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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79108e026959c5ea44bee36fe1ff35b3cba4e16d | 9,375 | h | C | Code/Core/Data/Common/vnsLoggerBase.h | spacebel/MAJA | 3e5d20bc9c744c610e608cfcf1f4c5c738d4de9e | [
"Apache-2.0"
] | 57 | 2020-09-30T08:51:22.000Z | 2021-12-19T20:28:30.000Z | Code/Core/Data/Common/vnsLoggerBase.h | spacebel/MAJA | 3e5d20bc9c744c610e608cfcf1f4c5c738d4de9e | [
"Apache-2.0"
] | 34 | 2020-09-29T21:27:22.000Z | 2022-02-03T09:56:45.000Z | Code/Core/Data/Common/vnsLoggerBase.h | spacebel/MAJA | 3e5d20bc9c744c610e608cfcf1f4c5c738d4de9e | [
"Apache-2.0"
] | 14 | 2020-10-11T13:17:59.000Z | 2022-03-09T15:58:19.000Z | /*
* Copyright (C) 2020 Centre National d'Etudes Spatiales (CNES)
*
* 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.
*
*/
/************************************************************************************************************
* *
* ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo *
* o *
* o *
* o *
* o *
* o ooooooo ooooooo o o oo *
* o o o o o o o o o o *
* o o o o o o o o o o *
* o o o o o o o o o o *
* o o o oooo o o o o o o *
* o o o o o o o o o *
* o o o o o o o o o o *
* oo oooooooo o o o oooooo o oooo *
* o *
* o *
* o o *
* o o oooo o o oooo *
* o o o o o o *
* o o ooo o o ooo *
* o o o o o *
* ooooo oooo o ooooo oooo *
* o *
* *
************************************************************************************************************
* *
* Author: CS Systemes d'Information (France) *
* *
************************************************************************************************************
* HISTORIQUE *
* *
* VERSION : 1.0.0 : FA : LAIG-FA-MAC-1987-CNES : 18 octobre 2016 : Correction qualite (destructeur virtuel)*
* VERSION : 1.0.0 : FA : LAIG-FA-MAC-148399-CS : 11 octobre 2016 : Audit code - Correction qualite *
* VERSION : 5-1-0 : FA : LAIG-FA-MAC-145739-CS : 27 juin 2016 : Audit code - Supp de la macro ITK_EXPORT *
* VERSION : 1-0-0 : <TypeFT> : <NumFT> : 15 décembre 2010 : Creation
* *
* FIN-HISTORIQUE *
* *
* $Id$
* *
************************************************************************************************************/
#ifndef __vnsLoggerBase_h
#define __vnsLoggerBase_h
#include "itkObject.h"
#include "itkObjectFactory.h"
#include "itkMultipleLogOutput.h"
#include "itkRealTimeClock.h"
namespace vns
{
/** \class LoggerBase
* \brief Class LoggerBase is meant for logging information during a run.
*
* \author Hee-Su Kim, Compute Science Dept. Kyungpook National University,
* ISIS Center, Georgetown University.
*
*
* \ingroup OSSystemObjects LoggingObjects
*/
class LoggerBase : public itk::Object
{
public:
typedef LoggerBase Self;
typedef itk::Object Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Run-time type information (and related methods). */
itkTypeMacro( LoggerBase, Object );
typedef itk::MultipleLogOutput::OutputType OutputType;
/** Definition of types of messages. These codes will be used to regulate
* the level of detail of messages reported to the final outputs */
typedef enum
{
SUPER_DEBUG = 0, DEBUG = 1, INFO = 2, PROGRESS = 3, WARNING = 4, ERROR_FATAL = 5
} LevelType;
itkSetStringMacro (Name);
itkGetStringMacro (Name);
/** Provides a default formatted log entry */
virtual std::string
BuildFormattedEntry(LevelType level, std::string const & content);
/** Set/Get the min priority level for the current logger. Only messages that have
* priorities equal or greater than the one set here will be posted to the
* current outputs */
itkSetEnumMacro(MinLevel,LevelType)
itkGetEnumMacro(MinLevel,LevelType)
/** Set/Get the max priority level for the current logger. Only messages that have
* priorities equal or lower than the one set here will be posted to the
* current outputs */
itkSetEnumMacro(MaxLevel, LevelType)
itkGetEnumMacro(MaxLevel, LevelType)
/** Registers another output stream with the multiple output. */
virtual void
AddLogOutput(OutputType* output);
/** Write formatted message */
virtual void
Write(LevelType level, std::string const & content);
/** Helper methods */
void
SuperDebug(std::string const& message)
{
this->Write(LoggerBase::SUPER_DEBUG, message);
}
void
Debug(std::string const& message)
{
this->Write(LoggerBase::DEBUG, message);
}
void
Info(std::string const& message)
{
this->Write(LoggerBase::INFO, message);
}
void
Progress(std::string const& message)
{
this->Write(LoggerBase::PROGRESS, message);
}
void
Warning(std::string const& message)
{
this->Write(LoggerBase::WARNING, message);
}
void
Error(std::string const& message)
{
this->Write(LoggerBase::ERROR_FATAL, message);
}
void SetStdLogLevel(std::string value);
virtual void
Flush();
protected:
/** Constructor */
LoggerBase();
/** Destructor */
virtual
~LoggerBase();
/** Print contents of a LoggerBase */
virtual void
PrintSelf(std::ostream &os, itk::Indent indent) const;
/** Build formatted date for output */
std::string
BuildFormattedDate();
protected:
std::string
GetLevelString(const LevelType & level);
LevelType m_MinLevel;
LevelType m_MaxLevel;
//PriorityLevelType m_LevelForFlushing;
itk::MultipleLogOutput::Pointer m_Output;
itk::RealTimeClock::Pointer m_Clock;
static std::string m_HumanReadableFormatDate;
static std::string m_HumanReadableFormatMicroSeconds;
static std::string m_PIDFormat;
static unsigned int m_NumberOfLevels;
std::string m_Name;
std::string m_ProcessorName;
std::string m_NodeName;
std::string m_PID;
};
// class LoggerBase
}// namespace vns
#endif // __vnsLoggerBase_h
| 44.43128 | 110 | 0.385707 |
7982940e4584dbfd65a4f37c40d9fcf72faddad7 | 761 | h | C | misc/pixtag.h | david-loffredo/pixscribe | 3ad6814427b19729db0952b0cb81a7b395e95824 | [
"Apache-2.0"
] | null | null | null | misc/pixtag.h | david-loffredo/pixscribe | 3ad6814427b19729db0952b0cb81a7b395e95824 | [
"Apache-2.0"
] | null | null | null | misc/pixtag.h | david-loffredo/pixscribe | 3ad6814427b19729db0952b0cb81a7b395e95824 | [
"Apache-2.0"
] | null | null | null | /* $RCSfile$
* $Revision$ $Date$
* Auth: Dave Loffredo (loffredo@steptools.com)
*
* Copyright (c) 2003-2008 by Dave Loffredo
* All Rights Reserved.
*
* This file is part of the PIXLIB software package
*
* This file may be distributed and/or modified under the terms of
* the GNU General Public License version 2 as published by the Free
* Software Foundation and appearing in the file LICENSE.GPL included
* with this file.
*
* THIS FILE IS PROVIDED "AS IS" WITH NO WARRANTY OF ANY KIND,
* INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE.
*
* ----------------------------------------
*
* Library for reading and writing the various protocols for
* encoding image file metadata.
*
*/
| 30.44 | 69 | 0.672799 |
e8115d15784997219d977200c28578a05159f313 | 3,903 | h | C | manager/ui_dialog.h | upcMvc/-BankQueuingSystem | 6eaec760f61430cb3a49692453b444982299e45f | [
"MIT"
] | 2 | 2016-07-20T02:23:51.000Z | 2017-09-02T09:44:52.000Z | manager/ui_dialog.h | upcMvc/bank-queue-system | 6eaec760f61430cb3a49692453b444982299e45f | [
"MIT"
] | null | null | null | manager/ui_dialog.h | upcMvc/bank-queue-system | 6eaec760f61430cb3a49692453b444982299e45f | [
"MIT"
] | null | null | null | /********************************************************************************
** Form generated from reading UI file 'dialog.ui'
**
** Created by: Qt User Interface Compiler version 5.7.0
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_DIALOG_H
#define UI_DIALOG_H
#include <QtCore/QVariant>
#include <QtWidgets/QAction>
#include <QtWidgets/QApplication>
#include <QtWidgets/QButtonGroup>
#include <QtWidgets/QDialog>
#include <QtWidgets/QHeaderView>
#include <QtWidgets/QLabel>
#include <QtWidgets/QPushButton>
#include <QtWidgets/QTextEdit>
QT_BEGIN_NAMESPACE
class Ui_Dialog
{
public:
QPushButton *pushButton;
QLabel *label;
QTextEdit *textEdit;
QLabel *label_2;
QTextEdit *textEdit_2;
QLabel *label_3;
QLabel *label_4;
QLabel *label_5;
void setupUi(QDialog *Dialog)
{
if (Dialog->objectName().isEmpty())
Dialog->setObjectName(QStringLiteral("Dialog"));
Dialog->resize(621, 435);
pushButton = new QPushButton(Dialog);
pushButton->setObjectName(QStringLiteral("pushButton"));
pushButton->setGeometry(QRect(140, 370, 81, 41));
label = new QLabel(Dialog);
label->setObjectName(QStringLiteral("label"));
label->setGeometry(QRect(30, 30, 151, 31));
textEdit = new QTextEdit(Dialog);
textEdit->setObjectName(QStringLiteral("textEdit"));
textEdit->setGeometry(QRect(20, 70, 221, 271));
label_2 = new QLabel(Dialog);
label_2->setObjectName(QStringLiteral("label_2"));
label_2->setGeometry(QRect(260, 20, 151, 41));
textEdit_2 = new QTextEdit(Dialog);
textEdit_2->setObjectName(QStringLiteral("textEdit_2"));
textEdit_2->setGeometry(QRect(260, 70, 291, 271));
label_3 = new QLabel(Dialog);
label_3->setObjectName(QStringLiteral("label_3"));
label_3->setGeometry(QRect(360, 370, 171, 31));
label_4 = new QLabel(Dialog);
label_4->setObjectName(QStringLiteral("label_4"));
label_4->setGeometry(QRect(300, 370, 54, 31));
label_5 = new QLabel(Dialog);
label_5->setObjectName(QStringLiteral("label_5"));
label_5->setGeometry(QRect(500, 10, 91, 31));
retranslateUi(Dialog);
QMetaObject::connectSlotsByName(Dialog);
} // setupUi
void retranslateUi(QDialog *Dialog)
{
Dialog->setWindowTitle(QApplication::translate("Dialog", "Dialog", 0));
pushButton->setText(QApplication::translate("Dialog", "\345\210\267\346\226\260", 0));
label->setText(QApplication::translate("Dialog", "\347\273\237\350\256\241\344\277\241\346\201\257\345\246\202\344\270\213", 0));
textEdit->setHtml(QApplication::translate("Dialog", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:'SimSun'; font-size:9pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">\346\200\273\346\216\222\351\230\237\344\272\272\346\225\260</p></body></html>", 0));
label_2->setText(QApplication::translate("Dialog", "\350\257\204\344\273\267\344\277\241\346\201\257\345\246\202\344\270\213", 0));
label_3->setText(QString());
label_4->setText(QApplication::translate("Dialog", "Time:", 0));
label_5->setText(QApplication::translate("Dialog", "\347\255\211\345\276\205\346\225\260\346\215\256", 0));
} // retranslateUi
};
namespace Ui {
class Dialog: public Ui_Dialog {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_DIALOG_H
| 40.65625 | 207 | 0.638483 |
e8530b8be96edf946bbd8fdcc5bd39906469e9ce | 2,353 | h | C | iPhoneOS14.0.sdk/System/Library/Frameworks/PassKit.framework/Headers/PKAddTicketConfiguration.h | quiprr/sdks-1 | f6735879039f4aea29a75a896b5386dfcc2ddacb | [
"MIT"
] | 1 | 2021-01-16T08:49:06.000Z | 2021-01-16T08:49:06.000Z | iPhoneOS14.0.sdk/System/Library/Frameworks/PassKit.framework/Headers/PKAddTicketConfiguration.h | quiprr/sdks-1 | f6735879039f4aea29a75a896b5386dfcc2ddacb | [
"MIT"
] | null | null | null | iPhoneOS14.0.sdk/System/Library/Frameworks/PassKit.framework/Headers/PKAddTicketConfiguration.h | quiprr/sdks-1 | f6735879039f4aea29a75a896b5386dfcc2ddacb | [
"MIT"
] | 1 | 2021-01-28T13:52:20.000Z | 2021-01-28T13:52:20.000Z | //
// PKAddTicketConfiguration.h
// PassKit
//
// Copyright © 2020 Apple, Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <CoreGraphics/CGImage.h>
#import <PassKit/PKAddSecureElementPassConfiguration.h>
NS_ASSUME_NONNULL_BEGIN
API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(watchos, tvos)
@interface PKTicketMetadata : NSObject
- (nullable instancetype)initWithProvisioningCredentialIdentifier:(NSString *)credentialIdentifier
cardConfigurationIdentifier:(NSString *)cardConfigurationIdentifier
sharingInstanceIdentifier:(NSString *)sharingInstanceIdentifier
passThumbnailImage:(nullable CGImageRef)passThumbnailImage
ownerDisplayName:(NSString *)ownerDisplayName
localizedDescription:(NSString *)localizedDescription;
@property (nonatomic, strong, readonly) NSString *credentialIdentifier;
@property (nonatomic, strong, readonly) NSString *cardConfigurationIdentifier;
@property (nonatomic, strong, readonly) NSString *sharingInstanceIdentifier;
@property (nonatomic, readonly) CGImageRef passThumbnailImage CF_RETURNS_NOT_RETAINED;
@property (nonatomic, strong, readonly) NSString *localizedDescription;
@property (nonatomic, strong, readonly) NSString *ownerDisplayName;
@end
typedef NS_ENUM(NSUInteger, PKAddTicketConfigurationPrimaryAction) {
PKAddTicketConfigurationPrimaryActionAdd,
PKAddTicketConfigurationPrimaryActionShare
} API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(watchos, tvos);
API_AVAILABLE(ios(14.0)) API_UNAVAILABLE(watchos, tvos)
@interface PKAddTicketConfiguration : PKAddSecureElementPassConfiguration
- (instancetype)initWithPrimaryAction:(PKAddTicketConfigurationPrimaryAction)action
ticketsMetadata:(NSArray<PKTicketMetadata *> *)metadata
provisioningPolicyIdentifier:(NSString *)policyIdentifier;
- (void)preflightWithCompletion:(void (^)(BOOL))completion;
@property (nonatomic, readonly) PKAddTicketConfigurationPrimaryAction primaryAction;
@property (nonatomic, strong, readonly) NSArray<PKTicketMetadata *> *ticketsMetadata;
@property (nonatomic, strong, readonly) NSString *provisioningPolicyIdentifier;
@end
NS_ASSUME_NONNULL_END
| 41.280702 | 105 | 0.747981 |
b295aae1e94b19d6dba67f6728b527f272802ec4 | 1,993 | h | C | include/fileos/filetree.h | napina/fileos | 44443d126d9c4faf1192196bfe88b556c4a7411f | [
"MIT"
] | 2 | 2017-05-10T06:05:54.000Z | 2021-03-31T13:14:49.000Z | include/fileos/filetree.h | napina/fileos | 44443d126d9c4faf1192196bfe88b556c4a7411f | [
"MIT"
] | null | null | null | include/fileos/filetree.h | napina/fileos | 44443d126d9c4faf1192196bfe88b556c4a7411f | [
"MIT"
] | null | null | null | /*=============================================================================
Copyright (c) 2014 Ville Ruusutie
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
=============================================================================*/
#pragma once
#ifndef fileos_filetree_h
#define fileos_filetree_h
#include "fileos/common.h"
#include "fileos/fileinfo.h"
#include "fileos/path.h"
#include "containos/list.h"
namespace fileos {
class FileTree
{
public:
typedef containos::List<FileInfo>::const_iterator const_iterator;
FileTree(size_t capasity);
~FileTree();
void addFile(FileInfo const* fileInfo);
void removeFile(Path const& path);
void addFolder(Path const& path);
void removeFolder(Path const& path);
FileInfo const* findFile(Path const& path) const;
const_iterator begin() const;
const_iterator end() const;
size_t fileCount() const;
protected:
containos::List<FileInfo> m_fileInfos;
};
} // end of fileos
#include "fileos/filetree.inl"
#endif
| 31.634921 | 79 | 0.707476 |
58ab1a1f11b5ef41926e2b1b5f317576c8322884 | 21,611 | h | C | Source/rAthena/map/battle.h | piaoasd123/rathenaPurified | d33fe66cd8ea9fbfea196d8ef80e4909358be67b | [
"BSD-3-Clause"
] | null | null | null | Source/rAthena/map/battle.h | piaoasd123/rathenaPurified | d33fe66cd8ea9fbfea196d8ef80e4909358be67b | [
"BSD-3-Clause"
] | null | null | null | Source/rAthena/map/battle.h | piaoasd123/rathenaPurified | d33fe66cd8ea9fbfea196d8ef80e4909358be67b | [
"BSD-3-Clause"
] | null | null | null | // Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
#ifndef _BATTLE_H_
#define _BATTLE_H_
#include "../common/mmo.h"
#include "../config/core.h"
#include "map.h" //ELE_MAX
/// State of a single attack attempt; used in flee/def penalty calculations when mobbed
typedef enum damage_lv {
ATK_NONE, /// Not an attack
ATK_LUCKY, /// Attack was lucky-dodged
ATK_FLEE, /// Attack was dodged
ATK_MISS, /// Attack missed because of element/race modifier.
ATK_BLOCK, /// Attack was blocked by some skills.
ATK_DEF /// Attack connected
} damage_lv;
/// Flag of the final calculation
enum e_battle_flag {
BF_WEAPON = 0x0001, /// Weapon attack
BF_MAGIC = 0x0002, /// Magic attack
BF_MISC = 0x0004, /// Misc attack
BF_SHORT = 0x0010, /// Short attack
BF_LONG = 0x0040, /// Long attack
BF_SKILL = 0x0100, /// Skill attack
BF_NORMAL = 0x0200, /// Normal attack
BF_WEAPONMASK = BF_WEAPON|BF_MAGIC|BF_MISC, /// Weapon attack mask
BF_RANGEMASK = BF_SHORT|BF_LONG, /// Range attack mask
BF_SKILLMASK = BF_SKILL|BF_NORMAL, /// Skill attack mask
};
/// Battle check target [Skotlex]
enum e_battle_check_target {
BCT_NOONE = 0x000000, ///< No one
BCT_SELF = 0x010000, ///< Self
BCT_ENEMY = 0x020000, ///< Enemy
BCT_PARTY = 0x040000, ///< Party members
BCT_GUILDALLY = 0x080000, ///< Only allies, NOT guildmates
BCT_NEUTRAL = 0x100000, ///< Neutral target
BCT_SAMEGUILD = 0x200000, ///< Guildmates, No Guild Allies
BCT_ALL = 0x3F0000, ///< All targets
BCT_WOS = 0x400000, ///< Except self (currently used for skipping if src == bl in skill_area_sub)
BCT_GUILD = BCT_SAMEGUILD|BCT_GUILDALLY, ///< Guild AND Allies (BCT_SAMEGUILD|BCT_GUILDALLY)
BCT_NOGUILD = BCT_ALL&~BCT_GUILD, ///< Except guildmates
BCT_NOPARTY = BCT_ALL&~BCT_PARTY, ///< Except party members
BCT_NOENEMY = BCT_ALL&~BCT_ENEMY, ///< Except enemy
};
/// Damage structure
struct Damage {
#ifdef RENEWAL
int64 statusAtk, statusAtk2, weaponAtk, weaponAtk2, equipAtk, equipAtk2, masteryAtk, masteryAtk2;
#endif
int64 damage, /// Right hand damage
damage2; /// Left hand damage
char type; /// chk clif_damage for type (clif.h enum e_damage_type)
short div_; /// Number of hit
int amotion,
dmotion;
int blewcount; /// Number of knockback
int flag; /// chk e_battle_flag
int miscflag;
enum damage_lv dmg_lv; /// ATK_LUCKY,ATK_FLEE,ATK_DEF
bool isspdamage; /// Display blue damage numbers in clif_damage
};
//(Used in read pc.c,) attribute table (battle_attr_fix)
extern int attr_fix_table[4][ELE_MAX][ELE_MAX];
struct map_session_data;
struct mob_data;
struct block_list;
// Damage Calculation
struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,uint16 skill_id,uint16 skill_lv,int flag);
struct Damage battle_calc_attack_plant(struct Damage wd, struct block_list *src,struct block_list *target, uint16 skill_id, uint16 skill_lv);
int64 battle_calc_return_damage(struct block_list *bl, struct block_list *src, int64 *, int flag, uint16 skill_id, bool status_reflect);
void battle_drain(struct map_session_data *sd, struct block_list *tbl, int64 rdamage, int64 ldamage, int race, int class_);
void battle_vanish(struct map_session_data *sd, struct block_list *target, struct Damage *wd);
int battle_attr_ratio(int atk_elem,int def_type, int def_lv);
int64 battle_attr_fix(struct block_list *src, struct block_list *target, int64 damage,int atk_elem,int def_type, int def_lv);
int battle_calc_cardfix(int attack_type, struct block_list *src, struct block_list *target, int nk, int s_ele, int s_ele_, int64 damage, int left, int flag);
// Final calculation Damage
int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int64 damage,uint16 skill_id,uint16 skill_lv);
int64 battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int64 damage,uint16 skill_id,int flag);
int64 battle_calc_bg_damage(struct block_list *src,struct block_list *bl,int64 damage,uint16 skill_id,int flag);
void battle_damage(struct block_list *src, struct block_list *target, int64 damage, int delay, uint16 skill_lv, uint16 skill_id, enum damage_lv dmg_lv, unsigned short attack_type, bool additional_effects, unsigned int tick, bool spdamage);
int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, uint16 skill_id, uint16 skill_lv, int64 damage, enum damage_lv dmg_lv, int ddelay, bool additional_effects, bool spdamage);
// Summary normal attack treatment (basic attack)
enum damage_lv battle_weapon_attack( struct block_list *bl,struct block_list *target,unsigned int tick,int flag);
// Accessors
struct block_list* battle_get_master(struct block_list *src);
struct block_list* battle_gettargeted(struct block_list *target);
struct block_list* battle_getenemy(struct block_list *target, int type, int range);
int battle_gettarget(struct block_list *bl);
int battle_getcurrentskill(struct block_list *bl);
#define is_boss(bl) ( status_get_class_(bl) == CLASS_BOSS ) // Can refine later [Aru]
int battle_check_undead(int race,int element);
int battle_check_target(struct block_list *src, struct block_list *target,int flag);
bool battle_check_range(struct block_list *src,struct block_list *bl,int range);
void battle_consume_ammo(struct map_session_data* sd, int skill, int lv);
bool is_infinite_defense(struct block_list *target, int flag);
// Settings
#define MIN_HAIR_STYLE battle_config.min_hair_style
#define MAX_HAIR_STYLE battle_config.max_hair_style
#define MIN_HAIR_COLOR battle_config.min_hair_color
#define MAX_HAIR_COLOR battle_config.max_hair_color
#define MIN_CLOTH_COLOR battle_config.min_cloth_color
#define MAX_CLOTH_COLOR battle_config.max_cloth_color
#define MIN_BODY_STYLE battle_config.min_body_style
#define MAX_BODY_STYLE battle_config.max_body_style
extern struct Battle_Config
{
int warp_point_debug;
int enable_critical;
int mob_critical_rate;
int critical_rate;
int enable_baseatk;
int enable_perfect_flee;
int cast_rate, delay_rate;
int delay_dependon_dex, delay_dependon_agi;
int sdelay_attack_enable;
int left_cardfix_to_right;
int skill_add_range;
int skill_out_range_consume;
int skill_amotion_leniency;
int skillrange_by_distance; //[Skotlex]
int use_weapon_skill_range; //[Skotlex]
int pc_damage_delay_rate;
int defnotenemy;
int vs_traps_bctall;
int traps_setting;
int summon_flora; //[Skotlex]
int clear_unit_ondeath; //[Skotlex]
int clear_unit_onwarp; //[Skotlex]
int random_monster_checklv;
int attr_recover;
int item_auto_get;
int flooritem_lifetime;
int item_first_get_time;
int item_second_get_time;
int item_third_get_time;
int mvp_item_first_get_time;
int mvp_item_second_get_time;
int mvp_item_third_get_time;
int base_exp_rate,job_exp_rate;
int drop_rate0item;
int death_penalty_type;
int death_penalty_base,death_penalty_job;
int pvp_exp; // [MouseJstr]
int gtb_sc_immunity;
int zeny_penalty;
int restart_hp_rate;
int restart_sp_rate;
int mvp_exp_rate;
int mvp_hp_rate;
int monster_hp_rate;
int monster_max_aspd;
int view_range_rate;
int chase_range_rate;
int atc_spawn_quantity_limit;
int atc_slave_clone_limit;
int partial_name_scan;
int skillfree;
int skillup_limit;
int wp_rate;
int pp_rate;
int monster_active_enable;
int monster_damage_delay_rate;
int monster_loot_type;
int mob_skill_rate; //[Skotlex]
int mob_skill_delay; //[Skotlex]
int mob_count_rate;
int no_spawn_on_player; //[Skotlex]
int force_random_spawn; //[Skotlex]
int mob_spawn_delay, plant_spawn_delay, boss_spawn_delay; // [Skotlex]
int slaves_inherit_mode;
int slaves_inherit_speed;
int summons_trigger_autospells;
int pc_walk_delay_rate; //Adjusts can't walk delay after being hit for players. [Skotlex]
int walk_delay_rate; //Adjusts can't walk delay after being hit. [Skotlex]
int multihit_delay; //Adjusts can't walk delay per hit on multi-hitting skills. [Skotlex]
int quest_skill_learn;
int quest_skill_reset;
int basic_skill_check;
int guild_emperium_check;
int guild_exp_limit;
int guild_max_castles;
int guild_skill_relog_delay;
int emergency_call;
int guild_aura;
int pc_invincible_time;
int pet_catch_rate;
int pet_rename;
int pet_friendly_rate;
int pet_hungry_delay_rate;
int pet_hungry_friendly_decrease;
int pet_status_support;
int pet_attack_support;
int pet_damage_support;
int pet_support_min_friendly; //[Skotlex]
int pet_equip_min_friendly;
int pet_support_rate;
int pet_attack_exp_to_master;
int pet_attack_exp_rate;
int pet_lv_rate; //[Skotlex]
int pet_max_stats; //[Skotlex]
int pet_max_atk1; //[Skotlex]
int pet_max_atk2; //[Skotlex]
int pet_no_gvg; //Disables pets in gvg. [Skotlex]
int pet_equip_required;
int skill_min_damage;
int finger_offensive_type;
int heal_exp;
int max_heal_lv;
int max_heal; //Mitternacht
int resurrection_exp;
int shop_exp;
int combo_delay_rate;
int item_check;
int item_use_interval; //[Skotlex]
int cashfood_use_interval;
int wedding_modifydisplay;
int wedding_ignorepalette; //[Skotlex]
int xmas_ignorepalette; // [Valaris]
int summer_ignorepalette; // [Zephyrus]
int hanbok_ignorepalette;
int oktoberfest_ignorepalette;
int natural_healhp_interval;
int natural_healsp_interval;
int natural_heal_skill_interval;
int natural_heal_weight_rate;
int arrow_decrement;
int max_aspd;
int max_walk_speed; //Maximum walking speed after buffs [Skotlex]
int max_hp;
int max_sp;
int max_lv, aura_lv;
int max_parameter, max_baby_parameter;
int max_cart_weight;
int skill_log;
int battle_log;
int etc_log;
int save_clothcolor;
int undead_detect_type;
int auto_counter_type;
int min_hitrate; //[Skotlex]
int max_hitrate; //[Skotlex]
int agi_penalty_target;
int agi_penalty_type;
int agi_penalty_count;
int agi_penalty_num;
int vit_penalty_target;
int vit_penalty_type;
int vit_penalty_count;
int vit_penalty_num;
int weapon_defense_type;
int magic_defense_type;
int skill_reiteration;
int skill_nofootset;
int pc_cloak_check_type;
int monster_cloak_check_type;
int estimation_type;
int gvg_short_damage_rate;
int gvg_long_damage_rate;
int gvg_weapon_damage_rate;
int gvg_magic_damage_rate;
int gvg_misc_damage_rate;
int gvg_flee_penalty;
int pk_short_damage_rate;
int pk_long_damage_rate;
int pk_weapon_damage_rate;
int pk_magic_damage_rate;
int pk_misc_damage_rate;
int mob_changetarget_byskill;
int attack_direction_change;
int land_skill_limit;
int monster_class_change_recover;
int produce_item_name_input;
int display_skill_fail;
int chat_warpportal;
int mob_warp;
int dead_branch_active;
int vending_max_value;
int vending_over_max;
int vending_tax;
int show_steal_in_same_party;
int party_share_type;
int party_hp_mode;
int party_show_share_picker;
int show_picker_item_type;
int attack_attr_none;
int item_rate_mvp, item_rate_common, item_rate_common_boss, item_rate_card, item_rate_card_boss,
item_rate_equip, item_rate_equip_boss, item_rate_heal, item_rate_heal_boss, item_rate_use,
item_rate_use_boss, item_rate_treasure, item_rate_adddrop;
int logarithmic_drops;
int item_drop_common_min,item_drop_common_max; // Added by TyrNemesis^
int item_drop_card_min,item_drop_card_max;
int item_drop_equip_min,item_drop_equip_max;
int item_drop_mvp_min,item_drop_mvp_max; // End Addition
int item_drop_mvp_mode; //rAthena addition [Playtester]
int item_drop_heal_min,item_drop_heal_max; // Added by Valatris
int item_drop_use_min,item_drop_use_max; //End
int item_drop_treasure_min,item_drop_treasure_max; //by [Skotlex]
int item_drop_adddrop_min,item_drop_adddrop_max; //[Skotlex]
int prevent_logout; // Added by RoVeRT
int alchemist_summon_reward; // [Valaris]
int drops_by_luk;
int drops_by_luk2;
int equip_natural_break_rate; //Base Natural break rate for attacks.
int equip_self_break_rate; //Natural & Penalty skills break rate
int equip_skill_break_rate; //Offensive skills break rate
int multi_level_up;
int max_exp_gain_rate; //Max amount of exp bar % you can get in one go.
int pk_mode;
int pk_level_range;
int manner_system; // end additions [Valaris]
int show_mob_info;
int gx_allhit;
int gx_disptype;
int devotion_level_difference;
int player_skill_partner_check;
int invite_request_check;
int skill_removetrap_type;
int disp_experience;
int disp_zeny;
int castle_defense_rate;
int backstab_bow_penalty;
int hp_rate;
int sp_rate;
int bone_drop;
int buyer_name;
int dancing_weaponswitch_fix;
// eAthena additions
int night_at_start; // added by [Yor]
int day_duration; // added by [Yor]
int night_duration; // added by [Yor]
int ban_hack_trade; // added by [Yor]
int packet_ver_flag; // added by [Yor]
int packet_ver_flag2; // expend of packet_ver_flag
int min_hair_style; // added by [MouseJstr]
int max_hair_style; // added by [MouseJstr]
int min_hair_color; // added by [MouseJstr]
int max_hair_color; // added by [MouseJstr]
int min_cloth_color; // added by [MouseJstr]
int max_cloth_color; // added by [MouseJstr]
int pet_hair_style; // added by [Skotlex]
int castrate_dex_scale; // added by [MouseJstr]
int area_size; // added by [MouseJstr]
int max_def, over_def_bonus; //added by [Skotlex]
int zeny_from_mobs; // [Valaris]
int mobs_level_up; // [Valaris]
int mobs_level_up_exp_rate; // [Valaris]
int pk_min_level; // [celest]
int skill_steal_max_tries; //max steal skill tries on a mob. if 0, then w/o limit [Lupus]
int motd_type; // [celest]
int finding_ore_rate; // orn
int exp_calc_type;
int exp_bonus_attacker;
int exp_bonus_max_attacker;
int min_skill_delay_limit;
int default_walk_delay;
int no_skill_delay;
int attack_walk_delay;
int require_glory_guild;
int idle_no_share;
int party_update_interval;
int party_even_share_bonus;
int delay_battle_damage;
int hide_woe_damage;
int display_version;
int display_hallucination; // [Skotlex]
int use_statpoint_table; // [Skotlex]
int ignore_items_gender; //[Lupus]
int berserk_cancels_buffs; // [Aru]
int debuff_on_logout; // Removes a few "official" negative Scs on logout. [Skotlex]
int mob_ai; //Configures various mob_ai settings to make them smarter or dumber(official). [Skotlex]
int hom_setting; //Configures various homunc settings which make them behave unlike normal characters.. [Skotlex]
int dynamic_mobs; // Dynamic Mobs [Wizputer] - battle_athena flag implemented by [random]
int mob_remove_damaged; // Dynamic Mobs - Remove mobs even if damaged [Wizputer]
int mob_remove_delay; // Dynamic Mobs - delay before removing mobs from a map [Skotlex]
int mob_active_time; //Duration through which mobs execute their Hard AI after players leave their area of sight.
int boss_active_time;
int show_hp_sp_drain, show_hp_sp_gain; //[Skotlex]
int mob_npc_event_type; //Determines on who the npc_event is executed. [Skotlex]
int character_size; // if riders have size=2, and baby class riders size=1 [Lupus]
int mob_max_skilllvl; // Max possible skill level [Lupus]
int rare_drop_announce; // chance <= to show rare drops global announces
int retaliate_to_master; //Whether when a mob is attacked by another mob, it will retaliate versus the mob or the mob's master. [Skotlex]
int duel_allow_pvp; // [LuzZza]
int duel_allow_gvg; // [LuzZza]
int duel_allow_teleport; // [LuzZza]
int duel_autoleave_when_die; // [LuzZza]
int duel_time_interval; // [LuzZza]
int duel_only_on_same_map; // [Toms]
int skip_teleport_lv1_menu; // possibility to disable (skip) Teleport Lv1 menu, that have only two lines `Random` and `Cancel` [LuzZza]
int allow_skill_without_day; // [Komurka]
int allow_es_magic_pc; // [Skotlex]
int skill_wall_check; // [Skotlex]
int official_cell_stack_limit; // [Playtester]
int custom_cell_stack_limit; // [Skotlex]
int skill_caster_check; // [Skotlex]
int sc_castcancel; // [Skotlex]
int pc_sc_def_rate; // [Skotlex]
int mob_sc_def_rate;
int pc_max_sc_def;
int mob_max_sc_def;
int sg_angel_skill_ratio;
int sg_miracle_skill_ratio;
int sg_miracle_skill_duration;
int autospell_stacking; //Enables autospell cards to stack. [Skotlex]
int override_mob_names; //Enables overriding spawn mob names with the mob_db names. [Skotlex]
int min_chat_delay; //Minimum time between client messages. [Skotlex]
int friend_auto_add; //When accepting friends, both get friended. [Skotlex]
int hvan_explosion_intimate; // fix [albator]
int hom_rename;
int homunculus_show_growth ; //[orn]
int homunculus_friendly_rate;
int quest_exp_rate;
int autotrade_mapflag;
int at_timeout;
int homunculus_autoloot;
int idle_no_autoloot;
int max_guild_alliance;
int ksprotection;
int auction_feeperhour;
int auction_maximumprice;
int homunculus_auto_vapor; //Keep Homunculus from Vaporizing when master dies. [L0ne_W0lf]
int display_status_timers; //Show or hide skill buff/delay timers in recent clients [Sara]
int skill_add_heal_rate; //skills that bHealPower has effect on [Inkfish]
int eq_single_target_reflectable;
int invincible_nodamage;
int mob_slave_keep_target;
int autospell_check_range; //Enable range check for autospell bonus. [L0ne_W0lf]
int knockback_left;
int client_reshuffle_dice; // Reshuffle /dice
int client_sort_storage;
int feature_buying_store;
int feature_search_stores;
int searchstore_querydelay;
int searchstore_maxresults;
int display_party_name;
int cashshop_show_points;
int mail_show_status;
int client_limit_unit_lv;
int hom_max_level;
int hom_S_max_level;
int hom_S_growth_level;
// [BattleGround Settings]
int bg_update_interval;
int bg_short_damage_rate;
int bg_long_damage_rate;
int bg_weapon_damage_rate;
int bg_magic_damage_rate;
int bg_misc_damage_rate;
int bg_flee_penalty;
// rAthena
int max_third_parameter;
int max_baby_third_parameter;
int max_trans_parameter;
int max_third_trans_parameter;
int max_extended_parameter;
int max_summoner_parameter;
int max_third_aspd;
int vcast_stat_scale;
int mvp_tomb_enabled;
int atcommand_suggestions_enabled;
int min_npc_vendchat_distance;
int atcommand_mobinfo_type;
int mob_size_influence; // Enable modifications on earned experience, drop rates and monster status depending on monster size. [mkbu95]
int skill_trap_type;
int allow_consume_restricted_item;
int allow_equip_restricted_item;
int max_walk_path;
int item_enabled_npc;
int item_onfloor; // Whether to drop an undroppable item on the map or destroy it if inventory is full.
int bowling_bash_area;
int drop_rateincrease;
int feature_auction;
int feature_banking;
int vip_storage_increase;
int vip_base_exp_increase;
int vip_job_exp_increase;
int vip_bm_increase;
int vip_drop_increase;
int vip_gemstone;
int vip_exp_penalty_base_normal;
int vip_exp_penalty_base;
int vip_exp_penalty_job_normal;
int vip_exp_penalty_job;
int vip_disp_rate;
int mon_trans_disable_in_gvg;
int emblem_woe_change;
int emblem_transparency_limit;
int discount_item_point_shop;
int update_enemy_position;
int devotion_rdamage;
// autotrade persistency
int feature_autotrade;
int feature_autotrade_direction;
int feature_autotrade_head_direction;
int feature_autotrade_sit;
int feature_autotrade_open_delay;
// Fame points
int fame_taekwon_mission;
int fame_refine_lv1;
int fame_refine_lv2;
int fame_refine_lv3;
int fame_forge;
int fame_pharmacy_3;
int fame_pharmacy_5;
int fame_pharmacy_7;
int fame_pharmacy_10;
int disp_serverbank_msg;
int disp_servervip_msg;
int warg_can_falcon;
int path_blown_halt;
int rental_mount_speed_boost;
int warp_suggestions_enabled;
int taekwon_mission_mobname;
int teleport_on_portal;
int cart_revo_knockback;
int guild_notice_changemap;
int transcendent_status_points;
int taekwon_ranker_min_lv;
int revive_onwarp;
int mail_delay;
int autotrade_monsterignore;
int idletime_option;
int spawn_direction;
int arrow_shower_knockback;
int devotion_rdamage_skill_only;
int max_extended_aspd;
int mob_chase_refresh; //How often a monster should refresh its chase [Playtester]
int mob_icewall_walk_block; //How a normal monster should be trapped in icewall [Playtester]
int boss_icewall_walk_block; //How a boss monster should be trapped in icewall [Playtester]
int snap_dodge; // Enable or disable dodging damage snapping away [csnv]
int stormgust_knockback;
int default_fixed_castrate;
int default_bind_on_equip;
int pet_ignore_infinite_def; // Makes fixed damage of petskillattack2 ignores infinite defense
int homunculus_evo_intimacy_need;
int homunculus_evo_intimacy_reset;
int monster_loot_search_type;
int feature_roulette;
int monster_hp_bars_info;
int min_body_style;
int max_body_style;
int save_body_style;
int mob_eye_range_bonus; //Vulture's Eye and Snake's Eye range bonus
int mob_stuck_warning; //Show warning if a monster is stuck too long
int skill_eightpath_algorithm; //Official path algorithm
int death_penalty_maxlv;
int exp_cost_redemptio;
int exp_cost_redemptio_limit;
int exp_cost_inspiration;
int mvp_exp_reward_message;
int can_damage_skill; //Which BL types can damage traps
} battle_config;
void do_init_battle(void);
void do_final_battle(void);
extern int battle_config_read(const char *cfgName);
extern void battle_validate_conf(void);
extern void battle_set_defaults(void);
int battle_set_value(const char* w1, const char* w2);
int battle_get_value(const char* w1);
//
struct block_list* battle_getenemyarea(struct block_list *src, int x, int y, int range, int type, int ignore_id);
/**
* Royal Guard
**/
int battle_damage_area( struct block_list *bl, va_list ap);
#endif /* _BATTLE_H_ */
| 34.248811 | 248 | 0.797048 |
58ab22798ee0389723c42d74f6d4cf201f1435a6 | 1,409 | h | C | talk/owt/sdk/include/cpp/owt/base/logging.h | AoEiuV020/owt-client-native | 7fc498347b20149fd1a4fd7ff84fa891548c9a84 | [
"Apache-2.0"
] | 294 | 2019-02-20T01:44:34.000Z | 2022-03-30T15:52:55.000Z | talk/owt/sdk/include/cpp/owt/base/logging.h | AoEiuV020/owt-client-native | 7fc498347b20149fd1a4fd7ff84fa891548c9a84 | [
"Apache-2.0"
] | 335 | 2019-02-20T11:54:49.000Z | 2022-03-29T14:26:34.000Z | talk/owt/sdk/include/cpp/owt/base/logging.h | AoEiuV020/owt-client-native | 7fc498347b20149fd1a4fd7ff84fa891548c9a84 | [
"Apache-2.0"
] | 163 | 2019-02-18T06:56:26.000Z | 2022-03-30T13:37:24.000Z | // Copyright (C) <2018> Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
#ifndef OWT_BASE_LOGGING_H_
#define OWT_BASE_LOGGING_H_
namespace owt {
namespace base {
enum class LoggingSeverity : int {
/// Information which should only be logged with the consent of the user, due to privacy concerns.
kSensitive = 1,
/// This level is for data which we do not want to appear in the normal debug log, but should appear in diagnostic logs.
kVerbose,
/// Chatty level used in debugging for all sorts of things, the default in debug builds.
kInfo,
/// Something that may warrant investigation.
kWarning,
/// Something that should not have occurred.
kError,
/// Don't log.
kNone
};
/// Logger configuration class. Choose either LogToConsole or LogToFileRotate in
/// your application for logging to console or file.
class Logging final {
public:
/// Set logging severity. All logging messages with higher severity will be
/// logged.
static void Severity(LoggingSeverity severity);
/// Get current logging severity.
static LoggingSeverity Severity();
/// Set logging to console
static void LogToConsole(LoggingSeverity severity);
/// Set logging to files under provided dir rotately.
static void LogToFileRotate(LoggingSeverity severity, std::string& dir, size_t max_log_size);
private:
static LoggingSeverity min_severity_;
};
}
}
#endif // OWT_BASE_LOGGING_H
| 34.365854 | 122 | 0.749468 |
d790c6b5d0c151a0bb2337b25b5d5d8ad1e9210b | 992 | h | C | HiveWE/Map.h | Retera/HiveWE | 82d757ed13420fcd31e63b23670bf09ce3cf82f0 | [
"MIT"
] | 3 | 2019-07-18T07:32:25.000Z | 2021-08-18T20:04:40.000Z | HiveWE/Map.h | Retera/HiveWE | 82d757ed13420fcd31e63b23670bf09ce3cf82f0 | [
"MIT"
] | null | null | null | HiveWE/Map.h | Retera/HiveWE | 82d757ed13420fcd31e63b23670bf09ce3cf82f0 | [
"MIT"
] | 1 | 2020-01-20T12:00:34.000Z | 2020-01-20T12:00:34.000Z | #pragma once
class Map {
public:
bool loaded = false;
TriggerStrings trigger_strings;
Triggers triggers;
MapInfo info;
Terrain terrain;
TerrainUndo terrain_undo;
PathingMap pathing_map;
Imports imports;
Doodads doodads;
Units units;
Regions regions;
GameCameras cameras;
Sounds sounds;
Brush* brush = nullptr;
bool is_protected = false;
bool units_loaded = false;
bool enforce_water_height_limits = true;
bool render_doodads = true;
bool render_units = true;
bool render_pathing = true;
bool render_brush = true;
bool render_lighting = true;
bool render_wireframe = false;
bool render_debug = false;
fs::path filesystem_path;
// For instancing
std::vector<StaticMesh*> meshes;
std::chrono::steady_clock::time_point last_time = std::chrono::high_resolution_clock::now();
double total_time;
~Map();
void load(const fs::path& path);
bool save(const fs::path& path, bool switch_working = true);
void play_test();
void render(int width, int height);
}; | 20.244898 | 93 | 0.746976 |
b59a9e76e8b7698dceab13df6a527732a4b0025b | 261 | c | C | Example/build/Pods.build/Debug-iphonesimulator/sdk.build/DerivedSources/sdk_vers.c | tnb107/SLG_SDK | 14fc89d2fcab1cf8f6134b9b767ea6c44e775d3e | [
"MIT"
] | null | null | null | Example/build/Pods.build/Debug-iphonesimulator/sdk.build/DerivedSources/sdk_vers.c | tnb107/SLG_SDK | 14fc89d2fcab1cf8f6134b9b767ea6c44e775d3e | [
"MIT"
] | null | null | null | Example/build/Pods.build/Debug-iphonesimulator/sdk.build/DerivedSources/sdk_vers.c | tnb107/SLG_SDK | 14fc89d2fcab1cf8f6134b9b767ea6c44e775d3e | [
"MIT"
] | null | null | null | extern const unsigned char sdkVersionString[];
extern const double sdkVersionNumber;
const unsigned char sdkVersionString[] __attribute__ ((used)) = "@(#)PROGRAM:sdk PROJECT:Pods-1" "\n";
const double sdkVersionNumber __attribute__ ((used)) = (double)1.;
| 43.5 | 104 | 0.750958 |
b3f80f1343b8e099b552b4e8087dd027ffe03155 | 207 | c | C | lib/charbuffer/append.c | peter-mount/libarea51 | 6cdb8ed38c7cd5764e8a895cf9ab9d3189c8b117 | [
"Apache-2.0"
] | null | null | null | lib/charbuffer/append.c | peter-mount/libarea51 | 6cdb8ed38c7cd5764e8a895cf9ab9d3189c8b117 | [
"Apache-2.0"
] | null | null | null | lib/charbuffer/append.c | peter-mount/libarea51 | 6cdb8ed38c7cd5764e8a895cf9ab9d3189c8b117 | [
"Apache-2.0"
] | null | null | null | /**
* Handles an extensible reusable char buffer
*/
#include <string.h>
#include <area51/charbuffer.h>
int charbuffer_append(CharBuffer *b, char *src) {
return charbuffer_put(b, src, strlen(src));
}
| 18.818182 | 49 | 0.705314 |
24d53c29f74ee6af057c7c70859a1a9b030e343a | 3,407 | c | C | src/Utility/ACE/xmvis6/timewin.c | rustychris/schism | 3754530ef57b3a058906432b4a9fca4a670f395e | [
"Apache-2.0"
] | 42 | 2019-08-12T21:48:24.000Z | 2022-03-03T03:08:10.000Z | src/Utility/ACE/xmvis6/timewin.c | rustychris/schism | 3754530ef57b3a058906432b4a9fca4a670f395e | [
"Apache-2.0"
] | 42 | 2019-08-19T21:57:12.000Z | 2022-03-03T17:42:01.000Z | src/Utility/ACE/xmvis6/timewin.c | rustychris/schism | 3754530ef57b3a058906432b4a9fca4a670f395e | [
"Apache-2.0"
] | 51 | 2019-08-09T20:59:07.000Z | 2022-03-29T15:48:43.000Z | /*
* ACE/vis - Visualization of Flow and Transport
*
* Paul J. Turner and Antonio M. Baptista
*
* Copyright 1990-2003 Oregon Health and Science University
* All Rights Reserved
*
*/
/*
* VIS clock routine
*/
#ifndef lint
static char RCSid[] = "$Id: timewin.c,v 1.4 2003/10/07 04:40:14 pturner Exp $";
#endif
#include "motifinc.h"
#include "defines.h"
#include "globals.h"
extern Widget app_shell;
extern XmStringCharSet charset;
static Widget time_frame;
static Widget time_panel;
void create_time_frame(void);
static void update_time(void);
void set_clock(int type, double start, double stop, double step, int nsteps);
/*
* Panel item declarations
*/
static Widget time_start_item;
static Widget time_step_item;
static Widget time_nsteps_item;
static Widget time_interp_item;
static Widget *time_skip_item;
/*
* Event and Notify proc declarations
*/
void time_accept_proc(void);
void create_time_frame(void)
{
Widget wbut, fr, bb, sep, rc, rc2;
int i, got_one = 0;;
setistop();
if (!time_frame) {
time_frame = XmCreateDialogShell(app_shell, "Time", NULL, 0);
handle_close(time_frame);
time_panel = XmCreateRowColumn(time_frame, "time_rc", NULL, 0);
time_start_item = CreateTextItem2(time_panel, 10, "Start time:");
time_step_item = CreateTextItem2(time_panel, 10, "Time step:");
time_nsteps_item = CreateTextItem2(time_panel, 10, "Number of steps:");
rc = XmCreateRowColumn(time_panel, "rc", NULL, 0);
XtVaSetValues(rc, XmNorientation, XmHORIZONTAL, NULL);
wbut = XtVaCreateManagedWidget("Accept", xmPushButtonWidgetClass, rc, NULL);
XtAddCallback(wbut, XmNactivateCallback, (XtCallbackProc) time_accept_proc, NULL);
wbut = XtVaCreateManagedWidget("Done", xmPushButtonWidgetClass, rc, NULL);
XtAddCallback(wbut, XmNactivateCallback, (XtCallbackProc) destroy_dialog, time_frame);
XtManageChild(rc);
XtManageChild(time_panel);
}
update_time();
XtRaise(time_frame);
}
void print_clock(void)
{
printf("Start = %lf\n", timeclock.start);
printf("Stop = %lf\n", timeclock.stop);
printf("Step = %lf\n", timeclock.step);
printf("Nsteps = %d\n", timeclock.nsteps);
}
void time_accept_proc(void)
{
char buf[256];
timeclock.type = 1;
timeclock.start = atof((char *) xv_getstr(time_start_item));
timeclock.step = atof((char *) xv_getstr(time_step_item));
timeclock.nsteps = atoi((char *) xv_getstr(time_nsteps_item));
set_clock(timeclock.type, timeclock.start, timeclock.stop, timeclock.step, timeclock.nsteps);
}
static void update_time(void)
{
char buf[256];
if (time_frame) {
sprintf(buf, "%.3lf", timeclock.start);
xv_setstr(time_start_item, buf);
sprintf(buf, "%.3lf", timeclock.step);
xv_setstr(time_step_item, buf);
sprintf(buf, "%d", timeclock.nsteps);
xv_setstr(time_nsteps_item, buf);
}
}
void set_clock(int type, double start, double stop, double step, int nsteps)
{
char buf[256];
int i;
if (timeclock.nsteps > 0 && timeclock.t != NULL) {
free(timeclock.t);
}
timeclock.start = start;
timeclock.stop = stop;
timeclock.step = step;
timeclock.curstep = 0;
timeclock.nsteps = nsteps;
timeclock.t = (double *) malloc(nsteps * sizeof(double));
if (type == 1) { /* setting time from the UI */
for (i = 0; i < nsteps; i++) {
timeclock.t[i] = start + i * step;
}
}
timeclock.curtime = timeclock.t[0];
update_time();
}
| 26.410853 | 97 | 0.70091 |
4a36de9336433287e7dd5388e173b3b80f3d5597 | 2,781 | c | C | src/roboclaw_wrapper.c | Zack340/RaspberryPi_RoboClaw_Simulink | 2fe8ffc6b4aa2e3e304eb623d5a81a7213a019b9 | [
"MIT"
] | null | null | null | src/roboclaw_wrapper.c | Zack340/RaspberryPi_RoboClaw_Simulink | 2fe8ffc6b4aa2e3e304eb623d5a81a7213a019b9 | [
"MIT"
] | null | null | null | src/roboclaw_wrapper.c | Zack340/RaspberryPi_RoboClaw_Simulink | 2fe8ffc6b4aa2e3e304eb623d5a81a7213a019b9 | [
"MIT"
] | null | null | null | #include "roboclaw.h"
#include "roboclaw_wrapper.h"
struct roboclaw *rc;
struct roboclaw_Settings *rc_sets;
pthread_t rc_thread;
struct roboclaw_Data *rc_pdata;
#ifdef __cplusplus
extern "C" {
#endif
void roboclaw_initialize(struct roboclaw_Settings *settings)
{
rc_sets = settings;
rc = roboclaw_init_ext(rc_sets->tty,
rc_sets->baudrate,
rc_sets->timeout_ms,
rc_sets->retries,
rc_sets->strict_0xFF_ACK);
if (rc == NULL)
{
printf("\nFailed to init RoboClaw.\n");
exit(1);
}
rc_pdata = (struct roboclaw_Data *)malloc(sizeof(struct roboclaw_Data));
rc_pdata->m1Duty = 0;
rc_pdata->m2Duty = 0;
rc_pdata->m1Speed = 0;
rc_pdata->m2Speed = 0;
rc_pdata->accel = 0;
rc_pdata->m1Counts = 0;
rc_pdata->m2Counts = 0;
rc_pdata->voltage = 0;
}
void roboclaw_step(struct roboclaw_Data *data)
{
pthread_join(rc_thread, NULL);
rc_pdata->m1Duty = data->m1Duty;
rc_pdata->m2Duty = data->m2Duty;
rc_pdata->m1Speed = data->m1Speed;
rc_pdata->m2Speed = data->m2Speed;
rc_pdata->accel = data->accel;
data->m1Counts = rc_pdata->m1Counts;
data->m2Counts = rc_pdata->m2Counts;
data->voltage = rc_pdata->voltage;
pthread_create(&rc_thread, NULL, (void *)roboclaw_tic, (void *)rc_pdata);
}
void roboclaw_terminate()
{
pthread_join(rc_thread, NULL);
roboclaw_duty_m1m2(rc, rc_sets->address, 0, 0);
roboclaw_close(rc);
}
void *roboclaw_tic(void *pdata)
{
struct roboclaw_Data *data = (struct roboclaw_Data *)pdata;
int8_T ret = 0;
switch (rc_sets->mode)
{
case 0:
ret = roboclaw_duty_m1m2(rc, rc_sets->address, data->m1Duty, data->m2Duty);
break;
case 1:
ret = roboclaw_speed_m1m2(rc, rc_sets->address, data->m1Speed, data->m2Speed);
break;
case 2:
ret = roboclaw_speed_accel_m1m2(rc, rc_sets->address, data->m1Speed, data->m2Speed, data->accel);
break;
default:
break;
}
ret = roboclaw_encoders(rc, rc_sets->address, &data->m1Counts, &data->m2Counts);
int16_T voltage = 0;
ret = roboclaw_main_battery_voltage(rc, rc_sets->address, &voltage);
data->voltage = (real32_T)voltage / 10.0f;
}
void roboclaw_errorDetector(int8_T ret)
{
if (ret == -1)
{
fprintf(stderr, "\nIO Error: %s\n", strerror(errno));
}
if (ret == -2)
{
printf("\nExceeded retries.\n");
}
roboclaw_terminate();
exit(1);
}
#ifdef __cplusplus
}
#endif | 25.990654 | 110 | 0.581086 |
0bf290fd3c7d23281407201b5c1b344d9fe9b70e | 3,821 | c | C | src/asn/rrc/ASN_RRC_UECapabilityEnquiry-IEs.c | aligungr/ue-ran-sim | 564f9d228723f03adfa2b02df2ea019bdf305085 | [
"MIT"
] | 16 | 2020-04-16T02:07:37.000Z | 2020-07-23T10:48:27.000Z | src/asn/rrc/ASN_RRC_UECapabilityEnquiry-IEs.c | aligungr/ue-ran-sim | 564f9d228723f03adfa2b02df2ea019bdf305085 | [
"MIT"
] | 8 | 2020-07-13T17:11:35.000Z | 2020-08-03T16:46:31.000Z | src/asn/rrc/ASN_RRC_UECapabilityEnquiry-IEs.c | aligungr/ue-ran-sim | 564f9d228723f03adfa2b02df2ea019bdf305085 | [
"MIT"
] | 9 | 2020-03-04T15:05:08.000Z | 2020-07-30T06:18:18.000Z | /*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "NR-RRC-Definitions"
* found in "asn/nr-rrc-15.6.0.asn1"
* `asn1c -fcompound-names -pdu=all -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D rrc`
*/
#include "ASN_RRC_UECapabilityEnquiry-IEs.h"
static int
memb_ASN_RRC_ue_CapabilityEnquiryExt_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr,
asn_app_constraint_failed_f *ctfailcb, void *app_key) {
const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr;
if(!sptr) {
ASN__CTFAIL(app_key, td, sptr,
"%s: value not given (%s:%d)",
td->name, __FILE__, __LINE__);
return -1;
}
if(1 /* No applicable constraints whatsoever */) {
(void)st; /* Unused variable */
/* Nothing is here. See below */
}
return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key);
}
static asn_per_constraints_t asn_PER_memb_ASN_RRC_ue_CapabilityEnquiryExt_constr_4 CC_NOTUSED = {
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
{ APC_SEMI_CONSTRAINED, -1, -1, 0, 0 } /* (SIZE(0..MAX)) */,
0, 0 /* No PER value map */
};
asn_TYPE_member_t asn_MBR_ASN_RRC_UECapabilityEnquiry_IEs_1[] = {
{ ATF_NOFLAGS, 0, offsetof(struct ASN_RRC_UECapabilityEnquiry_IEs, ue_CapabilityRAT_RequestList),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_ASN_RRC_UE_CapabilityRAT_RequestList,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"ue-CapabilityRAT-RequestList"
},
{ ATF_POINTER, 2, offsetof(struct ASN_RRC_UECapabilityEnquiry_IEs, lateNonCriticalExtension),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_OCTET_STRING,
0,
{ 0, 0, 0 },
0, 0, /* No default value */
"lateNonCriticalExtension"
},
{ ATF_POINTER, 1, offsetof(struct ASN_RRC_UECapabilityEnquiry_IEs, ue_CapabilityEnquiryExt),
(ASN_TAG_CLASS_CONTEXT | (2 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_OCTET_STRING,
0,
{ 0, &asn_PER_memb_ASN_RRC_ue_CapabilityEnquiryExt_constr_4, memb_ASN_RRC_ue_CapabilityEnquiryExt_constraint_1 },
0, 0, /* No default value */
"ue-CapabilityEnquiryExt"
},
};
static const int asn_MAP_ASN_RRC_UECapabilityEnquiry_IEs_oms_1[] = { 1, 2 };
static const ber_tlv_tag_t asn_DEF_ASN_RRC_UECapabilityEnquiry_IEs_tags_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
};
static const asn_TYPE_tag2member_t asn_MAP_ASN_RRC_UECapabilityEnquiry_IEs_tag2el_1[] = {
{ (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ue-CapabilityRAT-RequestList */
{ (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* lateNonCriticalExtension */
{ (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* ue-CapabilityEnquiryExt */
};
asn_SEQUENCE_specifics_t asn_SPC_ASN_RRC_UECapabilityEnquiry_IEs_specs_1 = {
sizeof(struct ASN_RRC_UECapabilityEnquiry_IEs),
offsetof(struct ASN_RRC_UECapabilityEnquiry_IEs, _asn_ctx),
asn_MAP_ASN_RRC_UECapabilityEnquiry_IEs_tag2el_1,
3, /* Count of tags in the map */
asn_MAP_ASN_RRC_UECapabilityEnquiry_IEs_oms_1, /* Optional members */
2, 0, /* Root/Additions */
-1, /* First extension addition */
};
asn_TYPE_descriptor_t asn_DEF_ASN_RRC_UECapabilityEnquiry_IEs = {
"UECapabilityEnquiry-IEs",
"UECapabilityEnquiry-IEs",
&asn_OP_SEQUENCE,
asn_DEF_ASN_RRC_UECapabilityEnquiry_IEs_tags_1,
sizeof(asn_DEF_ASN_RRC_UECapabilityEnquiry_IEs_tags_1)
/sizeof(asn_DEF_ASN_RRC_UECapabilityEnquiry_IEs_tags_1[0]), /* 1 */
asn_DEF_ASN_RRC_UECapabilityEnquiry_IEs_tags_1, /* Same as above */
sizeof(asn_DEF_ASN_RRC_UECapabilityEnquiry_IEs_tags_1)
/sizeof(asn_DEF_ASN_RRC_UECapabilityEnquiry_IEs_tags_1[0]), /* 1 */
{ 0, 0, SEQUENCE_constraint },
asn_MBR_ASN_RRC_UECapabilityEnquiry_IEs_1,
3, /* Elements count */
&asn_SPC_ASN_RRC_UECapabilityEnquiry_IEs_specs_1 /* Additional specs */
};
| 38.59596 | 117 | 0.743261 |
93adaaf2195e9a8e57d40026a00aebfb54fe9bef | 3,910 | h | C | cc3200-sdk/ti_rtos/ti_rtos_config/ewarm/iar/tirtos/ti/sysbios/xdcruntime/package/internal/SemThreadSupport.xdc.h | rchtsang/cc3200-sdk-linux-gcc | 92d11e088a19cdea9374ef0ead2c3dd55995dcff | [
"MIT"
] | 2 | 2017-04-27T09:24:42.000Z | 2020-04-01T17:52:28.000Z | cc3200-sdk/ti_rtos/ti_rtos_config/ewarm/iar/tirtos/ti/sysbios/xdcruntime/package/internal/SemThreadSupport.xdc.h | rchtsang/cc3200-sdk-linux-gcc | 92d11e088a19cdea9374ef0ead2c3dd55995dcff | [
"MIT"
] | null | null | null | cc3200-sdk/ti_rtos/ti_rtos_config/ewarm/iar/tirtos/ti/sysbios/xdcruntime/package/internal/SemThreadSupport.xdc.h | rchtsang/cc3200-sdk-linux-gcc | 92d11e088a19cdea9374ef0ead2c3dd55995dcff | [
"MIT"
] | 3 | 2018-01-30T16:38:52.000Z | 2022-03-30T00:56:46.000Z | /*
* Do not modify this file; it is automatically
* generated and any modifications will be overwritten.
*
* @(#) xdc-B06
*/
#ifndef ti_sysbios_xdcruntime_SemThreadSupport__INTERNAL__
#define ti_sysbios_xdcruntime_SemThreadSupport__INTERNAL__
#ifndef ti_sysbios_xdcruntime_SemThreadSupport__internalaccess
#define ti_sysbios_xdcruntime_SemThreadSupport__internalaccess
#endif
#include <ti/sysbios/xdcruntime/SemThreadSupport.h>
#undef xdc_FILE__
#ifndef xdc_FILE
#define xdc_FILE__ NULL
#else
#define xdc_FILE__ xdc_FILE
#endif
/* pend */
#undef ti_sysbios_xdcruntime_SemThreadSupport_pend
#define ti_sysbios_xdcruntime_SemThreadSupport_pend ti_sysbios_xdcruntime_SemThreadSupport_pend__E
/* post */
#undef ti_sysbios_xdcruntime_SemThreadSupport_post
#define ti_sysbios_xdcruntime_SemThreadSupport_post ti_sysbios_xdcruntime_SemThreadSupport_post__E
/* Module_startup */
#undef ti_sysbios_xdcruntime_SemThreadSupport_Module_startup
#define ti_sysbios_xdcruntime_SemThreadSupport_Module_startup ti_sysbios_xdcruntime_SemThreadSupport_Module_startup__E
/* Instance_init */
#undef ti_sysbios_xdcruntime_SemThreadSupport_Instance_init
#define ti_sysbios_xdcruntime_SemThreadSupport_Instance_init ti_sysbios_xdcruntime_SemThreadSupport_Instance_init__E
/* Instance_finalize */
#undef ti_sysbios_xdcruntime_SemThreadSupport_Instance_finalize
#define ti_sysbios_xdcruntime_SemThreadSupport_Instance_finalize ti_sysbios_xdcruntime_SemThreadSupport_Instance_finalize__E
/* per-module runtime symbols */
#undef Module__MID
#define Module__MID ti_sysbios_xdcruntime_SemThreadSupport_Module__id__C
#undef Module__DGSINCL
#define Module__DGSINCL ti_sysbios_xdcruntime_SemThreadSupport_Module__diagsIncluded__C
#undef Module__DGSENAB
#define Module__DGSENAB ti_sysbios_xdcruntime_SemThreadSupport_Module__diagsEnabled__C
#undef Module__DGSMASK
#define Module__DGSMASK ti_sysbios_xdcruntime_SemThreadSupport_Module__diagsMask__C
#undef Module__LOGDEF
#define Module__LOGDEF ti_sysbios_xdcruntime_SemThreadSupport_Module__loggerDefined__C
#undef Module__LOGOBJ
#define Module__LOGOBJ ti_sysbios_xdcruntime_SemThreadSupport_Module__loggerObj__C
#undef Module__LOGFXN0
#define Module__LOGFXN0 ti_sysbios_xdcruntime_SemThreadSupport_Module__loggerFxn0__C
#undef Module__LOGFXN1
#define Module__LOGFXN1 ti_sysbios_xdcruntime_SemThreadSupport_Module__loggerFxn1__C
#undef Module__LOGFXN2
#define Module__LOGFXN2 ti_sysbios_xdcruntime_SemThreadSupport_Module__loggerFxn2__C
#undef Module__LOGFXN4
#define Module__LOGFXN4 ti_sysbios_xdcruntime_SemThreadSupport_Module__loggerFxn4__C
#undef Module__LOGFXN8
#define Module__LOGFXN8 ti_sysbios_xdcruntime_SemThreadSupport_Module__loggerFxn8__C
#undef Module__G_OBJ
#define Module__G_OBJ ti_sysbios_xdcruntime_SemThreadSupport_Module__gateObj__C
#undef Module__G_PRMS
#define Module__G_PRMS ti_sysbios_xdcruntime_SemThreadSupport_Module__gatePrms__C
#undef Module__GP_create
#define Module__GP_create ti_sysbios_xdcruntime_SemThreadSupport_Module_GateProxy_create
#undef Module__GP_delete
#define Module__GP_delete ti_sysbios_xdcruntime_SemThreadSupport_Module_GateProxy_delete
#undef Module__GP_enter
#define Module__GP_enter ti_sysbios_xdcruntime_SemThreadSupport_Module_GateProxy_enter
#undef Module__GP_leave
#define Module__GP_leave ti_sysbios_xdcruntime_SemThreadSupport_Module_GateProxy_leave
#undef Module__GP_query
#define Module__GP_query ti_sysbios_xdcruntime_SemThreadSupport_Module_GateProxy_query
/* Object__sizingError */
#line 1 "Error_inconsistent_object_size_in_ti.sysbios.xdcruntime.SemThreadSupport"
typedef char ti_sysbios_xdcruntime_SemThreadSupport_Object__sizingError[sizeof(ti_sysbios_xdcruntime_SemThreadSupport_Object) > sizeof(ti_sysbios_xdcruntime_SemThreadSupport_Struct) ? -1 : 1];
#endif /* ti_sysbios_xdcruntime_SemThreadSupport__INTERNAL____ */
| 44.431818 | 193 | 0.88798 |
2f5292805667573f860a45a72870d350d9f9fe0d | 159 | h | C | sistemas/directorios/listarrec/fuente/incl/listarrec.h | Arcatus/Sistemas | 67a6eaec693ac67425c6794bb62d36da7503b966 | [
"MIT"
] | null | null | null | sistemas/directorios/listarrec/fuente/incl/listarrec.h | Arcatus/Sistemas | 67a6eaec693ac67425c6794bb62d36da7503b966 | [
"MIT"
] | 1 | 2018-01-12T00:27:03.000Z | 2018-01-12T00:27:03.000Z | sistemas/directorios/listarrec/fuente/incl/listarrec.h | Arcatus/Sistemas | 67a6eaec693ac67425c6794bb62d36da7503b966 | [
"MIT"
] | null | null | null | #include <ftw.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int procesaarchivo(const char*, const struct stat*, int);
| 15.9 | 57 | 0.698113 |
94e20274574a9af7c5fdfd3f6286f9156600c994 | 80 | h | C | src/stats.h | tuna-yapakci/Platal-Game-1 | bec694a456a5f32004ed2d195b4406d93c0390b3 | [
"MIT"
] | null | null | null | src/stats.h | tuna-yapakci/Platal-Game-1 | bec694a456a5f32004ed2d195b4406d93c0390b3 | [
"MIT"
] | 5 | 2020-12-10T09:41:24.000Z | 2021-01-16T15:48:06.000Z | src/stats.h | tuna-yapakci/Platal-Game-1 | bec694a456a5f32004ed2d195b4406d93c0390b3 | [
"MIT"
] | 9 | 2020-12-07T12:24:18.000Z | 2020-12-14T15:35:04.000Z | #pragma once
class Stats {
public:
Stats();
~Stats();
private:
};
| 8 | 13 | 0.5375 |
a244cefaa2bc7944b6fd97b3116ec4382ac71517 | 198 | h | C | ParticleEmitter.h | Robert-xiaoqiang/SplendidSoccer | 2e3b84d45deb655c226c1375b23fbdef457deae6 | [
"MIT"
] | 2 | 2018-07-29T03:11:01.000Z | 2018-08-03T08:35:53.000Z | ParticleEmitter.h | Robert-xiaoqiang/SplendidSoccer | 2e3b84d45deb655c226c1375b23fbdef457deae6 | [
"MIT"
] | null | null | null | ParticleEmitter.h | Robert-xiaoqiang/SplendidSoccer | 2e3b84d45deb655c226c1375b23fbdef457deae6 | [
"MIT"
] | null | null | null | #pragma once;
#include "Particle.h"
class ParticleEmitter
{
public:
virtual ~ParticleEmitter() {}
virtual void EmitParticle( Particle& particle ) = 0;
virtual void DebugRender() {}
}; | 16.5 | 56 | 0.686869 |
b10b94a3d889c7d7b7eb1b7ff2fd10878c13cf67 | 4,574 | h | C | third_party/TI/TivaWare_C_Series-2.1.4.178/examples/boards/dk-tm4c129x/usb_stick_update/simple_fs.h | briancostabile/tiva-bsp | 603187791cac3c28fd8ca77e286f3f68afa9a39a | [
"MIT"
] | 1 | 2017-02-05T11:12:36.000Z | 2017-02-05T11:12:36.000Z | third_party/TI/TivaWare_C_Series-2.1.4.178/examples/boards/dk-tm4c129x/usb_stick_update/simple_fs.h | briancostabile/tiva-bsp | 603187791cac3c28fd8ca77e286f3f68afa9a39a | [
"MIT"
] | 1 | 2021-03-21T03:00:58.000Z | 2021-03-22T10:05:45.000Z | examples/boards/dk-tm4c129x/usb_stick_update/simple_fs.h | CynaraKrewe/TivaWare_TM4C | b2c47601b6bd3bbae6bd015bf10759f33730e842 | [
"BSD-3-Clause"
] | 1 | 2019-06-20T09:21:45.000Z | 2019-06-20T09:21:45.000Z | //*****************************************************************************
//
// simple_fs.h - Header for simple FAT file system support
//
// Copyright (c) 2013-2017 Texas Instruments Incorporated. All rights reserved.
// Software License Agreement
//
// Texas Instruments (TI) is supplying this software for use solely and
// exclusively on TI's microcontroller products. The software is owned by
// TI and/or its suppliers, and is protected under applicable copyright
// laws. You may not combine this software with "viral" open-source
// software in order to form a larger program.
//
// THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
// NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
// NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
// CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
// DAMAGES, FOR ANY REASON WHATSOEVER.
//
// This is part of revision 2.1.4.178 of the DK-TM4C129X Firmware Package.
//
//*****************************************************************************
#ifndef __SIMPLE_FS_H__
#define __SIMPLE_FS_H__
//*****************************************************************************
//
// \addtogroup simple_fs_api
// @{
//
//*****************************************************************************
//*****************************************************************************
//
// Macro to read a single sector from a file that was opened with
// SimpleFsOpen()
//
// This convenience macro maps to the function SimpleFsGetNextFileSector()
// called with a parameter of 0. It should be used to read successive
// sectors from a file after the file has been opened with SimpleFsOpen().
//
// When a sector is read, it is loaded into the sector buffer that was passed
// when SimpleFsInit() was called.
//
// A non-zero value will be returned to the caller as int32_t as successive
// sectors are successfully read into the sector buffer. At the end of the
// file, or if there is any error, then a value of 0 is returned.
//
// Note that the a whole sector is always loaded, even if the end of
// a file does not fill the last sector. It is the responsibility of the
// caller to track the file size and to deal with a partially full last
// sector.
//
// \return Non-zero if a sector was read into the sector buffer, or
// 0 if there are no more sectors or if any error occurred.
//
//*****************************************************************************
#define SimpleFsReadFileSector() SimpleFsGetNextFileSector(0)
//*****************************************************************************
//
// Read a single sector from the application-specific storage device into
// the sector buffer.
//
// \param ui32Sector is the absolute sector number to read from the storage
// device
// \param pui8SectorBuf is a pointer to a 512 byte buffer where the sector
// data should be written
//
// This function is used by the simple file system functions to read a sector
// of data from a storage device. It must be implemented as part of the
// application specific code. For example, it could be used to read sectors
// from a USB mass storage device, or from an SD card, or any device that can
// be used to store a FAT file system. Note that the sector size is always
// assumed to be 512 bytes.
//
// \return Zero value if a sector of data was successfully read from the
// device and stored in the sector buffer, non-zero if not successful.
//
//*****************************************************************************
//
// This function to be supplied by the client
//
extern uint32_t SimpleFsReadMediaSector(uint_fast32_t ui32Sector,
uint8_t *pui8SectorBuf);
//*****************************************************************************
//
// Close the Doxygen group.
// @}
//
//*****************************************************************************
//*****************************************************************************
//
// Functions to help with accessing the FAT file system on a storage device
//
//****************************************************************************
extern uint32_t SimpleFsInit(uint8_t *pui8SectorBuf);
extern uint32_t SimpleFsOpen(char *pcName83);
extern uint32_t SimpleFsGetNextFileSector(uint_fast32_t ui32StartCluster);
#endif // __SIMPLE_FS_H__
| 43.150943 | 81 | 0.569523 |
b11d113046a22853afc1f93f749dcbcb7ba1f870 | 7,055 | c | C | drivers/watchdog/wdt_esp32.c | psychogenic/zephyr | b0e05e8cac3a24bfee2901898a15aa4306f01d66 | [
"Apache-2.0"
] | 2 | 2022-02-20T14:14:09.000Z | 2022-02-28T14:40:52.000Z | drivers/watchdog/wdt_esp32.c | psychogenic/zephyr | b0e05e8cac3a24bfee2901898a15aa4306f01d66 | [
"Apache-2.0"
] | null | null | null | drivers/watchdog/wdt_esp32.c | psychogenic/zephyr | b0e05e8cac3a24bfee2901898a15aa4306f01d66 | [
"Apache-2.0"
] | 2 | 2020-03-26T17:30:38.000Z | 2022-02-20T16:36:31.000Z | /*
* Copyright (C) 2017 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRV_COMPAT espressif_esp32_watchdog
/* Include esp-idf headers first to avoid redefining BIT() macro */
#include <soc/rtc_cntl_reg.h>
#include <soc/timer_group_reg.h>
#include <string.h>
#include <drivers/watchdog.h>
#ifndef CONFIG_SOC_ESP32C3
#include <drivers/interrupt_controller/intc_esp32.h>
#else
#include <drivers/interrupt_controller/intc_esp32c3.h>
#endif
#include <device.h>
#ifdef CONFIG_SOC_ESP32C3
#define ISR_HANDLER isr_handler_t
#else
#define ISR_HANDLER intr_handler_t
#endif
/* FIXME: This struct shall be removed from here, when esp32 timer driver got
* implemented.
* That's why the type name starts with `timer` not `wdt`
*/
struct timer_esp32_irq_regs_t {
uint32_t *timer_int_ena;
uint32_t *timer_int_clr;
};
struct wdt_esp32_regs_t {
uint32_t config0;
uint32_t config1;
uint32_t config2;
uint32_t config3;
uint32_t config4;
uint32_t config5;
uint32_t feed;
uint32_t wprotect;
};
enum wdt_mode {
WDT_MODE_RESET = 0,
WDT_MODE_INTERRUPT_RESET
};
struct wdt_esp32_data {
uint32_t timeout;
enum wdt_mode mode;
wdt_callback_t callback;
int irq_line;
};
struct wdt_esp32_config {
void (*connect_irq)(void);
const struct wdt_esp32_regs_t *base;
const struct timer_esp32_irq_regs_t irq_regs;
int irq_source;
};
#define DEV_BASE(dev) \
((volatile struct wdt_esp32_regs_t *) \
((const struct wdt_esp32_config *const)(dev)->config)->base)
/* ESP32 ignores writes to any register if WDTWPROTECT doesn't contain the
* magic value of TIMG_WDT_WKEY_VALUE. The datasheet recommends unsealing,
* making modifications, and sealing for every watchdog modification.
*/
static inline void wdt_esp32_seal(const struct device *dev)
{
DEV_BASE(dev)->wprotect = 0U;
}
static inline void wdt_esp32_unseal(const struct device *dev)
{
DEV_BASE(dev)->wprotect = TIMG_WDT_WKEY_VALUE;
}
static void wdt_esp32_enable(const struct device *dev)
{
wdt_esp32_unseal(dev);
DEV_BASE(dev)->config0 |= BIT(TIMG_WDT_EN_S);
wdt_esp32_seal(dev);
}
static int wdt_esp32_disable(const struct device *dev)
{
wdt_esp32_unseal(dev);
DEV_BASE(dev)->config0 &= ~BIT(TIMG_WDT_EN_S);
wdt_esp32_seal(dev);
return 0;
}
static void adjust_timeout(const struct device *dev, uint32_t timeout)
{
/* MWDT ticks every 12.5ns. Set the prescaler to 40000, so the
* counter for each watchdog stage is decremented every 0.5ms.
*/
DEV_BASE(dev)->config1 = 40000U;
DEV_BASE(dev)->config2 = timeout;
DEV_BASE(dev)->config3 = timeout;
}
static void wdt_esp32_isr(void *arg);
static int wdt_esp32_feed(const struct device *dev, int channel_id)
{
wdt_esp32_unseal(dev);
DEV_BASE(dev)->feed = 0xABAD1DEA; /* Writing any value to WDTFEED will reload it. */
wdt_esp32_seal(dev);
return 0;
}
static void set_interrupt_enabled(const struct device *dev, bool setting)
{
const struct wdt_esp32_config *config = dev->config;
struct wdt_esp32_data *data = dev->data;
*config->irq_regs.timer_int_clr |= TIMG_WDT_INT_CLR;
if (setting) {
*config->irq_regs.timer_int_ena |= TIMG_WDT_INT_ENA;
irq_enable(data->irq_line);
} else {
*config->irq_regs.timer_int_ena &= ~TIMG_WDT_INT_ENA;
irq_disable(data->irq_line);
}
}
static int wdt_esp32_set_config(const struct device *dev, uint8_t options)
{
struct wdt_esp32_data *data = dev->data;
uint32_t v = DEV_BASE(dev)->config0;
if (!data) {
return -EINVAL;
}
/* Stages 3 and 4 are not used: disable them. */
v |= TIMG_WDT_STG_SEL_OFF << TIMG_WDT_STG2_S;
v |= TIMG_WDT_STG_SEL_OFF << TIMG_WDT_STG3_S;
/* Wait for 3.2us before booting again. */
v |= 7 << TIMG_WDT_SYS_RESET_LENGTH_S;
v |= 7 << TIMG_WDT_CPU_RESET_LENGTH_S;
if (data->mode == WDT_MODE_RESET) {
/* Warm reset on timeout */
v |= TIMG_WDT_STG_SEL_RESET_SYSTEM << TIMG_WDT_STG0_S;
v |= TIMG_WDT_STG_SEL_OFF << TIMG_WDT_STG1_S;
/* Disable interrupts for this mode. */
#ifndef CONFIG_SOC_ESP32C3
v &= ~(TIMG_WDT_LEVEL_INT_EN | TIMG_WDT_EDGE_INT_EN);
#else
v &= ~(TIMG_WDT_INT_ENA);
#endif
} else if (data->mode == WDT_MODE_INTERRUPT_RESET) {
/* Interrupt first, and warm reset if not reloaded */
v |= TIMG_WDT_STG_SEL_INT << TIMG_WDT_STG0_S;
v |= TIMG_WDT_STG_SEL_RESET_SYSTEM << TIMG_WDT_STG1_S;
/* Use level-triggered interrupts. */
#ifndef CONFIG_SOC_ESP32C3
v |= TIMG_WDT_LEVEL_INT_EN;
v &= ~TIMG_WDT_EDGE_INT_EN;
#else
v |= TIMG_WDT_INT_ENA;
#endif
} else {
return -EINVAL;
}
wdt_esp32_unseal(dev);
DEV_BASE(dev)->config0 = v;
adjust_timeout(dev, data->timeout);
set_interrupt_enabled(dev, data->mode == WDT_MODE_INTERRUPT_RESET);
wdt_esp32_seal(dev);
wdt_esp32_feed(dev, 0);
return 0;
}
static int wdt_esp32_install_timeout(const struct device *dev,
const struct wdt_timeout_cfg *cfg)
{
struct wdt_esp32_data *data = dev->data;
if (cfg->flags != WDT_FLAG_RESET_SOC) {
return -ENOTSUP;
}
if (cfg->window.min != 0U || cfg->window.max == 0U) {
return -EINVAL;
}
data->timeout = cfg->window.max;
data->mode = (cfg->callback == NULL) ?
WDT_MODE_RESET : WDT_MODE_INTERRUPT_RESET;
data->callback = cfg->callback;
return 0;
}
static int wdt_esp32_init(const struct device *dev)
{
const struct wdt_esp32_config *const config = dev->config;
struct wdt_esp32_data *data = dev->data;
#ifdef CONFIG_WDT_DISABLE_AT_BOOT
wdt_esp32_disable(dev);
#endif
/* For xtensa esp32 chips, this is a level 4 interrupt,
* which is handled by _Level4Vector,
* located in xtensa_vectors.S.
*/
data->irq_line = esp_intr_alloc(config->irq_source,
0,
(ISR_HANDLER)wdt_esp32_isr,
(void *)dev,
NULL);
wdt_esp32_enable(dev);
return 0;
}
static const struct wdt_driver_api wdt_api = {
.setup = wdt_esp32_set_config,
.disable = wdt_esp32_disable,
.install_timeout = wdt_esp32_install_timeout,
.feed = wdt_esp32_feed
};
#define ESP32_WDT_INIT(idx) \
static struct wdt_esp32_data wdt##idx##_data; \
static struct wdt_esp32_config wdt_esp32_config##idx = { \
.base = (struct wdt_esp32_regs_t *) DT_INST_REG_ADDR(idx), \
.irq_regs = { \
.timer_int_ena = (uint32_t *)TIMG_INT_ENA_TIMERS_REG(idx), \
.timer_int_clr = (uint32_t *)TIMG_INT_CLR_TIMERS_REG(idx), \
}, \
.irq_source = DT_IRQN(DT_NODELABEL(wdt##idx)), \
}; \
\
DEVICE_DT_INST_DEFINE(idx, \
wdt_esp32_init, \
NULL, \
&wdt##idx##_data, \
&wdt_esp32_config##idx, \
PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEVICE, \
&wdt_api)
static void wdt_esp32_isr(void *arg)
{
const struct device *dev = (const struct device *)arg;
const struct wdt_esp32_config *config = dev->config;
struct wdt_esp32_data *data = dev->data;
if (data->callback) {
data->callback(dev, 0);
}
*config->irq_regs.timer_int_clr |= TIMG_WDT_INT_CLR;
}
#if DT_NODE_HAS_STATUS(DT_NODELABEL(wdt0), okay)
ESP32_WDT_INIT(0);
#endif
#if DT_NODE_HAS_STATUS(DT_NODELABEL(wdt1), okay)
ESP32_WDT_INIT(1);
#endif
| 24.411765 | 85 | 0.719348 |
829d306a2a907e0d46e51bb6f8b2b8d995feb835 | 748 | h | C | Example/Pods/WDPRCore/Pod/Classes/WDPRUIKitExtensions/UILabel+WDPR.h | PaymentKit/HaviPayment | 14b7e099161b918cf5b10393b876eca4a03be94b | [
"MIT"
] | null | null | null | Example/Pods/WDPRCore/Pod/Classes/WDPRUIKitExtensions/UILabel+WDPR.h | PaymentKit/HaviPayment | 14b7e099161b918cf5b10393b876eca4a03be94b | [
"MIT"
] | null | null | null | Example/Pods/WDPRCore/Pod/Classes/WDPRUIKitExtensions/UILabel+WDPR.h | PaymentKit/HaviPayment | 14b7e099161b918cf5b10393b876eca4a03be94b | [
"MIT"
] | null | null | null | //
// UILabel+WDPR.h
// WDPR
//
// Created by Rodden, James on 8/9/13.
// Copyright (c) 2013 WDPRO. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UILabel (WDPR)
- (void)setTextOrAttributedText:(id)text;
/**
Sizes this label based on it's textual content, and given maximum size dimensions.
If the maximum dimensions are reached during resizing, text will be truncated.
Note: Set the text and font, before calling this method.
@param maxSize - Maximum size this label can be.
*/
- (void)sizeWithMaxSize:(CGSize)maxSize;
/**
Calculates the current number of lines based on the label's bounds and the font's line height.
@return The current number of line the label has
*/
- (NSInteger)currentNumberOfLines;
@end
| 22.666667 | 95 | 0.721925 |
323c6e453834312847321e390a563a82d73dd012 | 14,801 | c | C | ompi/mca/coll/libnbc/nbc_iallgather.c | gkatev/ompi | b331dbe5784691cf9376518e49e35485754ce2f1 | [
"BSD-3-Clause-Open-MPI"
] | null | null | null | ompi/mca/coll/libnbc/nbc_iallgather.c | gkatev/ompi | b331dbe5784691cf9376518e49e35485754ce2f1 | [
"BSD-3-Clause-Open-MPI"
] | null | null | null | ompi/mca/coll/libnbc/nbc_iallgather.c | gkatev/ompi | b331dbe5784691cf9376518e49e35485754ce2f1 | [
"BSD-3-Clause-Open-MPI"
] | null | null | null | /* -*- Mode: C; c-basic-offset:2 ; indent-tabs-mode:nil -*- */
/*
* Copyright (c) 2006 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2006 The Technical University of Chemnitz. All
* rights reserved.
* Copyright (c) 2014-2017 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2017 IBM Corporation. All rights reserved.
* Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* Author(s): Torsten Hoefler <htor@cs.indiana.edu>
*
*/
#include "nbc_internal.h"
static inline int allgather_sched_linear(
int rank, int comm_size, NBC_Schedule *schedule, const void *sendbuf,
int scount, struct ompi_datatype_t *sdtype, void *recvbuf, int rcount,
struct ompi_datatype_t *rdtype);
static inline int allgather_sched_recursivedoubling(
int rank, int comm_size, NBC_Schedule *schedule, const void *sbuf,
int scount, struct ompi_datatype_t *sdtype, void *rbuf, int rcount,
struct ompi_datatype_t *rdtype);
#ifdef NBC_CACHE_SCHEDULE
/* tree comparison function for schedule cache */
int NBC_Allgather_args_compare(NBC_Allgather_args *a, NBC_Allgather_args *b, void *param) {
if ((a->sendbuf == b->sendbuf) &&
(a->sendcount == b->sendcount) &&
(a->sendtype == b->sendtype) &&
(a->recvbuf == b->recvbuf) &&
(a->recvcount == b->recvcount) &&
(a->recvtype == b->recvtype) ) {
return 0;
}
if( a->sendbuf < b->sendbuf ) {
return -1;
}
return 1;
}
#endif
static int nbc_allgather_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request,
mca_coll_base_module_t *module, bool persistent)
{
int rank, p, res;
MPI_Aint rcvext;
NBC_Schedule *schedule;
char *rbuf, inplace;
#ifdef NBC_CACHE_SCHEDULE
NBC_Allgather_args *args, *found, search;
#endif
enum { NBC_ALLGATHER_LINEAR, NBC_ALLGATHER_RDBL} alg;
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
NBC_IN_PLACE(sendbuf, recvbuf, inplace);
rank = ompi_comm_rank (comm);
p = ompi_comm_size (comm);
int is_commsize_pow2 = !(p & (p - 1));
if (libnbc_iallgather_algorithm == 0) {
alg = NBC_ALLGATHER_LINEAR;
} else {
/* user forced dynamic decision */
if (libnbc_iallgather_algorithm == 1) {
alg = NBC_ALLGATHER_LINEAR;
} else if (libnbc_iallgather_algorithm == 2 && is_commsize_pow2) {
alg = NBC_ALLGATHER_RDBL;
} else {
alg = NBC_ALLGATHER_LINEAR;
}
}
res = ompi_datatype_type_extent(recvtype, &rcvext);
if (MPI_SUCCESS != res) {
return res;
}
if (inplace) {
sendtype = recvtype;
sendcount = recvcount;
} else if (!persistent) { /* for persistent, the copy must be scheduled */
/* copy my data to receive buffer */
rbuf = (char *) recvbuf + (MPI_Aint)rcvext * rank * recvcount;
res = NBC_Copy (sendbuf, sendcount, sendtype, rbuf, recvcount, recvtype, comm);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
return res;
}
}
if (1 == p && (!persistent || inplace)) {
return nbc_get_noop_request(persistent, request);
}
#ifdef NBC_CACHE_SCHEDULE
/* search schedule in communicator specific tree */
search.sendbuf = sendbuf;
search.sendcount = sendcount;
search.sendtype = sendtype;
search.recvbuf = recvbuf;
search.recvcount = recvcount;
search.recvtype = recvtype;
found = (NBC_Allgather_args *) hb_tree_search ((hb_tree*)libnbc_module->NBC_Dict[NBC_ALLGATHER], &search);
if (NULL == found) {
#endif
schedule = OBJ_NEW(NBC_Schedule);
if (OPAL_UNLIKELY(NULL == schedule)) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
if (persistent && !inplace) {
/* for nonblocking, data has been copied already */
/* copy my data to receive buffer (= send buffer of NBC_Sched_send) */
rbuf = (char *)recvbuf + (MPI_Aint) rcvext * rank * recvcount;
res = NBC_Sched_copy((void *)sendbuf, false, sendcount, sendtype,
rbuf, false, recvcount, recvtype, schedule, true);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
OBJ_RELEASE(schedule);
return res;
}
}
switch (alg) {
case NBC_ALLGATHER_LINEAR:
res = allgather_sched_linear(rank, p, schedule, sendbuf, sendcount, sendtype,
recvbuf, recvcount, recvtype);
break;
case NBC_ALLGATHER_RDBL:
res = allgather_sched_recursivedoubling(rank, p, schedule, sendbuf, sendcount,
sendtype, recvbuf, recvcount, recvtype);
break;
}
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
OBJ_RELEASE(schedule);
return res;
}
res = NBC_Sched_commit(schedule);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
OBJ_RELEASE(schedule);
return res;
}
#ifdef NBC_CACHE_SCHEDULE
/* save schedule to tree */
args = (NBC_Allgather_args *) malloc (sizeof (args));
args->sendbuf = sendbuf;
args->sendcount = sendcount;
args->sendtype = sendtype;
args->recvbuf = recvbuf;
args->recvcount = recvcount;
args->recvtype = recvtype;
args->schedule = schedule;
res = hb_tree_insert ((hb_tree *) libnbc_module->NBC_Dict[NBC_ALLGATHER], args, args, 0);
if (res != 0) {
free (args);
} else {
OBJ_RETAIN(schedule);
}
/* increase number of elements for A2A */
if (++libnbc_module->NBC_Dict_size[NBC_ALLGATHER] > NBC_SCHED_DICT_UPPER) {
NBC_SchedCache_dictwipe ((hb_tree *) libnbc_module->NBC_Dict[NBC_ALLGATHER], &libnbc_module->NBC_Dict_size[NBC_ALLGATHER]);
}
} else {
/* found schedule */
schedule = found->schedule;
OBJ_RETAIN(schedule);
}
#endif
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
OBJ_RELEASE(schedule);
return res;
}
return OMPI_SUCCESS;
}
int ompi_coll_libnbc_iallgather(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request,
mca_coll_base_module_t *module)
{
int res = nbc_allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
comm, request, module, false);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
return res;
}
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
NBC_Return_handle (*(ompi_coll_libnbc_request_t **)request);
*request = &ompi_request_null.request;
return res;
}
return OMPI_SUCCESS;
}
static int nbc_allgather_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request,
mca_coll_base_module_t *module, bool persistent)
{
int res, rsize;
MPI_Aint rcvext;
NBC_Schedule *schedule;
char *rbuf;
ompi_coll_libnbc_module_t *libnbc_module = (ompi_coll_libnbc_module_t*) module;
res = ompi_datatype_type_extent(recvtype, &rcvext);
if (MPI_SUCCESS != res) {
NBC_Error ("MPI Error in ompi_datatype_type_extent() (%i)", res);
return res;
}
rsize = ompi_comm_remote_size (comm);
/* set up schedule */
schedule = OBJ_NEW(NBC_Schedule);
if (OPAL_UNLIKELY(NULL == schedule)) {
return OMPI_ERR_OUT_OF_RESOURCE;
}
/* do rsize - 1 rounds */
for (int r = 0 ; r < rsize ; ++r) {
/* recv from rank r */
rbuf = (char *) recvbuf + (MPI_Aint) rcvext * r * recvcount;
res = NBC_Sched_recv (rbuf, false, recvcount, recvtype, r, schedule, false);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
OBJ_RELEASE(schedule);
return res;
}
/* send to rank r */
res = NBC_Sched_send (sendbuf, false, sendcount, sendtype, r, schedule, false);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
OBJ_RELEASE(schedule);
return res;
}
}
res = NBC_Sched_commit (schedule);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
OBJ_RELEASE(schedule);
return res;
}
res = NBC_Schedule_request(schedule, comm, libnbc_module, persistent, request, NULL);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
OBJ_RELEASE(schedule);
return res;
}
return OMPI_SUCCESS;
}
int ompi_coll_libnbc_iallgather_inter(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
MPI_Datatype recvtype, struct ompi_communicator_t *comm, ompi_request_t ** request,
mca_coll_base_module_t *module) {
int res = nbc_allgather_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
comm, request, module, false);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
return res;
}
res = NBC_Start(*(ompi_coll_libnbc_request_t **)request);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
NBC_Return_handle (*(ompi_coll_libnbc_request_t **)request);
*request = &ompi_request_null.request;
return res;
}
return OMPI_SUCCESS;
}
/*
* allgather_sched_linear
*
* Description: an implementation of Iallgather using linear algorithm
*
* Time: O(comm_size)
* Schedule length (rounds): O(comm_size)
*/
static inline int allgather_sched_linear(
int rank, int comm_size, NBC_Schedule *schedule, const void *sendbuf,
int scount, struct ompi_datatype_t *sdtype, void *recvbuf, int rcount,
struct ompi_datatype_t *rdtype)
{
int res = OMPI_SUCCESS;
ptrdiff_t rlb, rext;
res = ompi_datatype_get_extent(rdtype, &rlb, &rext);
char *sbuf = (char *)recvbuf + (MPI_Aint) rext * rank * rcount;
for (int remote = 0; remote < comm_size ; ++remote) {
if (remote != rank) {
/* Recv from rank remote */
char *rbuf = (char *)recvbuf + (MPI_Aint) rext * remote * rcount;
res = NBC_Sched_recv(rbuf, false, rcount, rdtype, remote, schedule, false);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) { goto cleanup_and_return; }
/* Send to rank remote - not from the sendbuf to optimize MPI_IN_PLACE */
res = NBC_Sched_send(sbuf, false, rcount, rdtype, remote, schedule, false);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) { goto cleanup_and_return; }
}
}
cleanup_and_return:
return res;
}
/*
* allgather_sched_recursivedoubling
*
* Description: an implementation of Iallgather using recursive doubling algorithm
* Limitation: power-of-two number of processes only
* Time: O(log(comm_size))
* Schedule length (rounds): O(log(comm_size))
* Memory: no additional memory requirements beyond user-supplied buffers.
*
* Example on 4 nodes:
* Initialization: everyone has its own buffer at location rank in rbuf
* # 0 1 2 3
* [0] [ ] [ ] [ ]
* [ ] [1] [ ] [ ]
* [ ] [ ] [2] [ ]
* [ ] [ ] [ ] [3]
* Step 0: exchange data with (rank ^ 2^0)
* # 0 1 2 3
* [0] [0] [ ] [ ]
* [1] [1] [ ] [ ]
* [ ] [ ] [2] [2]
* [ ] [ ] [3] [3]
* Step 1: exchange data with (rank ^ 2^1) (if you can)
* # 0 1 2 3
* [0] [0] [0] [0]
* [1] [1] [1] [1]
* [2] [2] [2] [2]
* [3] [3] [3] [3]
*
*/
static inline int allgather_sched_recursivedoubling(
int rank, int comm_size, NBC_Schedule *schedule, const void *sbuf,
int scount, struct ompi_datatype_t *sdtype, void *rbuf, int rcount,
struct ompi_datatype_t *rdtype)
{
int res = OMPI_SUCCESS;
ptrdiff_t rlb, rext;
char *tmpsend = NULL, *tmprecv = NULL;
res = ompi_datatype_get_extent(rdtype, &rlb, &rext);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) { goto cleanup_and_return; }
int sendblocklocation = rank;
for (int distance = 1; distance < comm_size; distance <<= 1) {
int remote = rank ^ distance;
tmpsend = (char *)rbuf + (ptrdiff_t)sendblocklocation * (ptrdiff_t)rcount * rext;
if (rank < remote) {
tmprecv = (char *)rbuf + (ptrdiff_t)(sendblocklocation + distance) * (ptrdiff_t)rcount * rext;
} else {
tmprecv = (char *)rbuf + (ptrdiff_t)(sendblocklocation - distance) * (ptrdiff_t)rcount * rext;
sendblocklocation -= distance;
}
res = NBC_Sched_send(tmpsend, false, (ptrdiff_t)distance * (ptrdiff_t)rcount,
rdtype, remote, schedule, false);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) { goto cleanup_and_return; }
res = NBC_Sched_recv(tmprecv, false, (ptrdiff_t)distance * (ptrdiff_t)rcount,
rdtype, remote, schedule, true);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) { goto cleanup_and_return; }
}
cleanup_and_return:
return res;
}
int ompi_coll_libnbc_allgather_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
mca_coll_base_module_t *module) {
int res = nbc_allgather_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
comm, request, module, true);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
return res;
}
return OMPI_SUCCESS;
}
int ompi_coll_libnbc_allgather_inter_init(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
MPI_Datatype recvtype, struct ompi_communicator_t *comm, MPI_Info info, ompi_request_t ** request,
mca_coll_base_module_t *module) {
int res = nbc_allgather_inter_init(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype,
comm, request, module, true);
if (OPAL_UNLIKELY(OMPI_SUCCESS != res)) {
return res;
}
return OMPI_SUCCESS;
}
| 35.66506 | 140 | 0.626579 |
aab2592eb2d3a7fe84dc98ea263cf9e786db87bc | 3,947 | h | C | src/xma/xma_legacy/include/xma.h | AlphaBu/XRT | 72d34d637d3292e56871f9384888e6aed73b5969 | [
"Apache-2.0"
] | 1 | 2020-09-24T09:43:25.000Z | 2020-09-24T09:43:25.000Z | src/xma/xma_legacy/include/xma.h | AlphaBu/XRT | 72d34d637d3292e56871f9384888e6aed73b5969 | [
"Apache-2.0"
] | 11 | 2018-10-04T23:12:51.000Z | 2018-12-03T05:46:55.000Z | src/xma/xma_legacy/include/xma.h | AlphaBu/XRT | 72d34d637d3292e56871f9384888e6aed73b5969 | [
"Apache-2.0"
] | 3 | 2021-03-12T00:39:52.000Z | 2021-03-25T20:42:22.000Z | /*
* Copyright (C) 2018, Xilinx Inc - All rights reserved
* Xilinx SDAccel Media Accelerator API
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may
* not use this file except in compliance with the License. A copy of the
* License is located at
*
* http://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 _XMA_H_
#define _XMA_H_
#include "app/xmabuffers.h"
#include "app/xmalogger.h"
#include "app/xmadecoder.h"
#include "app/xmaencoder.h"
#include "app/xmaerror.h"
#include "app/xmascaler.h"
#include "app/xmafilter.h"
#include "app/xmakernel.h"
#ifdef __GNUC__
# define XMA_DEPRECATED __attribute__ ((deprecated))
#else
# define XMA_DEPRECATED
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* DOC: XMA Application Interface
* The interface used by stand-alone XMA applications or plugins
* XMA_legacy is deprecated
* See https://github.com/Xilinx/xma-samples/tree/master/copy-encoder
* example to use new XMA2 APIs
*/
/**
* Deprecated API
* See https://github.com/Xilinx/xma-samples/tree/master/copy-encoder
* example to use new XMA2 APIs
* xma_initialize() - the system according to the layout specified in the
* YAML configuration file.
*
* This is the entry point routine for utilzing the XMA library and must be
* the first call within any application before calling any other XMA APIs.
* The YAML file is parsed and then verified for compatibility with the system
* hardware. If deemed compatible, each device specified in the YAML file
* will be programmed with the xclbin(s) specified in the YAML. A shared
* memory file will be created in /tmp which will store the contents of
* the YAML file * and serve as a resource database tracking allocation of
* kernels thus permitting multiple processes to share device resources. If
* the system has already been configured by a prior process, then a successful
* return from this routine will map the *existing* resource database file to
* the calling processes; XMA will NOT attempt to reprogram any of the system
* devices if any device is in-use based on the prior configuration.
* In effect, programming and and configuration of the system will only occur
* when this routine is first invoked. From the first invocation, so long as
* any running process is attached to and utilizing resources for an existing
* configuration, all subsequent invocations of this routine by any other
* process will be forced to use the existing configuration of the system;
* their configuration file argument will be ignored.
* When all currently running processes attached to a given resource file
* database have run to completion normally, the resource file will be deleted
* and a subsequent process invoking this routine will restart the parsing and
* programming of the system as would be true during initial invocation.
*
* @cfgfile: a filepath to the YAML configuration file describing
* the layout of the xclbin(s) and the devices to which the xclbin(s) are
* to be deployed. If a NULL value is passed, the XMA will use a default
* name and location: /etc/xma/xma_def_sys_cfg.yaml. In all cases, a
* properly defined yaml configuration file must exist.
*
* RETURN: XMA_SUCCESS after successfully initializing the system and/or (if not the first process to invoke)
* mapping in the currently active system configuration.
*
* XMA_ERROR_INVALID if the YAML file is incompatible with the system hardware.
*
* XMA_ERROR for all other errors.
*/
XMA_DEPRECATED
int32_t xma_initialize(char *cfgfile);
#ifdef __cplusplus
}
#endif
#endif
| 41.114583 | 109 | 0.755511 |
c5a07db4d86bb91f57bdf2a817b4afd345108e7f | 726 | h | C | tetris_sfml/Math.h | daemon3000/Tetris | a78b39485c47916bb0e9178163f1cb23d09b5b83 | [
"Zlib",
"MIT"
] | null | null | null | tetris_sfml/Math.h | daemon3000/Tetris | a78b39485c47916bb0e9178163f1cb23d09b5b83 | [
"Zlib",
"MIT"
] | null | null | null | tetris_sfml/Math.h | daemon3000/Tetris | a78b39485c47916bb0e9178163f1cb23d09b5b83 | [
"Zlib",
"MIT"
] | null | null | null | #pragma once
#include <SFML\Graphics.hpp>
namespace tetris
{
namespace math
{
float clamp(float value, float min, float max);
float clamp01(float value);
float lerp(float from, float to, float t);
float min(float a, float b);
float max(float a, float b);
int clamp(int value, int min, int max);
int min(int a, int b);
int max(int a, int b);
bool isWithinRange(float value, float min, float max);
bool isWithinRange(int value, int min, int max);
int randomRange(int min, int max);
namespace vector2
{
sf::Vector2f normalize(sf::Vector2f vec);
sf::Vector2f lerp(sf::Vector2f from, sf::Vector2f to, float t);
float length(sf::Vector2f vec);
float sqLength(sf::Vector2f vec);
}
}
}
| 24.2 | 66 | 0.681818 |
3034bb36d7af4d91d33d98821b33d3646f4bf1b5 | 4,847 | c | C | src/dis/interrupt.c | ZaidQureshi/gpudirect-nvme | cba22f844acd6c3885b936cbb128cca0895a62da | [
"BSD-2-Clause"
] | 11 | 2021-02-17T18:28:31.000Z | 2022-03-22T02:21:29.000Z | src/dis/interrupt.c | ZaidQureshi/gpudirect-nvme | cba22f844acd6c3885b936cbb128cca0895a62da | [
"BSD-2-Clause"
] | 1 | 2022-02-18T05:39:59.000Z | 2022-02-18T05:39:59.000Z | src/dis/interrupt.c | ZaidQureshi/gpudirect-nvme | cba22f844acd6c3885b936cbb128cca0895a62da | [
"BSD-2-Clause"
] | 3 | 2021-11-29T06:46:21.000Z | 2022-03-23T08:27:29.000Z | #ifndef _SISCI
#error "Must compile with SISCI support"
#endif
#ifndef __DIS_CLUSTER__
#define __DIS_CLUSTER__
#endif
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <errno.h>
#include "dis/interrupt.h"
#include "dprintf.h"
#include <sisci_types.h>
#include <sisci_error.h>
#include <sisci_api.h>
/*
* Do some sanity checking and then call supplied callback.
*/
static sci_callback_action_t interrupt_callback(struct local_intr* interrupt,
sci_local_data_interrupt_t intr,
void* data,
uint32_t length,
sci_error_t status)
{
#ifndef NDEBUG
if (status != SCI_ERR_OK)
{
dprintf("Unexpected status in interrupt handler routine: %s\n", _SCIGetErrorString(status));
return SCI_CALLBACK_CANCEL;
}
if (intr != interrupt->intr)
{
dprintf("Possible memory corruption\n");
return SCI_CALLBACK_CANCEL;
}
#endif
interrupt->callback(interrupt->data, data, length);
return SCI_CALLBACK_CONTINUE;
}
int _nvm_local_intr_get(struct local_intr* intr, uint32_t adapter, void* cb_data, intr_callback_t cb)
{
sci_error_t err = SCI_ERR_OK;
// Get local node identifier
SCIGetLocalNodeId(adapter, &intr->node_id, 0, &err);
#ifndef NDEBUG
if (err != SCI_ERR_OK)
{
dprintf("Unexpected error: %s\n", _SCIGetErrorString(err));
return EIO;
}
#endif
// Open SISCI descriptor
SCIOpen(&intr->sd, 0, &err);
#ifndef NDEBUG
if (err != SCI_ERR_OK)
{
dprintf("Failed to open SISCI virtual device: %s\n", _SCIGetErrorString(err));
return EIO;
}
#endif
intr->adapter = adapter;
intr->data = cb_data;
intr->callback = cb;
uint32_t flags = 0;
void* data = NULL;
sci_cb_data_interrupt_t callback = NULL;
// Callback was supplied, set up parameters
if (cb != NULL)
{
data = (void*) intr;
callback = (sci_cb_data_interrupt_t) interrupt_callback;
flags |= SCI_FLAG_USE_CALLBACK;
}
// Create data interrupt
SCICreateDataInterrupt(intr->sd, &intr->intr, adapter, &intr->intr_no, callback, data, flags, &err);
if (err != SCI_ERR_OK)
{
dprintf("Failed to create data interrupt: %s\n", _SCIGetErrorString(err));
SCIClose(intr->sd, 0, &err);
return ENOSPC;
}
return 0;
}
void _nvm_local_intr_put(struct local_intr* intr)
{
sci_error_t err = SCI_ERR_OK;
do
{
SCIRemoveDataInterrupt(intr->intr, 0, &err);
}
while (err == SCI_ERR_BUSY);
SCIClose(intr->sd, 0, &err);
}
int _nvm_local_intr_wait(struct local_intr* intr, void* data, uint16_t maxlen, uint32_t timeout)
{
sci_error_t err = SCI_ERR_OK;
uint32_t len = maxlen;
SCIWaitForDataInterrupt(intr->intr, data, &len, timeout, 0, &err);
switch (err)
{
case SCI_ERR_OK:
return 0;
case SCI_ERR_TIMEOUT:
return ETIMEDOUT;
default:
dprintf("Waiting for data interrupt unexpectedly failed: %s\n", _SCIGetErrorString(err));
return EIO;
}
}
int _nvm_remote_intr_get(struct remote_intr* intr, uint32_t adapter, uint32_t node, uint32_t no)
{
sci_error_t err = SCI_ERR_OK;
SCIOpen(&intr->sd, 0, &err);
#ifndef NDEBUG
if (err != SCI_ERR_OK)
{
dprintf("Failed to open SISCI virtual device: %s\n", _SCIGetErrorString(err));
return EIO;
}
#endif
SCIConnectDataInterrupt(intr->sd, &intr->intr, node, adapter, no, SCI_INFINITE_TIMEOUT, 0, &err);
if (err != SCI_ERR_OK)
{
SCIClose(intr->sd, 0, &err);
return ECONNREFUSED;
}
return 0;
}
void _nvm_remote_intr_put(struct remote_intr* intr)
{
sci_error_t err = SCI_ERR_OK;
SCIDisconnectDataInterrupt(intr->intr, 0, &err);
SCIClose(intr->sd, 0, &err);
}
/*
* Trigger remote interrupt with data.
*/
int _nvm_remote_intr_trigger(const struct remote_intr* intr, void* data, uint16_t length)
{
sci_error_t err = SCI_ERR_OK;
SCITriggerDataInterrupt(intr->intr, data, length, 0, &err);
if (err != SCI_ERR_OK)
{
dprintf("Failed to trigger data interrupt\n");
return ENOTCONN;
}
return 0;
}
/*
* Convenience function for easy remote interrupt triggering.
*/
int _nvm_remote_intr_fire_and_forget(uint32_t adapter, uint32_t node, uint32_t no, void* data, uint16_t len)
{
int status = 0;
struct remote_intr intr;
status = _nvm_remote_intr_get(&intr, adapter, node, no);
if (status != 0)
{
return status;
}
status = _nvm_remote_intr_trigger(&intr, data, len);
_nvm_remote_intr_put(&intr);
return status;
}
| 22.544186 | 108 | 0.626986 |
3086c0d3caa3ae908636e60dbbc22249a976ad41 | 810 | h | C | RigidBodies/PhysicsProject/SolarSystem.h | mattstruble/PhysicSimulations | 29e6b4c07a9faed5997a0023e953bf345f2e7323 | [
"MIT"
] | null | null | null | RigidBodies/PhysicsProject/SolarSystem.h | mattstruble/PhysicSimulations | 29e6b4c07a9faed5997a0023e953bf345f2e7323 | [
"MIT"
] | null | null | null | RigidBodies/PhysicsProject/SolarSystem.h | mattstruble/PhysicSimulations | 29e6b4c07a9faed5997a0023e953bf345f2e7323 | [
"MIT"
] | null | null | null | //======================================================================
//File: SolarSystem.h
//Author: Matt Struble
//======================================================================
#ifndef SOLAR_SYSTEM_H
#define SOLAR_SYSTEM_H
//======================================================================
#pragma once
//======================================================================
#include "Planet.h"
#include <vector>
#include "SolarSystemParser.h"
#include "PhysicObjectHandler.h"
//======================================================================
class SolarSystem
{
public:
SolarSystem();
~SolarSystem();
void Initialize(PhysicObjectHandler* handler);
inline const std::vector<Planet*> GetPlanets() const { return m_Planets; };
private:
std::vector<Planet*> m_Planets;
};
#endif | 30 | 76 | 0.417284 |
d05cb61bbc4e7d05b7a5c9b9e5df309afe040c35 | 9,820 | c | C | Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchLanSxSmm.c | hwu25/edk2-platforms | 94b23488bbda4361b6753adf6025c8a1dfabe27b | [
"BSD-2-Clause"
] | null | null | null | Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchLanSxSmm.c | hwu25/edk2-platforms | 94b23488bbda4361b6753adf6025c8a1dfabe27b | [
"BSD-2-Clause"
] | null | null | null | Silicon/Intel/KabylakeSiliconPkg/Pch/PchInit/Smm/PchLanSxSmm.c | hwu25/edk2-platforms | 94b23488bbda4361b6753adf6025c8a1dfabe27b | [
"BSD-2-Clause"
] | null | null | null | /** @file
PCH LAN Sx handler implementation.
Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that 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 <Library/TimerLib.h>
#include "PchInitSmm.h"
//
// Maximum loop time for GbE status check
//
#define GBE_MAX_LOOP_TIME 4000
/**
Checks if Lan is Enabled or Disabled
@retval BOOLEAN TRUE if device is enabled, FALSE otherwise.
**/
BOOLEAN
IsGbeEnabled (
VOID
)
{
UINTN GbePciBase;
GbePciBase = MmPciBase (
DEFAULT_PCI_BUS_NUMBER_PCH,
PCI_DEVICE_NUMBER_PCH_LAN,
PCI_FUNCTION_NUMBER_PCH_LAN
);
if (MmioRead32 (GbePciBase) != 0xFFFFFFFF) {
return TRUE;
}
return FALSE;
}
/**
Test for MDIO operation complete.
@param [in] GbeBar GbE MMIO space
@retval EFI_SUCCESS
@retval EFI_TIMEOUT
**/
EFI_STATUS
GbeMdiWaitReady (
UINT32 GbeBar
)
{
UINT32 Count;
for (Count = 0; Count < GBE_MAX_LOOP_TIME; ++Count) {
if (MmioRead32 (GbeBar + R_PCH_LAN_CSR_MDIC) & B_PCH_LAN_CSR_MDIC_RB) {
return EFI_SUCCESS;
}
MicroSecondDelay (50);
}
return EFI_TIMEOUT;
}
/**
Acquire MDIO software semaphore.
1. Ensure that MBARA offset F00h [5] = 1b
2. Poll MBARA offset F00h [5] up to 200ms
@param [in] GbeBar GbE MMIO space
@retval EFI_SUCCESS
@retval EFI_TIMEOUT
**/
EFI_STATUS
GbeAcquireMdio (
IN UINT32 GbeBar
)
{
UINT32 ExtCnfCtrl;
UINT32 Count;
MmioOr32 (GbeBar + R_PCH_LAN_CSR_EXTCNF_CTRL, B_PCH_LAN_CSR_EXTCNF_CTRL_SWFLAG);
for (Count = 0; Count < GBE_MAX_LOOP_TIME; ++Count) {
ExtCnfCtrl = MmioRead32 (GbeBar + R_PCH_LAN_CSR_EXTCNF_CTRL);
if (ExtCnfCtrl & B_PCH_LAN_CSR_EXTCNF_CTRL_SWFLAG) {
return EFI_SUCCESS;
}
MicroSecondDelay (50);
}
ASSERT (FALSE);
return EFI_TIMEOUT;
}
/**
Release MDIO software semaphore by clearing MBARA offset F00h [5]
@param [in] GbeBar GbE MMIO space
**/
VOID
GbeReleaseMdio (
IN UINT32 GbeBar
)
{
ASSERT (MmioRead32 (GbeBar + R_PCH_LAN_CSR_EXTCNF_CTRL) & B_PCH_LAN_CSR_EXTCNF_CTRL_SWFLAG);
MmioAnd32 (GbeBar + R_PCH_LAN_CSR_EXTCNF_CTRL, (UINT32) ~B_PCH_LAN_CSR_EXTCNF_CTRL_SWFLAG);
ASSERT ((MmioRead32 (GbeBar + R_PCH_LAN_CSR_EXTCNF_CTRL) & B_PCH_LAN_CSR_EXTCNF_CTRL_SWFLAG) == 0);
}
/**
Perform MDI write.
@param [in] GbeBar GbE MMIO space
@param [in] Data Value to write in lower 16bits, upper 16bit may contain opcode.
@return EFI_STATUS
**/
EFI_STATUS
GbeMdiWrite (
IN UINT32 GbeBar,
IN UINT32 Data
)
{
MmioWrite32 (GbeBar + R_PCH_LAN_CSR_MDIC, Data | 0x04000000);
return GbeMdiWaitReady (GbeBar);
}
/**
Perform MDI read.
@param [in] GbeBar GbE MMIO space
@param [in] Command MDI command
@param [out] Data Value read
@return EFI_STATUS
**/
EFI_STATUS
GbeMdiRead (
IN UINT32 GbeBar,
IN UINT32 Command,
OUT UINT16 *Data
)
{
EFI_STATUS Status;
MmioWrite32 (GbeBar + R_PCH_LAN_CSR_MDIC, Command | 0x08000000);
Status = GbeMdiWaitReady (GbeBar);
*Data = (UINT16) MmioRead32 (GbeBar + R_PCH_LAN_CSR_MDIC);
return Status;
}
/**
Configure WOL during Sx entry.
@param [in] GbeBar GbE MMIO space
**/
VOID
GbeWolWorkaround (
IN UINT32 GbeBar
)
{
UINT32 RAL0;
UINT32 RAH0;
EFI_STATUS Status;
UINT16 Data16;
//
// System BIOS performs read from MBARA offset 5400h [31:0] and MBARA offset 5404h [31:0]
//
RAL0 = MmioRead32 (GbeBar + R_PCH_LAN_CSR_RAL);
RAH0 = MmioRead32 (GbeBar + R_PCH_LAN_CSR_RAH);
//
// Set MBARA offset 20h = 0x043f6400
//
Status = GbeMdiWrite (GbeBar, 0x043f6400);
//
// If timeout is reached, force MAC to SMB and try again
// Assert if failed on second attempt
//
if (Status == EFI_TIMEOUT) {
//
// Change Extended Device Control Register BIT 11 to 1 which
// forces the interface between the MAC and the Phy to be on SMBus.
// Cleared on the assertion of PCI reset.
//
MmioOr32 (GbeBar + R_PCH_LAN_CSR_CTRL_EXT, B_PCH_LAN_CSR_CTRL_EXT_FORCE_SMB);
Status = GbeMdiWrite (GbeBar, 0x043f6400);
}
if (EFI_ERROR (Status)) return;
//
// Wait 4 mSec
//
MicroSecondDelay (4000);
//
// Set MBARA offset 20h = 0x4310010
//
Status = GbeMdiWrite (GbeBar, 0x04310010);
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x4320000 or with
// the least significant word of MBARA offset 5400
//
Status = GbeMdiWrite (GbeBar, (0x04320000 | (RAL0 & 0xFFFF)));
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x4310011
//
Status = GbeMdiWrite (GbeBar, 0x04310011);
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x4320000 or with
// the most significant word of MBARA offset 5400
//
Status = GbeMdiWrite (GbeBar, (0x04320000 | (RAL0 >> 16)));
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x4310012
//
Status = GbeMdiWrite (GbeBar, 0x04310012);
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x4320000 or with
// the least significant word of MBARA offset 5404
//
Status = GbeMdiWrite (GbeBar, (0x04320000 | (RAH0 & B_PCH_LAN_CSR_RAH_RAH)));
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x4310013
//
Status = GbeMdiWrite (GbeBar, 0x04310013);
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x4328000
//
Status = GbeMdiWrite (GbeBar, 0x04328000);
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x4310001
//
Status = GbeMdiWrite (GbeBar, 0x04310001);
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x8320000
//
Status = GbeMdiRead (GbeBar, 0x08320000, &Data16);
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x4320000 OR TEMP[15:0] OR 1
//
Status = GbeMdiWrite (GbeBar, 0x04320000 | Data16 | BIT0);
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x43f6460
//
Status = GbeMdiWrite (GbeBar, 0x043f6460);
if (EFI_ERROR (Status)) return;
//
// Wait 4 mSec
//
MicroSecondDelay (4000);
//
// Set MBARA offset 20h = 0x4310042
//
Status = GbeMdiWrite (GbeBar, 0x04310042);
if (EFI_ERROR (Status)) return;
//
// Set MBARA offset 20h = 0x43F6020
//
Status = GbeMdiWrite (GbeBar, 0x043F6020);
if (EFI_ERROR (Status)) return;
//
// Wait 4 mSec
//
MicroSecondDelay (4000);
//
// Set MBARA offset 20h = 0x8310000
// TEMP[15:0] = MBARA + 20[15:0]
//
Status = GbeMdiRead (GbeBar, 0x08310000, &Data16);
if (EFI_ERROR (Status)) return;
//
// Set MBARA + 20h = 4310000h or with the TEMP[15:0] OR 10h
//
GbeMdiWrite (GbeBar, 0x04310000 | Data16 | BIT4);
}
/**
Additional Internal GbE Controller special cases WOL Support.
System BIOS is required perform additional steps upon S0 to S3,4,5 transition
when ME is off and GbE device in D0. This is needed to enable LAN wake
in particular when platform is shut-down from EFI.
**/
VOID
GbeSxWorkaround (
VOID
)
{
UINTN LanRegBase;
UINT32 GbeBar;
EFI_STATUS Status;
LanRegBase = MmPciBase (
DEFAULT_PCI_BUS_NUMBER_PCH,
PCI_DEVICE_NUMBER_PCH_LAN,
PCI_FUNCTION_NUMBER_PCH_LAN
);
if (MmioRead16 (LanRegBase + PCI_VENDOR_ID_OFFSET) == 0xFFFF) {
return;
}
//
// Check if GbE device is in D0
//
if ((MmioRead16 (LanRegBase + R_PCH_LAN_PMCS) & B_PCH_LAN_PMCS_PS) != V_PCH_LAN_PMCS_PS0) {
return;
}
ASSERT (mResvMmioSize >= (1 << N_PCH_LAN_MBARA_ALIGN));
GbeBar = (UINT32) mResvMmioBaseAddr;
if (GbeBar == 0) {
ASSERT (FALSE);
return;
}
//
// Enable MMIO decode using reserved range.
//
MmioAnd16 (LanRegBase + PCI_COMMAND_OFFSET, (UINT16) ~EFI_PCI_COMMAND_MEMORY_SPACE);
MmioWrite32 (LanRegBase + R_PCH_LAN_MBARA, GbeBar);
MmioOr16 (LanRegBase + PCI_COMMAND_OFFSET, EFI_PCI_COMMAND_MEMORY_SPACE);
//
// If MBARA offset 5800h [0] = 1b then proceed with the w/a
//
if (MmioRead32 (GbeBar + R_PCH_LAN_CSR_WUC) & B_PCH_LAN_CSR_WUC_APME) {
Status = GbeAcquireMdio (GbeBar);
ASSERT_EFI_ERROR (Status);
if (!EFI_ERROR (Status)) {
GbeWolWorkaround (GbeBar);
GbeReleaseMdio (GbeBar);
}
}
//
// Disable MMIO decode.
//
MmioAnd16 (LanRegBase + PCI_COMMAND_OFFSET, (UINT16) ~EFI_PCI_COMMAND_MEMORY_SPACE);
MmioWrite32 (LanRegBase + R_PCH_LAN_MBARA, 0);
}
/**
Enable platform wake from LAN when in DeepSx if platform supports it.
Called upon Sx entry.
**/
VOID
GbeConfigureDeepSxWake (
VOID
)
{
UINT32 PchPwrmBase;
PchPwrmBaseGet (&PchPwrmBase);
if ((MmioRead32 (PchPwrmBase + R_PCH_PWRM_DSX_CFG) & (UINT32) B_PCH_PWRM_DSX_CFG_LAN_WAKE_EN) != 0) {
IoOr32 ((UINTN) (mAcpiBaseAddr + R_PCH_ACPI_GPE0_EN_127_96), (UINT32) B_PCH_ACPI_GPE0_EN_127_96_LAN_WAKE);
}
}
/**
GbE Sx entry handler
**/
VOID
PchLanSxCallback (
VOID
)
{
if (IsGbeEnabled ()) {
GbeSxWorkaround ();
GbeConfigureDeepSxWake ();
}
}
| 23.605769 | 111 | 0.641853 |
6583924f9da865a4aafcb923c616a23c6c4138bc | 517 | h | C | app/src/main/cpp/constants.h | AleksandarDamnjanovic/Goodha-Share-Android-App | 0daea39ef388af1e0964b02a8fcb3ab616869ce4 | [
"Apache-2.0"
] | null | null | null | app/src/main/cpp/constants.h | AleksandarDamnjanovic/Goodha-Share-Android-App | 0daea39ef388af1e0964b02a8fcb3ab616869ce4 | [
"Apache-2.0"
] | null | null | null | app/src/main/cpp/constants.h | AleksandarDamnjanovic/Goodha-Share-Android-App | 0daea39ef388af1e0964b02a8fcb3ab616869ce4 | [
"Apache-2.0"
] | null | null | null | //
// Created by aleksandar on 8/21/21.
//
#ifndef GOODHA_SHARE_CONSTANTS_H
#define GOODHA_SHARE_CONSTANTS_H
const int CHUNK_SIZE= 1024*50;
const char HEADER_START[1]={0x00};
const char HEADER_END[1]={0x01};
const char CONTENT_START[1]={0x02};
const char CONTENT_END[1]={0x03};
const char CHUNK[1]={0x0d};
const char CHUNK_RECEIVED[1]={0x0a};
const int SERVICE_PORT= 44445;
#define SERVICE_PORT_CHAR "44445"
const int DETECTION_PORT= 44446;
#define DETECTION_PORT_CHAR "44446"
#endif //GOODHA_SHARE_CONSTANTS_H | 21.541667 | 36 | 0.769826 |
4577fcad4ad0bdd1836f08c4e78a2a0e964ad93b | 4,208 | h | C | src/qt/src/gui/inputmethod/qximinputcontext_p.h | ant0ine/phantomjs | 8114d44a28134b765ab26b7e13ce31594fa81253 | [
"BSD-3-Clause"
] | 46 | 2015-01-08T14:32:34.000Z | 2022-02-05T16:48:26.000Z | src/qt/src/gui/inputmethod/qximinputcontext_p.h | ant0ine/phantomjs | 8114d44a28134b765ab26b7e13ce31594fa81253 | [
"BSD-3-Clause"
] | 7 | 2015-01-20T14:28:12.000Z | 2017-01-18T17:21:44.000Z | src/qt/src/gui/inputmethod/qximinputcontext_p.h | ant0ine/phantomjs | 8114d44a28134b765ab26b7e13ce31594fa81253 | [
"BSD-3-Clause"
] | 14 | 2015-10-27T06:17:48.000Z | 2020-03-03T06:15:50.000Z | /****************************************************************************
**
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the QtGui module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** 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 Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/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 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
/****************************************************************************
**
** Definition of QXIMInputContext class
**
** Copyright (C) 2003-2004 immodule for Qt Project. All rights reserved.
**
** This file is written to contribute to Nokia Corporation and/or its subsidiary(-ies) under their own
** license. You may use this file under your Qt license. Following
** description is copied from their original file headers. Contact
** immodule-qt@freedesktop.org if any conditions of this licensing are
** not clear to you.
**
****************************************************************************/
#ifndef QXIMINPUTCONTEXT_P_H
#define QXIMINPUTCONTEXT_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.
//
#if !defined(Q_NO_IM)
#include "QtCore/qglobal.h"
#include "QtGui/qinputcontext.h"
#include "QtGui/qfont.h"
#include "QtCore/qhash.h"
#ifdef Q_WS_X11
#include "QtCore/qlist.h"
#include "QtCore/qbitarray.h"
#include "QtGui/qwindowdefs.h"
#include "private/qt_x11_p.h"
#endif
QT_BEGIN_NAMESPACE
class QKeyEvent;
class QWidget;
class QFont;
class QString;
class QXIMInputContext : public QInputContext
{
Q_OBJECT
public:
struct ICData {
XIC ic;
XFontSet fontset;
QWidget *widget;
QString text;
QBitArray selectedChars;
bool composing;
bool preeditEmpty;
void clear();
};
QXIMInputContext();
~QXIMInputContext();
QString identifierName();
QString language();
void reset();
void mouseHandler( int x, QMouseEvent *event);
bool isComposing() const;
void setFocusWidget( QWidget *w );
void widgetDestroyed(QWidget *w);
void create_xim();
void close_xim();
void update();
ICData *icData() const;
protected:
bool x11FilterEvent( QWidget *keywidget, XEvent *event );
private:
static XIMStyle xim_style;
QString _language;
XIM xim;
QHash<WId, ICData *> ximData;
ICData *createICData(QWidget *w);
};
QT_END_NAMESPACE
#endif // Q_NO_IM
#endif // QXIMINPUTCONTEXT_P_H
| 29.426573 | 102 | 0.668013 |
30b7441ae86b0b4b84c859be0168d66f618cf0d5 | 1,398 | h | C | DrawKitTouch/source/drawkit/Code/DKSweptAngleGradient.h | alexcurylo/drawkit-touch | 471dd74bc65d6a2da96b8cc8b098004aa5ccfeda | [
"MIT"
] | null | null | null | DrawKitTouch/source/drawkit/Code/DKSweptAngleGradient.h | alexcurylo/drawkit-touch | 471dd74bc65d6a2da96b8cc8b098004aa5ccfeda | [
"MIT"
] | null | null | null | DrawKitTouch/source/drawkit/Code/DKSweptAngleGradient.h | alexcurylo/drawkit-touch | 471dd74bc65d6a2da96b8cc8b098004aa5ccfeda | [
"MIT"
] | null | null | null | ///**********************************************************************************************************************************
/// DKSweptAngleGradient.h
/// DrawKit ©2005-2008 Apptree.net
///
/// Created by graham on 13/07/2007.
///
/// This software is released subject to licensing conditions as detailed in DRAWKIT-LICENSING.TXT, which must accompany this source file.
///
///**********************************************************************************************************************************
#import "DKGradient.h"
typedef union
{
unsigned long pixel;
struct
{
unsigned char a;
unsigned char r;
unsigned char g;
unsigned char b;
}
c;
}
pix_int;
@interface DKSweptAngleGradient : DKGradient
{
CGImageRef m_sa_image;
CGContextRef m_sa_bitmap;
pix_int* m_sa_colours;
NSInteger m_sa_segments;
NSPoint m_sa_centre;
CGFloat m_sa_startAngle;
NSInteger m_sa_img_width;
BOOL m_ditherColours;
}
+ (DKGradient*) sweptAngleGradient;
//+ (DKGradient*) sweptAngleGradientWithStartingColor:(NSColor*) c1 endingColor:(NSColor*) c2;
+ (DKGradient*) sweptAngleGradientWithStartingColor:(DKColor*) c1 endingColor:(DKColor*) c2;
- (void) setNumberOfAngularSegments:(NSInteger) ns;
- (NSInteger) numberOfAngularSegments;
- (void) preloadColours;
- (void) createGradientImageWithRect:(NSRect) rect;
- (void) invalidateCache;
@end
| 25.888889 | 140 | 0.594421 |
45ec50265e574a46356896583de7ba30f4a871e0 | 6,085 | c | C | interview/sum_of_three.c | leok7v/interview2020 | 20de52e5fb5a42fe2fe8df40b3b063557cf2a59f | [
"Unlicense"
] | null | null | null | interview/sum_of_three.c | leok7v/interview2020 | 20de52e5fb5a42fe2fe8df40b3b063557cf2a59f | [
"Unlicense"
] | null | null | null | interview/sum_of_three.c | leok7v/interview2020 | 20de52e5fb5a42fe2fe8df40b3b063557cf2a59f | [
"Unlicense"
] | null | null | null | #include <assert.h>
#include <errno.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// Problem statement:
// given array of positive distinct integers (in random order)
// count number of tripples (not necesseraly sequential) that adds
// to specified sum:
// int sum3_count_O3(int a[], int n)
// array can be rewritten in place during counting
#undef VERBOSE // define for debuggins, too much output and too slow for test run
static bool verbose; // initialized as false by linker, loader
#define countof(a) (sizeof(a) / sizeof(a[0]))
static void test(void);
static int compare(const void* a, const void* b) { return *(int*)a - *(int*)b; }
#ifdef VERBOSE
# define trace(format, ...) printf(format, ## __VA_ARGS__)
# define traceln(format, ...) printf(format "\n", ## __VA_ARGS__)
#else
# define trace(format, ...) do { if (verbose) { printf(format "\n", ## __VA_ARGS__); } } while (false)
# define traceln(format, ...) do { if (verbose) { printf(format "\n", ## __VA_ARGS__); } } while (false)
#endif
static void printa(int* a, int n, int s) {
trace("s=%d a[%d]={", s, n);
for (int i = 0; i < n; i++) { trace("%d%c", a[i], i < n - 1 ? ',' : '}'); }
trace("\n");
}
static int sum3_count_O3(int* a, int n, int s) {
int count = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
for (int k = j + 1; k < n; k++) {
if (a[i] + a[j] + a[k] == s) {
traceln("a[%d]=%d + a[%d]=%d + a[%d]=%d == %d", i, a[i], j, a[j], k, a[k], s);
}
count += a[i] + a[j] + a[k] == s;
}
}
}
traceln("sum count=%d O(n^3)", count);
return count;
}
static int sum3_count_ONlnN(int* a, int n, int s) {
qsort(a, n, sizeof(a[0]), compare);
int count = 0;
int i = 0;
int j = i + 1;
int k = n - 1;
while (i < j && j < k) {
while (i < k - 1 && a[i] + a[i + 1] + a[k] > s) { k--; }
while (j < k && a[i] + a[j] + a[k] < s) { j++; }
while (j < k && a[i] + a[j] + a[k] > s) { k--; }
if (j < k && a[i] + a[j] + a[k] == s) {
count++;
traceln("a[%d]=%d + a[%d]=%d + a[%d]=%d == %d", i, a[i], j, a[j], k, a[k], s);
// there is no more tripples inside [i..k] that
// can sum to "s" because all numbers are distinct
if (j < k - 1) {
k--;
} else {
i++;
j = i + 1;
while (k < n - 1 && a[i] + a[j] + a[k + 1] <= s) { k++; }
}
} else if (j == k) {
if (k < i + 2) {
k--;
if (j > k - 1) { j = k - 1; }
} else if (i < n - 2){
i++;
j = i + 1;
while (k < n - 1 && a[i] + a[j] + a[k + 1] <= s) { k++; }
} else {
break;
}
}
}
traceln("sum count=%d O(n * ln(n))", count);
return count;
}
static int run(int* a, int n, int sum) {
int c3 = sum3_count_O3(a, n, sum);
int cn = sum3_count_ONlnN(a, n, sum);
if (c3 != cn) { // useful for debugging:
verbose = true;
printa(a, n, sum);
c3 = sum3_count_O3(a, n, sum);
cn = sum3_count_ONlnN(a, n, sum);
}
assert(c3 == cn);
return c3 == cn ? 0 : EFAULT;
}
int main(int argc, const char * argv[]) {
int a[] = {13, 2, 3, 6, 4, 7, 9, 10, 1};
// a[] = {1, 2, 3, 4, 6, 7, 9, 10, 13} sorted
int b[] = {6,16,18,25,30,38,58,60,73,89};
int r = run(a, countof(a), 13); // 13 == 1 + 2 + 10, 2 + 4 + 9, 0 + 3 + 10, ...
r = r == 0 ? run(b, countof(a), 58) : r;
r = r == 0 ? run(b, countof(a), 59) : r;
r = r == 0 ? run(b, countof(a), 61) : r;
r = r == 0 ? run(b, countof(a), 82) : r;
test();
return 0;
}
static void fill_array(int* a, int n, int range) {
for (int i = 0; i < n; i++) {
bool distinct;
int r;
do {
distinct = true;
r = random() % range + 1;
for (int j = 0; j < i && distinct; j++) { distinct = a[j] != r; }
} while (!distinct);
a[i] = r;
}
}
static double seconds() {
struct timespec ts = {};
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec + ts.tv_nsec * 1e-09;
}
static void performance() {
enum { N = 10 };
int a[1000];
const int n = countof(a);
const int sum = n / 2;
fill_array(a, n, n * 3 / 2);
double time = seconds();
for (int i = 0; i < N; i++) { sum3_count_O3(a, n, sum); }
double elapsed_o3 = (seconds() - time) * 1000;
enum { M = 1000 };
time = seconds();
for (int i = 0; i < N; i++) { sum3_count_ONlnN(a, n, sum); }
double elapsed_ln = (seconds() - time) * 1000;
fprintf(stderr, "performance n=%d O(n^3) %.6f milliseconds O(n * ln(n)) %.6f milliseconds\n",
n, elapsed_o3 / N, elapsed_ln / M);
}
static void test_n(const int n, const int iterations) {
int* a = (int*)alloca(n * sizeof(int));
for (int pass = 0; pass < iterations; pass++) {
fill_array(a, n, 98); // [1..99] easy on the eyes to debug
for (int s = 3; s < 99 * 3; s++) {
if (sum3_count_O3(a, n, s) != sum3_count_ONlnN(a, n, s)) {
verbose = true;
printa(a, n, s);
(void)(sum3_count_O3(a, n, s) != sum3_count_ONlnN(a, n, s)); // in verbose mode
fprintf(stderr, "TEST FAILED\n");
exit(1);
}
}
}
}
static void test(void) {
for (int n = 3; n <= 32; n++) { test_n(n, 1000); }
fprintf(stderr, "TEST PASSED\n");
performance();
}
// performance n=1000 O(n^3) 242.420400 milliseconds O(n * ln(n)) 0.001085 milliseconds
// Model Name: MacBook Pro
// Model Identifier: MacBookPro8,3
// Processor Name: Intel Core i7
// Processor Speed: 2.5 GHz
// Number of Processors : 1
// Total Number of Cores: 4
// L2 Cache (per Core): 256 KB
// L3 Cache: 8 MB
// Memory: 8 GB
// leo.kuznetsov@gmail.com
// Nov 19, 2020
| 32.026316 | 107 | 0.47461 |
a141e58f37fc6201c970fe94a861ba41fe0d7338 | 221 | h | C | SDKChallengeProject/GameParty/Game-iOS/GGameParty/My/View/GGAnwserTableViewCell.h | AgoraIO-Community/RTC-Innovation-Challenge-2020 | 13a1b7f917a90beb758727eeb908622045420455 | [
"MIT"
] | 33 | 2020-07-31T05:53:41.000Z | 2021-12-27T11:18:44.000Z | SDKChallengeProject/GameParty/Game-iOS/GGameParty/My/View/GGAnwserTableViewCell.h | AgoraIO-Community/RTC-Innovation-Challenge-2020 | 13a1b7f917a90beb758727eeb908622045420455 | [
"MIT"
] | 6 | 2020-08-02T03:34:16.000Z | 2020-09-10T20:22:31.000Z | SDKChallengeProject/GameParty/Game-iOS/GGameParty/My/View/GGAnwserTableViewCell.h | AgoraIO-Community/RTC-Innovation-Challenge-2020 | 13a1b7f917a90beb758727eeb908622045420455 | [
"MIT"
] | 79 | 2020-07-31T03:02:30.000Z | 2021-07-13T06:45:37.000Z | //
// GGAnwserTableViewCell.h
// GGameParty
//
// Created by Victor on 2018/8/7.
// Copyright © 2018年 Victor. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface GGAnwserTableViewCell : UITableViewCell
@end
| 15.785714 | 50 | 0.710407 |
ecb6fcd013e35e828dfa3669610547b3e5b4d2b3 | 26,133 | c | C | NORDIC_SDK/components/iot/mqtt/mqtt.c | zhiqiang-hu/ZJ-SDK-RT-Thread-NORDIC | 9a8ec42b0d8d36b082eafea6987536c951bd13f6 | [
"Apache-2.0"
] | 68 | 2018-12-22T08:04:41.000Z | 2022-01-19T02:13:01.000Z | NORDIC_SDK/components/iot/mqtt/mqtt.c | xupenghu/ZJ-SDK-RT-Thread-NORDIC | 12475c5ceef637cd5038e23f1c69176708c83aa7 | [
"Apache-2.0"
] | null | null | null | NORDIC_SDK/components/iot/mqtt/mqtt.c | xupenghu/ZJ-SDK-RT-Thread-NORDIC | 12475c5ceef637cd5038e23f1c69176708c83aa7 | [
"Apache-2.0"
] | 49 | 2018-12-24T00:53:15.000Z | 2021-08-09T01:12:18.000Z | /**
* Copyright (c) 2015 - 2018, Nordic Semiconductor ASA
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form, except as embedded into a Nordic
* Semiconductor ASA integrated circuit in a product or a software update for
* such product, must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of Nordic Semiconductor ASA nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* Nordic Semiconductor ASA integrated circuit.
*
* 5. Any software provided in binary form under this license must not be reverse
* engineered, decompiled, modified and/or disassembled.
*
* THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA 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 mqtt.c
*
* @brief MQTT Client API Implementation.
*/
#include "mqtt.h"
#include "mem_manager.h"
#include "mqtt_transport.h"
#include "mqtt_internal.h"
#include "iot_timer.h"
#if MQTT_CONFIG_LOG_ENABLED
#define NRF_LOG_MODULE_NAME mqtt
#define NRF_LOG_LEVEL MQTT_CONFIG_LOG_LEVEL
#define NRF_LOG_INFO_COLOR MQTT_CONFIG_INFO_COLOR
#define NRF_LOG_DEBUG_COLOR MQTT_CONFIG_DEBUG_COLOR
#include "nrf_log.h"
NRF_LOG_MODULE_REGISTER();
#define MQTT_TRC NRF_LOG_DEBUG /**< Used for getting trace of execution in the module. */
#define MQTT_ERR NRF_LOG_ERROR /**< Used for logging errors in the module. */
#define MQTT_DUMP NRF_LOG_HEXDUMP_DEBUG /**< Used for dumping octet information to get details of bond information etc. */
#define MQTT_ENTRY() MQTT_TRC(">> %s", __func__)
#define MQTT_EXIT() MQTT_TRC("<< %s", __func__)
#else // MQTT_CONFIG_LOG_ENABLED
#define MQTT_TRC(...) /**< Disables traces. */
#define MQTT_DUMP(...) /**< Disables dumping of octet streams. */
#define MQTT_ERR(...) /**< Disables error logs. */
#define MQTT_ENTRY(...)
#define MQTT_EXIT(...)
#endif // MQTT_CONFIG_LOG_ENABLED
/**< Never changing ping request, needed for Keep Alive. */
static const uint8_t m_ping_packet[MQTT_PKT_HEADER_SIZE] = \
{MQTT_PKT_TYPE_PINGREQ, \
0x00};
/**< Never changing disconnect request. */
static const uint8_t m_disc_packet[MQTT_PKT_HEADER_SIZE] = \
{MQTT_PKT_TYPE_DISCONNECT, \
0x00};
static mqtt_client_t * m_mqtt_client[MQTT_MAX_CLIENTS]; /**< MQTT Client table. */
SDK_MUTEX_DEFINE(m_mqtt_mutex) /**< Mutex variable for the module, currently unused. */
static uint32_t get_client_index(mqtt_client_t * const p_client)
{
for (uint32_t index = 0; index < MQTT_MAX_CLIENTS; index++)
{
if (m_mqtt_client[index] == p_client)
{
return index;
}
}
return MQTT_MAX_CLIENTS;
}
void client_free(mqtt_client_t * const p_client)
{
MQTT_STATE_INIT(p_client);
// Free memory used for TX packets and reset the pointer.
nrf_free(p_client->p_packet);
p_client->p_packet = NULL;
// Free TLS instance and reset the instance.
UNUSED_VARIABLE(nrf_tls_free(&p_client->tls_instance));
NRF_TLS_INTSANCE_INIT(&p_client->tls_instance);
}
void client_init(mqtt_client_t * const p_client)
{
memset(p_client, 0, sizeof(*p_client));
MQTT_STATE_INIT(p_client);
p_client->protocol_version = MQTT_VERSION_3_1_0;
p_client->clean_session = 1;
NRF_TLS_INTSANCE_INIT(&p_client->tls_instance);
}
/**@brief Notifies event to the application.
*
* @param[in] p_client Identifies the client for which the procedure is requested.
* @param[in] p_evt Reason for disconnection.
*/
void event_notify(mqtt_client_t * const p_client, const mqtt_evt_t * p_evt, uint32_t flags)
{
const mqtt_evt_cb_t evt_cb = p_client->evt_cb;
if (evt_cb != NULL)
{
MQTT_MUTEX_UNLOCK();
evt_cb(p_client, p_evt);
MQTT_MUTEX_LOCK();
if (IS_SET(flags,MQTT_EVT_FLAG_INSTANCE_RESET))
{
client_init(p_client);
}
}
}
/**@brief Notifies disconnection event to the application.
*
* @param[in] p_client Identifies the client for which the procedure is requested.
* @param[in] result Reason for disconnection.
*/
void disconnect_event_notify(mqtt_client_t * p_client, uint32_t result)
{
mqtt_evt_t evt;
const uint32_t client_index = get_client_index(p_client);
// Remove the client from internal table.
if (client_index != MQTT_MAX_CLIENTS)
{
m_mqtt_client[client_index] = NULL;
}
// Determine appropriate event to generate.
if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_CONNECTED) ||
MQTT_VERIFY_STATE(p_client, MQTT_STATE_DISCONNECTING))
{
evt.id = MQTT_EVT_DISCONNECT;
evt.result = result;
}
else
{
evt.id = MQTT_EVT_CONNACK;
evt.result = MQTT_CONNECTION_FAILED;
}
// Free the instance.
client_free(p_client);
// Notify application.
event_notify(p_client, &evt, MQTT_EVT_FLAG_INSTANCE_RESET);
}
uint32_t mqtt_init(void)
{
SDK_MUTEX_INIT(m_mqtt_mutex);
MQTT_MUTEX_LOCK();
memset(m_mqtt_client, 0, sizeof(m_mqtt_client));
MQTT_MUTEX_UNLOCK();
return nrf_tls_init();
}
void mqtt_client_init(mqtt_client_t * const p_client)
{
NULL_PARAM_CHECK_VOID(p_client);
MQTT_MUTEX_LOCK();
client_init(p_client);
MQTT_MUTEX_UNLOCK();
}
uint32_t mqtt_connect(mqtt_client_t * const p_client)
{
// Look for a free instance if available.
uint32_t err_code = NRF_SUCCESS;
uint32_t client_index = 0;
NULL_PARAM_CHECK(p_client);
NULL_PARAM_CHECK(p_client->client_id.p_utf_str);
MQTT_MUTEX_LOCK();
for (client_index = 0; client_index < MQTT_MAX_CLIENTS; client_index++)
{
if (m_mqtt_client[client_index] == NULL)
{
// Found a free instance.
m_mqtt_client[client_index] = p_client;
// Allocate buffer packets in TX path.
p_client->p_packet = nrf_malloc(MQTT_MAX_PACKET_LENGTH);
break;
}
}
if ((client_index == MQTT_MAX_CLIENTS) || (p_client->p_packet == NULL))
{
err_code = (NRF_ERROR_NO_MEM | IOT_MQTT_ERR_BASE);
}
else
{
err_code = tcp_request_connection(p_client);
if (err_code != NRF_SUCCESS)
{
// Free the instance.
m_mqtt_client[client_index] = NULL;
nrf_free(p_client->p_packet);
err_code = MQTT_ERR_TCP_PROC_FAILED;
}
}
UNUSED_VARIABLE(p_client);
MQTT_MUTEX_UNLOCK();
return err_code;
}
uint32_t mqtt_publish(mqtt_client_t * const p_client,
mqtt_publish_param_t const * const p_param)
{
uint32_t err_code = MQTT_ERR_NOT_CONNECTED;
uint32_t offset = 0;
uint32_t mqtt_packetlen = 0;
uint8_t * p_payload;
NULL_PARAM_CHECK(p_client);
NULL_PARAM_CHECK(p_param);
MQTT_TRC("[CID %p]:[State 0x%02x]: >> %s Topic size 0x%08x, Data size 0x%08x",
p_client,
p_client->state,
__func__,
p_param->message.topic.topic.utf_strlen,
p_param->message.payload.bin_strlen);
MQTT_MUTEX_LOCK();
p_payload = &p_client->p_packet[MQTT_FIXED_HEADER_EXTENDED_SIZE];
if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_PENDING_WRITE))
{
err_code = (NRF_ERROR_BUSY | IOT_MQTT_ERR_BASE);
}
else if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_CONNECTED))
{
memset(p_payload, 0, MQTT_MAX_PACKET_LENGTH);
// Pack topic.
err_code = pack_utf8_str(&p_param->message.topic.topic,
MQTT_MAX_VARIABLE_HEADER_N_PAYLOAD,
p_payload,
&offset);
if (err_code == NRF_SUCCESS)
{
if (p_param->message.topic.qos)
{
err_code = pack_uint16(p_param->message_id,
MQTT_MAX_VARIABLE_HEADER_N_PAYLOAD,
p_payload,
&offset);
}
}
if (err_code == NRF_SUCCESS)
{
// Pack message on the topic.
err_code = pack_bin_str(&p_param->message.payload,
MQTT_MAX_VARIABLE_HEADER_N_PAYLOAD,
p_payload,
&offset);
}
if (err_code == NRF_SUCCESS)
{
const uint8_t message_type = MQTT_MESSAGES_OPTIONS(MQTT_PKT_TYPE_PUBLISH,
0, // Duplicate flag not set.
p_param->message.topic.qos,
0); // Retain flag not set.
mqtt_packetlen = mqtt_encode_fixed_header(message_type, // Message type
offset, // Payload size without the fixed header
&p_payload); // Address where the p_payload is contained.
// Publish message.
err_code = mqtt_transport_write(p_client, p_payload, mqtt_packetlen);
}
}
MQTT_TRC("<< %s", (uint32_t)__func__);
MQTT_MUTEX_UNLOCK();
return err_code;
}
/**@brief Encodes and sends messages that contain only message id in the variable header.
*
* @param[in] p_client Identifies the client for which the procedure is requested.
* @param[in] op_code Opcode for the message.
* @param[in] message_id Message id to be encoded in the variable header.
*
* @retval NRF_SUCCESS or an error code indicating a reason for failure.
*/
uint32_t mqtt_message_id_only_enc_n_send(mqtt_client_t * const p_client,
uint8_t opcode,
uint16_t message_id)
{
uint32_t err_code = MQTT_ERR_NOT_CONNECTED;
uint32_t offset = 0;
uint32_t mqtt_packetlen = 0;
uint8_t * p_payload;
p_payload = &p_client->p_packet[MQTT_FIXED_HEADER_EXTENDED_SIZE];
if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_PENDING_WRITE))
{
err_code = (NRF_ERROR_BUSY | IOT_MQTT_ERR_BASE);
}
else if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_CONNECTED))
{
memset(p_payload, 0, MQTT_MAX_PACKET_LENGTH);
err_code = pack_uint16(message_id,
MQTT_MAX_VARIABLE_HEADER_N_PAYLOAD,
p_payload,
&offset);
if (err_code == NRF_SUCCESS)
{
const uint8_t message_type = MQTT_MESSAGES_OPTIONS(opcode,
0, // Duplicate flag not set.
0, // QoS unused.
0); // Retain flag not set.
mqtt_packetlen = mqtt_encode_fixed_header(message_type, // Message type
offset, // Payload size without the fixed header
&p_payload); // Address where the p_payload is contained.
// Publish message.
err_code = mqtt_transport_write(p_client, p_payload, mqtt_packetlen);
}
}
return err_code;
}
/**@brief Sends raw message to the peer.
*
* @param[in] p_client Identifies the client for which the procedure is requested.
* @param[in] p_message Raw message to be sent to the peer.
* @param[in] message_id Message id to be encoded in the variable header.
*
* @retval NRF_SUCCESS or an error code indicating a reason for failure.
*/
uint32_t mqtt_raw_message_send(mqtt_client_t * const p_client,
const uint8_t * p_message,
uint16_t message_len)
{
uint32_t err_code;
if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_PENDING_WRITE))
{
err_code = (NRF_ERROR_BUSY | IOT_MQTT_ERR_BASE);
}
else if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_CONNECTED))
{
err_code = mqtt_transport_write(p_client, p_message, message_len);
}
else
{
err_code = MQTT_ERR_NOT_CONNECTED;
}
return err_code;
}
uint32_t mqtt_publish_ack(mqtt_client_t * const p_client,
mqtt_puback_param_t const * p_param)
{
NULL_PARAM_CHECK(p_client);
NULL_PARAM_CHECK(p_param);
MQTT_TRC("[CID %p]:[State 0x%02x]: >> %s Message id 0x%04x",
p_client,
p_client->state,
__func__,
p_param->message_id);
MQTT_MUTEX_LOCK();
uint32_t err_code = mqtt_message_id_only_enc_n_send(p_client,
MQTT_PKT_TYPE_PUBACK,
p_param->message_id);
MQTT_TRC("[CID %p]:[State 0x%02x]: << %s result 0x%08x",
p_client,
p_client->state,
__func__,
err_code);
MQTT_MUTEX_UNLOCK();
return err_code;
}
uint32_t mqtt_publish_receive(mqtt_client_t * const p_client,
mqtt_pubrec_param_t const * const p_param)
{
NULL_PARAM_CHECK(p_client);
NULL_PARAM_CHECK(p_param);
MQTT_TRC("[CID %p]:[State 0x%02x]: >> %s Message id 0x%04x",
p_client,
p_client->state,
__func__,
p_param->message_id);
MQTT_MUTEX_LOCK();
uint32_t err_code = mqtt_message_id_only_enc_n_send(p_client,
MQTT_PKT_TYPE_PUBREC,
p_param->message_id);
MQTT_TRC("[CID %p]:[State 0x%02x]: << %s result 0x%08x",
p_client,
p_client->state,
__func__,
err_code);
MQTT_MUTEX_UNLOCK();
return err_code;
}
uint32_t mqtt_publish_release(mqtt_client_t * const p_client,
mqtt_pubrel_param_t const * const p_param)
{
NULL_PARAM_CHECK(p_client);
NULL_PARAM_CHECK(p_param);
MQTT_TRC("[CID %p]:[State 0x%02x]: >> %s Message id 0x%04x",
p_client,
p_client->state,
__func__,
p_param->message_id);
MQTT_MUTEX_LOCK();
uint32_t err_code = mqtt_message_id_only_enc_n_send(p_client,
MQTT_PKT_TYPE_PUBREL,
p_param->message_id);
MQTT_TRC("[CID %p]:[State 0x%02x]: << %s result 0x%08x",
p_client,
p_client->state,
__func__,
err_code);
MQTT_MUTEX_UNLOCK();
return err_code;
}
uint32_t mqtt_publish_complete(mqtt_client_t * const p_client,
mqtt_pubcomp_param_t const * const p_param)
{
NULL_PARAM_CHECK(p_client);
NULL_PARAM_CHECK(p_param);
MQTT_TRC("[CID %p]:[State 0x%02x]: >> %s Message id 0x%04x",
p_client,
p_client->state,
__func__,
p_param->message_id);
MQTT_MUTEX_LOCK();
uint32_t err_code = mqtt_message_id_only_enc_n_send(p_client,
MQTT_PKT_TYPE_PUBCOMP,
p_param->message_id);
MQTT_TRC("[CID %p]:[State 0x%02x]: << %s result 0x%08x",
p_client,
p_client->state,
__func__,
err_code);
MQTT_MUTEX_UNLOCK();
return err_code;
}
uint32_t mqtt_disconnect(mqtt_client_t * const p_client)
{
uint32_t err_code = MQTT_ERR_NOT_CONNECTED;
NULL_PARAM_CHECK(p_client);
MQTT_MUTEX_LOCK();
err_code = mqtt_raw_message_send(p_client, m_disc_packet, MQTT_FIXED_HEADER_SIZE);
if (err_code == NRF_SUCCESS)
{
MQTT_SET_STATE_EXCLUSIVE(p_client, MQTT_STATE_DISCONNECTING);
}
MQTT_MUTEX_UNLOCK();
return err_code;
}
uint32_t mqtt_subscribe(mqtt_client_t * const p_client,
mqtt_subscription_list_t const * const p_param)
{
uint32_t err_code = MQTT_ERR_NOT_CONNECTED;
uint32_t offset = 0;
uint32_t count = 0;
uint32_t mqtt_packetlen = 0;
uint8_t * p_payload;
NULL_PARAM_CHECK(p_client);
NULL_PARAM_CHECK(p_param);
MQTT_TRC("[CID %p]:[State 0x%02x]: >> %s message id 0x%04x topic count 0x%04x",
p_client,
p_client->state,
__func__,
p_param->message_id,
p_param->list_count);
MQTT_MUTEX_LOCK();
p_payload = &p_client->p_packet[MQTT_FIXED_HEADER_EXTENDED_SIZE];
if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_PENDING_WRITE))
{
err_code = (NRF_ERROR_BUSY | IOT_MQTT_ERR_BASE);
}
else if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_CONNECTED))
{
memset(p_payload, 0, MQTT_MAX_PACKET_LENGTH);
err_code = pack_uint16(p_param->message_id,
MQTT_MAX_VARIABLE_HEADER_N_PAYLOAD,
p_payload,
&offset);
if (err_code == NRF_SUCCESS)
{
do
{
err_code = pack_utf8_str(&p_param->p_list[count].topic,
MQTT_MAX_VARIABLE_HEADER_N_PAYLOAD,
p_payload,
&offset);
if (err_code == NRF_SUCCESS)
{
err_code = pack_uint8(p_param->p_list[count].qos,
MQTT_MAX_VARIABLE_HEADER_N_PAYLOAD,
p_payload,
&offset);
}
count++;
} while ((err_code != NRF_SUCCESS) || (count < p_param->list_count));
}
if (err_code == NRF_SUCCESS)
{
const uint8_t message_type = MQTT_MESSAGES_OPTIONS(MQTT_PKT_TYPE_SUBSCRIBE, 0, 1, 0);
// Rewind the packet to encode the packet correctly.
mqtt_packetlen = mqtt_encode_fixed_header(message_type, // Message type, Duplicate Flag, QoS and retain flag setting.
offset, // p_payload size without the fixed header
&p_payload); // Address where the p_payload is contained. Header will encoded by rewinding the location.
// Send message.
err_code = mqtt_transport_write(p_client, p_payload, mqtt_packetlen);
}
}
MQTT_TRC("[CID %p]:[State 0x%02x]: << %s result 0x%08x",
p_client,
p_client->state,
__func__,
err_code);
MQTT_MUTEX_UNLOCK();
return err_code;
}
uint32_t mqtt_unsubscribe(mqtt_client_t * const p_client,
mqtt_subscription_list_t const * const p_param)
{
uint32_t err_code = MQTT_ERR_NOT_CONNECTED;
uint32_t count = 0;
uint32_t offset = 0;
uint32_t mqtt_packetlen = 0;
uint8_t * p_payload;
NULL_PARAM_CHECK(p_client);
NULL_PARAM_CHECK(p_param);
MQTT_MUTEX_LOCK();
p_payload = &p_client->p_packet[MQTT_FIXED_HEADER_EXTENDED_SIZE];
if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_PENDING_WRITE))
{
err_code = (NRF_ERROR_BUSY | IOT_MQTT_ERR_BASE);
}
else if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_CONNECTED))
{
memset(p_payload, 0, MQTT_MAX_PACKET_LENGTH);
err_code = pack_uint16(p_param->message_id,
MQTT_MAX_PACKET_LENGTH,
p_payload,
&offset);
if (err_code == NRF_SUCCESS)
{
do
{
err_code = pack_utf8_str(&p_param->p_list[count].topic,
MQTT_MAX_VARIABLE_HEADER_N_PAYLOAD,
p_payload,
&offset);
count++;
} while ((err_code != NRF_SUCCESS) || (count < p_param->list_count));
}
if (err_code == NRF_SUCCESS)
{
const uint8_t message_type = MQTT_MESSAGES_OPTIONS(MQTT_PKT_TYPE_UNSUBSCRIBE,
0, // Duplicate flag.
MQTT_QoS_1_ATLEAST_ONCE,
0); // Retain flag.
// Rewind the packet to encode the packet correctly.
mqtt_packetlen = mqtt_encode_fixed_header(message_type, // Message type, Duplicate Flag, QoS and retain flag setting.
offset, // Payload size without the fixed header
&p_payload); // Address where the p_payload is contained. Header will encoded by rewinding the location.
// Send message.
err_code = mqtt_transport_write(p_client, p_payload, mqtt_packetlen);
}
}
MQTT_MUTEX_UNLOCK();
return err_code;
}
uint32_t mqtt_ping(mqtt_client_t * const p_client)
{
uint32_t err_code;
NULL_PARAM_CHECK(p_client);
MQTT_MUTEX_LOCK();
err_code = mqtt_raw_message_send(p_client, m_ping_packet, MQTT_PKT_HEADER_SIZE);
MQTT_MUTEX_UNLOCK();
return err_code;
}
uint32_t mqtt_abort(mqtt_client_t * const p_client)
{
MQTT_MUTEX_LOCK();
NULL_PARAM_CHECK(p_client);
if (p_client->state != MQTT_STATE_IDLE)
{
mqtt_client_tcp_abort(p_client);
}
MQTT_MUTEX_UNLOCK();
return NRF_SUCCESS;
}
uint32_t mqtt_live(void)
{
iot_timer_time_in_ms_t elapsed_time;
uint32_t index;
// Note: The module should not be locked when calling this TLS API.
nrf_tls_process();
MQTT_MUTEX_LOCK();
for (index = 0; index < MQTT_MAX_CLIENTS; index++)
{
mqtt_client_t * p_client = m_mqtt_client[index];
if (p_client != NULL)
{
UNUSED_VARIABLE(iot_timer_wall_clock_delta_get(&p_client->last_activity,
&elapsed_time));
if ((MQTT_KEEPALIVE > 0) && (elapsed_time > ((MQTT_KEEPALIVE - 2) * 1000)))
{
UNUSED_VARIABLE(mqtt_ping(p_client));
}
if (p_client->p_pending_packet != NULL)
{
uint32_t err;
err = mqtt_transport_write(p_client, p_client->p_pending_packet,
p_client->pending_packetlen);
if (err == NRF_SUCCESS)
{
p_client->p_pending_packet = NULL;
p_client->pending_packetlen = 0;
}
}
}
}
MQTT_MUTEX_UNLOCK();
return NRF_SUCCESS;
}
uint32_t mqtt_input(mqtt_client_t * p_client, uint32_t timeout)
{
uint32_t err_code;
NULL_PARAM_CHECK(p_client);
MQTT_MUTEX_LOCK();
MQTT_TRC("%s: 0x%08x", __func__, p_client->state);
if (MQTT_VERIFY_STATE(p_client, MQTT_STATE_TCP_CONNECTED) ||
MQTT_VERIFY_STATE(p_client, MQTT_STATE_DISCONNECTING))
{
err_code = tcp_receive_packet(p_client, timeout);
}
else
{
err_code = (NRF_ERROR_INVALID_STATE | IOT_MQTT_ERR_BASE);
}
MQTT_MUTEX_UNLOCK();
return err_code;
}
| 31.791971 | 178 | 0.561244 |
d942186389d1fbb6389607357abb64be8b1c727d | 11,543 | c | C | win32/uriparser/UriMemory.c | Voskrese/libxspf-msvc | 1755102a2953d2390b66b157cb0703620bb03910 | [
"BSD-3-Clause"
] | null | null | null | win32/uriparser/UriMemory.c | Voskrese/libxspf-msvc | 1755102a2953d2390b66b157cb0703620bb03910 | [
"BSD-3-Clause"
] | null | null | null | win32/uriparser/UriMemory.c | Voskrese/libxspf-msvc | 1755102a2953d2390b66b157cb0703620bb03910 | [
"BSD-3-Clause"
] | null | null | null | /*
* uriparser - RFC 3986 URI parsing library
*
* Copyright (C) 2018, Weijia Song <songweijia@gmail.com>
* Copyright (C) 2018, Sebastian Pipping <sebastian@pipping.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above
* copyright notice, this list of conditions and the following
* disclaimer.
*
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* * Neither the name of the <ORGANIZATION> 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 UriMemory.c
* Holds memory manager implementation.
*/
#include <config.h>
#ifdef HAVE_REALLOCARRAY
# ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
# endif
#endif
#include <errno.h>
#include <stdlib.h>
#ifndef URI_DOXYGEN
# include "UriMemory.h"
#endif
#define URI_CHECK_ALLOC_OVERFLOW(total_size, nmemb, size) \
do { \
/* check for unsigned overflow */ \
if ((nmemb != 0) && (total_size / nmemb != size)) { \
errno = ENOMEM; \
return NULL; \
} \
} while (0)
static void * uriDefaultMalloc(UriMemoryManager * URI_UNUSED(memory),
size_t size) {
return malloc(size);
}
static void * uriDefaultCalloc(UriMemoryManager * URI_UNUSED(memory),
size_t nmemb, size_t size) {
return calloc(nmemb, size);
}
static void * uriDefaultRealloc(UriMemoryManager * URI_UNUSED(memory),
void * ptr, size_t size) {
return realloc(ptr, size);
}
static void * uriDefaultReallocarray(UriMemoryManager * URI_UNUSED(memory),
void * ptr, size_t nmemb, size_t size) {
#ifdef HAVE_REALLOCARRAY
return reallocarray(ptr, nmemb, size);
#else
const size_t total_size = nmemb * size;
URI_CHECK_ALLOC_OVERFLOW(total_size, nmemb, size); /* may return */
return realloc(ptr, total_size);
#endif
}
static void uriDefaultFree(UriMemoryManager * URI_UNUSED(memory),
void * ptr) {
free(ptr);
}
UriBool uriMemoryManagerIsComplete(const UriMemoryManager * memory) {
return (memory
&& memory->malloc
&& memory->calloc
&& memory->realloc
&& memory->reallocarray
&& memory->free) ? URI_TRUE : URI_FALSE;
}
void * uriEmulateCalloc(UriMemoryManager * memory, size_t nmemb, size_t size) {
void * buffer;
const size_t total_size = nmemb * size;
if (memory == NULL) {
errno = EINVAL;
return NULL;
}
URI_CHECK_ALLOC_OVERFLOW(total_size, nmemb, size); /* may return */
buffer = memory->malloc(memory, total_size);
if (buffer == NULL) {
/* errno set by malloc */
return NULL;
}
memset(buffer, 0, total_size);
return buffer;
}
void * uriEmulateReallocarray(UriMemoryManager * memory,
void * ptr, size_t nmemb, size_t size) {
const size_t total_size = nmemb * size;
if (memory == NULL) {
errno = EINVAL;
return NULL;
}
URI_CHECK_ALLOC_OVERFLOW(total_size, nmemb, size); /* may return */
return memory->realloc(memory, ptr, total_size);
}
static void * uriDecorateMalloc(UriMemoryManager * memory,
size_t size) {
UriMemoryManager * backend;
const size_t extraBytes = sizeof(size_t);
void * buffer;
if (memory == NULL) {
errno = EINVAL;
return NULL;
}
/* check for unsigned overflow */
if (size > ((size_t)-1) - extraBytes) {
errno = ENOMEM;
return NULL;
}
backend = (UriMemoryManager *)memory->userData;
if (backend == NULL) {
errno = EINVAL;
return NULL;
}
buffer = backend->malloc(backend, extraBytes + size);
if (buffer == NULL) {
return NULL;
}
*(size_t *)buffer = size;
return (char *)buffer + extraBytes;
}
static void * uriDecorateRealloc(UriMemoryManager * memory,
void * ptr, size_t size) {
void * newBuffer;
size_t prevSize;
if (memory == NULL) {
errno = EINVAL;
return NULL;
}
/* man realloc: "If ptr is NULL, then the call is equivalent to
* malloc(size), for *all* values of size" */
if (ptr == NULL) {
return memory->malloc(memory, size);
}
/* man realloc: "If size is equal to zero, and ptr is *not* NULL,
* then the call is equivalent to free(ptr)." */
if (size == 0) {
memory->free(memory, ptr);
return NULL;
}
prevSize = *((size_t *)((char *)ptr - sizeof(size_t)));
/* Anything to do? */
if (size <= prevSize) {
return ptr;
}
newBuffer = memory->malloc(memory, size);
if (newBuffer == NULL) {
/* errno set by malloc */
return NULL;
}
memcpy(newBuffer, ptr, prevSize);
memory->free(memory, ptr);
return newBuffer;
}
static void uriDecorateFree(UriMemoryManager * memory, void * ptr) {
UriMemoryManager * backend;
if ((ptr == NULL) || (memory == NULL)) {
return;
}
backend = (UriMemoryManager *)memory->userData;
if (backend == NULL) {
return;
}
backend->free(backend, (char *)ptr - sizeof(size_t));
}
int uriCompleteMemoryManager(UriMemoryManager * memory,
UriMemoryManager * backend) {
if ((memory == NULL) || (backend == NULL)) {
return URI_ERROR_NULL;
}
if ((backend->malloc == NULL) || (backend->free == NULL)) {
return URI_ERROR_MEMORY_MANAGER_INCOMPLETE;
}
memory->calloc = uriEmulateCalloc;
memory->reallocarray = uriEmulateReallocarray;
memory->malloc = uriDecorateMalloc;
memory->realloc = uriDecorateRealloc;
memory->free = uriDecorateFree;
memory->userData = backend;
return URI_SUCCESS;
}
int uriTestMemoryManager(UriMemoryManager * memory) {
const size_t mallocSize = 7;
const size_t callocNmemb = 3;
const size_t callocSize = 5;
const size_t callocTotalSize = callocNmemb * callocSize;
const size_t reallocSize = 11;
const size_t reallocarrayNmemb = 5;
const size_t reallocarraySize = 7;
const size_t reallocarrayTotal = reallocarrayNmemb * reallocarraySize;
size_t index;
char * buffer;
if (memory == NULL) {
return URI_ERROR_NULL;
}
if (uriMemoryManagerIsComplete(memory) != URI_TRUE) {
return URI_ERROR_MEMORY_MANAGER_INCOMPLETE;
}
/* malloc + free*/
buffer = memory->malloc(memory, mallocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
buffer[mallocSize - 1] = '\xF1';
memory->free(memory, buffer);
buffer = NULL;
/* calloc + free */
buffer = memory->calloc(memory, callocNmemb, callocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
for (index = 0; index < callocTotalSize; index++) { /* all zeros? */
if (buffer[index] != '\0') {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
}
buffer[callocTotalSize - 1] = '\xF2';
memory->free(memory, buffer);
buffer = NULL;
/* malloc + realloc + free */
buffer = memory->malloc(memory, mallocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
for (index = 0; index < mallocSize; index++) {
buffer[index] = '\xF3';
}
buffer = memory->realloc(memory, buffer, reallocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
for (index = 0; index < mallocSize; index++) { /* previous content? */
if (buffer[index] != '\xF3') {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
}
buffer[reallocSize - 1] = '\xF4';
memory->free(memory, buffer);
buffer = NULL;
/* malloc + realloc ptr!=NULL size==0 (equals free) */
buffer = memory->malloc(memory, mallocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
buffer[mallocSize - 1] = '\xF5';
memory->realloc(memory, buffer, 0);
buffer = NULL;
/* realloc ptr==NULL size!=0 (equals malloc) + free */
buffer = memory->realloc(memory, NULL, mallocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
buffer[mallocSize - 1] = '\xF6';
memory->free(memory, buffer);
buffer = NULL;
/* realloc ptr==NULL size==0 (equals malloc) + free */
buffer = memory->realloc(memory, NULL, 0);
if (buffer != NULL) {
memory->free(memory, buffer);
buffer = NULL;
}
/* malloc + reallocarray + free */
buffer = memory->malloc(memory, mallocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
for (index = 0; index < mallocSize; index++) {
buffer[index] = '\xF7';
}
buffer = memory->reallocarray(memory, buffer, reallocarrayNmemb,
reallocarraySize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
for (index = 0; index < mallocSize; index++) { /* previous content? */
if (buffer[index] != '\xF7') {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
}
buffer[reallocarrayTotal - 1] = '\xF8';
memory->free(memory, buffer);
buffer = NULL;
/* malloc + reallocarray ptr!=NULL nmemb==0 size!=0 (equals free) */
buffer = memory->malloc(memory, mallocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
buffer[mallocSize - 1] = '\xF9';
memory->reallocarray(memory, buffer, 0, reallocarraySize);
buffer = NULL;
/* malloc + reallocarray ptr!=NULL nmemb!=0 size==0 (equals free) */
buffer = memory->malloc(memory, mallocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
buffer[mallocSize - 1] = '\xFA';
memory->reallocarray(memory, buffer, reallocarrayNmemb, 0);
buffer = NULL;
/* malloc + reallocarray ptr!=NULL nmemb==0 size==0 (equals free) */
buffer = memory->malloc(memory, mallocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
buffer[mallocSize - 1] = '\xFB';
memory->reallocarray(memory, buffer, 0, 0);
buffer = NULL;
/* reallocarray ptr==NULL nmemb!=0 size!=0 (equals malloc) + free */
buffer = memory->reallocarray(memory, NULL, callocNmemb, callocSize);
if (buffer == NULL) {
return URI_ERROR_MEMORY_MANAGER_FAULTY;
}
buffer[callocTotalSize - 1] = '\xFC';
memory->free(memory, buffer);
buffer = NULL;
/* reallocarray ptr==NULL nmemb==0 size!=0 (equals malloc) + free */
buffer = memory->reallocarray(memory, NULL, 0, callocSize);
if (buffer != NULL) {
memory->free(memory, buffer);
buffer = NULL;
}
/* reallocarray ptr==NULL nmemb!=0 size==0 (equals malloc) + free */
buffer = memory->reallocarray(memory, NULL, callocNmemb, 0);
if (buffer != NULL) {
memory->free(memory, buffer);
buffer = NULL;
}
/* reallocarray ptr==NULL nmemb==0 size==0 (equals malloc) + free */
buffer = memory->reallocarray(memory, NULL, 0, 0);
if (buffer != NULL) {
memory->free(memory, buffer);
buffer = NULL;
}
return URI_SUCCESS;
}
/*extern*/ UriMemoryManager defaultMemoryManager = {
uriDefaultMalloc,
uriDefaultCalloc,
uriDefaultRealloc,
uriDefaultReallocarray,
uriDefaultFree,
NULL /* userData */
};
| 24.61194 | 79 | 0.684917 |
03c3416713304e8197c397bc9443c3994b7f7451 | 27,883 | c | C | xen/xen-4.2.2/xen/arch/x86/mpparse.c | zhiming-shen/Xen-Blanket-NG | 47e59d9bb92e8fdc60942df526790ddb983a5496 | [
"Apache-2.0"
] | 1 | 2018-02-02T00:15:26.000Z | 2018-02-02T00:15:26.000Z | xen/xen-4.2.2/xen/arch/x86/mpparse.c | zhiming-shen/Xen-Blanket-NG | 47e59d9bb92e8fdc60942df526790ddb983a5496 | [
"Apache-2.0"
] | null | null | null | xen/xen-4.2.2/xen/arch/x86/mpparse.c | zhiming-shen/Xen-Blanket-NG | 47e59d9bb92e8fdc60942df526790ddb983a5496 | [
"Apache-2.0"
] | 1 | 2019-05-27T09:47:18.000Z | 2019-05-27T09:47:18.000Z | /*
* Intel Multiprocessor Specification 1.1 and 1.4
* compliant MP-table parsing routines.
*
* (c) 1995 Alan Cox, Building #3 <alan@redhat.com>
* (c) 1998, 1999, 2000 Ingo Molnar <mingo@redhat.com>
*
* Fixes
* Erich Boleyn : MP v1.4 and additional changes.
* Alan Cox : Added EBDA scanning
* Ingo Molnar : various cleanups and rewrites
* Maciej W. Rozycki: Bits for default MP configurations
* Paul Diefenbaugh: Added full ACPI support
*/
#include <xen/config.h>
#include <xen/types.h>
#include <xen/irq.h>
#include <xen/init.h>
#include <xen/acpi.h>
#include <xen/delay.h>
#include <xen/efi.h>
#include <xen/sched.h>
#include <asm/bitops.h>
#include <asm/smp.h>
#include <asm/acpi.h>
#include <asm/mtrr.h>
#include <asm/mpspec.h>
#include <asm/io_apic.h>
#include <asm/setup.h>
#include <mach_apic.h>
#include <mach_mpparse.h>
#include <bios_ebda.h>
/* Have we found an MP table */
bool_t __initdata smp_found_config;
/*
* Various Linux-internal data structures created from the
* MP-table.
*/
unsigned char __read_mostly apic_version[MAX_APICS];
unsigned char __read_mostly mp_bus_id_to_type[MAX_MP_BUSSES];
/* I/O APIC entries */
struct mpc_config_ioapic __read_mostly mp_ioapics[MAX_IO_APICS];
/* # of MP IRQ source entries */
struct mpc_config_intsrc __read_mostly mp_irqs[MAX_IRQ_SOURCES];
/* MP IRQ source entries */
int __read_mostly mp_irq_entries;
bool_t __read_mostly pic_mode;
bool_t __read_mostly def_to_bigsmp = 0;
unsigned long __read_mostly mp_lapic_addr;
/* Processor that is doing the boot up */
unsigned int __read_mostly boot_cpu_physical_apicid = BAD_APICID;
/* Internal processor count */
static unsigned int __devinitdata num_processors;
static unsigned int __initdata disabled_cpus;
/* Bitmask of physically existing CPUs */
physid_mask_t phys_cpu_present_map;
void __init set_nr_cpu_ids(unsigned int max_cpus)
{
if (!max_cpus)
max_cpus = num_processors + disabled_cpus;
if (max_cpus > NR_CPUS)
max_cpus = NR_CPUS;
else if (!max_cpus)
max_cpus = 1;
printk(XENLOG_INFO "SMP: Allowing %u CPUs (%d hotplug CPUs)\n",
max_cpus, max_t(int, max_cpus - num_processors, 0));
nr_cpu_ids = max_cpus;
#ifndef nr_cpumask_bits
nr_cpumask_bits = (max_cpus + (BITS_PER_LONG - 1)) &
~(BITS_PER_LONG - 1);
printk(XENLOG_DEBUG "NR_CPUS:%u nr_cpumask_bits:%u\n",
NR_CPUS, nr_cpumask_bits);
#endif
}
/*
* Intel MP BIOS table parsing routines:
*/
/*
* Checksum an MP configuration block.
*/
static int __init mpf_checksum(unsigned char *mp, int len)
{
int sum = 0;
while (len--)
sum += *mp++;
return sum & 0xFF;
}
/* Return xen's logical cpu_id of the new added cpu or <0 if error */
static int __devinit MP_processor_info_x(struct mpc_config_processor *m,
u32 apicidx, bool_t hotplug)
{
int ver, apicid, cpu = 0;
if (!(m->mpc_cpuflag & CPU_ENABLED)) {
if (!hotplug)
++disabled_cpus;
return -EINVAL;
}
apicid = mpc_apic_id(m, apicidx);
if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) {
Dprintk(" Bootup CPU\n");
boot_cpu_physical_apicid = apicid;
}
ver = m->mpc_apicver;
/*
* Validate version
*/
if (ver == 0x0) {
printk(KERN_WARNING "BIOS bug, APIC version is 0 for CPU#%d! "
"fixing up to 0x10. (tell your hw vendor)\n",
apicid);
ver = 0x10;
}
apic_version[apicid] = ver;
set_apicid(apicid, &phys_cpu_present_map);
if (num_processors >= nr_cpu_ids) {
printk(KERN_WARNING "WARNING: NR_CPUS limit of %u reached."
" Processor ignored.\n", nr_cpu_ids);
return -ENOSPC;
}
if (num_processors >= 8 && hotplug && genapic == &apic_default) {
printk(KERN_WARNING "WARNING: CPUs limit of 8 reached."
" Processor ignored.\n");
return -ENOSPC;
}
/* Boot cpu has been marked present in smp_prepare_boot_cpu */
if (!(m->mpc_cpuflag & CPU_BOOTPROCESSOR)) {
cpu = alloc_cpu_id();
if (cpu < 0) {
printk(KERN_WARNING "WARNING: Can't alloc cpu_id."
" Processor with apicid %i ignored\n", apicid);
return cpu;
}
x86_cpu_to_apicid[cpu] = apicid;
cpumask_set_cpu(cpu, &cpu_present_map);
}
if (++num_processors > 8) {
/*
* No need for processor or APIC checks: physical delivery
* (bigsmp) mode should always work.
*/
def_to_bigsmp = 1;
}
return cpu;
}
static int __devinit MP_processor_info(struct mpc_config_processor *m)
{
return MP_processor_info_x(m, m->mpc_apicid, 0);
}
static void __init MP_bus_info (struct mpc_config_bus *m)
{
char str[7];
memcpy(str, m->mpc_bustype, 6);
str[6] = 0;
#if 0 /* size of mpc_busid (8 bits) makes this check unnecessary */
if (m->mpc_busid >= MAX_MP_BUSSES) {
printk(KERN_WARNING "MP table busid value (%d) for bustype %s "
" is too large, max. supported is %d\n",
m->mpc_busid, str, MAX_MP_BUSSES - 1);
return;
}
#endif
if (strncmp(str, BUSTYPE_ISA, sizeof(BUSTYPE_ISA)-1) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA;
} else if (strncmp(str, BUSTYPE_EISA, sizeof(BUSTYPE_EISA)-1) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_EISA;
} else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI)-1) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI;
} else if (strncmp(str, BUSTYPE_MCA, sizeof(BUSTYPE_MCA)-1) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_MCA;
} else if (strncmp(str, BUSTYPE_NEC98, sizeof(BUSTYPE_NEC98)-1) == 0) {
mp_bus_id_to_type[m->mpc_busid] = MP_BUS_NEC98;
} else {
printk(KERN_WARNING "Unknown bustype %s - ignoring\n", str);
}
}
static void __init MP_ioapic_info (struct mpc_config_ioapic *m)
{
if (!(m->mpc_flags & MPC_APIC_USABLE))
return;
printk(KERN_INFO "I/O APIC #%d Version %d at 0x%X.\n",
m->mpc_apicid, m->mpc_apicver, m->mpc_apicaddr);
if (nr_ioapics >= MAX_IO_APICS) {
printk(KERN_CRIT "Max # of I/O APICs (%d) exceeded (found %d).\n",
MAX_IO_APICS, nr_ioapics);
panic("Recompile kernel with bigger MAX_IO_APICS!.\n");
}
if (!m->mpc_apicaddr) {
printk(KERN_ERR "WARNING: bogus zero I/O APIC address"
" found in MP table, skipping!\n");
return;
}
mp_ioapics[nr_ioapics] = *m;
nr_ioapics++;
}
static void __init MP_intsrc_info (struct mpc_config_intsrc *m)
{
mp_irqs [mp_irq_entries] = *m;
Dprintk("Int: type %d, pol %d, trig %d, bus %d,"
" IRQ %02x, APIC ID %x, APIC INT %02x\n",
m->mpc_irqtype, m->mpc_irqflag & 3,
(m->mpc_irqflag >> 2) & 3, m->mpc_srcbus,
m->mpc_srcbusirq, m->mpc_dstapic, m->mpc_dstirq);
if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded!!\n");
}
static void __init MP_lintsrc_info (struct mpc_config_lintsrc *m)
{
Dprintk("Lint: type %d, pol %d, trig %d, bus %d,"
" IRQ %02x, APIC ID %x, APIC LINT %02x\n",
m->mpc_irqtype, m->mpc_irqflag & 3,
(m->mpc_irqflag >> 2) &3, m->mpc_srcbusid,
m->mpc_srcbusirq, m->mpc_destapic, m->mpc_destapiclint);
/*
* Well it seems all SMP boards in existence
* use ExtINT/LVT1 == LINT0 and
* NMI/LVT2 == LINT1 - the following check
* will show us if this assumptions is false.
* Until then we do not have to add baggage.
*/
if ((m->mpc_irqtype == mp_ExtINT) &&
(m->mpc_destapiclint != 0))
BUG();
if ((m->mpc_irqtype == mp_NMI) &&
(m->mpc_destapiclint != 1))
BUG();
}
/*
* Read/parse the MPC
*/
static int __init smp_read_mpc(struct mp_config_table *mpc)
{
char str[16];
char oem[10];
int count=sizeof(*mpc);
unsigned char *mpt=((unsigned char *)mpc)+count;
if (memcmp(mpc->mpc_signature,MPC_SIGNATURE,4)) {
printk(KERN_ERR "SMP mptable: bad signature [0x%x]!\n",
*(u32 *)mpc->mpc_signature);
return 0;
}
if (mpf_checksum((unsigned char *)mpc,mpc->mpc_length)) {
printk(KERN_ERR "SMP mptable: checksum error!\n");
return 0;
}
if (mpc->mpc_spec!=0x01 && mpc->mpc_spec!=0x04) {
printk(KERN_ERR "SMP mptable: bad table version (%d)!!\n",
mpc->mpc_spec);
return 0;
}
if (!mpc->mpc_lapic) {
printk(KERN_ERR "SMP mptable: null local APIC address!\n");
return 0;
}
memcpy(oem,mpc->mpc_oem,8);
oem[8]=0;
printk(KERN_INFO "OEM ID: %s ",oem);
memcpy(str,mpc->mpc_productid,12);
str[12]=0;
printk("Product ID: %s ",str);
mps_oem_check(mpc, oem, str);
printk("APIC at: 0x%X\n",mpc->mpc_lapic);
/*
* Save the local APIC address (it might be non-default) -- but only
* if we're not using ACPI.
*/
if (!acpi_lapic)
mp_lapic_addr = mpc->mpc_lapic;
/*
* Now process the configuration blocks.
*/
while (count < mpc->mpc_length) {
switch(*mpt) {
case MP_PROCESSOR:
{
struct mpc_config_processor *m=
(struct mpc_config_processor *)mpt;
/* ACPI may have already provided this data */
if (!acpi_lapic)
MP_processor_info(m);
mpt += sizeof(*m);
count += sizeof(*m);
break;
}
case MP_BUS:
{
struct mpc_config_bus *m=
(struct mpc_config_bus *)mpt;
MP_bus_info(m);
mpt += sizeof(*m);
count += sizeof(*m);
break;
}
case MP_IOAPIC:
{
struct mpc_config_ioapic *m=
(struct mpc_config_ioapic *)mpt;
MP_ioapic_info(m);
mpt+=sizeof(*m);
count+=sizeof(*m);
break;
}
case MP_INTSRC:
{
struct mpc_config_intsrc *m=
(struct mpc_config_intsrc *)mpt;
MP_intsrc_info(m);
mpt+=sizeof(*m);
count+=sizeof(*m);
break;
}
case MP_LINTSRC:
{
struct mpc_config_lintsrc *m=
(struct mpc_config_lintsrc *)mpt;
MP_lintsrc_info(m);
mpt+=sizeof(*m);
count+=sizeof(*m);
break;
}
default:
{
count = mpc->mpc_length;
break;
}
}
}
clustered_apic_check();
if (!num_processors)
printk(KERN_ERR "SMP mptable: no processors registered!\n");
return num_processors;
}
static int __init ELCR_trigger(unsigned int irq)
{
unsigned int port;
port = 0x4d0 + (irq >> 3);
return (inb(port) >> (irq & 7)) & 1;
}
static void __init construct_default_ioirq_mptable(int mpc_default_type)
{
struct mpc_config_intsrc intsrc;
int i;
int ELCR_fallback = 0;
intsrc.mpc_type = MP_INTSRC;
intsrc.mpc_irqflag = 0; /* conforming */
intsrc.mpc_srcbus = 0;
intsrc.mpc_dstapic = mp_ioapics[0].mpc_apicid;
intsrc.mpc_irqtype = mp_INT;
/*
* If true, we have an ISA/PCI system with no IRQ entries
* in the MP table. To prevent the PCI interrupts from being set up
* incorrectly, we try to use the ELCR. The sanity check to see if
* there is good ELCR data is very simple - IRQ0, 1, 2 and 13 can
* never be level sensitive, so we simply see if the ELCR agrees.
* If it does, we assume it's valid.
*/
if (mpc_default_type == 5) {
printk(KERN_INFO "ISA/PCI bus type with no IRQ information... falling back to ELCR\n");
if (ELCR_trigger(0) || ELCR_trigger(1) || ELCR_trigger(2) || ELCR_trigger(13))
printk(KERN_WARNING "ELCR contains invalid data... not using ELCR\n");
else {
printk(KERN_INFO "Using ELCR to identify PCI interrupts\n");
ELCR_fallback = 1;
}
}
for (i = 0; platform_legacy_irq(i); i++) {
switch (mpc_default_type) {
case 2:
if (i == 0 || i == 13)
continue; /* IRQ0 & IRQ13 not connected */
/* fall through */
default:
if (i == 2)
continue; /* IRQ2 is never connected */
}
if (ELCR_fallback) {
/*
* If the ELCR indicates a level-sensitive interrupt, we
* copy that information over to the MP table in the
* irqflag field (level sensitive, active high polarity).
*/
if (ELCR_trigger(i))
intsrc.mpc_irqflag = 13;
else
intsrc.mpc_irqflag = 0;
}
intsrc.mpc_srcbusirq = i;
intsrc.mpc_dstirq = i ? i : 2; /* IRQ0 to INTIN2 */
MP_intsrc_info(&intsrc);
}
intsrc.mpc_irqtype = mp_ExtINT;
intsrc.mpc_srcbusirq = 0;
intsrc.mpc_dstirq = 0; /* 8259A to INTIN0 */
MP_intsrc_info(&intsrc);
}
static inline void __init construct_default_ISA_mptable(int mpc_default_type)
{
struct mpc_config_processor processor;
struct mpc_config_bus bus;
struct mpc_config_ioapic ioapic;
struct mpc_config_lintsrc lintsrc;
int linttypes[2] = { mp_ExtINT, mp_NMI };
int i;
/*
* local APIC has default address
*/
mp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
/*
* 2 CPUs, numbered 0 & 1.
*/
processor.mpc_type = MP_PROCESSOR;
/* Either an integrated APIC or a discrete 82489DX. */
processor.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01;
processor.mpc_cpuflag = CPU_ENABLED;
processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) |
(boot_cpu_data.x86_model << 4) |
boot_cpu_data.x86_mask;
processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
processor.mpc_reserved[0] = 0;
processor.mpc_reserved[1] = 0;
for (i = 0; i < 2; i++) {
processor.mpc_apicid = i;
MP_processor_info(&processor);
}
bus.mpc_type = MP_BUS;
bus.mpc_busid = 0;
switch (mpc_default_type) {
default:
printk("???\n");
printk(KERN_ERR "Unknown standard configuration %d\n",
mpc_default_type);
/* fall through */
case 1:
case 5:
memcpy(bus.mpc_bustype, "ISA ", 6);
break;
case 2:
case 6:
case 3:
memcpy(bus.mpc_bustype, "EISA ", 6);
break;
case 4:
case 7:
memcpy(bus.mpc_bustype, "MCA ", 6);
}
MP_bus_info(&bus);
if (mpc_default_type > 4) {
bus.mpc_busid = 1;
memcpy(bus.mpc_bustype, "PCI ", 6);
MP_bus_info(&bus);
}
ioapic.mpc_type = MP_IOAPIC;
ioapic.mpc_apicid = 2;
ioapic.mpc_apicver = mpc_default_type > 4 ? 0x10 : 0x01;
ioapic.mpc_flags = MPC_APIC_USABLE;
ioapic.mpc_apicaddr = 0xFEC00000;
MP_ioapic_info(&ioapic);
/*
* We set up most of the low 16 IO-APIC pins according to MPS rules.
*/
construct_default_ioirq_mptable(mpc_default_type);
lintsrc.mpc_type = MP_LINTSRC;
lintsrc.mpc_irqflag = 0; /* conforming */
lintsrc.mpc_srcbusid = 0;
lintsrc.mpc_srcbusirq = 0;
lintsrc.mpc_destapic = MP_APIC_ALL;
for (i = 0; i < 2; i++) {
lintsrc.mpc_irqtype = linttypes[i];
lintsrc.mpc_destapiclint = i;
MP_lintsrc_info(&lintsrc);
}
}
#define FIX_EFI_MPF FIX_KEXEC_BASE_0
static __init void efi_unmap_mpf(void)
{
if (efi_enabled)
__set_fixmap(FIX_EFI_MPF, 0, 0);
}
static struct intel_mp_floating *__initdata mpf_found;
/*
* Scan the memory blocks for an SMP configuration block.
*/
void __init get_smp_config (void)
{
struct intel_mp_floating *mpf = mpf_found;
/*
* ACPI supports both logical (e.g. Hyper-Threading) and physical
* processors, where MPS only supports physical.
*/
if (acpi_lapic && acpi_ioapic) {
efi_unmap_mpf();
printk(KERN_INFO "Using ACPI (MADT) for SMP configuration information\n");
return;
}
else if (acpi_lapic)
printk(KERN_INFO "Using ACPI for processor (LAPIC) configuration information\n");
printk(KERN_INFO "Intel MultiProcessor Specification v1.%d\n", mpf->mpf_specification);
if (mpf->mpf_feature2 & (1<<7)) {
printk(KERN_INFO " IMCR and PIC compatibility mode.\n");
pic_mode = 1;
} else {
printk(KERN_INFO " Virtual Wire compatibility mode.\n");
pic_mode = 0;
}
/*
* Now see if we need to read further.
*/
if (mpf->mpf_feature1 != 0) {
printk(KERN_INFO "Default MP configuration #%d\n", mpf->mpf_feature1);
construct_default_ISA_mptable(mpf->mpf_feature1);
} else if (mpf->mpf_physptr) {
/*
* Read the physical hardware table. Anything here will
* override the defaults.
*/
if (!smp_read_mpc((void *)(unsigned long)mpf->mpf_physptr)) {
efi_unmap_mpf();
smp_found_config = 0;
printk(KERN_ERR "BIOS bug, MP table errors detected!...\n");
printk(KERN_ERR "... disabling SMP support. (tell your hw vendor)\n");
return;
}
/*
* If there are no explicit MP IRQ entries, then we are
* broken. We set up most of the low 16 IO-APIC pins to
* ISA defaults and hope it will work.
*/
if (!mp_irq_entries) {
struct mpc_config_bus bus;
printk(KERN_ERR "BIOS bug, no explicit IRQ entries, using default mptable. (tell your hw vendor)\n");
bus.mpc_type = MP_BUS;
bus.mpc_busid = 0;
memcpy(bus.mpc_bustype, "ISA ", 6);
MP_bus_info(&bus);
construct_default_ioirq_mptable(0);
}
} else
BUG();
efi_unmap_mpf();
printk(KERN_INFO "Processors: %d\n", num_processors);
/*
* Only use the first configuration found.
*/
}
static int __init smp_scan_config (unsigned long base, unsigned long length)
{
unsigned int *bp = maddr_to_virt(base);
struct intel_mp_floating *mpf;
Dprintk("Scan SMP from %p for %ld bytes.\n", bp,length);
if (sizeof(*mpf) != 16)
printk("Error: MPF size\n");
while (length > 0) {
mpf = (struct intel_mp_floating *)bp;
if ((*bp == SMP_MAGIC_IDENT) &&
(mpf->mpf_length == 1) &&
!mpf_checksum((unsigned char *)bp, 16) &&
((mpf->mpf_specification == 1)
|| (mpf->mpf_specification == 4)) ) {
smp_found_config = 1;
printk(KERN_INFO "found SMP MP-table at %08lx\n",
virt_to_maddr(mpf));
#if 0
reserve_bootmem(virt_to_maddr(mpf), PAGE_SIZE);
if (mpf->mpf_physptr) {
/*
* We cannot access to MPC table to compute
* table size yet, as only few megabytes from
* the bottom is mapped now.
* PC-9800's MPC table places on the very last
* of physical memory; so that simply reserving
* PAGE_SIZE from mpg->mpf_physptr yields BUG()
* in reserve_bootmem.
*/
unsigned long size = PAGE_SIZE;
unsigned long end = max_low_pfn * PAGE_SIZE;
if (mpf->mpf_physptr + size > end)
size = end - mpf->mpf_physptr;
reserve_bootmem(mpf->mpf_physptr, size);
}
#endif
mpf_found = mpf;
return 1;
}
bp += 4;
length -= 16;
}
return 0;
}
static void __init efi_check_config(void)
{
struct intel_mp_floating *mpf;
if (efi.mps == EFI_INVALID_TABLE_ADDR)
return;
__set_fixmap(FIX_EFI_MPF, PFN_DOWN(efi.mps), __PAGE_HYPERVISOR);
mpf = (void *)fix_to_virt(FIX_EFI_MPF) + ((long)efi.mps & (PAGE_SIZE-1));
if (memcmp(mpf->mpf_signature, "_MP_", 4) == 0 &&
mpf->mpf_length == 1 &&
mpf_checksum((void *)mpf, 16) &&
(mpf->mpf_specification == 1 || mpf->mpf_specification == 4)) {
smp_found_config = 1;
printk(KERN_INFO "SMP MP-table at %08lx\n", efi.mps);
mpf_found = mpf;
}
else
efi_unmap_mpf();
}
void __init find_smp_config (void)
{
unsigned int address;
if (efi_enabled) {
efi_check_config();
return;
}
/*
* FIXME: Linux assumes you have 640K of base ram..
* this continues the error...
*
* 1) Scan the bottom 1K for a signature
* 2) Scan the top 1K of base RAM
* 3) Scan the 64K of bios
*/
if (smp_scan_config(0x0,0x400) ||
smp_scan_config(639*0x400,0x400) ||
smp_scan_config(0xF0000,0x10000))
return;
/*
* If it is an SMP machine we should know now, unless the
* configuration is in an EISA/MCA bus machine with an
* extended bios data area.
*
* there is a real-mode segmented pointer pointing to the
* 4K EBDA area at 0x40E, calculate and scan it here.
*
* NOTE! There are Linux loaders that will corrupt the EBDA
* area, and as such this kind of SMP config may be less
* trustworthy, simply because the SMP table may have been
* stomped on during early boot. These loaders are buggy and
* should be fixed.
*
* MP1.4 SPEC states to only scan first 1K of 4K EBDA.
*/
address = get_bios_ebda();
if (address)
smp_scan_config(address, 0x400);
}
/* --------------------------------------------------------------------------
ACPI-based MP Configuration
-------------------------------------------------------------------------- */
#ifdef CONFIG_ACPI
void __init mp_register_lapic_address (
u64 address)
{
if (!x2apic_enabled) {
mp_lapic_addr = (unsigned long) address;
set_fixmap_nocache(FIX_APIC_BASE, mp_lapic_addr);
}
if (boot_cpu_physical_apicid == -1U)
boot_cpu_physical_apicid = get_apic_id();
Dprintk("Boot CPU = %d\n", boot_cpu_physical_apicid);
}
int __devinit mp_register_lapic (
u32 id,
bool_t enabled,
bool_t hotplug)
{
struct mpc_config_processor processor;
int boot_cpu = 0;
if (MAX_APICS <= id) {
printk(KERN_WARNING "Processor #%d invalid (max %d)\n",
id, MAX_APICS);
return -EINVAL;
}
if (id == boot_cpu_physical_apicid)
boot_cpu = 1;
processor.mpc_type = MP_PROCESSOR;
processor.mpc_apicid = id;
processor.mpc_apicver = GET_APIC_VERSION(apic_read(APIC_LVR));
processor.mpc_cpuflag = (enabled ? CPU_ENABLED : 0);
processor.mpc_cpuflag |= (boot_cpu ? CPU_BOOTPROCESSOR : 0);
processor.mpc_cpufeature = (boot_cpu_data.x86 << 8) |
(boot_cpu_data.x86_model << 4) | boot_cpu_data.x86_mask;
processor.mpc_featureflag = boot_cpu_data.x86_capability[0];
processor.mpc_reserved[0] = 0;
processor.mpc_reserved[1] = 0;
return MP_processor_info_x(&processor, id, hotplug);
}
void mp_unregister_lapic(uint32_t apic_id, uint32_t cpu)
{
if (!cpu || (apic_id == boot_cpu_physical_apicid))
return;
if (x86_cpu_to_apicid[cpu] != apic_id)
return;
physid_clear(apic_id, phys_cpu_present_map);
x86_cpu_to_apicid[cpu] = BAD_APICID;
cpumask_clear_cpu(cpu, &cpu_present_map);
}
#ifdef CONFIG_X86_IO_APIC
#define MP_ISA_BUS 0
#define MP_MAX_IOAPIC_PIN 127
static struct mp_ioapic_routing {
int gsi_base;
int gsi_end;
unsigned long pin_programmed[BITS_TO_LONGS(MP_MAX_IOAPIC_PIN + 1)];
} mp_ioapic_routing[MAX_IO_APICS];
static int mp_find_ioapic (
int gsi)
{
unsigned int i;
/* Find the IOAPIC that manages this GSI. */
for (i = 0; i < nr_ioapics; i++) {
if ((gsi >= mp_ioapic_routing[i].gsi_base)
&& (gsi <= mp_ioapic_routing[i].gsi_end))
return i;
}
printk(KERN_ERR "ERROR: Unable to locate IOAPIC for GSI %d\n", gsi);
return -1;
}
void __init mp_register_ioapic (
u8 id,
u32 address,
u32 gsi_base)
{
int idx = 0;
int tmpid;
if (nr_ioapics >= MAX_IO_APICS) {
printk(KERN_ERR "ERROR: Max # of I/O APICs (%d) exceeded "
"(found %d)\n", MAX_IO_APICS, nr_ioapics);
panic("Recompile kernel with bigger MAX_IO_APICS!\n");
}
if (!address) {
printk(KERN_ERR "WARNING: Bogus (zero) I/O APIC address"
" found in MADT table, skipping!\n");
return;
}
idx = nr_ioapics++;
mp_ioapics[idx].mpc_type = MP_IOAPIC;
mp_ioapics[idx].mpc_flags = MPC_APIC_USABLE;
mp_ioapics[idx].mpc_apicaddr = address;
set_fixmap_nocache(FIX_IO_APIC_BASE_0 + idx, address);
if ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
&& !APIC_XAPIC(apic_version[boot_cpu_physical_apicid]))
tmpid = io_apic_get_unique_id(idx, id);
else
tmpid = id;
if (tmpid == -1) {
nr_ioapics--;
return;
}
mp_ioapics[idx].mpc_apicid = tmpid;
mp_ioapics[idx].mpc_apicver = io_apic_get_version(idx);
/*
* Build basic GSI lookup table to facilitate gsi->io_apic lookups
* and to prevent reprogramming of IOAPIC pins (PCI GSIs).
*/
mp_ioapic_routing[idx].gsi_base = gsi_base;
mp_ioapic_routing[idx].gsi_end = gsi_base +
io_apic_get_redir_entries(idx);
printk("IOAPIC[%d]: apic_id %d, version %d, address 0x%x, "
"GSI %d-%d\n", idx, mp_ioapics[idx].mpc_apicid,
mp_ioapics[idx].mpc_apicver, mp_ioapics[idx].mpc_apicaddr,
mp_ioapic_routing[idx].gsi_base,
mp_ioapic_routing[idx].gsi_end);
return;
}
unsigned __init highest_gsi(void)
{
unsigned x, res = 0;
for (x = 0; x < nr_ioapics; x++)
if (res < mp_ioapic_routing[x].gsi_end)
res = mp_ioapic_routing[x].gsi_end;
return res;
}
unsigned apic_gsi_base(int apic)
{
return mp_ioapic_routing[apic].gsi_base;
}
void __init mp_override_legacy_irq (
u8 bus_irq,
u8 polarity,
u8 trigger,
u32 gsi)
{
struct mpc_config_intsrc intsrc;
int ioapic = -1;
int pin = -1;
/*
* Convert 'gsi' to 'ioapic.pin'.
*/
ioapic = mp_find_ioapic(gsi);
if (ioapic < 0)
return;
pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
/*
* TBD: This check is for faulty timer entries, where the override
* erroneously sets the trigger to level, resulting in a HUGE
* increase of timer interrupts!
*/
if ((bus_irq == 0) && (trigger == 3))
trigger = 1;
intsrc.mpc_type = MP_INTSRC;
intsrc.mpc_irqtype = mp_INT;
intsrc.mpc_irqflag = (trigger << 2) | polarity;
intsrc.mpc_srcbus = MP_ISA_BUS;
intsrc.mpc_srcbusirq = bus_irq; /* IRQ */
intsrc.mpc_dstapic = mp_ioapics[ioapic].mpc_apicid; /* APIC ID */
intsrc.mpc_dstirq = pin; /* INTIN# */
Dprintk("Int: type %d, pol %d, trig %d, bus %d, irq %d, %d-%d\n",
intsrc.mpc_irqtype, intsrc.mpc_irqflag & 3,
(intsrc.mpc_irqflag >> 2) & 3, intsrc.mpc_srcbus,
intsrc.mpc_srcbusirq, intsrc.mpc_dstapic, intsrc.mpc_dstirq);
mp_irqs[mp_irq_entries] = intsrc;
if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded!\n");
return;
}
void __init mp_config_acpi_legacy_irqs (void)
{
struct mpc_config_intsrc intsrc;
int i = 0;
int ioapic = -1;
/*
* Fabricate the legacy ISA bus (bus #31).
*/
mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA;
Dprintk("Bus #%d is ISA\n", MP_ISA_BUS);
/*
* Locate the IOAPIC that manages the ISA IRQs (0-15).
*/
ioapic = mp_find_ioapic(0);
if (ioapic < 0)
return;
intsrc.mpc_type = MP_INTSRC;
intsrc.mpc_irqflag = 0; /* Conforming */
intsrc.mpc_srcbus = MP_ISA_BUS;
intsrc.mpc_dstapic = mp_ioapics[ioapic].mpc_apicid;
/*
* Use the default configuration for the IRQs 0-15. Unless
* overriden by (MADT) interrupt source override entries.
*/
for (i = 0; platform_legacy_irq(i); i++) {
int idx;
for (idx = 0; idx < mp_irq_entries; idx++) {
struct mpc_config_intsrc *irq = mp_irqs + idx;
/* Do we already have a mapping for this ISA IRQ? */
if (irq->mpc_srcbus == MP_ISA_BUS && irq->mpc_srcbusirq == i)
break;
/* Do we already have a mapping for this IOAPIC pin */
if ((irq->mpc_dstapic == intsrc.mpc_dstapic) &&
(irq->mpc_dstirq == i))
break;
}
if (idx != mp_irq_entries) {
printk(KERN_DEBUG "ACPI: IRQ%d used by override.\n", i);
continue; /* IRQ already used */
}
intsrc.mpc_irqtype = mp_INT;
intsrc.mpc_srcbusirq = i; /* Identity mapped */
intsrc.mpc_dstirq = i;
Dprintk("Int: type %d, pol %d, trig %d, bus %d, irq %d, "
"%d-%d\n", intsrc.mpc_irqtype, intsrc.mpc_irqflag & 3,
(intsrc.mpc_irqflag >> 2) & 3, intsrc.mpc_srcbus,
intsrc.mpc_srcbusirq, intsrc.mpc_dstapic,
intsrc.mpc_dstirq);
mp_irqs[mp_irq_entries] = intsrc;
if (++mp_irq_entries == MAX_IRQ_SOURCES)
panic("Max # of irq sources exceeded!\n");
}
}
int mp_register_gsi (u32 gsi, int triggering, int polarity)
{
int ioapic;
int ioapic_pin;
struct irq_desc * desc;
unsigned long flags;
/*
* Mapping between Global System Interrups, which
* represent all possible interrupts, and IRQs
* assigned to actual devices.
*/
#ifdef CONFIG_ACPI_BUS
/* Don't set up the ACPI SCI because it's already set up */
if (acpi_fadt.sci_int == gsi)
return gsi;
#endif
if (!nr_ioapics) {
unsigned int port = 0x4d0 + (gsi >> 3);
u8 val;
if (!platform_legacy_irq(gsi))
return -EINVAL;
val = inb(port);
if (triggering)
val |= 1 << (gsi & 7);
else
val &= ~(1 << (gsi & 7));
outb(val, port);
return 0;
}
ioapic = mp_find_ioapic(gsi);
if (ioapic < 0) {
printk(KERN_WARNING "No IOAPIC for GSI %u\n", gsi);
return -EINVAL;
}
ioapic_pin = gsi - mp_ioapic_routing[ioapic].gsi_base;
desc = irq_to_desc(gsi);
spin_lock_irqsave(&desc->lock, flags);
if (!(desc->status & IRQ_DISABLED) && desc->handler != &no_irq_type) {
spin_unlock_irqrestore(&desc->lock, flags);
return -EEXIST;
}
spin_unlock_irqrestore(&desc->lock, flags);
/*
* Avoid pin reprogramming. PRTs typically include entries
* with redundant pin->gsi mappings (but unique PCI devices);
* we only program the IOAPIC on the first.
*/
if (ioapic_pin > MP_MAX_IOAPIC_PIN) {
printk(KERN_ERR "Invalid reference to IOAPIC pin "
"%d-%d\n", mp_ioapics[ioapic].mpc_apicid,
ioapic_pin);
return -EINVAL;
}
if (test_and_set_bit(ioapic_pin,
mp_ioapic_routing[ioapic].pin_programmed)) {
Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n",
mp_ioapics[ioapic].mpc_apicid, ioapic_pin);
return -EEXIST;
}
return io_apic_set_pci_routing(ioapic, ioapic_pin, gsi,
triggering, polarity);
}
#endif /* CONFIG_X86_IO_APIC */
#endif /* CONFIG_ACPI */
| 25.533883 | 104 | 0.675573 |
86144f726529c568e5db0a2108fe43fa81bbfc11 | 1,956 | c | C | src/protocol.c | alsetema/mirrorop-wepresent-linux | 3ae0054ade665d21236544921a3ea132f4c18637 | [
"MIT"
] | null | null | null | src/protocol.c | alsetema/mirrorop-wepresent-linux | 3ae0054ade665d21236544921a3ea132f4c18637 | [
"MIT"
] | null | null | null | src/protocol.c | alsetema/mirrorop-wepresent-linux | 3ae0054ade665d21236544921a3ea132f4c18637 | [
"MIT"
] | 1 | 2021-06-29T09:04:28.000Z | 2021-06-29T09:04:28.000Z | #include "protocol.h"
/**
* All client-originating packets
*/
const unsigned char CMD_CLIENT_ROCK[] = {C_STR, 'a', 'l', 'i', 'v', 'e', 'R', 'O', 'C', 'K'};
const int CMD_CLIENT_ROCK_SIZE = sizeof(CMD_CLIENT_ROCK);
const unsigned char CMD_CLIENT_INFO_REQ[] = {CMD_STR, 0x00, 0x00, 0x90};
const int CMD_CLIENT_INFO_REQ_SIZE = sizeof(CMD_CLIENT_INFO_REQ);
const unsigned char CMD_CLIENT_AUTH_REQ[] = {CMD_STR, 0x00, 0x00, 0x92};
const int CMD_CLIENT_AUTH_REQ_SIZE = sizeof(CMD_CLIENT_AUTH_REQ);
const unsigned char CMD_CLIENT_UNKNOWN[] = {CMD_STR, 0x00, 0x00, 0x80};
const int CMD_CLIENT_UNKNOWN_SIZE = sizeof(CMD_CLIENT_UNKNOWN);
const unsigned char CMD_CLIENT_UID_REQ[] = {CMD_STR, 0x00, 0x00, 0xB2};
const int CMD_CLIENT_UID_REQ_SIZE = sizeof(CMD_CLIENT_UID_REQ);
const unsigned char CMD_CLIENT_START_TRANS[] = {CMD_STR, 0x00, 0x00, 0xC0};
const int CMD_CLIENT_START_TRANS_SIZE = sizeof(CMD_CLIENT_START_TRANS);
const unsigned char CMD_CLIENT_CHK_FLAG[] = {CMD_STR, 0x00, 0x00, 0x88};
const int CMD_CLIENT_CHK_FLAG_SIZE = sizeof(CMD_CLIENT_CHK_FLAG);
/**
* All server-originating packets
*/
const unsigned char CMD_SERVER_ROLL[] = {C_STR, 'a', 'l', 'i', 'v', 'e', 'R', 'O', 'L', 'L'};
const int CMD_SERVER_ROLL_SIZE = sizeof(CMD_CLIENT_ROCK);
const unsigned char CMD_SERVER_INFO_RESP[] = {CMD_STR, 0x00, 0x00, 0x81};
const int CMD_SERVER_INFO_RESP_SIZE = sizeof(CMD_SERVER_INFO_RESP);
const unsigned char CMD_SERVER_STATUS[] = {CMD_STR, 0x00, 0x00, 0x91};
const int CMD_SERVER_STATUS_SIZE = sizeof(CMD_SERVER_STATUS);
const unsigned char CMD_SERVER_AUTH_RESP[] = {CMD_STR, 0x00, 0x00, 0x93};
const int CMD_SERVER_AUTH_RESP_SIZE = sizeof(CMD_SERVER_AUTH_RESP);
const unsigned char CMD_SERVER_UID_RESP[] = {CMD_STR, 0x00, 0x00, 0xB3};
const int CMD_SERVER_UID_RESP_SIZE = sizeof(CMD_SERVER_UID_RESP);
const unsigned char CMD_SERVER_SND_FLAG[] = {CMD_STR, 0x00, 0x00, 0x89};
const int CMD_SERVER_SND_FLAG_SIZE = sizeof(CMD_SERVER_SND_FLAG);
| 40.75 | 93 | 0.764315 |
6417896898a1e1b822910b7bfe0ea63e85beeab5 | 1,582 | h | C | fnet_demos/common/fnet_application/fapp_llmnr.h | 8bitgeek/fnet | 989903fa94fcc3a507484dc9a69eaf3d6840826c | [
"Apache-2.0"
] | 1 | 2016-04-28T01:21:05.000Z | 2016-04-28T01:21:05.000Z | fnet_demos/common/fnet_application/fapp_llmnr.h | Yona-Appletree/FnetCubes | 549b0b80de6587c6012020d09cced39be5d576ee | [
"Apache-2.0"
] | null | null | null | fnet_demos/common/fnet_application/fapp_llmnr.h | Yona-Appletree/FnetCubes | 549b0b80de6587c6012020d09cced39be5d576ee | [
"Apache-2.0"
] | null | null | null | /**************************************************************************
*
* Copyright 2014 by Andrey Butok. FNET Community.
*
***************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
**********************************************************************/
/*!
*
* @file fapp_llmnr.h
*
* @author Andrey Butok
*
* @brief FNET Shell Demo (LLMNR Server).
*
***************************************************************************/
/************************************************************************
* Private Definitions.
*************************************************************************/
#ifndef _FAPP_LLMNR_H_
#define _FAPP_LLMNR_H_
#if FAPP_CFG_LLMNR_CMD && FNET_CFG_LLMNR
#if defined(__cplusplus)
extern "C" {
#endif
void fapp_llmnr_cmd( fnet_shell_desc_t desc, fnet_index_t argc, fnet_char_t ** argv );
void fapp_llmnr_info(fnet_shell_desc_t desc);
void fapp_llmnr_release(void);
#if defined(__cplusplus)
}
#endif
#endif /* FAPP_CFG_LLMNR_CMD */
#endif /* _FAPP_LLMNR_H_ */
| 28.763636 | 86 | 0.53287 |
1463a0738b7067f7a59e902c2016689f88e3b9ba | 855 | h | C | share/image.h | pphilippos/Neverball-for-micro-bit | 64e67e2dcc073548e805136995a0e2601285f5cd | [
"RSA-MD"
] | null | null | null | share/image.h | pphilippos/Neverball-for-micro-bit | 64e67e2dcc073548e805136995a0e2601285f5cd | [
"RSA-MD"
] | null | null | null | share/image.h | pphilippos/Neverball-for-micro-bit | 64e67e2dcc073548e805136995a0e2601285f5cd | [
"RSA-MD"
] | 1 | 2015-04-28T11:21:31.000Z | 2015-04-28T11:21:31.000Z | #ifndef IMAGE_H
#define IMAGE_H
#include <SDL.h>
#include <SDL_ttf.h>
#include "glext.h"
#include "base_image.h"
/*---------------------------------------------------------------------------*/
#define IF_MIPMAP 0x01
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
#define RMASK 0xFF000000
#define GMASK 0x00FF0000
#define BMASK 0x0000FF00
#define AMASK 0x000000FF
#else
#define RMASK 0x000000FF
#define GMASK 0x0000FF00
#define BMASK 0x00FF0000
#define AMASK 0xFF000000
#endif
void image_snap(const char *);
GLuint make_image_from_file(const char *, int);
GLuint make_image_from_font(int *, int *,
int *, int *, const char *, TTF_Font *, int);
GLuint make_texture(const void *, int, int, int, int);
SDL_Surface *load_surface(const char *);
/*---------------------------------------------------------------------------*/
#endif
| 22.5 | 79 | 0.588304 |
ca4bb2ba36ecee6f855cfe9822d777dd74bdf02e | 1,341 | h | C | src/sdk/hl2_csgo/game/client/swarm/vgui/nb_mission_options.h | newcommerdontblame/ionlib | 47ca829009e1529f62b2134aa6c0df8673864cf3 | [
"MIT"
] | 51 | 2016-03-18T01:48:07.000Z | 2022-03-21T20:02:02.000Z | src/game/client/swarm/vgui/nb_mission_options.h | senny970/AlienSwarm | c5a2d3fa853c726d040032ff2c7b90c8ed8d5d84 | [
"Unlicense"
] | null | null | null | src/game/client/swarm/vgui/nb_mission_options.h | senny970/AlienSwarm | c5a2d3fa853c726d040032ff2c7b90c8ed8d5d84 | [
"Unlicense"
] | 26 | 2016-03-17T21:20:37.000Z | 2022-03-24T10:21:30.000Z | #ifndef _INCLUDED_NB_MISSION_OPTIONS_H
#define _INCLUDED_NB_MISSION_OPTIONS_H
#ifdef _WIN32
#pragma once
#endif
#include <vgui/VGUI.h>
#include <vgui_controls/EditablePanel.h>
// == MANAGED_CLASS_DECLARATIONS_START: Do not edit by hand ==
class vgui::Label;
class vgui::Panel;
class vgui::Button;
class CNB_Header_Footer;
// == MANAGED_CLASS_DECLARATIONS_END ==
class CNB_Button;
#define ASW_NUM_GAME_STYLES 4
class CNB_Mission_Options : public vgui::EditablePanel
{
DECLARE_CLASS_SIMPLE( CNB_Mission_Options, vgui::EditablePanel );
public:
CNB_Mission_Options( vgui::Panel *parent, const char *name );
virtual ~CNB_Mission_Options();
virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
virtual void PerformLayout();
virtual void OnThink();
virtual void OnCommand( char const* command );
// == MANAGED_MEMBER_POINTERS_START: Do not edit by hand ==
CNB_Header_Footer *m_pHeaderFooter;
vgui::Button* m_pDifficultyUpButton;
vgui::Button* m_pDifficultyDownButton;
vgui::Label* m_pDifficultyTitle;
vgui::Label* m_pSkillLevelLabel;
vgui::Label* m_pSkillDescriptionLabel;
vgui::Label* m_pStyleTitle;
vgui::Label* m_pStyleLabel;
// == MANAGED_MEMBER_POINTERS_END ==
CNB_Button *m_pBackButton;
vgui::Button* m_pGameStyle[ASW_NUM_GAME_STYLES];
int m_iLastSkillLevel;
};
#endif // _INCLUDED_NB_MISSION_OPTIONS_H
| 26.294118 | 66 | 0.787472 |
aaa029b89b01ab7230e2eec5185714cecb9f46ff | 8,810 | h | C | src/mpid/pamid/src/pt2pt/mpidi_recv.h | OpenCMISS-Dependencies/mpich2 | cc5f4d3fd0f8c9f2774d10deaebdced77985d839 | [
"Unlicense"
] | 1 | 2015-09-11T07:55:48.000Z | 2015-09-11T07:55:48.000Z | src/mpid/pamid/src/pt2pt/mpidi_recv.h | OpenCMISS-Dependencies/mpich2 | cc5f4d3fd0f8c9f2774d10deaebdced77985d839 | [
"Unlicense"
] | null | null | null | src/mpid/pamid/src/pt2pt/mpidi_recv.h | OpenCMISS-Dependencies/mpich2 | cc5f4d3fd0f8c9f2774d10deaebdced77985d839 | [
"Unlicense"
] | 2 | 2015-11-27T23:24:14.000Z | 2021-03-29T07:06:34.000Z | /* begin_generated_IBM_copyright_prolog */
/* */
/* This is an automatically generated copyright prolog. */
/* After initializing, DO NOT MODIFY OR MOVE */
/* --------------------------------------------------------------- */
/* Licensed Materials - Property of IBM */
/* Blue Gene/Q 5765-PER 5765-PRP */
/* */
/* (C) Copyright IBM Corp. 2011, 2012 All Rights Reserved */
/* US Government Users Restricted Rights - */
/* Use, duplication, or disclosure restricted */
/* by GSA ADP Schedule Contract with IBM Corp. */
/* */
/* --------------------------------------------------------------- */
/* */
/* end_generated_IBM_copyright_prolog */
/* (C)Copyright IBM Corp. 2007, 2011 */
/**
* \file src/pt2pt/mpidi_recv.h
* \brief ADI level implemenation of MPI_Irecv()
*/
#ifndef __src_pt2pt_mpidi_recv_h__
#define __src_pt2pt_mpidi_recv_h__
#include <mpidimpl.h>
#include "../mpid_recvq.h"
#include "mpid_datatype.h"
/*#ifdef MPIDI_STATISTICS
#include "../../include/mpidi_datatypes.h"
#endif*/
#if TOKEN_FLOW_CONTROL
extern MPIDI_Out_cntr_t *MPIDI_Out_cntr;
extern int MPIDI_tfctrl_hwmark;
extern void *MPIDI_mm_alloc(size_t);
extern void MPIDI_mm_free(void *, size_t);
extern int tfctrl_enabled;
extern char *EagerLimit;
#define MPIDI_Return_tokens MPIDI_Return_tokens_inline
#define MPIDI_Receive_tokens MPIDI_Receive_tokens_inline
#define MPIDI_Update_rettoks MPIDI_Update_rettoks_inline
#define MPIDI_Alloc_lock MPIDI_Alloc_lock_inline
#define MPIDI_Must_return_tokens MPIDI_Must_return_tokens_inline
static inline void *
MPIDI_Return_tokens_inline(pami_context_t context, int dest, int tokens)
{
MPIDI_MsgInfo tokenInfo;
if (tokens) {
memset(&tokenInfo,0, sizeof(MPIDI_MsgInfo));
tokenInfo.control=MPIDI_CONTROL_RETURN_TOKENS;
tokenInfo.alltokens=tokens;
pami_send_immediate_t params = {
.dispatch = MPIDI_Protocols_Control,
.dest = dest,
.header = {
.iov_base = &tokenInfo,
.iov_len = sizeof(MPIDI_MsgInfo),
},
.data = {
.iov_base = NULL,
.iov_len = 0,
},
};
pami_result_t rc;
rc = PAMI_Send_immediate(context, ¶ms);
MPID_assert(rc == PAMI_SUCCESS);
}
}
static inline void *
MPIDI_Must_return_tokens_inline(pami_context_t context,int dest)
{
int rettoks=0;
if (MPIDI_Token_cntr[dest].rettoks
&& (MPIDI_Token_cntr[dest].rettoks + MPIDI_Token_cntr[dest].unmatched
>= MPIDI_tfctrl_hwmark))
{
rettoks=MPIDI_Token_cntr[dest].rettoks;
MPIDI_Token_cntr[dest].rettoks=0;
MPIDI_Return_tokens_inline(context,dest,rettoks);
}
}
static inline void *
MPIDI_Receive_tokens_inline(const MPIDI_MsgInfo *m, int dest)
{
if ((m)->tokens)
{
MPIDI_Token_cntr[dest].tokens += (m)->tokens;
}
}
static inline void *
MPIDI_Update_rettoks_inline(int source)
{
MPIDI_Token_cntr[source].rettoks++;
}
static inline void *
MPIDI_Alloc_lock_inline(void **buf,size_t size)
{
MPIU_THREAD_CS_ENTER(MSGQUEUE,0);
(*buf) = (void *) MPIDI_mm_alloc(size);
MPIU_THREAD_CS_EXIT(MSGQUEUE,0);
}
#else
#define MPIDI_Return_tokens(x,y,z)
#define MPIDI_Receive_tokens(x,y)
#define MPIDI_Update_rettoks(x)
#define MPIDI_Must_return_tokens(x,y) (0)
#define MPIDI_Alloc_lock(x,y)
#endif
/**
* \brief ADI level implemenation of MPI_(I)Recv()
*
* \param[in] buf The buffer to receive into
* \param[in] count Number of expected elements in the buffer
* \param[in] datatype The datatype of each element
* \param[in] rank The sending rank
* \param[in] tag The message tag
* \param[in] comm Pointer to the communicator
* \param[in] context_offset Offset from the communicator context ID
* \param[out] status Update the status structure
* \param[out] request Return a pointer to the new request object
*
* \returns An MPI Error code
*/
static inline int
MPIDI_Recv(void * buf,
int count,
MPI_Datatype datatype,
int rank,
int tag,
MPID_Comm * comm,
int context_offset,
unsigned is_blocking,
MPI_Status * status,
MPID_Request ** request)
{
MPID_Request * rreq;
int found;
int mpi_errno = MPI_SUCCESS;
/* ---------------------------------------- */
/* NULL rank means empty request */
/* ---------------------------------------- */
if (unlikely(rank == MPI_PROC_NULL))
{
MPIDI_RecvMsg_procnull(comm, is_blocking, status, request);
return MPI_SUCCESS;
}
#if (MPIDI_STATISTICS)
MPID_NSTAT(mpid_statp->recvs);
#endif
MPIR_Comm_add_ref(comm);
/* ---------------------------------------- */
/* find our request in the unexpected queue */
/* or allocate one in the posted queue */
/* ---------------------------------------- */
MPID_Request *newreq = MPIDI_Request_create2();
MPIU_THREAD_CS_ENTER(MSGQUEUE,0);
#ifndef OUT_OF_ORDER_HANDLING
rreq = MPIDI_Recvq_FDU_or_AEP(newreq, rank,
tag,
comm->recvcontext_id + context_offset,
&found);
#else
int pami_source;
if(rank != MPI_ANY_SOURCE) {
pami_source = MPID_VCR_GET_LPID(comm->vcr, rank);
} else {
pami_source = MPI_ANY_SOURCE;
}
if ((pami_source != MPI_ANY_SOURCE) && (MPIDI_In_cntr[pami_source].n_OutOfOrderMsgs>0)) {
/* returns unlock */
MPIDI_Recvq_process_out_of_order_msgs(pami_source, MPIDI_Context[0]);
}
rreq = MPIDI_Recvq_FDU_or_AEP(newreq, rank,
pami_source,
tag,
comm->recvcontext_id + context_offset,
&found);
#endif
MPIDI_SET_PR_REC(rreq,buf,count,datatype,pami_source,rank,tag,comm,is_blocking);
/* ----------------------------------------------------------------- */
/* populate request with our data */
/* We can do this because this is not a multithreaded implementation */
/* ----------------------------------------------------------------- */
rreq->comm = comm;
rreq->mpid.userbuf = buf;
rreq->mpid.userbufcount = count;
rreq->mpid.datatype = datatype;
/* We don't need this because MPIDI_CA_COMPLETE is the initialized default */
/* MPIDI_Request_setCA(rreq, MPIDI_CA_COMPLETE); */
if (unlikely(found))
{
TRACE_SET_R_VALX(pami_source,rreq,len,rreq->mpid.uebuflen);
MPIDI_RecvMsg_Unexp(rreq, buf, count, datatype);
mpi_errno = rreq->status.MPI_ERROR;
if (TOKEN_FLOW_CONTROL_ON) {
#if TOKEN_FLOW_CONTROL
if ((rreq->mpid.uebuflen) && (!(rreq->mpid.envelope.msginfo.isRzv))) {
MPIDI_Token_cntr[(rreq->mpid.peer_pami)].unmatched--;
MPIDI_Update_rettoks(rreq->mpid.peer_pami);
}
MPIDI_Must_return_tokens(MPIDI_Context[0],(rreq->mpid.peer_pami));
#else
MPID_assert_always(0);
#endif
}
MPIU_THREAD_CS_EXIT(MSGQUEUE,0);
MPID_Request_discard(newreq);
#ifdef OUT_OF_ORDER_HANDLING
if ((MPIDI_In_cntr[rreq->mpid.peer_pami].n_OutOfOrderMsgs>0))
MPIDI_Recvq_process_out_of_order_msgs(rreq->mpid.peer_pami, MPIDI_Context[0]);
#endif
}
else
{
/* ----------------------------------------------------------- */
/* request not found in unexpected queue, allocated and posted */
/* ----------------------------------------------------------- */
if (HANDLE_GET_KIND(datatype) != HANDLE_KIND_BUILTIN)
{
MPID_Datatype_get_ptr(datatype, rreq->mpid.datatype_ptr);
MPID_Datatype_add_ref(rreq->mpid.datatype_ptr);
}
MPIU_THREAD_CS_EXIT(MSGQUEUE,0);
}
/* mutex has been dropped... */
*request = rreq;
if (status != MPI_STATUS_IGNORE)
*status = rreq->status;
#ifdef MPIDI_STATISTICS
if (!(MPID_cc_is_complete(&rreq->cc)))
{
MPID_NSTAT(mpid_statp->recvWaitsComplete);
}
#endif
return mpi_errno;
}
#endif
| 34.147287 | 92 | 0.56084 |
b7a375b6f67379536247fca49675e3af4901f1e6 | 346 | h | C | ios/Framework/BanubaEffectPlayer.xcframework/ios-x86_64-simulator/BanubaEffectPlayer.framework/Headers/BNBAttachment.h | AbhishekDoshi-Bacancy/AgoraSDK | 030a024e5c10189526cb98b5db86998f8da43864 | [
"MIT"
] | 80 | 2020-10-30T07:14:40.000Z | 2022-03-27T08:52:16.000Z | ios/Framework/BanubaEffectPlayer.xcframework/ios-x86_64-simulator/BanubaEffectPlayer.framework/Headers/BNBAttachment.h | aayushparashar/plugin_tester | a43f8458f2f06ef2f5b7e7ac4aa067e8d6f65527 | [
"MIT"
] | 5 | 2020-10-27T14:07:20.000Z | 2021-06-01T09:03:01.000Z | ios/Framework/BanubaEffectPlayer.xcframework/ios-x86_64-simulator/BanubaEffectPlayer.framework/Headers/BNBAttachment.h | aayushparashar/plugin_tester | a43f8458f2f06ef2f5b7e7ac4aa067e8d6f65527 | [
"MIT"
] | 10 | 2020-12-01T15:24:24.000Z | 2022-02-22T12:38:09.000Z | // AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from scene.djinni
#import "BNBAttachmentType.h"
#import "BNBVec3.h"
#import <Foundation/Foundation.h>
@interface BNBAttachment : NSObject
- (BNBAttachmentType)getAttachmentType;
- (void)setClearColor:(nonnull BNBVec3 *)color;
- (nonnull BNBVec3 *)getClearColor;
@end
| 19.222222 | 50 | 0.760116 |
315fe7931957cf363b40a6461947ea6e90f0f2b5 | 29,155 | h | C | teensey/DMAChannel.h | umbc-hackafe/sign-drivers | cd2a80a455a0956f23afb5dc15eb67f48c69f289 | [
"MIT"
] | 5 | 2015-03-04T22:48:52.000Z | 2021-12-18T11:57:53.000Z | walrus_firmware/rosserial_teensyduino/teensyduino_sdk/arduino-1.0.6/hardware/teensy/cores/teensy3/DMAChannel.h | RIVeR-Lab/walrus | 28d285cec8e181e9300fdd9a82a299c7c025f32e | [
"BSD-3-Clause"
] | 52 | 2015-01-02T05:50:10.000Z | 2021-07-23T20:34:50.000Z | teensey/DMAChannel.h | umbc-hackafe/sign-drivers | cd2a80a455a0956f23afb5dc15eb67f48c69f289 | [
"MIT"
] | 5 | 2015-08-24T10:05:30.000Z | 2021-12-18T11:58:03.000Z | #ifndef DMAChannel_h_
#define DMAChannel_h_
#include "kinetis.h"
// This code is a work-in-progress. It's incomplete and not usable yet...
//
// http://forum.pjrc.com/threads/25778-Could-there-be-something-like-an-ISR-template-function/page3
// known libraries with DMA usage (in need of porting to this new scheme):
//
// https://github.com/PaulStoffregen/Audio
// https://github.com/PaulStoffregen/OctoWS2811
// https://github.com/pedvide/ADC
// https://github.com/duff2013/SerialEvent
// https://github.com/pixelmatix/SmartMatrix
// https://github.com/crteensy/DmaSpi
#ifdef __cplusplus
#define DMACHANNEL_HAS_BEGIN
#define DMACHANNEL_HAS_BOOLEAN_CTOR
class DMABaseClass {
public:
typedef struct __attribute__((packed)) {
volatile const void * volatile SADDR;
int16_t SOFF;
union { uint16_t ATTR;
struct { uint8_t ATTR_DST; uint8_t ATTR_SRC; }; };
union { uint32_t NBYTES; uint32_t NBYTES_MLNO;
uint32_t NBYTES_MLOFFNO; uint32_t NBYTES_MLOFFYES; };
int32_t SLAST;
volatile void * volatile DADDR;
int16_t DOFF;
union { volatile uint16_t CITER;
volatile uint16_t CITER_ELINKYES; volatile uint16_t CITER_ELINKNO; };
int32_t DLASTSGA;
volatile uint16_t CSR;
union { volatile uint16_t BITER;
volatile uint16_t BITER_ELINKYES; volatile uint16_t BITER_ELINKNO; };
} TCD_t;
TCD_t *TCD;
/***************************************/
/** Data Transfer **/
/***************************************/
// Use a single variable as the data source. Typically a register
// for receiving data from one of the hardware peripherals is used.
void source(volatile const signed char &p) { source(*(volatile const uint8_t *)&p); }
void source(volatile const unsigned char &p) {
TCD->SADDR = &p;
TCD->SOFF = 0;
TCD->ATTR_SRC = 0;
if ((uint32_t)&p < 0x40000000 || TCD->NBYTES == 0) TCD->NBYTES = 1;
TCD->SLAST = 0;
}
void source(volatile const signed short &p) { source(*(volatile const uint16_t *)&p); }
void source(volatile const unsigned short &p) {
TCD->SADDR = &p;
TCD->SOFF = 0;
TCD->ATTR_SRC = 1;
if ((uint32_t)&p < 0x40000000 || TCD->NBYTES == 0) TCD->NBYTES = 2;
TCD->SLAST = 0;
}
void source(volatile const signed int &p) { source(*(volatile const uint32_t *)&p); }
void source(volatile const unsigned int &p) { source(*(volatile const uint32_t *)&p); }
void source(volatile const signed long &p) { source(*(volatile const uint32_t *)&p); }
void source(volatile const unsigned long &p) {
TCD->SADDR = &p;
TCD->SOFF = 0;
TCD->ATTR_SRC = 2;
if ((uint32_t)&p < 0x40000000 || TCD->NBYTES == 0) TCD->NBYTES = 4;
TCD->SLAST = 0;
}
// Use a buffer (array of data) as the data source. Typically a
// buffer for transmitting data is used.
void sourceBuffer(volatile const signed char p[], unsigned int len) {
sourceBuffer((volatile const uint8_t *)p, len); }
void sourceBuffer(volatile const unsigned char p[], unsigned int len) {
TCD->SADDR = p;
TCD->SOFF = 1;
TCD->ATTR_SRC = 0;
TCD->NBYTES = 1;
TCD->SLAST = -len;
TCD->BITER = len;
TCD->CITER = len;
}
void sourceBuffer(volatile const signed short p[], unsigned int len) {
sourceBuffer((volatile const uint16_t *)p, len); }
void sourceBuffer(volatile const unsigned short p[], unsigned int len) {
TCD->SADDR = p;
TCD->SOFF = 2;
TCD->ATTR_SRC = 1;
TCD->NBYTES = 2;
TCD->SLAST = -len;
TCD->BITER = len / 2;
TCD->CITER = len / 2;
}
void sourceBuffer(volatile const signed int p[], unsigned int len) {
sourceBuffer((volatile const uint32_t *)p, len); }
void sourceBuffer(volatile const unsigned int p[], unsigned int len) {
sourceBuffer((volatile const uint32_t *)p, len); }
void sourceBuffer(volatile const signed long p[], unsigned int len) {
sourceBuffer((volatile const uint32_t *)p, len); }
void sourceBuffer(volatile const unsigned long p[], unsigned int len) {
TCD->SADDR = p;
TCD->SOFF = 4;
TCD->ATTR_SRC = 2;
TCD->NBYTES = 4;
TCD->SLAST = -len;
TCD->BITER = len / 4;
TCD->CITER = len / 4;
}
// Use a circular buffer as the data source
void sourceCircular(volatile const signed char p[], unsigned int len) {
sourceCircular((volatile const uint8_t *)p, len); }
void sourceCircular(volatile const unsigned char p[], unsigned int len) {
TCD->SADDR = p;
TCD->SOFF = 1;
TCD->ATTR_SRC = ((31 - __builtin_clz(len)) << 3);
TCD->NBYTES = 1;
TCD->SLAST = 0;
TCD->BITER = len;
TCD->CITER = len;
}
void sourceCircular(volatile const signed short p[], unsigned int len) {
sourceCircular((volatile const uint16_t *)p, len); }
void sourceCircular(volatile const unsigned short p[], unsigned int len) {
TCD->SADDR = p;
TCD->SOFF = 2;
TCD->ATTR_SRC = ((31 - __builtin_clz(len)) << 3) | 1;
TCD->NBYTES = 2;
TCD->SLAST = 0;
TCD->BITER = len / 2;
TCD->CITER = len / 2;
}
void sourceCircular(volatile const signed int p[], unsigned int len) {
sourceCircular((volatile const uint32_t *)p, len); }
void sourceCircular(volatile const unsigned int p[], unsigned int len) {
sourceCircular((volatile const uint32_t *)p, len); }
void sourceCircular(volatile const signed long p[], unsigned int len) {
sourceCircular((volatile const uint32_t *)p, len); }
void sourceCircular(volatile const unsigned long p[], unsigned int len) {
TCD->SADDR = p;
TCD->SOFF = 4;
TCD->ATTR_SRC = ((31 - __builtin_clz(len)) << 3) | 2;
TCD->NBYTES = 4;
TCD->SLAST = 0;
TCD->BITER = len / 4;
TCD->CITER = len / 4;
}
// Use a single variable as the data destination. Typically a register
// for transmitting data to one of the hardware peripherals is used.
void destination(volatile signed char &p) { destination(*(volatile uint8_t *)&p); }
void destination(volatile unsigned char &p) {
TCD->DADDR = &p;
TCD->DOFF = 0;
TCD->ATTR_DST = 0;
if ((uint32_t)&p < 0x40000000 || TCD->NBYTES == 0) TCD->NBYTES = 1;
TCD->DLASTSGA = 0;
}
void destination(volatile signed short &p) { destination(*(volatile uint16_t *)&p); }
void destination(volatile unsigned short &p) {
TCD->DADDR = &p;
TCD->DOFF = 0;
TCD->ATTR_DST = 1;
if ((uint32_t)&p < 0x40000000 || TCD->NBYTES == 0) TCD->NBYTES = 2;
TCD->DLASTSGA = 0;
}
void destination(volatile signed int &p) { destination(*(volatile uint32_t *)&p); }
void destination(volatile unsigned int &p) { destination(*(volatile uint32_t *)&p); }
void destination(volatile signed long &p) { destination(*(volatile uint32_t *)&p); }
void destination(volatile unsigned long &p) {
TCD->DADDR = &p;
TCD->DOFF = 0;
TCD->ATTR_DST = 2;
if ((uint32_t)&p < 0x40000000 || TCD->NBYTES == 0) TCD->NBYTES = 4;
TCD->DLASTSGA = 0;
}
// Use a buffer (array of data) as the data destination. Typically a
// buffer for receiving data is used.
void destinationBuffer(volatile signed char p[], unsigned int len) {
destinationBuffer((volatile uint8_t *)p, len); }
void destinationBuffer(volatile unsigned char p[], unsigned int len) {
TCD->DADDR = p;
TCD->DOFF = 1;
TCD->ATTR_DST = 0;
TCD->NBYTES = 1;
TCD->DLASTSGA = -len;
TCD->BITER = len;
TCD->CITER = len;
}
void destinationBuffer(volatile signed short p[], unsigned int len) {
destinationBuffer((volatile uint16_t *)p, len); }
void destinationBuffer(volatile unsigned short p[], unsigned int len) {
TCD->DADDR = p;
TCD->DOFF = 2;
TCD->ATTR_DST = 1;
TCD->NBYTES = 2;
TCD->DLASTSGA = -len;
TCD->BITER = len / 2;
TCD->CITER = len / 2;
}
void destinationBuffer(volatile signed int p[], unsigned int len) {
destinationBuffer((volatile uint32_t *)p, len); }
void destinationBuffer(volatile unsigned int p[], unsigned int len) {
destinationBuffer((volatile uint32_t *)p, len); }
void destinationBuffer(volatile signed long p[], unsigned int len) {
destinationBuffer((volatile uint32_t *)p, len); }
void destinationBuffer(volatile unsigned long p[], unsigned int len) {
TCD->DADDR = p;
TCD->DOFF = 4;
TCD->ATTR_DST = 2;
TCD->NBYTES = 4;
TCD->DLASTSGA = -len;
TCD->BITER = len / 4;
TCD->CITER = len / 4;
}
// Use a circular buffer as the data destination
void destinationCircular(volatile signed char p[], unsigned int len) {
destinationCircular((volatile uint8_t *)p, len); }
void destinationCircular(volatile unsigned char p[], unsigned int len) {
TCD->DADDR = p;
TCD->DOFF = 1;
TCD->ATTR_DST = ((31 - __builtin_clz(len)) << 3);
TCD->NBYTES = 1;
TCD->DLASTSGA = 0;
TCD->BITER = len;
TCD->CITER = len;
}
void destinationCircular(volatile signed short p[], unsigned int len) {
destinationCircular((volatile uint16_t *)p, len); }
void destinationCircular(volatile unsigned short p[], unsigned int len) {
TCD->DADDR = p;
TCD->DOFF = 2;
TCD->ATTR_DST = ((31 - __builtin_clz(len)) << 3) | 1;
TCD->NBYTES = 2;
TCD->DLASTSGA = 0;
TCD->BITER = len / 2;
TCD->CITER = len / 2;
}
void destinationCircular(volatile signed int p[], unsigned int len) {
destinationCircular((volatile uint32_t *)p, len); }
void destinationCircular(volatile unsigned int p[], unsigned int len) {
destinationCircular((volatile uint32_t *)p, len); }
void destinationCircular(volatile signed long p[], unsigned int len) {
destinationCircular((volatile uint32_t *)p, len); }
void destinationCircular(volatile unsigned long p[], unsigned int len) {
TCD->DADDR = p;
TCD->DOFF = 4;
TCD->ATTR_DST = ((31 - __builtin_clz(len)) << 3) | 2;
TCD->NBYTES = 4;
TCD->DLASTSGA = 0;
TCD->BITER = len / 4;
TCD->CITER = len / 4;
}
/*************************************************/
/** Quantity of Data to Transfer **/
/*************************************************/
// Set the data size used for each triggered transfer
void transferSize(unsigned int len) {
if (len == 4) {
TCD->NBYTES = 4;
if (TCD->SOFF != 0) TCD->SOFF = 4;
if (TCD->DOFF != 0) TCD->DOFF = 4;
TCD->ATTR = (TCD->ATTR & 0xF8F8) | 0x0202;
} else if (len == 2) {
TCD->NBYTES = 2;
if (TCD->SOFF != 0) TCD->SOFF = 2;
if (TCD->DOFF != 0) TCD->DOFF = 2;
TCD->ATTR = (TCD->ATTR & 0xF8F8) | 0x0101;
} else {
TCD->NBYTES = 1;
if (TCD->SOFF != 0) TCD->SOFF = 1;
if (TCD->DOFF != 0) TCD->DOFF = 1;
TCD->ATTR = TCD->ATTR & 0xF8F8;
}
}
// Set the number of transfers (number of triggers until complete)
void transferCount(unsigned int len) {
if (len > 32767) return;
if (len >= 512) {
TCD->BITER = len;
TCD->CITER = len;
} else {
TCD->BITER = (TCD->BITER & 0xFE00) | len;
TCD->CITER = (TCD->CITER & 0xFE00) | len;
}
}
/*************************************************/
/** Special Options / Features **/
/*************************************************/
void interruptAtCompletion(void) {
TCD->CSR |= DMA_TCD_CSR_INTMAJOR;
}
void interruptAtHalf(void) {
TCD->CSR |= DMA_TCD_CSR_INTHALF;
}
void disableOnCompletion(void) {
TCD->CSR |= DMA_TCD_CSR_DREQ;
}
void replaceSettingsOnCompletion(const DMABaseClass &settings) {
TCD->DLASTSGA = (int32_t)(settings.TCD);
TCD->CSR &= ~DMA_TCD_CSR_DONE;
TCD->CSR |= DMA_TCD_CSR_ESG;
}
protected:
// users should not be able to create instances of DMABaseClass, which
// require the inheriting class to initialize the TCD pointer.
DMABaseClass() {}
static inline void copy_tcd(TCD_t *dst, const TCD_t *src) {
const uint32_t *p = (const uint32_t *)src;
uint32_t *q = (uint32_t *)dst;
uint32_t t1, t2, t3, t4;
t1 = *p++; t2 = *p++; t3 = *p++; t4 = *p++;
*q++ = t1; *q++ = t2; *q++ = t3; *q++ = t4;
t1 = *p++; t2 = *p++; t3 = *p++; t4 = *p++;
*q++ = t1; *q++ = t2; *q++ = t3; *q++ = t4;
}
};
// DMASetting represents settings stored only in memory, which can be
// applied to any DMA channel.
class DMASetting : public DMABaseClass {
public:
DMASetting() {
TCD = &tcddata;
}
DMASetting(const DMASetting &c) {
TCD = &tcddata;
*this = c;
}
DMASetting(const DMABaseClass &c) {
TCD = &tcddata;
*this = c;
}
DMASetting & operator = (const DMABaseClass &rhs) {
copy_tcd(TCD, rhs.TCD);
return *this;
}
private:
TCD_t tcddata __attribute__((aligned(32)));
};
// DMAChannel reprents an actual DMA channel and its current settings
class DMAChannel : public DMABaseClass {
public:
/*************************************************/
/** Channel Allocation **/
/*************************************************/
DMAChannel() {
begin();
}
DMAChannel(const DMAChannel &c) {
TCD = c.TCD;
channel = c.channel;
}
DMAChannel(const DMASetting &c) {
begin();
copy_tcd(TCD, c.TCD);
}
DMAChannel(bool allocate) {
if (allocate) begin();
}
DMAChannel & operator = (const DMAChannel &rhs) {
if (channel != rhs.channel) {
release();
TCD = rhs.TCD;
channel = rhs.channel;
}
return *this;
}
DMAChannel & operator = (const DMASetting &rhs) {
copy_tcd(TCD, rhs.TCD);
return *this;
}
~DMAChannel() {
release();
}
void begin(bool force_initialization = false);
private:
void release(void);
public:
/***************************************/
/** Triggering **/
/***************************************/
// Triggers cause the DMA channel to actually move data. Each
// trigger moves a single data unit, which is typically 8, 16 or
// 32 bits. If a channel is configured for 200 transfers
// Use a hardware trigger to make the DMA channel run
void triggerAtHardwareEvent(uint8_t source) {
volatile uint8_t *mux;
mux = (volatile uint8_t *)&(DMAMUX0_CHCFG0) + channel;
*mux = 0;
*mux = (source & 63) | DMAMUX_ENABLE;
}
// Use another DMA channel as the trigger, causing this
// channel to trigger after each transfer is makes, except
// the its last transfer. This effectively makes the 2
// channels run in parallel until the last transfer
void triggerAtTransfersOf(DMABaseClass &ch) {
ch.TCD->BITER = (ch.TCD->BITER & ~DMA_TCD_BITER_ELINKYES_LINKCH_MASK)
| DMA_TCD_BITER_ELINKYES_LINKCH(channel) | DMA_TCD_BITER_ELINKYES_ELINK;
ch.TCD->CITER = ch.TCD->BITER ;
}
// Use another DMA channel as the trigger, causing this
// channel to trigger when the other channel completes.
void triggerAtCompletionOf(DMABaseClass &ch) {
ch.TCD->CSR = (ch.TCD->CSR & ~(DMA_TCD_CSR_MAJORLINKCH_MASK|DMA_TCD_CSR_DONE))
| DMA_TCD_CSR_MAJORLINKCH(channel) | DMA_TCD_CSR_MAJORELINK;
}
// Cause this DMA channel to be continuously triggered, so
// it will move data as rapidly as possible, without waiting.
// Normally this would be used with disableOnCompletion().
void triggerContinuously(void) {
volatile uint8_t *mux = (volatile uint8_t *)&DMAMUX0_CHCFG0;
mux[channel] = 0;
#if DMAMUX_NUM_SOURCE_ALWAYS >= DMA_NUM_CHANNELS
mux[channel] = DMAMUX_SOURCE_ALWAYS0 + channel;
#else
// search for an unused "always on" source
unsigned int i = DMAMUX_SOURCE_ALWAYS0;
for (i = DMAMUX_SOURCE_ALWAYS0;
i < DMAMUX_SOURCE_ALWAYS0 + DMAMUX_NUM_SOURCE_ALWAYS; i++) {
unsigned int ch;
for (ch=0; ch < DMA_NUM_CHANNELS; ch++) {
if (mux[ch] == i) break;
}
if (ch >= DMA_NUM_CHANNELS) {
mux[channel] = (i | DMAMUX_ENABLE);
return;
}
}
#endif
}
// Manually trigger the DMA channel.
void triggerManual(void) {
DMA_SSRT = channel;
}
/***************************************/
/** Interrupts **/
/***************************************/
// An interrupt routine can be run when the DMA channel completes
// the entire transfer, and also optionally when half of the
// transfer is completed.
void attachInterrupt(void (*isr)(void)) {
_VectorsRam[channel + IRQ_DMA_CH0 + 16] = isr;
NVIC_ENABLE_IRQ(IRQ_DMA_CH0 + channel);
}
void detachInterrupt(void) {
NVIC_DISABLE_IRQ(IRQ_DMA_CH0 + channel);
}
void clearInterrupt(void) {
DMA_CINT = channel;
}
/***************************************/
/** Enable / Disable **/
/***************************************/
void enable(void) {
DMA_SERQ = channel;
}
void disable(void) {
DMA_CERQ = channel;
}
/***************************************/
/** Status **/
/***************************************/
bool complete(void) {
if (TCD->CSR & DMA_TCD_CSR_DONE) return true;
return false;
}
void clearComplete(void) {
DMA_CDNE = channel;
}
bool error(void) {
if (DMA_ERR & (1<<channel)) return true;
return false;
}
void clearError(void) {
DMA_CERR = channel;
}
void * sourceAddress(void) {
return (void *)(TCD->SADDR);
}
void * destinationAddress(void) {
return (void *)(TCD->DADDR);
}
/***************************************/
/** Direct Hardware Access **/
/***************************************/
// For complex and unusual configurations not possible with the above
// functions, the Transfer Control Descriptor (TCD) and channel number
// can be used directly. This leads to less portable and less readable
// code, but direct control of all parameters is possible.
uint8_t channel;
// TCD is accessible due to inheritance from DMABaseClass
/* usage cases:
************************
OctoWS2811:
************************
// enable clocks to the DMA controller and DMAMUX
SIM_SCGC7 |= SIM_SCGC7_DMA;
SIM_SCGC6 |= SIM_SCGC6_DMAMUX;
DMA_CR = 0;
DMA_CERQ = 1;
DMA_CERQ = 2;
DMA_CERQ = 3;
// DMA channel #1 sets WS2811 high at the beginning of each cycle
DMA_TCD1_SADDR = &ones;
DMA_TCD1_SOFF = 0;
DMA_TCD1_ATTR = DMA_TCD_ATTR_SSIZE(0) | DMA_TCD_ATTR_DSIZE(0);
DMA_TCD1_NBYTES_MLNO = 1;
DMA_TCD1_SLAST = 0;
DMA_TCD1_DADDR = &GPIOD_PSOR;
DMA_TCD1_DOFF = 0;
DMA_TCD1_CITER_ELINKNO = bufsize;
DMA_TCD1_DLASTSGA = 0;
DMA_TCD1_CSR = DMA_TCD_CSR_DREQ;
DMA_TCD1_BITER_ELINKNO = bufsize;
dma1.source(ones);
dma1.destination(GPIOD_PSOR);
dma1.size(1);
dma1.count(bufsize);
dma1.disableOnCompletion();
// DMA channel #2 writes the pixel data at 20% of the cycle
DMA_TCD2_SADDR = frameBuffer;
DMA_TCD2_SOFF = 1;
DMA_TCD2_ATTR = DMA_TCD_ATTR_SSIZE(0) | DMA_TCD_ATTR_DSIZE(0);
DMA_TCD2_NBYTES_MLNO = 1;
DMA_TCD2_SLAST = -bufsize;
DMA_TCD2_DADDR = &GPIOD_PDOR;
DMA_TCD2_DOFF = 0;
DMA_TCD2_CITER_ELINKNO = bufsize;
DMA_TCD2_DLASTSGA = 0;
DMA_TCD2_CSR = DMA_TCD_CSR_DREQ;
DMA_TCD2_BITER_ELINKNO = bufsize;
dma2.source(frameBuffer, sizeof(frameBuffer));
dma2.destination(GPIOD_PDOR);
dma2.size(1);
dma2.count(bufsize);
dma2.disableOnCompletion();
// DMA channel #3 clear all the pins low at 48% of the cycle
DMA_TCD3_SADDR = &ones;
DMA_TCD3_SOFF = 0;
DMA_TCD3_ATTR = DMA_TCD_ATTR_SSIZE(0) | DMA_TCD_ATTR_DSIZE(0);
DMA_TCD3_NBYTES_MLNO = 1;
DMA_TCD3_SLAST = 0;
DMA_TCD3_DADDR = &GPIOD_PCOR;
DMA_TCD3_DOFF = 0;
DMA_TCD3_CITER_ELINKNO = bufsize;
DMA_TCD3_DLASTSGA = 0;
DMA_TCD3_CSR = DMA_TCD_CSR_DREQ | DMA_TCD_CSR_INTMAJOR;
DMA_TCD3_BITER_ELINKNO = bufsize;
dma3.source(ones);
dma3.destination(GPIOD_PCOR);
dma3.size(1);
dma3.count(bufsize);
dma3.disableOnCompletion();
************************
Audio, DAC
************************
DMA_CR = 0;
DMA_TCD4_SADDR = dac_buffer;
DMA_TCD4_SOFF = 2;
DMA_TCD4_ATTR = DMA_TCD_ATTR_SSIZE(1) | DMA_TCD_ATTR_DSIZE(1);
DMA_TCD4_NBYTES_MLNO = 2;
DMA_TCD4_SLAST = -sizeof(dac_buffer);
DMA_TCD4_DADDR = &DAC0_DAT0L;
DMA_TCD4_DOFF = 0;
DMA_TCD4_CITER_ELINKNO = sizeof(dac_buffer) / 2;
DMA_TCD4_DLASTSGA = 0;
DMA_TCD4_BITER_ELINKNO = sizeof(dac_buffer) / 2;
DMA_TCD4_CSR = DMA_TCD_CSR_INTHALF | DMA_TCD_CSR_INTMAJOR;
DMAMUX0_CHCFG4 = DMAMUX_DISABLE;
DMAMUX0_CHCFG4 = DMAMUX_SOURCE_PDB | DMAMUX_ENABLE;
************************
Audio, I2S
************************
DMA_CR = 0;
DMA_TCD0_SADDR = i2s_tx_buffer;
DMA_TCD0_SOFF = 2;
DMA_TCD0_ATTR = DMA_TCD_ATTR_SSIZE(1) | DMA_TCD_ATTR_DSIZE(1);
DMA_TCD0_NBYTES_MLNO = 2;
DMA_TCD0_SLAST = -sizeof(i2s_tx_buffer);
DMA_TCD0_DADDR = &I2S0_TDR0;
DMA_TCD0_DOFF = 0;
DMA_TCD0_CITER_ELINKNO = sizeof(i2s_tx_buffer) / 2;
DMA_TCD0_DLASTSGA = 0;
DMA_TCD0_BITER_ELINKNO = sizeof(i2s_tx_buffer) / 2;
DMA_TCD0_CSR = DMA_TCD_CSR_INTHALF | DMA_TCD_CSR_INTMAJOR;
DMAMUX0_CHCFG0 = DMAMUX_DISABLE;
DMAMUX0_CHCFG0 = DMAMUX_SOURCE_I2S0_TX | DMAMUX_ENABLE;
************************
ADC lib, Pedro Villanueva
************************
DMA_CR = 0; // normal mode of operation
*DMAMUX0_CHCFG = DMAMUX_DISABLE; // disable before changing
*DMA_TCD_ATTR = DMA_TCD_ATTR_SSIZE(DMA_TCD_ATTR_SIZE_16BIT) |
DMA_TCD_ATTR_DSIZE(DMA_TCD_ATTR_SIZE_16BIT) |
DMA_TCD_ATTR_DMOD(4); // src and dst data is 16 bit (2 bytes), buffer size 2^^4 bytes = 8 values
*DMA_TCD_NBYTES_MLNO = 2; // Minor Byte Transfer Count 2 bytes = 16 bits (we transfer 2 bytes each minor loop)
*DMA_TCD_SADDR = ADC_RA; // source address
*DMA_TCD_SOFF = 0; // don't change the address when minor loop finishes
*DMA_TCD_SLAST = 0; // don't change src address after major loop completes
*DMA_TCD_DADDR = elems; // destination address
*DMA_TCD_DOFF = 2; // increment 2 bytes each minor loop
*DMA_TCD_DLASTSGA = 0; // modulus feature takes care of going back to first element
*DMA_TCD_CITER_ELINKNO = 1; // Current Major Iteration Count with channel linking disabled
*DMA_TCD_BITER_ELINKNO = 1; // Starting Major Iteration Count with channel linking disabled
*DMA_TCD_CSR = DMA_TCD_CSR_INTMAJOR; // Control and status: interrupt when major counter is complete
DMA_CERQ = DMA_CERQ_CERQ(DMA_channel); // clear all past request
DMA_CINT = DMA_channel; // clear interrupts
uint8_t DMAMUX_SOURCE_ADC = DMAMUX_SOURCE_ADC0;
if(ADC_number==1){
DMAMUX_SOURCE_ADC = DMAMUX_SOURCE_ADC1;
}
*DMAMUX0_CHCFG = DMAMUX_SOURCE_ADC | DMAMUX_ENABLE; // enable mux and set channel DMA_channel to ADC0
DMA_SERQ = DMA_SERQ_SERQ(DMA_channel); // enable DMA request
NVIC_ENABLE_IRQ(IRQ_DMA_CH); // enable interrupts
************************
SmartMatrix
************************
// enable minor loop mapping so addresses can get reset after minor loops
DMA_CR = 1 << 7;
// DMA channel #0 - on latch rising edge, read address from fixed address temporary buffer, and output address on GPIO
// using combo of writes to set+clear registers, to only modify the address pins and not other GPIO pins
// address temporary buffer is refreshed before each DMA trigger (by DMA channel #2)
// only use single major loop, never disable channel
#define ADDRESS_ARRAY_REGISTERS_TO_UPDATE 2
DMA_TCD0_SADDR = &gpiosync.gpio_pcor;
DMA_TCD0_SOFF = (int)&gpiosync.gpio_psor - (int)&gpiosync.gpio_pcor;
DMA_TCD0_SLAST = (ADDRESS_ARRAY_REGISTERS_TO_UPDATE * ((int)&ADDX_GPIO_CLEAR_REGISTER - (int)&ADDX_GPIO_SET_REGISTER));
DMA_TCD0_ATTR = DMA_TCD_ATTR_SSIZE(2) | DMA_TCD_ATTR_DSIZE(2);
// Destination Minor Loop Offset Enabled - transfer appropriate number of bytes per minor loop, and put DADDR back to original value when minor loop is complete
// Source Minor Loop Offset Enabled - source buffer is same size and offset as destination so values reset after each minor loop
DMA_TCD0_NBYTES_MLOFFYES = DMA_TCD_NBYTES_SMLOE | DMA_TCD_NBYTES_DMLOE |
((ADDRESS_ARRAY_REGISTERS_TO_UPDATE * ((int)&ADDX_GPIO_CLEAR_REGISTER - (int)&ADDX_GPIO_SET_REGISTER)) << 10) |
(ADDRESS_ARRAY_REGISTERS_TO_UPDATE * sizeof(gpiosync.gpio_psor));
// start on higher value of two registers, and make offset decrement to avoid negative number in NBYTES_MLOFFYES (TODO: can switch order by masking negative offset)
DMA_TCD0_DADDR = &ADDX_GPIO_CLEAR_REGISTER;
// update destination address so the second update per minor loop is ADDX_GPIO_SET_REGISTER
DMA_TCD0_DOFF = (int)&ADDX_GPIO_SET_REGISTER - (int)&ADDX_GPIO_CLEAR_REGISTER;
DMA_TCD0_DLASTSGA = (ADDRESS_ARRAY_REGISTERS_TO_UPDATE * ((int)&ADDX_GPIO_CLEAR_REGISTER - (int)&ADDX_GPIO_SET_REGISTER));
// single major loop
DMA_TCD0_CITER_ELINKNO = 1;
DMA_TCD0_BITER_ELINKNO = 1;
// link channel 1, enable major channel-to-channel linking, don't clear enable on major loop complete
DMA_TCD0_CSR = (1 << 8) | (1 << 5);
DMAMUX0_CHCFG0 = DMAMUX_SOURCE_LATCH_RISING_EDGE | DMAMUX_ENABLE;
// DMA channel #1 - copy address values from current position in array to buffer to temporarily hold row values for the next timer cycle
// only use single major loop, never disable channel
DMA_TCD1_SADDR = &matrixUpdateBlocks[0][0].addressValues;
DMA_TCD1_SOFF = sizeof(uint16_t);
DMA_TCD1_SLAST = sizeof(matrixUpdateBlock) - (ADDRESS_ARRAY_REGISTERS_TO_UPDATE * sizeof(uint16_t));
DMA_TCD1_ATTR = DMA_TCD_ATTR_SSIZE(1) | DMA_TCD_ATTR_DSIZE(1);
// 16-bit = 2 bytes transferred
// transfer two 16-bit values, reset destination address back after each minor loop
DMA_TCD1_NBYTES_MLOFFNO = (ADDRESS_ARRAY_REGISTERS_TO_UPDATE * sizeof(uint16_t));
// start with the register that's the highest location in memory and make offset decrement to avoid negative number in NBYTES_MLOFFYES register (TODO: can switch order by masking negative offset)
DMA_TCD1_DADDR = &gpiosync.gpio_pcor;
DMA_TCD1_DOFF = (int)&gpiosync.gpio_psor - (int)&gpiosync.gpio_pcor;
DMA_TCD1_DLASTSGA = (ADDRESS_ARRAY_REGISTERS_TO_UPDATE * ((int)&gpiosync.gpio_pcor - (int)&gpiosync.gpio_psor));
// no minor loop linking, single major loop, single minor loop, don't clear enable after major loop complete
DMA_TCD1_CITER_ELINKNO = 1;
DMA_TCD1_BITER_ELINKNO = 1;
DMA_TCD1_CSR = 0;
// DMA channel #2 - on latch falling edge, load FTM1_CV1 and FTM1_MOD with with next values from current block
// only use single major loop, never disable channel
// link to channel 3 when complete
#define TIMER_REGISTERS_TO_UPDATE 2
DMA_TCD2_SADDR = &matrixUpdateBlocks[0][0].timerValues.timer_oe;
DMA_TCD2_SOFF = sizeof(uint16_t);
DMA_TCD2_SLAST = sizeof(matrixUpdateBlock) - (TIMER_REGISTERS_TO_UPDATE * sizeof(uint16_t));
DMA_TCD2_ATTR = DMA_TCD_ATTR_SSIZE(1) | DMA_TCD_ATTR_DSIZE(1);
// 16-bit = 2 bytes transferred
DMA_TCD2_NBYTES_MLOFFNO = TIMER_REGISTERS_TO_UPDATE * sizeof(uint16_t);
DMA_TCD2_DADDR = &FTM1_C1V;
DMA_TCD2_DOFF = (int)&FTM1_MOD - (int)&FTM1_C1V;
DMA_TCD2_DLASTSGA = TIMER_REGISTERS_TO_UPDATE * ((int)&FTM1_C1V - (int)&FTM1_MOD);
// no minor loop linking, single major loop
DMA_TCD2_CITER_ELINKNO = 1;
DMA_TCD2_BITER_ELINKNO = 1;
// link channel 3, enable major channel-to-channel linking, don't clear enable after major loop complete
DMA_TCD2_CSR = (3 << 8) | (1 << 5);
DMAMUX0_CHCFG2 = DMAMUX_SOURCE_LATCH_FALLING_EDGE | DMAMUX_ENABLE;
#define DMA_TCD_MLOFF_MASK (0x3FFFFC00)
// DMA channel #3 - repeatedly load gpio_array into GPIOD_PDOR, stop and int on major loop complete
DMA_TCD3_SADDR = matrixUpdateData[0][0];
DMA_TCD3_SOFF = sizeof(matrixUpdateData[0][0]) / 2;
// SADDR will get updated by ISR, no need to set SLAST
DMA_TCD3_SLAST = 0;
DMA_TCD3_ATTR = DMA_TCD_ATTR_SSIZE(0) | DMA_TCD_ATTR_DSIZE(0);
// after each minor loop, set source to point back to the beginning of this set of data,
// but advance by 1 byte to get the next significant bits data
DMA_TCD3_NBYTES_MLOFFYES = DMA_TCD_NBYTES_SMLOE |
(((1 - sizeof(matrixUpdateData[0])) << 10) & DMA_TCD_MLOFF_MASK) |
(MATRIX_WIDTH * DMA_UPDATES_PER_CLOCK);
DMA_TCD3_DADDR = &GPIOD_PDOR;
DMA_TCD3_DOFF = 0;
DMA_TCD3_DLASTSGA = 0;
DMA_TCD3_CITER_ELINKNO = LATCHES_PER_ROW;
DMA_TCD3_BITER_ELINKNO = LATCHES_PER_ROW;
// int after major loop is complete
DMA_TCD3_CSR = DMA_TCD_CSR_INTMAJOR;
// for debugging - enable bandwidth control (space out GPIO updates so they can be seen easier on a low-bandwidth logic analyzer)
//DMA_TCD3_CSR |= (0x02 << 14);
// enable a done interrupt when all DMA operations are complete
NVIC_ENABLE_IRQ(IRQ_DMA_CH3);
// enable additional dma interrupt used as software interrupt
NVIC_SET_PRIORITY(IRQ_DMA_CH1, 0xFF); // 0xFF = lowest priority
NVIC_ENABLE_IRQ(IRQ_DMA_CH1);
// enable channels 0, 1, 2, 3
DMA_ERQ = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3);
// at the end after everything is set up: enable timer from system clock, with appropriate prescale
FTM1_SC = FTM_SC_CLKS(1) | FTM_SC_PS(LATCH_TIMER_PRESCALE);
*/
};
// arrange the relative priority of 2 or more DMA channels
void DMAPriorityOrder(DMAChannel &ch1, DMAChannel &ch2);
void DMAPriorityOrder(DMAChannel &ch1, DMAChannel &ch2, DMAChannel &ch3);
void DMAPriorityOrder(DMAChannel &ch1, DMAChannel &ch2, DMAChannel &ch3, DMAChannel &ch4);
extern "C" {
#endif
extern uint16_t dma_channel_allocated_mask;
#ifdef __cplusplus
}
#endif
#endif
| 35.773006 | 199 | 0.657554 |
bd46d44e6a94a154c4beaec550a7e342b465ed41 | 1,964 | h | C | topi/include/topi/nn/upsampling.h | Yulun-Yao/tvm | 30540d32632e3014ac7da38e59c5667d4d75d1ce | [
"Apache-2.0"
] | 2 | 2019-01-07T06:00:27.000Z | 2019-02-28T15:07:16.000Z | topi/include/topi/nn/upsampling.h | Yulun-Yao/tvm | 30540d32632e3014ac7da38e59c5667d4d75d1ce | [
"Apache-2.0"
] | null | null | null | topi/include/topi/nn/upsampling.h | Yulun-Yao/tvm | 30540d32632e3014ac7da38e59c5667d4d75d1ce | [
"Apache-2.0"
] | 1 | 2019-11-22T03:48:48.000Z | 2019-11-22T03:48:48.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.
*/
/*!
* \file topi/nn/upsampling.h
* \brief upsampling op constructors
*/
#ifndef TOPI_NN_UPSAMPLING_H_
#define TOPI_NN_UPSAMPLING_H_
#include <string>
#include <vector>
#include <iterator>
#include <algorithm>
#include "topi/image/resize.h"
namespace topi {
namespace nn {
using namespace tvm;
using namespace tvm::te;
using namespace topi::image;
/*!
* \brief Upsample given tensor to given shape
*
* \param input The input tensor.
* \param shape Output shape to upsample.
* \param layout input layout
* \param mode Algorithm to use (NEAREST_NEIGHBOR / BILINEAR)
* \param name Name of the operation
* \param tag The tag to mark the operation
*
* \return A Tensor upsampled to given shape
*/
inline Tensor upsampling(const Tensor& input,
const Array<PrimExpr> shape,
std::string layout = "NCHW",
std::string mode = "NEAREST_NEIGHBOR",
std::string name = "tensor",
std::string tag = kInjective) {
return resize(input, shape, layout, false, mode);
}
} // namespace nn
} // namespace topi
#endif // TOPI_NN_UPSAMPLING_H_
| 30.6875 | 63 | 0.694501 |
39f7f8401fbf305e542aebaf5da58c3a144a8683 | 3,348 | h | C | src/debugger.h | DanB91/GBEmu | c9fed0674829a8a727c3c12dd63e2732348c062d | [
"MIT"
] | 26 | 2018-08-27T20:44:24.000Z | 2021-11-09T02:23:48.000Z | src/debugger.h | DanB91/GBEmu | c9fed0674829a8a727c3c12dd63e2732348c062d | [
"MIT"
] | null | null | null | src/debugger.h | DanB91/GBEmu | c9fed0674829a8a727c3c12dd63e2732348c062d | [
"MIT"
] | 3 | 2019-01-16T03:36:29.000Z | 2022-01-21T14:29:48.000Z | //Copyright (C) 2018 Daniel Bokser. See LICENSE.txt for license
#pragma once
#include "gbemu.h"
#define DEBUG_WINDOW_MIN_HEIGHT 800
#define DEBUG_WINDOW_MIN_WIDTH 800
constexpr int SCALED_TILE_HEIGHT = TILE_HEIGHT * DEFAULT_SCREEN_SCALE;
constexpr int SCALED_TILE_WIDTH = TILE_WIDTH * DEFAULT_SCREEN_SCALE;
struct DebuggerPlatformContext;
struct SDL_Window;
DebuggerPlatformContext *initDebugger(GameBoyDebug *gbDebug, ProgramState *programState, SDL_Window **outDebuggerWindow,
int mainScreenX, int mainScreenY);
void closeDebugger(DebuggerPlatformContext *debuggerContext);
void signalRenderDebugger(DebuggerPlatformContext *platformContext);
void newDebuggerFrame(DebuggerPlatformContext *platformContext);
enum class BreakpointOP {
Equal, LessThan, GreaterThan
};
enum class BreakpointType {
Regular = 0, Register, Hardware
};
enum class BreakpointExpectedValueType {
None = 0, Any, Custom, BitSet, BitClear, OnePastLast
};
struct Breakpoint {
BreakpointType type;
bool isUsed;
bool isDisabled;
BreakpointOP op;
union {
u16 address;
char reg[3];
struct {
u16 addressStart, addressEnd;
};
};
//fields only for HW and register bps
BreakpointExpectedValueType expectedValueType;
u16 valueBefore;
u16 valueAfter;
u16 expectedValue;
};
struct GameBoyDebug {
Breakpoint breakpoints[16];
Breakpoint *hitBreakpoint;
bool isEnabled;
bool isTypingInTextBox;
bool isDisassemblerOpen;
bool isMemoryViewOpen;
bool isSoundViewOpen;
bool isOAMViewOpen;
bool isBreakpointsViewOpen;
bool isBackgroundTileMapOpen;
#ifdef CO_PROFILE
bool isProfilerOpen;
char lastFileNameWritten[MAX_PATH_LEN];
#endif
bool shouldDisableSQ1;
bool shouldDisableSQ2;
bool shouldDisableWave;
bool shouldDisableNoise;
i64 numBreakpoints;
i64 debugNumPreviousSoundSamples;
u16 disassembledInstructionAddresses[MAX_INSTRUCTIONS];
char disassembledInstructions[MAX_INSTRUCTIONS][MAX_INSTRUCTION_LEN];
char disassemblerSearchString[MAX_INSTRUCTION_LEN];
bool shouldHighlightSearch;
bool didSearchFail;
i64 lineNumberOfHighlightedSearch;
i64 numDisassembledInstructions;
bool shouldRefreshDisassembler;
bool wasCPUPaused;
i64 nextFreeGBStateIndex;
isize numGBStates;
TimeUS elapsedTimeSinceLastRecord;
double frameTimeMS;
GameBoyState recordedGBStates[60];
GameBoyState prevGBDebugStates[60]; //used for debugging
int numDebugStates;
i64 currentDebugState;
bool isRecordDebugStateEnabled;
struct Tile {
bool needsUpdate;
ColorID pixels[64];
void *textureID;
};
Tile tiles[0x200];
//Input
char inputText[32]; //32 is based on SDL
char *nextTextPos;
int key;
bool isKeyDown;
bool isShiftDown;
bool isCtrlDown;
bool isAltDown;
bool isSuperDown;
int mouseX;
int mouseY;
int mouseScrollY;
bool mouseDownState[3];
bool isWindowInFocus;
};
Breakpoint *hardwareBreakpointForAddress(u16 address, BreakpointExpectedValueType expectedValueType, GameBoyDebug *gbDebug);
void continueFromBreakPoint(GameBoyDebug *gbDebug, MMU *mmu, CPU *cpu, ProgramState *programState);
| 26.784 | 124 | 0.730287 |
ea8b41b4ec0262fd64a1303fbe99a2c947fcfb06 | 3,644 | h | C | xun/xnu-6153.81.5/bsd/net/if_bond_var.h | L-Zheng/AppleOpenSource | 65fac74ce17dc97404f1aeb8c24625fe82b7d142 | [
"MIT"
] | null | null | null | xun/xnu-6153.81.5/bsd/net/if_bond_var.h | L-Zheng/AppleOpenSource | 65fac74ce17dc97404f1aeb8c24625fe82b7d142 | [
"MIT"
] | null | null | null | xun/xnu-6153.81.5/bsd/net/if_bond_var.h | L-Zheng/AppleOpenSource | 65fac74ce17dc97404f1aeb8c24625fe82b7d142 | [
"MIT"
] | null | null | null | /*
* Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the License
* may not be used to create, or enable the creation or redistribution of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of, any
* terms of an Apple operating system software license agreement.
*
* Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
*/
#ifndef _NET_IF_BOND_VAR_H_
#define _NET_IF_BOND_VAR_H_
#include <sys/types.h>
#include <net/lacp.h>
#pragma pack(4)
#define IF_BOND_OP_ADD_INTERFACE 1
#define IF_BOND_OP_REMOVE_INTERFACE 2
#define IF_BOND_OP_GET_STATUS 3
#define IF_BOND_OP_SET_VERBOSE 4
#define IF_BOND_OP_SET_MODE 5
#define IF_BOND_MODE_LACP 0
#define IF_BOND_MODE_STATIC 1
struct if_bond_partner_state {
lacp_system ibps_system;
lacp_system_priority ibps_system_priority;
lacp_key ibps_key;
lacp_port ibps_port;
lacp_port_priority ibps_port_priority;
lacp_actor_partner_state ibps_state;
u_char ibps_reserved1;
};
#define IF_BOND_STATUS_SELECTED_STATE_UNSELECTED 0
#define IF_BOND_STATUS_SELECTED_STATE_SELECTED 1
#define IF_BOND_STATUS_SELECTED_STATE_STANDBY 2
struct if_bond_status {
char ibs_if_name[IFNAMSIZ];/* interface name */
lacp_port_priority ibs_port_priority;
lacp_actor_partner_state ibs_state;
u_char ibs_selected_state;
struct if_bond_partner_state ibs_partner_state;
u_int32_t ibs_reserved[8];
};
#define IF_BOND_STATUS_REQ_VERSION 1
struct if_bond_status_req {
int ibsr_version;/* version */
int ibsr_total; /* returned number of struct if_bond_status's */
int ibsr_count; /* number that will fit in ibsr_buffer */
union { /* buffer to hold if_bond_status's */
void * ibsru_buffer;
u_int64_t ibsru_buffer64;
} ibsr_ibsru;
lacp_key ibsr_key; /* returned */
u_int8_t ibsr_mode; /* returned (IF_BOND_MODE_{LACP, STATIC}) */
u_int8_t ibsr_reserved0;/* for future use */
u_int32_t ibsr_reserved[3];/* for future use */
};
#define ibsr_buffer ibsr_ibsru.ibsru_buffer
struct if_bond_req {
u_int32_t ibr_op; /* operation */
union {
char ibru_if_name[IFNAMSIZ]; /* interface name */
struct if_bond_status_req ibru_status; /* status information */
int ibru_int_val;
} ibr_ibru;
};
#pragma pack()
#include <net/if_bond_internal.h>
#endif /* _NET_IF_BOND_VAR_H_ */
| 36.079208 | 76 | 0.693469 |
6c4e6168e9f76d746cf84e7b21238b131b5d21eb | 145 | h | C | src/examples/debug.h | felipeek/raw-physics | 238f6e192adcb1529222375426959a29d527570a | [
"MIT"
] | 16 | 2022-02-02T10:03:23.000Z | 2022-03-23T21:42:45.000Z | src/examples/debug.h | felipeek/raw-physics | 238f6e192adcb1529222375426959a29d527570a | [
"MIT"
] | null | null | null | src/examples/debug.h | felipeek/raw-physics | 238f6e192adcb1529222375426959a29d527570a | [
"MIT"
] | 1 | 2022-02-05T14:47:43.000Z | 2022-02-05T14:47:43.000Z | #ifndef RAW_PHYSICS_EXAMPLES_DEBUG_H
#define RAW_PHYSICS_EXAMPLES_DEBUG_H
#include "../core.h"
extern Example_Scene debug_example_scene;
#endif | 20.714286 | 41 | 0.848276 |
cad7888e3bfdfabf2e8b434c2f8d593caf14db4c | 1,264 | h | C | src/tactic/fpa/fpa2bv_model_converter.h | SweetVishnya/z3 | 0f8f886389557b001e09a5e88c99e9cd5988a383 | [
"MIT"
] | 26 | 2020-06-20T15:13:14.000Z | 2022-03-30T12:49:51.000Z | src/tactic/fpa/fpa2bv_model_converter.h | SweetVishnya/z3 | 0f8f886389557b001e09a5e88c99e9cd5988a383 | [
"MIT"
] | null | null | null | src/tactic/fpa/fpa2bv_model_converter.h | SweetVishnya/z3 | 0f8f886389557b001e09a5e88c99e9cd5988a383 | [
"MIT"
] | 8 | 2020-07-09T23:39:23.000Z | 2021-04-21T20:21:20.000Z | /*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
fpa2bv_model_converter.h
Abstract:
Model conversion for fpa2bv_converter
Author:
Christoph (cwinter) 2012-02-09
Notes:
--*/
#ifndef FPA2BV_MODEL_CONVERTER_H_
#define FPA2BV_MODEL_CONVERTER_H_
#include "ast/fpa/fpa2bv_converter.h"
#include "tactic/model_converter.h"
#include "ast/fpa/bv2fpa_converter.h"
class fpa2bv_model_converter : public model_converter {
ast_manager & m;
bv2fpa_converter * m_bv2fp;
public:
fpa2bv_model_converter(ast_manager & m, fpa2bv_converter & conv):
m(m),
m_bv2fp(alloc(bv2fpa_converter, m, conv)) {
}
~fpa2bv_model_converter() override {
dealloc(m_bv2fp);
}
void operator()(model_ref & md) override {
model_ref new_model = alloc(model, m);
convert(md.get(), new_model.get());
md = new_model;
}
void display(std::ostream & out) override;
model_converter * translate(ast_translation & translator) override;
protected:
fpa2bv_model_converter(ast_manager & m) :
m(m),
m_bv2fp(nullptr) {}
void convert(model_core * mc, model * float_mdl);
};
model_converter * mk_fpa2bv_model_converter(ast_manager & m, fpa2bv_converter & conv);
#endif
| 20.387097 | 86 | 0.691456 |
1b03104b58be52d89f36de1f051d5f045c829878 | 18,831 | h | C | physx/source/lowleveldynamics/src/DyTGSDynamics.h | Guillaume0477/PhysX_ME | 69c35c405d39df9b112567750e92542b235bdba7 | [
"Unlicense"
] | 13 | 2020-01-08T00:55:42.000Z | 2022-01-21T06:15:08.000Z | physx/source/lowleveldynamics/src/DyTGSDynamics.h | Guillaume0477/PhysX_ME | 69c35c405d39df9b112567750e92542b235bdba7 | [
"Unlicense"
] | 8 | 2020-01-13T07:10:57.000Z | 2021-05-14T20:55:17.000Z | physx/source/lowleveldynamics/src/DyTGSDynamics.h | Guillaume0477/PhysX_ME | 69c35c405d39df9b112567750e92542b235bdba7 | [
"Unlicense"
] | 5 | 2020-05-05T08:37:01.000Z | 2021-03-16T20:46:44.000Z | //
// 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 NVIDIA CORPORATION 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 ``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.
//
// Copyright (c) 2008-2019 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
#ifndef DY_TGS_DYNAMICS_H
#define DY_TGS_DYNAMICS_H
#include "PxvConfig.h"
#include "CmSpatialVector.h"
#include "CmTask.h"
#include "CmPool.h"
#include "PxcThreadCoherentCache.h"
#include "DyThreadContext.h"
#include "PxcConstraintBlockStream.h"
#include "DySolverBody.h"
#include "DyContext.h"
#include "PxsIslandManagerTypes.h"
#include "PxvNphaseImplementationContext.h"
#include "solver/PxSolverDefs.h"
#include "PxsIslandSim.h"
namespace physx
{
namespace Cm
{
class FlushPool;
}
namespace IG
{
class SimpleIslandManager;
struct Edge;
}
class PxsRigidBody;
class PxsStreamedThresholdTable;
struct PxsBodyCore;
struct PxsIslandObjects;
class PxsIslandIndices;
struct PxsIndexedInteraction;
class PxsIslandManager;
struct PxsIndexedConstraint;
struct PxsIndexedContactManager;
class PxsHeapMemoryAllocator;
class PxsMemoryManager;
class PxsDefaultMemoryManager;
namespace Cm
{
class Bitmap;
class SpatialVector;
}
namespace Dy
{
class SolverCore;
struct SolverIslandParams;
struct ArticulationSolverDesc;
class ArticulationV;
class DynamicsContext;
struct SolverContext;
struct SolverIslandObjectsStep
{
PxsRigidBody** bodies;
ArticulationV** articulations;
ArticulationV** articulationOwners;
PxsIndexedContactManager* contactManagers;
const IG::IslandId* islandIds;
PxU32 numIslands;
PxU32* bodyRemapTable;
PxU32* nodeIndexArray;
PxSolverConstraintDesc* constraintDescs;
PxSolverConstraintDesc* orderedConstraintDescs;
PxSolverConstraintDesc* tempConstraintDescs;
PxConstraintBatchHeader* constraintBatchHeaders;
Cm::SpatialVector* motionVelocities;
PxsBodyCore** bodyCoreArray;
PxU32 solverBodyOffset;
SolverIslandObjectsStep() : bodies(NULL), articulations(NULL), articulationOwners(NULL),
contactManagers(NULL), islandIds(NULL), numIslands(0), nodeIndexArray(NULL), constraintDescs(NULL), motionVelocities(NULL), bodyCoreArray(NULL),
solverBodyOffset(0)
{
}
};
struct IslandContextStep
{
//The thread context for this island (set in in the island start task, released in the island end task)
ThreadContext* mThreadContext;
PxsIslandIndices mCounts;
SolverIslandObjectsStep mObjects;
PxU32 mPosIters;
PxU32 mVelIters;
PxU32 mArticulationOffset;
PxReal mStepDt;
PxReal mInvStepDt;
PxI32 mSharedSolverIndex;
PxI32 mSolvedCount;
PxI32 mSharedRigidBodyIndex;
PxI32 mRigidBodyIntegratedCount;
PxI32 mSharedArticulationIndex;
PxI32 mArticulationIntegratedCount;
};
struct SolverIslandObjectsStep;
class SolverBodyVelDataPool : public Ps::Array<PxTGSSolverBodyVel, Ps::AlignedAllocator<128, Ps::ReflectionAllocator<PxTGSSolverBodyVel> > >
{
PX_NOCOPY(SolverBodyVelDataPool)
public:
SolverBodyVelDataPool() {}
};
class SolverBodyTxInertiaPool : public Ps::Array<PxTGSSolverBodyTxInertia, Ps::AlignedAllocator<128, Ps::ReflectionAllocator<PxTGSSolverBodyTxInertia> > >
{
PX_NOCOPY(SolverBodyTxInertiaPool)
public:
SolverBodyTxInertiaPool() {}
};
class SolverBodyDataStepPool : public Ps::Array<PxTGSSolverBodyData, Ps::AlignedAllocator<128, Ps::ReflectionAllocator<PxTGSSolverBodyData> > >
{
PX_NOCOPY(SolverBodyDataStepPool)
public:
SolverBodyDataStepPool() {}
};
class SolverStepConstraintDescPool : public Ps::Array<PxSolverConstraintDesc, Ps::AlignedAllocator<128, Ps::ReflectionAllocator<PxSolverConstraintDesc> > >
{
PX_NOCOPY(SolverStepConstraintDescPool)
public:
SolverStepConstraintDescPool() { }
};
#if PX_VC
#pragma warning(push)
#pragma warning( disable : 4324 ) // Padding was added at the end of a structure because of a __declspec(align) value.
#endif
class DynamicsTGSContext : public Context
{
PX_NOCOPY(DynamicsTGSContext)
public:
/**PxBaseTask* continuation
\brief Creates a DynamicsContext associated with a PxsContext
\return A pointer to the newly-created DynamicsContext.
*/
static DynamicsTGSContext* create(PxcNpMemBlockPool* memBlockPool,
PxcScratchAllocator& scratchAllocator,
Cm::FlushPool& taskPool,
PxvSimStats& simStats,
PxTaskManager* taskManager,
Ps::VirtualAllocatorCallback* allocator,
PxsMaterialManager* materialManager,
IG::IslandSim* accurateIslandSim,
PxU64 contextID,
const bool enableStabilization,
const bool useEnhancedDeterminism,
const bool useAdaptiveForce,
const PxReal lengthScale
);
/**
\brief Destroys this DynamicsContext
*/
void destroy();
/**
\brief Returns the static world solver body
\return The static world solver body.
*/
//PX_FORCE_INLINE PxSolverBody& getWorldSolverBody() { return mWorldSolverBody; }
PX_FORCE_INLINE Cm::FlushPool& getTaskPool() { return mTaskPool; }
PX_FORCE_INLINE ThresholdStream& getThresholdStream() { return *mThresholdStream; }
PX_FORCE_INLINE PxvSimStats& getSimStats() { return mSimStats; }
#if PX_ENABLE_SIM_STATS
void addThreadStats(const ThreadContext::ThreadSimStats& stats);
#endif
/**
\brief The entry point for the constraint solver.
\param[in] dt The simulation time-step
\param[in] continuation The continuation task for the solver
This method is called after the island generation has completed. Its main responsibilities are:
(1) Reserving the solver body pools
(2) Initializing the static and kinematic solver bodies, which are shared resources between islands.
(3) Construct the solver task chains for each island
Each island is solved as an independent solver task chain in parallel.
*/
virtual void update(IG::SimpleIslandManager& simpleIslandManager, PxBaseTask* continuation, PxBaseTask* lostTouchTask,
PxsContactManager** foundPatchManagers, PxU32 nbFoundPatchManagers, PxsContactManager** lostPatchManagers, PxU32 nbLostPatchManagers,
PxU32 maxPatchesPerCM, PxsContactManagerOutputIterator& iter, PxsContactManagerOutput* gpuOutputs, const PxReal dt, const PxVec3& gravity, const PxU32 bitMapWordCounts);
void updatePostKinematic(IG::SimpleIslandManager& simpleIslandManager, PxBaseTask* continuation,
PxBaseTask* lostTouchTask);
virtual void processLostPatches(IG::SimpleIslandManager& /*simpleIslandManager*/, PxsContactManager** /*lostPatchManagers*/, PxU32 /*nbLostPatchManagers*/, PxsContactManagerOutputIterator& /*iterator*/){}
virtual void updateBodyCore(PxBaseTask* continuation);
virtual void setSimulationController(PxsSimulationController* simulationController){ mSimulationController = simulationController; }
/**
\brief This method combines the results of several islands, e.g. constructing scene-level simulation statistics and merging together threshold streams for contact notification.
*/
virtual void mergeResults();
virtual void getDataStreamBase(void*& /*contactStreamBase*/, void*& /*patchStreamBase*/, void*& /*forceAndIndicesStreamBase*/){}
/**
\brief Allocates and returns a thread context object.
\return A thread context.
*/
PX_FORCE_INLINE ThreadContext* getThreadContext()
{
return mThreadContextPool.get();
}
/**
\brief Returns a thread context to the thread context pool.
\param[in] context The thread context to return to the thread context pool.
*/
void putThreadContext(ThreadContext* context)
{
mThreadContextPool.put(context);
}
PX_FORCE_INLINE PxU32 getKinematicCount() const { return mKinematicCount; }
PX_FORCE_INLINE PxU64 getContextId() const { return mContextID; }
PX_FORCE_INLINE PxReal getLengthScale() const { return mLengthScale; }
protected:
/**
\brief Constructor for DynamicsContext
*/
DynamicsTGSContext(PxcNpMemBlockPool* memBlockPool,
PxcScratchAllocator& scratchAllocator,
Cm::FlushPool& taskPool,
PxvSimStats& simStats,
PxTaskManager* taskManager,
Ps::VirtualAllocatorCallback* allocator,
PxsMaterialManager* materialManager,
IG::IslandSim* accurateIslandSim,
PxU64 contextID,
const bool enableStabilization,
const bool useEnhancedDeterminism,
const bool useAdaptiveForce,
const PxReal lengthScale
);
/**
\brief Destructor for DynamicsContext
*/
virtual ~DynamicsTGSContext();
// Solver helper-methods
/**
\brief Computes the unconstrained velocity for a given PxsRigidBody
\param[in] atom The PxsRigidBody
*/
void computeUnconstrainedVelocity(PxsRigidBody* atom) const;
/**
\brief fills in a PxSolverConstraintDesc from an indexed interaction
\param[in,out] desc The PxSolverConstraintDesc
\param[in] constraint The PxsIndexedInteraction
*/
void setDescFromIndices(PxSolverConstraintDesc& desc,
const PxsIndexedInteraction& constraint, const PxU32 solverBodyOffset, PxTGSSolverBodyVel* solverBodies);
void setDescFromIndices(PxSolverConstraintDesc& desc, IG::EdgeIndex edgeIndex,
const IG::SimpleIslandManager& islandManager, PxU32* bodyRemapTable, const PxU32 solverBodyOffset, PxTGSSolverBodyVel* solverBodies);
void solveIsland(const SolverIslandObjectsStep& objects,
const PxsIslandIndices& counts,
const PxU32 solverBodyOffset,
IG::SimpleIslandManager& islandManager,
PxU32* bodyRemapTable, PxsMaterialManager* materialManager,
PxsContactManagerOutputIterator& iterator,
PxBaseTask* continuation);
void prepareBodiesAndConstraints(const SolverIslandObjectsStep& objects,
IG::SimpleIslandManager& islandManager,
IslandContextStep& islandContext);
void setupDescs(IslandContextStep& islandContext, const SolverIslandObjectsStep& objects, IG::SimpleIslandManager& mIslandManager, PxU32* mBodyRemapTable, PxU32 mSolverBodyOffset,
PxsContactManagerOutputIterator& outputs);
void preIntegrateBodies(PxsBodyCore** bodyArray, PxsRigidBody** originalBodyArray,
PxTGSSolverBodyVel* solverBodyVelPool, PxTGSSolverBodyTxInertia* solverBodyTxInertia, PxTGSSolverBodyData* solverBodyDataPool2,
PxU32* nodeIndexArray, const PxU32 bodyCount, const PxVec3& gravity, const PxReal dt, PxU32& posIters, PxU32& velIters, PxU32 iteration);
void setupArticulations(IslandContextStep& islandContext, const PxVec3& gravity, const PxReal dt, PxU32& posIters, PxU32& velIters, PxBaseTask* continuation);
PxU32 setupArticulationInternalConstraints(IslandContextStep& islandContext, PxReal dt, PxReal invStepDt, PxSolverConstraintDesc* constraintDescs);
void createSolverConstraints(PxSolverConstraintDesc* contactDescPtr, PxConstraintBatchHeader* headers, const PxU32 nbHeaders,
PxsContactManagerOutputIterator& outputs, Dy::ThreadContext& islandThreadContext, Dy::ThreadContext& threadContext, PxReal stepDt, PxReal totalDt,
PxReal invStepDt, PxU32 nbSubsteps);
void solveConstraintsIteration(const PxSolverConstraintDesc* const contactDescPtr, const PxConstraintBatchHeader* const batchHeaders, const PxU32 nbHeaders, PxReal invStepDt,
const PxTGSSolverBodyTxInertia* const solverTxInertia, const PxReal elapsedTime, const PxReal minPenetration, SolverContext& cache);
void solveConcludeConstraintsIteration(const PxSolverConstraintDesc* const contactDescPtr, const PxConstraintBatchHeader* const batchHeaders, const PxU32 nbHeaders,
PxTGSSolverBodyTxInertia* solverTxInertia, const PxReal elapsedTime, SolverContext& cache);
void parallelSolveConstraints(const PxSolverConstraintDesc* const contactDescPtr, const PxConstraintBatchHeader* const batchHeaders, const PxU32 nbHeaders, PxTGSSolverBodyTxInertia* solverTxInertia,
const PxReal elapsedTime, const PxReal minPenetration, SolverContext& cache);
void writebackConstraintsIteration(const PxConstraintBatchHeader* const hdrs, const PxSolverConstraintDesc* const contactDescPtr, const PxU32 nbHeaders);
void parallelWritebackConstraintsIteration(const PxSolverConstraintDesc* const contactDescPtr, const PxConstraintBatchHeader* const batchHeaders, const PxU32 nbHeaders);
void integrateBodies(const SolverIslandObjectsStep& objects,
const PxU32 count, PxTGSSolverBodyVel* vels,
PxTGSSolverBodyTxInertia* txInertias, const PxTGSSolverBodyData*const bodyDatas, PxReal dt);
void parallelIntegrateBodies(PxTGSSolverBodyVel* vels, PxTGSSolverBodyTxInertia* txInertias,
const PxTGSSolverBodyData* const bodyDatas, const PxU32 count, PxReal dt);
void copyBackBodies(const SolverIslandObjectsStep& objects,
PxTGSSolverBodyVel* vels, PxTGSSolverBodyTxInertia* txInertias,
PxTGSSolverBodyData* solverBodyData, PxReal invDt, IG::IslandSim& islandSim,
PxU32 startIdx, PxU32 endIdx);
void updateArticulations(Dy::ThreadContext& threadContext, const PxU32 startIdx, const PxU32 endIdx, PxReal dt);
void stepArticulations(Dy::ThreadContext& threadContext, const PxsIslandIndices& counts, PxReal dt);
void iterativeSolveIsland(const SolverIslandObjectsStep& objects, const PxsIslandIndices& counts, ThreadContext& mThreadContext,
const PxReal stepDt, const PxReal invStepDt, const PxU32 posIters, const PxU32 velIters, SolverContext& cache);
void iterativeSolveIslandParallel(const SolverIslandObjectsStep& objects, const PxsIslandIndices& counts, ThreadContext& mThreadContext,
const PxReal stepDt, const PxU32 posIters, const PxU32 velIters, PxI32* solverCounts, PxI32* integrationCounts, PxI32* articulationIntegrationCounts,
PxI32* solverProgressCount, PxI32* integrationProgressCount, PxI32* articulationProgressCount, PxU32 solverUnrollSize, PxU32 integrationUnrollSize);
void endIsland(ThreadContext& mThreadContext);
void finishSolveIsland(ThreadContext& mThreadContext, const SolverIslandObjectsStep& objects,
const PxsIslandIndices& counts, IG::SimpleIslandManager& islandManager, PxBaseTask* continuation);
/**
\brief Resets the thread contexts
*/
void resetThreadContexts();
/**
\brief Returns the scratch memory allocator.
\return The scratch memory allocator.
*/
PX_FORCE_INLINE PxcScratchAllocator& getScratchAllocator() { return mScratchAllocator; }
//Data
PxTGSSolverBodyVel mWorldSolverBodyVel;
PxTGSSolverBodyTxInertia mWorldSolverBodyTxInertia;
PxTGSSolverBodyData mWorldSolverBodyData2;
/**
\brief A thread context pool
*/
PxcThreadCoherentCache<ThreadContext, PxcNpMemBlockPool> mThreadContextPool;
/**
\brief Solver constraint desc array
*/
SolverStepConstraintDescPool mSolverConstraintDescPool;
SolverStepConstraintDescPool mOrderedSolverConstraintDescPool;
SolverStepConstraintDescPool mTempSolverConstraintDescPool;
Ps::Array<PxConstraintBatchHeader> mContactConstraintBatchHeaders;
/**
\brief Array of motion velocities for all bodies in the scene.
*/
Ps::Array<Cm::SpatialVector> mMotionVelocityArray;
/**
\brief Array of body core pointers for all bodies in the scene.
*/
Ps::Array<PxsBodyCore*> mBodyCoreArray;
/**
\brief Array of rigid body pointers for all bodies in the scene.
*/
Ps::Array<PxsRigidBody*> mRigidBodyArray;
/**
\brief Array of articulationpointers for all articulations in the scene.
*/
Ps::Array<ArticulationV*> mArticulationArray;
SolverBodyVelDataPool mSolverBodyVelPool;
SolverBodyTxInertiaPool mSolverBodyTxInertiaPool;
SolverBodyDataStepPool mSolverBodyDataPool2;
ThresholdStream* mExceededForceThresholdStream[2]; //this store previous and current exceeded force thresholdStream
Ps::Array<PxU32> mExceededForceThresholdStreamMask;
Ps::Array<PxU32> mSolverBodyRemapTable; //Remaps from the "active island" index to the index within a solver island
Ps::Array<PxU32> mNodeIndexArray; //island node index
Ps::Array<PxsIndexedContactManager> mContactList;
/**
\brief The total number of kinematic bodies in the scene
*/
PxU32 mKinematicCount;
/**
\brief Atomic counter for the number of threshold stream elements.
*/
PxI32 mThresholdStreamOut;
PxsMaterialManager* mMaterialManager;
PxsContactManagerOutputIterator mOutputIterator;
PxReal mLengthScale;
private:
//private:
PxcScratchAllocator& mScratchAllocator;
Cm::FlushPool& mTaskPool;
PxTaskManager* mTaskManager;
PxU32 mCurrentIndex; // this is the index point to the current exceeded force threshold stream
PxU64 mContextID;
friend class SetupDescsTask;
friend class PreIntegrateTask;
friend class SetupArticulationTask;
friend class SetupArticulationInternalConstraintsTask;
friend class SetupSolverConstraintsTask;
friend class SolveIslandTask;
friend class EndIslandTask;
friend class SetupSolverConstraintsSubTask;
friend class ParallelSolveTask;
friend class PreIntegrateParallelTask;
friend class CopyBackTask;
friend class UpdateArticTask;
friend class FinishSolveIslandTask;
};
#if PX_VC
#pragma warning(pop)
#endif
}
}
#endif
| 36.353282 | 212 | 0.768679 |
e7c31a4c0f52743f80cacce8dee99a36871aae9a | 1,838 | c | C | win/src/UpTime.c | guozi058/srs-for-windows | 67f8d35002d6f5dbd48bf831b68798aac89bc1bf | [
"MIT"
] | 11 | 2017-11-12T06:07:25.000Z | 2022-01-20T09:28:51.000Z | win/src/UpTime.c | guozi058/srs-for-windows | 67f8d35002d6f5dbd48bf831b68798aac89bc1bf | [
"MIT"
] | null | null | null | win/src/UpTime.c | guozi058/srs-for-windows | 67f8d35002d6f5dbd48bf831b68798aac89bc1bf | [
"MIT"
] | 11 | 2017-08-01T07:26:52.000Z | 2021-12-26T09:21:10.000Z | #include "CpuInfo.h"
#include "UpTime.h"
#include "Util.h"
UpTime* UpTime_New()
{
UpTime* ut = NULL;
ut = xMalloc(sizeof(UpTime));
if(NULL == ut){
return NULL;
}
xMemSet(ut, 0, sizeof(UpTime));
ut->NtQuerySystemInformation = (NTQUERYSYSTEMINFOMATION) GetProcAddress(
LoadLibrary("ntdll.dll"), "NtQuerySystemInformation");
if (NULL == ut->NtQuerySystemInformation){
xFree(ut);
return NULL;
}
ut->init = TRUE;
return ut;
}
int UpTime_Init(UpTime* ut)
{
if (NULL == ut){
return -1;
}
if (ut->init){
return 0;
}
xMemSet(ut, 0, sizeof(UpTime));
ut->NtQuerySystemInformation = (NTQUERYSYSTEMINFOMATION) GetProcAddress(
LoadLibrary("ntdll.dll"), "NtQuerySystemInformation");
if (NULL == ut->NtQuerySystemInformation){
return -1;
}
ut->init = TRUE;
return 0;
}
int UpTime_Read(UpTime *ut)
{
DWORD status = NO_ERROR;
SYSTEM_PERFORMANCE_INFORMATION SysPerformanceInfo;
SYSTEM_TIME_INFORMATION SysTimeInfo;
if (!ut->init){
return -1;
}
status = ut->NtQuerySystemInformation(SystemTimeInformation, &SysTimeInfo,
sizeof(SYSTEM_TIME_INFORMATION), NULL);
if (NO_ERROR != status){
return status;
}
status = ut->NtQuerySystemInformation(SystemPerformanceInformation, &SysPerformanceInfo,
sizeof(SYSTEM_PERFORMANCE_INFORMATION), NULL);
if ( NO_ERROR != status)
{
return status;
}
if (0 != ut->OldIdleTime)
{
ut->IdleTime = Large_Integer_To_Double(SysPerformanceInfo.IdleTime) - ut->OldIdleTime;
ut->SystemTime = Large_Integer_To_Double(SysTimeInfo.liKeSystemTime) - ut->OldSystemTime;
ut->IdleTime = ut->IdleTime/ut->SystemTime;
ut->IdleTime = 100 - ut->IdleTime*100.0/((double)CpuInfo_GetCpuNum());
}
ut->OldIdleTime = Large_Integer_To_Double(SysPerformanceInfo.IdleTime);
ut->OldSystemTime =Large_Integer_To_Double( SysTimeInfo.liKeSystemTime);
return status;
}
| 25.178082 | 91 | 0.723613 |
23ddf227ddce17df0813b6faba614ad8a131875b | 1,041 | c | C | core/esp_gpio.c | jollen/rtos-wot | fe114e8c8ae356dc7b3f78c1a4c4825efdb81c46 | [
"BSD-3-Clause"
] | 28 | 2016-03-25T11:48:52.000Z | 2021-11-16T13:16:33.000Z | core/esp_gpio.c | flowchain/flowchain-rtos | 71a26494c32fe63a669db8be96ecfc6865644032 | [
"BSD-3-Clause"
] | 1 | 2016-03-25T10:23:07.000Z | 2016-03-25T10:23:07.000Z | core/esp_gpio.c | flowchain/flowchain-rtos | 71a26494c32fe63a669db8be96ecfc6865644032 | [
"BSD-3-Clause"
] | 19 | 2016-02-18T09:52:39.000Z | 2020-09-05T12:07:01.000Z | /* GPIO management functions
*
* Part of esp-open-rtos
* Copyright (C) 2015 Angus Gratton
* BSD Licensed as described in the file LICENSE
*/
#include <esp/gpio.h>
void gpio_enable(const uint8_t gpio_num, const gpio_direction_t direction)
{
uint32_t iomux_flags;
switch(direction) {
case GPIO_INPUT:
iomux_flags = 0;
break;
case GPIO_OUTPUT:
iomux_flags = IOMUX_PIN_OUTPUT_ENABLE;
break;
case GPIO_OUT_OPEN_DRAIN:
iomux_flags = IOMUX_PIN_OUTPUT_ENABLE;
break;
case GPIO_INPUT_PULLUP:
iomux_flags = IOMUX_PIN_PULLUP;
break;
default:
return; /* Invalid direction flag */
}
iomux_set_gpio_function(gpio_num, iomux_flags);
if(direction == GPIO_OUT_OPEN_DRAIN)
GPIO.CONF[gpio_num] |= GPIO_CONF_OPEN_DRAIN;
else
GPIO.CONF[gpio_num] &= ~GPIO_CONF_OPEN_DRAIN;
if (iomux_flags & IOMUX_PIN_OUTPUT_ENABLE)
GPIO.ENABLE_OUT_SET = BIT(gpio_num);
else
GPIO.ENABLE_OUT_CLEAR = BIT(gpio_num);
}
| 26.025 | 74 | 0.67147 |
885faedf07de57e0e162d9594a82adff46a997bf | 1,899 | h | C | cdk/extra/uuid/include/uuid_gen.h | whitebob/mysql-connector-cpp | 623911eac45b06be5ed5ba683d0044bc73acae3d | [
"Artistic-1.0-Perl"
] | 1 | 2019-09-07T12:16:45.000Z | 2019-09-07T12:16:45.000Z | cdk/extra/uuid/include/uuid_gen.h | whitebob/mysql-connector-cpp | 623911eac45b06be5ed5ba683d0044bc73acae3d | [
"Artistic-1.0-Perl"
] | null | null | null | cdk/extra/uuid/include/uuid_gen.h | whitebob/mysql-connector-cpp | 623911eac45b06be5ed5ba683d0044bc73acae3d | [
"Artistic-1.0-Perl"
] | 1 | 2019-09-07T12:16:10.000Z | 2019-09-07T12:16:10.000Z | /*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2.0, as
* published by the Free Software Foundation.
*
* This program is also distributed with certain software (including
* but not limited to OpenSSL) that is licensed under separate terms,
* as designated in a particular file or component or in included license
* documentation. The authors of MySQL hereby grant you an
* additional permission to link the program and your derivative works
* with the separately licensed software that they have included with
* MySQL.
*
* Without limiting anything contained in the foregoing, this file,
* which is part of MySQL Connector/C++, is also subject to the
* Universal FOSS Exception, version 1.0, a copy of which can be found at
* http://oss.oracle.com/licenses/universal-foss-exception.
*
* 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, version 2.0, 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 St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _UUID_GEN_H_
#define _UUID_GEN_H_
#include <stdint.h>
#define UUID_LENGTH_BIN 16
namespace uuid {
typedef unsigned char uuid_type[UUID_LENGTH_BIN];
/* The seed must be set before using the generator. */
void set_seed(uint16_t seed);
/* Convenience function, which sets the seed using the time and
process id */
void set_seed_from_time_pid();
/* UUID generator */
void generate_uuid(uuid_type &uuid);
} // namespace uuid
#endif
| 34.527273 | 80 | 0.755661 |
8897986138aab947789cd4edf4238d4c0bd52c92 | 349 | h | C | OC/Categories/UI/UIView/UIView+ZQView.h | fzq2016/category | e725b662430959389503afc2e44c8e77f680b26f | [
"MIT"
] | null | null | null | OC/Categories/UI/UIView/UIView+ZQView.h | fzq2016/category | e725b662430959389503afc2e44c8e77f680b26f | [
"MIT"
] | null | null | null | OC/Categories/UI/UIView/UIView+ZQView.h | fzq2016/category | e725b662430959389503afc2e44c8e77f680b26f | [
"MIT"
] | null | null | null | //
// UIView+ZQView.h
// iOSBaseProject
//
// Created by Felix on2018/2/9.
// Copyright © 2018年 Felix. All rights reserved.
// 该分类是UIView的创建方法
#import <UIKit/UIKit.h>
@interface UIView (ZQView)
/**
类方法,通过alloc init创建
@return 类对象
*/
+ (instancetype)zq_view;
/**
类方法,通过xib加载view
@return 类对象
*/
+ (instancetype)zq_viewFromNib;
@end
| 12.464286 | 49 | 0.670487 |
29da12b907896524c527860bb2f87e977ae245fb | 604 | h | C | algorithms/medium/0495. Teemo Attacking.h | MultivacX/letcode2020 | f86289f8718237303918a7705ae31625a12b68f6 | [
"MIT"
] | null | null | null | algorithms/medium/0495. Teemo Attacking.h | MultivacX/letcode2020 | f86289f8718237303918a7705ae31625a12b68f6 | [
"MIT"
] | null | null | null | algorithms/medium/0495. Teemo Attacking.h | MultivacX/letcode2020 | f86289f8718237303918a7705ae31625a12b68f6 | [
"MIT"
] | null | null | null | // 495. Teemo Attacking
// https://leetcode.com/problems/teemo-attacking/
// Runtime: 80 ms, faster than 40.70% of C++ online submissions for Teemo Attacking.
// Memory Usage: 26.2 MB, less than 100.00% of C++ online submissions for Teemo Attacking.
class Solution {
public:
int findPoisonedDuration(vector<int>& timeSeries, int duration) {
const int N = timeSeries.size();
int ans = 0;
for (int i = 0; i < N; ++i) {
if (i + 1 == N) ans += duration;
else ans += min(duration, timeSeries[i + 1] - timeSeries[i]);
}
return ans;
}
}; | 33.555556 | 90 | 0.599338 |
4bb0d792f3fafed79e2533a2f242f5fdfbc70924 | 1,465 | h | C | ios/model/STUploadFileModel.h | czarcoin/czarcoin-mobile | 57f8045edca9f700f6e5e17a6e658f4eef09fdc6 | [
"Apache-2.0"
] | 19 | 2018-06-19T23:46:17.000Z | 2022-03-25T16:26:27.000Z | ios/model/STUploadFileModel.h | czarcoin/czarcoin-mobile | 57f8045edca9f700f6e5e17a6e658f4eef09fdc6 | [
"Apache-2.0"
] | 18 | 2018-04-13T18:04:06.000Z | 2018-06-12T04:35:07.000Z | ios/model/STUploadFileModel.h | czarcoin/czarcoin-mobile | 57f8045edca9f700f6e5e17a6e658f4eef09fdc6 | [
"Apache-2.0"
] | 9 | 2018-05-10T10:06:40.000Z | 2022-02-01T04:53:21.000Z | //
// STUploadFileModel.h
// StorjMobile
//
// Created by Bogdan Artemenko on 3/22/18.
// Copyright © 2018 Storj. All rights reserved.
//
@import UIKit;
@import Foundation;
#import "IConvertibleToJS.h"
@class UploadFileDbo;
@class UploadFileContract;
@interface STUploadFileModel : NSObject<IConvertibleToJS>
@property (nonatomic, strong, getter=name) NSString *_name;
@property (nonatomic, strong, getter=bucketId) NSString *_bucketId;
@property (nonatomic, strong, getter=uri) NSString *_uri;
@property (nonatomic, getter=fileHandle) long _fileHandle;
@property (nonatomic, getter=uploaded) long _uploaded;
@property (nonatomic, getter=size) long _size;
@property (nonatomic, getter=progress) double _progress;
//base
-(instancetype)initWithFileHandle:(long) fileHandle
progress:(double)progress
size:(long) size
uploaded:(long) uploaded
name:(NSString *)name
uri:(NSString *)uri
bucketId:(NSString *)bucketId;
-(instancetype)initWithUploadFileDbo:(UploadFileDbo *)fileDbo;
-(instancetype)initWithFileHandle:(long)fileHandle
size:(long)size
name:(NSString *)name
uri:(NSString *)uri
bucketId:(NSString *)bucketId;
-(BOOL)isValid;
- (NSDictionary *)toDictionaryProgress;
@end
| 31.847826 | 67 | 0.627304 |
c60affc6e60065f8ee7df2aaf5abc4fd980c7624 | 5,791 | h | C | src/backend/gporca/libgpopt/include/gpopt/base/CCTEMap.h | deart2k/gpdb | df0144f8536c34a19e1c0158580e79a3906ace2e | [
"PostgreSQL",
"Apache-2.0"
] | 12 | 2018-10-02T09:44:51.000Z | 2022-02-21T07:24:08.000Z | src/backend/gporca/libgpopt/include/gpopt/base/CCTEMap.h | deart2k/gpdb | df0144f8536c34a19e1c0158580e79a3906ace2e | [
"PostgreSQL",
"Apache-2.0"
] | 134 | 2018-08-09T09:51:53.000Z | 2022-03-29T03:17:27.000Z | src/backend/gporca/libgpopt/include/gpopt/base/CCTEMap.h | deart2k/gpdb | df0144f8536c34a19e1c0158580e79a3906ace2e | [
"PostgreSQL",
"Apache-2.0"
] | 8 | 2018-05-21T16:20:39.000Z | 2021-11-01T07:05:39.000Z | //---------------------------------------------------------------------------
// Greenplum Database
// Copyright (C) 2012 EMC Corp.
//
// @filename:
// CCTEMap.h
//
// @doc:
// CTE map that is derived as part of plan properties. The map has
// entries corresponding to unresolved CTEs (producers or consumers) in
// the subtree under the physical operator in question. Note that if both
// a consumer and a producer with the same ID appear in the subtree, they
// cancel each other, and that CTE does not appear in the map for this
// operator
//---------------------------------------------------------------------------
#ifndef GPOPT_CCTEMap_H
#define GPOPT_CCTEMap_H
#include "gpos/base.h"
#include "gpos/common/CHashMap.h"
#include "gpos/common/CHashMapIter.h"
#include "gpos/common/CRefCount.h"
#include "gpopt/base/CCTEInfo.h"
#include "gpopt/base/CDrvdPropPlan.h"
namespace gpopt
{
using namespace gpos;
// hash map from CTE id to corresponding producer plan properties
typedef CHashMap<ULONG, CDrvdPropPlan, gpos::HashValue<ULONG>,
gpos::Equals<ULONG>, CleanupDelete<ULONG>,
CleanupRelease<CDrvdPropPlan> >
UlongToDrvdPropPlanMap;
// iterator for plan properties map
typedef CHashMapIter<ULONG, CDrvdPropPlan, gpos::HashValue<ULONG>,
gpos::Equals<ULONG>, CleanupDelete<ULONG>,
CleanupRelease<CDrvdPropPlan> >
UlongToDrvdPropPlanMapIter;
// forward declaration
class CCTEReq;
//---------------------------------------------------------------------------
// @class:
// CCTEMap
//
// @doc:
// CTE map that is derived as part of plan properties
//
//---------------------------------------------------------------------------
class CCTEMap : public CRefCount, public DbgPrintMixin<CCTEMap>
{
public:
// CTE types
enum ECteType
{
EctProducer,
EctConsumer,
EctSentinel
};
private:
//---------------------------------------------------------------------------
// @class:
// CCTEMapEntry
//
// @doc:
// A single entry in the CTE map;
// Each entry has a CTE ID and whether it is a consumer or a producer.
// If entry corresponds to a producer, the entry also has properties of
// the plan rooted by producer node.
//
//---------------------------------------------------------------------------
class CCTEMapEntry : public CRefCount, public DbgPrintMixin<CCTEMapEntry>
{
private:
// cte id
ULONG m_id;
// cte type
CCTEMap::ECteType m_ect;
// derived plan properties if entry corresponds to CTE producer
CDrvdPropPlan *m_pdpplan;
// private copy ctor
CCTEMapEntry(const CCTEMapEntry &);
public:
// ctor
CCTEMapEntry(ULONG id, CCTEMap::ECteType ect, CDrvdPropPlan *pdpplan)
: m_id(id), m_ect(ect), m_pdpplan(pdpplan)
{
GPOS_ASSERT(EctSentinel > ect);
GPOS_ASSERT_IMP(EctProducer == ect, NULL != pdpplan);
}
// dtor
virtual ~CCTEMapEntry()
{
CRefCount::SafeRelease(m_pdpplan);
}
// cte id
ULONG
Id() const
{
return m_id;
}
// cte type
CCTEMap::ECteType
Ect() const
{
return m_ect;
}
// plan properties
CDrvdPropPlan *
Pdpplan() const
{
return m_pdpplan;
}
// hash function
ULONG
HashValue() const
{
return gpos::CombineHashes(
gpos::HashValue<ULONG>(&m_id),
gpos::HashValue<CCTEMap::ECteType>(&m_ect));
}
// print function
virtual IOstream &
OsPrint(IOstream &os) const
{
os << m_id << (EctProducer == m_ect ? "p" : "c");
if (NULL != m_pdpplan)
{
os << "(" << *m_pdpplan << ")";
}
return os;
}
}; // class CCTEMapEntry
// map CTE id to CTE map entry
typedef CHashMap<ULONG, CCTEMapEntry, gpos::HashValue<ULONG>,
gpos::Equals<ULONG>, CleanupDelete<ULONG>,
CleanupRelease<CCTEMapEntry> >
UlongToCTEMapEntryMap;
// map iterator
typedef CHashMapIter<ULONG, CCTEMapEntry, gpos::HashValue<ULONG>,
gpos::Equals<ULONG>, CleanupDelete<ULONG>,
CleanupRelease<CCTEMapEntry> >
UlongToCTEMapEntryMapIter;
// memory pool
CMemoryPool *m_mp;
// cte map
UlongToCTEMapEntryMap *m_phmcm;
// private copy ctor
CCTEMap(const CCTEMap &);
// lookup info for given cte id
CCTEMapEntry *PcmeLookup(ULONG ulCteId) const;
// helper to add entries found in first map and are unresolved based on second map
static void AddUnresolved(const CCTEMap &cmFirst, const CCTEMap &cmSecond,
CCTEMap *pcmResult);
public:
// ctor
explicit CCTEMap(CMemoryPool *mp);
// dtor
virtual ~CCTEMap();
// return the CTE type associated with the given ID in the map
ECteType Ect(const ULONG id) const;
// inserting a new map entry, no entry with the same id can already exist
void Insert(ULONG ulCteId, ECteType ect, CDrvdPropPlan *pdpplan);
// hash function
ULONG HashValue() const;
// check if two cte maps are equal
BOOL
Equals(const CCTEMap *pcm) const
{
return (m_phmcm->Size() == pcm->m_phmcm->Size()) && this->FSubset(pcm);
}
// extract plan properties of the only producer in the map, if any
CDrvdPropPlan *PdpplanProducer(ULONG *ulpId) const;
// check if current map is a subset of the given one
BOOL FSubset(const CCTEMap *pcm) const;
// check whether the current CTE map satisfies the given CTE requirements
BOOL FSatisfies(const CCTEReq *pcter) const;
// return producer ids that are in this map but not in the given requirement
ULongPtrArray *PdrgpulAdditionalProducers(CMemoryPool *mp,
const CCTEReq *pcter) const;
// print function
virtual IOstream &OsPrint(IOstream &os) const;
// combine the two given maps and return the resulting map
static CCTEMap *PcmCombine(CMemoryPool *mp, const CCTEMap &cmFirst,
const CCTEMap &cmSecond);
}; // class CCTEMap
// shorthand for printing
IOstream &operator<<(IOstream &os, CCTEMap &cm);
} // namespace gpopt
#endif // !GPOPT_CCTEMap_H
// EOF
| 24.961207 | 83 | 0.64652 |
b7029b27bcb650072a2055823f35a0413ae03f2f | 1,476 | c | C | docs/libflame/examples/fill.c | haampie/libflame | a6b27af9b7ef91ec2724b52c7c09b681379a3470 | [
"BSD-3-Clause"
] | 199 | 2015-02-06T06:05:32.000Z | 2022-03-18T05:20:33.000Z | docs/libflame/examples/fill.c | haampie/libflame | a6b27af9b7ef91ec2724b52c7c09b681379a3470 | [
"BSD-3-Clause"
] | 44 | 2015-05-10T18:14:52.000Z | 2022-02-22T08:22:10.000Z | docs/libflame/examples/fill.c | haampie/libflame | a6b27af9b7ef91ec2724b52c7c09b681379a3470 | [
"BSD-3-Clause"
] | 70 | 2015-02-07T04:53:03.000Z | 2022-03-18T05:20:36.000Z | #include "PLA.h"
PLA_Error fill( PLA_Obj A )
{
PLA_Obj
AL, AR, A0, a1, A2,
aT1, a01,
aB1, alpha11,
a21;
double
value;
int
i, j,
me = PLA_Temp_comm_all_rank( PLA_Obj_template( A ) );
PLA_Part_1x2( A,
&AL, &AR,
0, PLA_LEFT );
j = 0;
while ( PLA_Obj_width( AL ) < PLA_Obj_width( A ) )
{
PLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &a1, &A2,
1, PLA_RIGHT );
/*----------------------------------------------------------------*/
PLA_Part_2x1( a1, &aT1,
&aB1,
0, PLA_TOP );
i = 0;
while ( PLA_Obj_length( aT1 ) < PLA_Obj_length( a1 ) )
{
PLA_Repart_2x1_to_3x1( aT1, &a01,
/* *** */ /* ******** */
&alpha11,
aB1, &a21,
1, PLA_BOTTOM );
/*------------------------------------------------------------*/
value = me + i * 0.01 + j * 0.0001;
PLA_Obj_set_element( alpha11, &value );
/*------------------------------------------------------------*/
PLA_Cont_with_3x1_to_2x1( &aT1, a01,
alpha11,
/* **** */ /* ******* */
&aB1, a21,
PLA_TOP );
i++;
}
/*------------------------------------------------------------*/
PLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, a1, /**/ A2,
PLA_LEFT );
j++;
}
return PLA_SUCCESS;
}
| 25.894737 | 74 | 0.342818 |
b7302ce20ce8f593c3fe1f673427c18bf8fd02b6 | 1,947 | h | C | usr/libexec/cloudphotod/CPLCloudKitMetric.h | lechium/tvOS145Headers | 9940da19adb0017f8037853e9cfccbe01b290dd5 | [
"MIT"
] | 5 | 2021-04-29T04:31:43.000Z | 2021-08-19T18:59:58.000Z | usr/libexec/cloudphotod/CPLCloudKitMetric.h | lechium/tvOS145Headers | 9940da19adb0017f8037853e9cfccbe01b290dd5 | [
"MIT"
] | null | null | null | usr/libexec/cloudphotod/CPLCloudKitMetric.h | lechium/tvOS145Headers | 9940da19adb0017f8037853e9cfccbe01b290dd5 | [
"MIT"
] | 1 | 2022-03-19T11:16:23.000Z | 2022-03-19T11:16:23.000Z | //
// 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>
@class CKContainer, CKEventMetric, NSMutableSet, NSString;
@interface CPLCloudKitMetric : NSObject
{
NSMutableSet *_outstandingOperations; // 8 = 0x8
CKEventMetric *_ckEventMetric; // 16 = 0x10
_Bool _submitted; // 24 = 0x18
NSString *_name; // 32 = 0x20
CKContainer *_container; // 40 = 0x28
long long _result; // 48 = 0x30
unsigned long long _outstandingBeginCount; // 56 = 0x38
NSString *_identifier; // 64 = 0x40
}
+ (void)initialize; // IMP=0x00000001000dae0c
- (void).cxx_destruct; // IMP=0x00000001000dbb94
@property(readonly, nonatomic) NSString *identifier; // @synthesize identifier=_identifier;
@property(readonly, nonatomic) _Bool submitted; // @synthesize submitted=_submitted;
@property(readonly, nonatomic) unsigned long long outstandingBeginCount; // @synthesize outstandingBeginCount=_outstandingBeginCount;
@property(nonatomic) long long result; // @synthesize result=_result;
@property(retain, nonatomic) CKContainer *container; // @synthesize container=_container;
@property(readonly, nonatomic) NSString *name; // @synthesize name=_name;
- (id)redactedDescription; // IMP=0x00000001000dbaa8
- (id)description; // IMP=0x00000001000dba00
@property(readonly, nonatomic) NSString *resultDescription;
- (void)prepareCKEventMetric:(id)arg1; // IMP=0x00000001000db9bc
- (void)drop; // IMP=0x00000001000db9a0
- (void)setError:(id)arg1; // IMP=0x00000001000db928
- (void)end; // IMP=0x00000001000db740
- (void)begin; // IMP=0x00000001000db64c
- (void)associatedOperationDidComplete:(id)arg1; // IMP=0x00000001000db454
- (void)associateWithOperation:(id)arg1; // IMP=0x00000001000db2e8
- (void)_submitIfNecessary; // IMP=0x00000001000db110
- (id)initWithName:(id)arg1; // IMP=0x00000001000daecc
@end
| 42.326087 | 133 | 0.750385 |
eb9c976e69b8626cebf1f78cab72bec9040e1fcf | 3,696 | c | C | src/pt2pt/getelementsf.c | RWTH-OS/MP-MPICH | f2ae296477bb9d812fda587221b3419c09f85b4a | [
"mpich2"
] | null | null | null | src/pt2pt/getelementsf.c | RWTH-OS/MP-MPICH | f2ae296477bb9d812fda587221b3419c09f85b4a | [
"mpich2"
] | null | null | null | src/pt2pt/getelementsf.c | RWTH-OS/MP-MPICH | f2ae296477bb9d812fda587221b3419c09f85b4a | [
"mpich2"
] | 1 | 2021-01-23T11:01:01.000Z | 2021-01-23T11:01:01.000Z | /* get_elements.c */
/* Fortran interface file */
#include "mpiimpl.h"
#if defined(MPI_BUILD_PROFILING) || defined(HAVE_WEAK_SYMBOLS)
#if defined(HAVE_WEAK_SYMBOLS)
#if defined(HAVE_PRAGMA_WEAK)
#if defined(FORTRANCAPS)
#pragma weak MPI_GET_ELEMENTS = PMPI_GET_ELEMENTS
EXPORT_MPI_API void MPI_GET_ELEMENTS ( MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * );
#elif defined(FORTRANDOUBLEUNDERSCORE)
#pragma weak mpi_get_elements__ = pmpi_get_elements__
EXPORT_MPI_API void mpi_get_elements__ ( MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * );
#elif !defined(FORTRANUNDERSCORE)
#pragma weak mpi_get_elements = pmpi_get_elements
EXPORT_MPI_API void mpi_get_elements ( MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * );
#else
#pragma weak mpi_get_elements_ = pmpi_get_elements_
EXPORT_MPI_API void mpi_get_elements_ ( MPI_Fint *, MPI_Fint *, MPI_Fint *, MPI_Fint * );
#endif
#elif defined(HAVE_ATTRIBUTE_WEAK)
#if defined(FORTRANCAPS)
EXPORT_MPI_API void MPI_GET_ELEMENTS ( MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint * ) __attribute__ ((weak, alias ("PMPI_GET_ELEMENTS")));
#elif defined(FORTRANDOUBLEUNDERSCORE)
EXPORT_MPI_API void mpi_get_elements__ ( MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint * ) __attribute__ ((weak, alias ("pmpi_get_elements__")));
#elif !defined(FORTRANUNDERSCORE)
EXPORT_MPI_API void mpi_get_elements ( MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint * ) __attribute__ ((weak, alias ("pmpi_get_elements")));
#else
EXPORT_MPI_API void mpi_get_elements_ ( MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint * ) __attribute__ ((weak, alias ("pmpi_get_elements_")));
#endif
#elif defined(HAVE_PRAGMA_HP_SEC_DEF)
#if defined(FORTRANCAPS)
#pragma _HP_SECONDARY_DEF PMPI_GET_ELEMENTS MPI_GET_ELEMENTS
#elif defined(FORTRANDOUBLEUNDERSCORE)
#pragma _HP_SECONDARY_DEF pmpi_get_elements__ mpi_get_elements__
#elif !defined(FORTRANUNDERSCORE)
#pragma _HP_SECONDARY_DEF pmpi_get_elements mpi_get_elements
#else
#pragma _HP_SECONDARY_DEF pmpi_get_elements_ mpi_get_elements_
#endif
#elif defined(HAVE_PRAGMA_CRI_DUP)
#if defined(FORTRANCAPS)
#pragma _CRI duplicate MPI_GET_ELEMENTS as PMPI_GET_ELEMENTS
#elif defined(FORTRANDOUBLEUNDERSCORE)
#pragma _CRI duplicate mpi_get_elements__ as pmpi_get_elements__
#elif !defined(FORTRANUNDERSCORE)
#pragma _CRI duplicate mpi_get_elements as pmpi_get_elements
#else
#pragma _CRI duplicate mpi_get_elements_ as pmpi_get_elements_
#endif
/* end of weak pragmas */
#endif
/* Include mapping from MPI->PMPI */
#include "mpiprof.h"
/* Insert the prototypes for the PMPI routines */
#undef __MPI_BINDINGS
#include "binding.h"
#endif
#ifdef FORTRANCAPS
#define mpi_get_elements_ PMPI_GET_ELEMENTS
#elif defined(FORTRANDOUBLEUNDERSCORE)
#define mpi_get_elements_ pmpi_get_elements__
#elif !defined(FORTRANUNDERSCORE)
#define mpi_get_elements_ pmpi_get_elements
#else
#define mpi_get_elements_ pmpi_get_elements_
#endif
#else
#ifdef FORTRANCAPS
#define mpi_get_elements_ MPI_GET_ELEMENTS
#elif defined(FORTRANDOUBLEUNDERSCORE)
#define mpi_get_elements_ mpi_get_elements__
#elif !defined(FORTRANUNDERSCORE)
#define mpi_get_elements_ mpi_get_elements
#endif
#endif
/* Prototype to suppress warnings about missing prototypes */
EXPORT_MPI_API void FORTRAN_API mpi_get_elements_ ANSI_ARGS(( MPI_Fint *, MPI_Fint *, MPI_Fint *,
MPI_Fint * ));
EXPORT_MPI_API void FORTRAN_API mpi_get_elements_ ( MPI_Fint *status, MPI_Fint *datatype, MPI_Fint *elements, MPI_Fint *__ierr )
{
int lelements;
MPI_Status c_status;
MPI_Status_f2c(status, &c_status);
*__ierr = MPI_Get_elements(&c_status,MPI_Type_f2c(*datatype),
&lelements);
*elements = (MPI_Fint)lelements;
}
| 34.867925 | 128 | 0.788149 |
8d739780a5b30d961a5fc8c781c217d3ee3462a3 | 7,316 | c | C | arch/arm/src/cxd56xx/cxd56_cpufifo.c | NicoMayer/incubator-nuttx | 4cb21312f0191994334b16d2f9f38af428832fcc | [
"Apache-2.0"
] | 3 | 2019-11-15T07:26:00.000Z | 2020-09-28T14:14:44.000Z | arch/arm/src/cxd56xx/cxd56_cpufifo.c | NicoMayer/incubator-nuttx | 4cb21312f0191994334b16d2f9f38af428832fcc | [
"Apache-2.0"
] | null | null | null | arch/arm/src/cxd56xx/cxd56_cpufifo.c | NicoMayer/incubator-nuttx | 4cb21312f0191994334b16d2f9f38af428832fcc | [
"Apache-2.0"
] | 6 | 2019-08-12T04:18:53.000Z | 2021-11-16T08:33:20.000Z | /****************************************************************************
* arch/arm/src/cxd56xx/cxd56_cpufifo.c
*
* Copyright 2018 Sony Semiconductor Solutions Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name of Sony Semiconductor Solutions Corporation 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 <nuttx/irq.h>
#include <nuttx/arch.h>
#include <queue.h>
#include <debug.h>
#include <errno.h>
#include "up_arch.h"
#include "chip.h"
#include "hardware/cxd56_cpufifo.h"
#include "cxd56_cpufifo.h"
/****************************************************************************
* Private Definitions
****************************************************************************/
#ifdef CONFIG_CXD56_CPUFIFO_ENTRIES
#define NR_PUSHBUFENTRIES CONFIG_CXD56_CPUFIFO_ENTRIES
#else
#define NR_PUSHBUFENTRIES 8
#endif
#define MSGFROM(x) (((x)[0] >> 28) & 0xf)
/****************************************************************************
* Private Types
****************************************************************************/
struct cfpushdata_s
{
FAR sq_entry_t entry;
uint32_t data[2];
};
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
static int cpufifo_txhandler(int irq, FAR void *context, FAR void *arg);
static int cpufifo_rxhandler(int irq, FAR void *context, FAR void *arg);
static int cpufifo_trypush(uint32_t data[2]);
static int cpufifo_reserve(uint32_t data[2]);
/****************************************************************************
* Private Data
****************************************************************************/
/* Only for SYS, GNSS CPUs */
static sq_queue_t g_pushqueue;
static sq_queue_t g_emptyqueue;
static struct cfpushdata_s g_pushbuffer[NR_PUSHBUFENTRIES];
static cpufifo_handler_t g_cfrxhandler;
/****************************************************************************
* Private Functions
****************************************************************************/
static int cpufifo_txhandler(int irq, FAR void *context, FAR void *arg)
{
FAR struct cfpushdata_s *pd;
pd = (FAR struct cfpushdata_s *)sq_remfirst(&g_pushqueue);
if (pd)
{
/* Ignore error because always FIFO is not full at here */
cpufifo_trypush(pd->data);
sq_addlast(&pd->entry, &g_emptyqueue);
}
if (sq_empty(&g_pushqueue))
{
up_disable_irq(CXD56_IRQ_FIFO_TO);
}
return OK;
}
static int cpufifo_rxhandler(int irq, FAR void *context, FAR void *arg)
{
uint32_t word[2] =
{
0
};
int cpuid;
/* Drain from PULL FIFO. But not all data because this handler
* will be re-entered when data remaining in PULL FIFO.
*/
cxd56_cfpull(word);
cpuid = MSGFROM(word);
DEBUGASSERT(cpuid >= 0 && cpuid < 8);
if (g_cfrxhandler)
{
g_cfrxhandler(cpuid, word);
}
return OK;
}
static int cpufifo_trypush(uint32_t data[2])
{
if (getreg32(CXD56_FIF_PUSH_FULL))
{
return -1;
}
putreg32(data[0], CXD56_FIF_PUSH_WRD0);
putreg32(data[1], CXD56_FIF_PUSH_WRD1);
putreg32(1, CXD56_FIF_PUSH_CMP);
return OK;
}
static int cpufifo_reserve(uint32_t data[2])
{
FAR struct cfpushdata_s *pd;
pd = (FAR struct cfpushdata_s *)sq_remfirst(&g_emptyqueue);
/* This error indicates that need more sending buffer, it can be
* configured by CONFIG_CXD56_CPUFIFO_ENTRIES.
*/
if (!pd)
{
return -EAGAIN;
}
pd->data[0] = data[0];
pd->data[1] = data[1];
sq_addlast(&pd->entry, &g_pushqueue);
return OK;
}
/****************************************************************************
* Public Functions
****************************************************************************/
int cxd56_cfpush(uint32_t data[2])
{
irqstate_t flags;
int ret;
flags = enter_critical_section();
if (!sq_empty(&g_pushqueue))
{
ret = cpufifo_reserve(data);
leave_critical_section(flags);
return ret;
}
ret = cpufifo_trypush(data);
if (ret < 0)
{
cpufifo_reserve(data);
up_enable_irq(CXD56_IRQ_FIFO_TO);
}
leave_critical_section(flags);
return OK;
}
int cxd56_cfpull(uint32_t data[2])
{
if (getreg32(CXD56_FIF_PULL_EMP))
{
return -1;
}
data[0] = getreg32(CXD56_FIF_PULL_WRD0);
data[1] = getreg32(CXD56_FIF_PULL_WRD1);
putreg32(1, CXD56_FIF_PULL_CMP);
return 0;
}
int cxd56_cfregrxhandler(cpufifo_handler_t handler)
{
irqstate_t flags;
int ret = OK;
flags = enter_critical_section();
if (g_cfrxhandler)
{
ret = -1;
}
else
{
g_cfrxhandler = handler;
}
leave_critical_section(flags);
return ret;
}
void cxd56_cfunregrxhandler(void)
{
irqstate_t flags;
flags = enter_critical_section();
g_cfrxhandler = NULL;
leave_critical_section(flags);
}
int cxd56_cfinitialize(void)
{
int i;
/* Setup IRQ handlers. Enable only FROM (RX) interrupt because TO (TX)
* interrupt for retry sending when FIFO is full.
*/
irq_attach(CXD56_IRQ_FIFO_FROM, cpufifo_rxhandler, NULL);
irq_attach(CXD56_IRQ_FIFO_TO, cpufifo_txhandler, NULL);
up_enable_irq(CXD56_IRQ_FIFO_FROM);
/* Initialize push buffer. */
sq_init(&g_pushqueue);
sq_init(&g_emptyqueue);
for (i = 0; i < NR_PUSHBUFENTRIES; i++)
{
sq_addlast((FAR sq_entry_t *)&g_pushbuffer[i], &g_emptyqueue);
}
/* Clear user defined receive handler. */
g_cfrxhandler = NULL;
return OK;
}
| 26.222222 | 78 | 0.577911 |
991b2b79fd0033f8db598b303c593f4170f01e90 | 375 | h | C | Bold-iOS/Bold-iOS.h | ChristianKienle/Bold | 3b9474f7a1a491b7305c3044ebe008efacad3fd5 | [
"MIT"
] | 16 | 2015-03-14T22:08:07.000Z | 2019-01-23T00:33:25.000Z | Bold-iOS/Bold-iOS.h | ChristianKienle/Bold | 3b9474f7a1a491b7305c3044ebe008efacad3fd5 | [
"MIT"
] | null | null | null | Bold-iOS/Bold-iOS.h | ChristianKienle/Bold | 3b9474f7a1a491b7305c3044ebe008efacad3fd5 | [
"MIT"
] | 2 | 2017-05-03T20:06:06.000Z | 2018-11-09T18:35:56.000Z | //
// Bold-iOS.h
// Bold-iOS
//
// Created by cmk on 30/10/2016.
// Copyright © 2016 Christian Kienle. All rights reserved.
//
#import <UIKit/UIKit.h>
//! Project version number for Bold-iOS.
FOUNDATION_EXPORT double Bold_iOSVersionNumber;
//! Project version string for Bold-iOS.
FOUNDATION_EXPORT const unsigned char Bold_iOSVersionString[];
#include <sqlite3.h>
| 18.75 | 62 | 0.728 |
9969293233facadcbfe2dc8e745e4c5bf27e0c13 | 534 | c | C | deps/map-macro/example.c | m-j-w/Perf.jl | 76a002bdec3e3eb2e87fd928439edfd7a7b28d28 | [
"MIT"
] | null | null | null | deps/map-macro/example.c | m-j-w/Perf.jl | 76a002bdec3e3eb2e87fd928439edfd7a7b28d28 | [
"MIT"
] | null | null | null | deps/map-macro/example.c | m-j-w/Perf.jl | 76a002bdec3e3eb2e87fd928439edfd7a7b28d28 | [
"MIT"
] | null | null | null | /*
* Compile with `gcc -E example.c` to see the preprocessor output.
*/
#include "map.h"
/* Basic `MAP` usage: */
#define STRING(x) char const *x##_string = #x;
MAP(STRING, foo, bar, baz)
/* Basic `MAP_LIST` usage: */
#define PARAM(x) int x
void function(MAP_LIST(PARAM, foo, bar, baz));
/* Test `MAP` with parentheses in the arguments: */
#define CALL(x) putchar x;
MAP(CALL, ('a'), ('b'), ('c'))
/* Test `MAP_LIST` with parentheses in the arguments: */
#define CALL_LIST(x) putchar x
MAP_LIST(CALL_LIST, ('a'), ('b'), ('c'));
| 25.428571 | 66 | 0.636704 |
8f6aa6f9ed866185196cae27c01370f38d3bfb34 | 273 | h | C | HKYunSDK/Frameworks/KKBSDK.framework/Headers/KKBSDKJobFilterRequest.h | kaikeba-github/HKYunSDK | a0f8bb4db00cd1c3a87192465ee77921dbe9d09b | [
"MIT"
] | null | null | null | HKYunSDK/Frameworks/KKBSDK.framework/Headers/KKBSDKJobFilterRequest.h | kaikeba-github/HKYunSDK | a0f8bb4db00cd1c3a87192465ee77921dbe9d09b | [
"MIT"
] | null | null | null | HKYunSDK/Frameworks/KKBSDK.framework/Headers/KKBSDKJobFilterRequest.h | kaikeba-github/HKYunSDK | a0f8bb4db00cd1c3a87192465ee77921dbe9d09b | [
"MIT"
] | null | null | null | //
// KKBSDKJobFilterRequest.h
// KKBSDK
//
// Created by 西门桃桃 on 2020/4/15.
// Copyright © 2020 KaiKeBa. All rights reserved.
//
#import <KKBSDK/KKBSDK.h>
NS_ASSUME_NONNULL_BEGIN
@interface KKBSDKJobFilterRequest : KKBSDKJobBaseRequest
@end
NS_ASSUME_NONNULL_END
| 15.166667 | 56 | 0.750916 |
6bdf27a472e24f2ccf96a85f3440c600825c0137 | 790 | h | C | src/Processors/Formats/Impl/JSONEachRowWithProgressRowOutputFormat.h | chalice19/ClickHouse | 2f38e7bc5c2113935ab86260439bb543a1737291 | [
"Apache-2.0"
] | 8,629 | 2016-06-14T21:03:01.000Z | 2019-09-23T07:46:38.000Z | src/Processors/Formats/Impl/JSONEachRowWithProgressRowOutputFormat.h | chalice19/ClickHouse | 2f38e7bc5c2113935ab86260439bb543a1737291 | [
"Apache-2.0"
] | 4,335 | 2016-06-15T12:58:31.000Z | 2019-09-23T11:18:43.000Z | src/Processors/Formats/Impl/JSONEachRowWithProgressRowOutputFormat.h | chalice19/ClickHouse | 2f38e7bc5c2113935ab86260439bb543a1737291 | [
"Apache-2.0"
] | 1,700 | 2016-06-15T09:25:11.000Z | 2019-09-23T11:16:38.000Z | #pragma once
#include <Processors/Formats/Impl/JSONEachRowRowOutputFormat.h>
#include <mutex>
namespace DB
{
class JSONEachRowWithProgressRowOutputFormat final : public JSONEachRowRowOutputFormat
{
public:
using JSONEachRowRowOutputFormat::JSONEachRowRowOutputFormat;
void onProgress(const Progress & value) override;
void flush() override;
private:
void writeRowStartDelimiter() override;
void writeRowEndDelimiter() override;
void writeSuffix() override;
void writeProgress();
Progress progress;
std::vector<String> progress_lines;
std::mutex progress_lines_mutex;
/// To not lock mutex and check progress_lines every row,
/// we will use atomic flag that progress_lines is not empty.
std::atomic_bool has_progress = false;
};
}
| 24.6875 | 86 | 0.75443 |
271418e77527fe2c9b53e1b0c9ea2768fd3282c8 | 37,702 | c | C | src/mame/drivers/tecmo.c | Zoltan45/Mame-mkp119 | d219a3549eafb4215727c974e09e43b28d058328 | [
"CC0-1.0"
] | null | null | null | src/mame/drivers/tecmo.c | Zoltan45/Mame-mkp119 | d219a3549eafb4215727c974e09e43b28d058328 | [
"CC0-1.0"
] | null | null | null | src/mame/drivers/tecmo.c | Zoltan45/Mame-mkp119 | d219a3549eafb4215727c974e09e43b28d058328 | [
"CC0-1.0"
] | null | null | null | /***************************************************************************
tecmo.c
driver by Nicola Salmoria
Silkworm memory map (preliminary)
0000-bfff ROM
c000-c1ff Background video RAM #2
c200-c3ff Background color RAM #2
c400-c5ff Background video RAM #1
c600-c7ff Background color RAM #1
c800-cbff Video RAM
cc00-cfff Color RAM
d000-dfff RAM
e000-e7ff Sprites
e800-efff Palette RAM, groups of 2 bytes, 4 bits per gun: xB RG
e800-e9ff sprites
ea00-ebff characters
ec00-edff bg #1
ee00-efff bg #2
f000-f7ff window for banked ROM
read:
f800 IN0 (heli) bit 0-3
f801 IN0 bit 4-7
f802 IN1 (jeep) bit 0-3
f803 IN1 bit 4-7
f806 DSWA bit 0-3
f807 DSWA bit 4-7
f808 DSWB bit 0-3
f809 DSWB bit 4-7
f80f COIN
write:
f800-f801 bg #1 x scroll
f802 bg #1 y scroll
f803-f804 bg #2 x scroll
f805 bg #2 y scroll
f806 ????
f808 ROM bank selector
f809 ????
f80b ????
***************************************************************************/
#include "driver.h"
#include "cpu/z80/z80.h"
#include "sound/3812intf.h"
#include "sound/msm5205.h"
extern int tecmo_video_type;
extern UINT8 *tecmo_txvideoram,*tecmo_fgvideoram,*tecmo_bgvideoram;
WRITE8_HANDLER( tecmo_txvideoram_w );
WRITE8_HANDLER( tecmo_fgvideoram_w );
WRITE8_HANDLER( tecmo_bgvideoram_w );
WRITE8_HANDLER( tecmo_fgscroll_w );
WRITE8_HANDLER( tecmo_bgscroll_w );
WRITE8_HANDLER( tecmo_flipscreen_w );
VIDEO_START( tecmo );
VIDEO_UPDATE( tecmo );
WRITE8_HANDLER( tecmo_bankswitch_w )
{
int bankaddress;
UINT8 *RAM = memory_region(REGION_CPU1);
bankaddress = 0x10000 + ((data & 0xf8) << 8);
memory_set_bankptr(1,&RAM[bankaddress]);
}
static WRITE8_HANDLER( tecmo_sound_command_w )
{
soundlatch_w(offset,data);
cpunum_set_input_line(1,INPUT_LINE_NMI,PULSE_LINE);
}
static int adpcm_pos,adpcm_end;
static WRITE8_HANDLER( tecmo_adpcm_start_w )
{
adpcm_pos = data << 8;
MSM5205_reset_w(0,0);
}
static WRITE8_HANDLER( tecmo_adpcm_end_w )
{
adpcm_end = (data + 1) << 8;
}
static WRITE8_HANDLER( tecmo_adpcm_vol_w )
{
MSM5205_set_volume(0,(data & 0x0f) * 100 / 15);
}
static void tecmo_adpcm_int(int num)
{
static int adpcm_data = -1;
if (adpcm_pos >= adpcm_end ||
adpcm_pos >= memory_region_length(REGION_SOUND1))
MSM5205_reset_w(0,1);
else if (adpcm_data != -1)
{
MSM5205_data_w(0,adpcm_data & 0x0f);
adpcm_data = -1;
}
else
{
UINT8 *ROM = memory_region(REGION_SOUND1);
adpcm_data = ROM[adpcm_pos++];
MSM5205_data_w(0,adpcm_data >> 4);
}
}
static ADDRESS_MAP_START( readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0xbfff) AM_READ(MRA8_ROM)
AM_RANGE(0xc000, 0xefff) AM_READ(MRA8_RAM)
AM_RANGE(0xf000, 0xf7ff) AM_READ(MRA8_BANK1)
AM_RANGE(0xf800, 0xf800) AM_READ(input_port_0_r)
AM_RANGE(0xf801, 0xf801) AM_READ(input_port_1_r)
AM_RANGE(0xf802, 0xf802) AM_READ(input_port_2_r)
AM_RANGE(0xf803, 0xf803) AM_READ(input_port_3_r)
AM_RANGE(0xf804, 0xf804) AM_READ(input_port_4_r)
AM_RANGE(0xf805, 0xf805) AM_READ(input_port_5_r)
AM_RANGE(0xf806, 0xf806) AM_READ(input_port_6_r)
AM_RANGE(0xf807, 0xf807) AM_READ(input_port_7_r)
AM_RANGE(0xf808, 0xf808) AM_READ(input_port_8_r)
AM_RANGE(0xf809, 0xf809) AM_READ(input_port_9_r)
AM_RANGE(0xf80f, 0xf80f) AM_READ(input_port_10_r)
ADDRESS_MAP_END
static ADDRESS_MAP_START( rygar_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xc000, 0xcfff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xd000, 0xd7ff) AM_WRITE(tecmo_txvideoram_w) AM_BASE(&tecmo_txvideoram)
AM_RANGE(0xd800, 0xdbff) AM_WRITE(tecmo_fgvideoram_w) AM_BASE(&tecmo_fgvideoram)
AM_RANGE(0xdc00, 0xdfff) AM_WRITE(tecmo_bgvideoram_w) AM_BASE(&tecmo_bgvideoram)
AM_RANGE(0xe000, 0xe7ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xe800, 0xefff) AM_WRITE(paletteram_xxxxBBBBRRRRGGGG_be_w) AM_BASE(&paletteram)
AM_RANGE(0xf000, 0xf7ff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xf800, 0xf802) AM_WRITE(tecmo_fgscroll_w)
AM_RANGE(0xf803, 0xf805) AM_WRITE(tecmo_bgscroll_w)
AM_RANGE(0xf806, 0xf806) AM_WRITE(tecmo_sound_command_w)
AM_RANGE(0xf807, 0xf807) AM_WRITE(tecmo_flipscreen_w)
AM_RANGE(0xf808, 0xf808) AM_WRITE(tecmo_bankswitch_w)
AM_RANGE(0xf80b, 0xf80b) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
static ADDRESS_MAP_START( gemini_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xc000, 0xcfff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xd000, 0xd7ff) AM_WRITE(tecmo_txvideoram_w) AM_BASE(&tecmo_txvideoram)
AM_RANGE(0xd800, 0xdbff) AM_WRITE(tecmo_fgvideoram_w) AM_BASE(&tecmo_fgvideoram)
AM_RANGE(0xdc00, 0xdfff) AM_WRITE(tecmo_bgvideoram_w) AM_BASE(&tecmo_bgvideoram)
AM_RANGE(0xe000, 0xe7ff) AM_WRITE(paletteram_xxxxBBBBRRRRGGGG_be_w) AM_BASE(&paletteram)
AM_RANGE(0xe800, 0xefff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xf000, 0xf7ff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xf800, 0xf802) AM_WRITE(tecmo_fgscroll_w)
AM_RANGE(0xf803, 0xf805) AM_WRITE(tecmo_bgscroll_w)
AM_RANGE(0xf806, 0xf806) AM_WRITE(tecmo_sound_command_w)
AM_RANGE(0xf807, 0xf807) AM_WRITE(tecmo_flipscreen_w)
AM_RANGE(0xf808, 0xf808) AM_WRITE(tecmo_bankswitch_w)
AM_RANGE(0xf80b, 0xf80b) AM_WRITE(watchdog_reset_w)
ADDRESS_MAP_END
static ADDRESS_MAP_START( silkworm_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0xbfff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xc000, 0xc3ff) AM_WRITE(tecmo_bgvideoram_w) AM_BASE(&tecmo_bgvideoram)
AM_RANGE(0xc400, 0xc7ff) AM_WRITE(tecmo_fgvideoram_w) AM_BASE(&tecmo_fgvideoram)
AM_RANGE(0xc800, 0xcfff) AM_WRITE(tecmo_txvideoram_w) AM_BASE(&tecmo_txvideoram)
AM_RANGE(0xd000, 0xdfff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xe000, 0xe7ff) AM_WRITE(MWA8_RAM) AM_BASE(&spriteram) AM_SIZE(&spriteram_size)
AM_RANGE(0xe800, 0xefff) AM_WRITE(paletteram_xxxxBBBBRRRRGGGG_be_w) AM_BASE(&paletteram)
AM_RANGE(0xf000, 0xf7ff) AM_WRITE(MWA8_ROM)
AM_RANGE(0xf800, 0xf802) AM_WRITE(tecmo_fgscroll_w)
AM_RANGE(0xf803, 0xf805) AM_WRITE(tecmo_bgscroll_w)
AM_RANGE(0xf806, 0xf806) AM_WRITE(tecmo_sound_command_w)
AM_RANGE(0xf807, 0xf807) AM_WRITE(tecmo_flipscreen_w)
AM_RANGE(0xf808, 0xf808) AM_WRITE(tecmo_bankswitch_w)
AM_RANGE(0xf809, 0xf809) AM_WRITE(MWA8_NOP) /* ? */
AM_RANGE(0xf80b, 0xf80b) AM_WRITE(MWA8_NOP) /* ? if mapped to watchdog like in the others, causes reset */
ADDRESS_MAP_END
static ADDRESS_MAP_START( rygar_sound_readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_READ(MRA8_ROM)
AM_RANGE(0x4000, 0x47ff) AM_READ(MRA8_RAM)
AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r)
ADDRESS_MAP_END
static ADDRESS_MAP_START( rygar_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x3fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x4000, 0x47ff) AM_WRITE(MWA8_RAM)
AM_RANGE(0x8000, 0x8000) AM_WRITE(YM3812_control_port_0_w)
AM_RANGE(0x8001, 0x8001) AM_WRITE(YM3812_write_port_0_w)
AM_RANGE(0xc000, 0xc000) AM_WRITE(tecmo_adpcm_start_w)
AM_RANGE(0xd000, 0xd000) AM_WRITE(tecmo_adpcm_end_w)
AM_RANGE(0xe000, 0xe000) AM_WRITE(tecmo_adpcm_vol_w)
AM_RANGE(0xf000, 0xf000) AM_WRITE(MWA8_NOP) /* NMI acknowledge */
ADDRESS_MAP_END
static ADDRESS_MAP_START( tecmo_sound_readmem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x0000, 0x7fff) AM_READ(MRA8_ROM)
AM_RANGE(0x8000, 0x87ff) AM_READ(MRA8_RAM)
AM_RANGE(0xc000, 0xc000) AM_READ(soundlatch_r)
ADDRESS_MAP_END
static ADDRESS_MAP_START( tecmo_sound_writemem, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x2000, 0x207f) AM_WRITE(MWA8_RAM) /* Silkworm set #2 has a custom CPU which */
/* writes code to this area */
AM_RANGE(0x0000, 0x7fff) AM_WRITE(MWA8_ROM)
AM_RANGE(0x8000, 0x87ff) AM_WRITE(MWA8_RAM)
AM_RANGE(0xa000, 0xa000) AM_WRITE(YM3812_control_port_0_w)
AM_RANGE(0xa001, 0xa001) AM_WRITE(YM3812_write_port_0_w)
AM_RANGE(0xc000, 0xc000) AM_WRITE(tecmo_adpcm_start_w)
AM_RANGE(0xc400, 0xc400) AM_WRITE(tecmo_adpcm_end_w)
AM_RANGE(0xc800, 0xc800) AM_WRITE(tecmo_adpcm_vol_w)
AM_RANGE(0xcc00, 0xcc00) AM_WRITE(MWA8_NOP) /* NMI acknowledge */
ADDRESS_MAP_END
INPUT_PORTS_START( rygar )
PORT_START /* IN0 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_START /* IN1 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_SERVICE1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* IN2 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_START /* IN3 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* IN4 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_START /* unused? */
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* DSWA bit 0-3 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_3C ) )
PORT_DIPNAME( 0x0C, 0x00, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0C, DEF_STR( 1C_3C ) )
PORT_START /* DSWA bit 4-7 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x03, "2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPNAME( 0x04, 0x04, DEF_STR( Cabinet ) )
PORT_DIPSETTING( 0x04, DEF_STR( Upright ) )
PORT_DIPSETTING( 0x00, DEF_STR( Cocktail ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) /* Listed as "Unused" in the manual */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_START /* DSWB bit 0-3 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "50000 200000 500000" )
PORT_DIPSETTING( 0x01, "100000 300000 600000" )
PORT_DIPSETTING( 0x02, "200000 500000" )
PORT_DIPSETTING( 0x03, "100000" )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unused ) ) /* Listed as "Unused" in the manual */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unused ) ) /* Listed as "Unused" in the manual */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_START /* DSWB bit 4-7 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x01, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x02, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x03, DEF_STR( Hardest ) )
PORT_DIPNAME( 0x04, 0x00, "2P Can Start Anytime" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x04, DEF_STR( Yes ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Allow_Continue ) )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x08, DEF_STR( Yes ) )
PORT_START /* unused? */
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
INPUT_PORTS_START( gemini )
PORT_START /* IN0 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_START /* IN1 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* IN2 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_COCKTAIL
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_COCKTAIL
PORT_START /* IN3 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_COCKTAIL
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_COCKTAIL
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* unused? */
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* IN4 bits 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
PORT_START /* DSWA bit 0-3 */
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x08, 0x00, "Final Round Continuation" )
PORT_DIPSETTING( 0x00, "Round 6" )
PORT_DIPSETTING( 0x08, "Round 7" )
PORT_START /* DSWA bit 4-7 */
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x06, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x07, DEF_STR( 2C_3C ) )
PORT_DIPSETTING( 0x01, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_3C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_4C ) )
PORT_DIPSETTING( 0x04, DEF_STR( 1C_5C ) )
PORT_DIPSETTING( 0x05, DEF_STR( 1C_6C ) )
PORT_DIPNAME( 0x08, 0x00, "Buy in During Final Round" )
PORT_DIPSETTING( 0x00, DEF_STR( No ) )
PORT_DIPSETTING( 0x08, DEF_STR( Yes ) )
PORT_START /* DSWB bit 0-3 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x03, "2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x00, DEF_STR( Easy ) )
PORT_DIPSETTING( 0x04, DEF_STR( Normal ) )
PORT_DIPSETTING( 0x08, DEF_STR( Hard ) )
PORT_DIPSETTING( 0x0c, DEF_STR( Hardest ) )
PORT_START /* DSWB bit 4-7 */
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "50000 200000" )
PORT_DIPSETTING( 0x01, "50000 300000" )
PORT_DIPSETTING( 0x02, "100000 500000" )
PORT_DIPSETTING( 0x03, "50000" )
PORT_DIPSETTING( 0x04, "100000" )
PORT_DIPSETTING( 0x05, "200000" )
PORT_DIPSETTING( 0x06, "300000" )
PORT_DIPSETTING( 0x07, DEF_STR( None ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x08, DEF_STR( Off ) )
PORT_DIPSETTING( 0x00, DEF_STR( On ) )
PORT_START /* unused? */
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNKNOWN )
INPUT_PORTS_END
INPUT_PORTS_START( silkworm )
PORT_START /* IN0 bit 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY
PORT_START /* IN0 bit 4-7 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* unused? */
PORT_START /* IN1 bit 0-3 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN ) PORT_8WAY PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP ) PORT_8WAY PORT_PLAYER(2)
PORT_START /* IN1 bit 4-7 */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_BUTTON2 ) PORT_PLAYER(2)
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_BUTTON1 ) PORT_PLAYER(2)
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_BUTTON3 ) PORT_PLAYER(2)
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* unused? */
PORT_START /* unused? */
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* unused? */
PORT_BIT( 0x0f, IP_ACTIVE_HIGH, IPT_UNKNOWN )
PORT_START /* DSWA bit 0-3 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_A ) )
PORT_DIPSETTING( 0x01, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x02, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x03, DEF_STR( 1C_3C ) )
PORT_DIPNAME( 0x0C, 0x00, DEF_STR( Coin_B ) )
PORT_DIPSETTING( 0x04, DEF_STR( 2C_1C ) )
PORT_DIPSETTING( 0x00, DEF_STR( 1C_1C ) )
PORT_DIPSETTING( 0x08, DEF_STR( 1C_2C ) )
PORT_DIPSETTING( 0x0C, DEF_STR( 1C_3C ) )
PORT_START /* DSWA bit 4-7 */
PORT_DIPNAME( 0x03, 0x00, DEF_STR( Lives ) )
PORT_DIPSETTING( 0x03, "2" )
PORT_DIPSETTING( 0x00, "3" )
PORT_DIPSETTING( 0x01, "4" )
PORT_DIPSETTING( 0x02, "5" )
PORT_DIPNAME( 0x04, 0x00, DEF_STR( Unknown ) ) /* unused? */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x04, DEF_STR( On ) )
PORT_DIPNAME( 0x08, 0x08, DEF_STR( Demo_Sounds ) )
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_START /* DSWB bit 0-3 */
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Bonus_Life ) )
PORT_DIPSETTING( 0x00, "50000 200000 500000" )
PORT_DIPSETTING( 0x01, "100000 300000 800000" )
PORT_DIPSETTING( 0x02, "50000 200000" )
PORT_DIPSETTING( 0x03, "100000 300000" )
PORT_DIPSETTING( 0x04, "50000" )
PORT_DIPSETTING( 0x05, "100000" )
PORT_DIPSETTING( 0x06, "200000" )
PORT_DIPSETTING( 0x07, DEF_STR( None ) )
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Unknown ) ) /* unused? */
PORT_DIPSETTING( 0x00, DEF_STR( Off ) )
PORT_DIPSETTING( 0x08, DEF_STR( On ) )
PORT_START /* DSWB bit 4-7 */
PORT_DIPNAME( 0x07, 0x00, DEF_STR( Difficulty ) )
PORT_DIPSETTING( 0x00, "0" )
PORT_DIPSETTING( 0x01, "1" )
PORT_DIPSETTING( 0x02, "2" )
PORT_DIPSETTING( 0x03, "3" )
PORT_DIPSETTING( 0x04, "4" )
PORT_DIPSETTING( 0x05, "5" )
/* 0x06 and 0x07 are the same as 0x00 */
PORT_DIPNAME( 0x08, 0x00, DEF_STR( Allow_Continue ) )
PORT_DIPSETTING( 0x08, DEF_STR( No ) )
PORT_DIPSETTING( 0x00, DEF_STR( Yes ) )
PORT_START /* COIN */
PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_START1 )
PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_START2 )
PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_COIN1 )
PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_COIN2 )
INPUT_PORTS_END
static const gfx_layout charlayout =
{
8,8,
RGN_FRAC(1,1),
4,
{ 0, 1, 2, 3 },
{ 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8
};
static const gfx_layout tilelayout =
{
16,16,
RGN_FRAC(1,1),
4,
{ 0, 1, 2, 3 },
{ 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
32*8+0*4, 32*8+1*4, 32*8+2*4, 32*8+3*4, 32*8+4*4, 32*8+5*4, 32*8+6*4, 32*8+7*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32,
16*32, 17*32, 18*32, 19*32, 20*32, 21*32, 22*32, 23*32 },
128*8
};
static const gfx_layout spritelayout =
{
8,8,
RGN_FRAC(1,1),
4,
{ 0, 1, 2, 3 },
{ 0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4 },
{ 0*32, 1*32, 2*32, 3*32, 4*32, 5*32, 6*32, 7*32 },
32*8
};
static const gfx_decode gfxdecodeinfo[] =
{
{ REGION_GFX1, 0, &charlayout, 256, 16 }, /* colors 256 - 511 */
{ REGION_GFX2, 0, &spritelayout, 0, 16 }, /* colors 0 - 255 */
{ REGION_GFX3, 0, &tilelayout, 512, 16 }, /* colors 512 - 767 */
{ REGION_GFX4, 0, &tilelayout, 768, 16 }, /* colors 768 - 1023 */
{ -1 }
};
static void irqhandler(int linestate)
{
cpunum_set_input_line(1,0,linestate);
}
static struct YM3526interface ym3812_interface =
{
irqhandler
};
static struct MSM5205interface msm5205_interface =
{
tecmo_adpcm_int, /* interrupt function */
MSM5205_S48_4B /* 8KHz */
};
static MACHINE_DRIVER_START( rygar )
/* basic machine hardware */
MDRV_CPU_ADD_TAG("main", Z80, 4000000)
MDRV_CPU_PROGRAM_MAP(readmem,rygar_writemem)
MDRV_CPU_VBLANK_INT(irq0_line_hold,1)
MDRV_CPU_ADD_TAG("sound", Z80, 4000000)
/* audio CPU */
MDRV_CPU_PROGRAM_MAP(rygar_sound_readmem,rygar_sound_writemem)
MDRV_SCREEN_REFRESH_RATE(60)
MDRV_SCREEN_VBLANK_TIME(DEFAULT_60HZ_VBLANK_DURATION /* frames per second, vblank duration */)
/* video hardware */
MDRV_VIDEO_ATTRIBUTES(VIDEO_TYPE_RASTER)
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_SIZE(32*8, 32*8)
MDRV_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1)
MDRV_GFXDECODE(gfxdecodeinfo)
MDRV_PALETTE_LENGTH(1024)
MDRV_VIDEO_START(tecmo)
MDRV_VIDEO_UPDATE(tecmo)
/* sound hardware */
MDRV_SPEAKER_STANDARD_MONO("mono")
MDRV_SOUND_ADD(YM3812, 4000000)
MDRV_SOUND_CONFIG(ym3812_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0)
MDRV_SOUND_ADD(MSM5205, 384000)
MDRV_SOUND_CONFIG(msm5205_interface)
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50)
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( gemini )
/* basic machine hardware */
MDRV_IMPORT_FROM(rygar)
MDRV_CPU_REPLACE("main", Z80, 6000000)
MDRV_CPU_PROGRAM_MAP(readmem,gemini_writemem)
MDRV_CPU_MODIFY("sound")
MDRV_CPU_PROGRAM_MAP(tecmo_sound_readmem,tecmo_sound_writemem)
MACHINE_DRIVER_END
static MACHINE_DRIVER_START( silkworm )
/* basic machine hardware */
MDRV_IMPORT_FROM(gemini)
MDRV_CPU_REPLACE("main", Z80, 6000000)
MDRV_CPU_PROGRAM_MAP(readmem,silkworm_writemem)
MACHINE_DRIVER_END
/***************************************************************************
Game driver(s)
***************************************************************************/
ROM_START( rygar )
ROM_REGION( 0x18000, REGION_CPU1, 0 )
ROM_LOAD( "5.5p", 0x00000, 0x08000, CRC(062cd55d) SHA1(656e29c890f5de964920b7841b3e11469cd20051) ) /* code */
ROM_LOAD( "cpu_5m.bin", 0x08000, 0x04000, CRC(7ac5191b) SHA1(305f39d974f906f9bc24e9fe2ca58e647925ab63) ) /* code */
ROM_LOAD( "cpu_5j.bin", 0x10000, 0x08000, CRC(ed76d606) SHA1(39c8a07e9a1f218ad088d00a2c9dfc993efafb6b) ) /* banked at f000-f7ff */
ROM_REGION( 0x10000, REGION_CPU2, 0 )
ROM_LOAD( "cpu_4h.bin", 0x0000, 0x2000, CRC(e4a2fa87) SHA1(ed58187dbbcf59358496a98ffd6c227a87d6c433) )
ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "cpu_8k.bin", 0x00000, 0x08000, CRC(4d482fb6) SHA1(57ad838b6d30b49dbd2d0ec425f33cfb15a67918) ) /* characters */
ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE )
ROM_LOAD( "vid_6k.bin", 0x00000, 0x08000, CRC(aba6db9e) SHA1(43eb6f4f92afb5fbc11adc7e2ab04878ab56cb17) ) /* sprites */
ROM_LOAD( "vid_6j.bin", 0x08000, 0x08000, CRC(ae1f2ed6) SHA1(6e6a33e665ba0884b7f57e9ad69d3f51e41d9e7b) ) /* sprites */
ROM_LOAD( "vid_6h.bin", 0x10000, 0x08000, CRC(46d9e7df) SHA1(a24e0bea310a03636af704a0ad3f1a9cc4aafe12) ) /* sprites */
ROM_LOAD( "vid_6g.bin", 0x18000, 0x08000, CRC(45839c9a) SHA1(eaee5767d8b0b62b991c089ef51b922e89850b79) ) /* sprites */
ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE )
ROM_LOAD( "vid_6p.bin", 0x00000, 0x08000, CRC(9eae5f8e) SHA1(ed83b608ca57b9bf69fa866d9b8f55d16b7cff63) )
ROM_LOAD( "vid_6o.bin", 0x08000, 0x08000, CRC(5a10a396) SHA1(12ebed3952ff35a2c275cb27c915f82183048cd4) )
ROM_LOAD( "vid_6n.bin", 0x10000, 0x08000, CRC(7b12cf3f) SHA1(6b9d8cad6e15317df01bab0591fab09199ca6d40) )
ROM_LOAD( "vid_6l.bin", 0x18000, 0x08000, CRC(3cea7eaa) SHA1(1dd194d5672dfe71c2b27d2d7b76f5a611cff76f) )
ROM_REGION( 0x20000, REGION_GFX4, ROMREGION_DISPOSE )
ROM_LOAD( "vid_6f.bin", 0x00000, 0x08000, CRC(9840edd8) SHA1(f19a1a1d932214037144c533ad07ed81256c34e7) )
ROM_LOAD( "vid_6e.bin", 0x08000, 0x08000, CRC(ff65e074) SHA1(513c1bad336ef5d871f15d6ba8943020f98d1f4a) )
ROM_LOAD( "vid_6c.bin", 0x10000, 0x08000, CRC(89868c85) SHA1(f21550f40e7a177e95c40f2726c651f85ca8edce) )
ROM_LOAD( "vid_6b.bin", 0x18000, 0x08000, CRC(35389a7b) SHA1(a887a89f9bbb5979bb589468d80efba1f243690b) )
ROM_REGION( 0x4000, REGION_SOUND1, 0 ) /* ADPCM samples */
ROM_LOAD( "cpu_1f.bin", 0x0000, 0x4000, CRC(3cc98c5a) SHA1(ea1035be939ed1a994f3273b33412c85dda0973e) )
ROM_END
ROM_START( rygar2 )
ROM_REGION( 0x18000, REGION_CPU1, 0 )
ROM_LOAD( "cpu_5p.bin", 0x00000, 0x08000, CRC(e79c054a) SHA1(1aaffa53d121d5c55899bf18e85c42333fe0df54) ) /* code */
ROM_LOAD( "cpu_5m.bin", 0x08000, 0x04000, CRC(7ac5191b) SHA1(305f39d974f906f9bc24e9fe2ca58e647925ab63) ) /* code */
ROM_LOAD( "cpu_5j.bin", 0x10000, 0x08000, CRC(ed76d606) SHA1(39c8a07e9a1f218ad088d00a2c9dfc993efafb6b) ) /* banked at f000-f7ff */
ROM_REGION( 0x10000, REGION_CPU2, 0 )
ROM_LOAD( "cpu_4h.bin", 0x0000, 0x2000, CRC(e4a2fa87) SHA1(ed58187dbbcf59358496a98ffd6c227a87d6c433) )
ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "cpu_8k.bin", 0x00000, 0x08000, CRC(4d482fb6) SHA1(57ad838b6d30b49dbd2d0ec425f33cfb15a67918) ) /* characters */
ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE )
ROM_LOAD( "vid_6k.bin", 0x00000, 0x08000, CRC(aba6db9e) SHA1(43eb6f4f92afb5fbc11adc7e2ab04878ab56cb17) ) /* sprites */
ROM_LOAD( "vid_6j.bin", 0x08000, 0x08000, CRC(ae1f2ed6) SHA1(6e6a33e665ba0884b7f57e9ad69d3f51e41d9e7b) ) /* sprites */
ROM_LOAD( "vid_6h.bin", 0x10000, 0x08000, CRC(46d9e7df) SHA1(a24e0bea310a03636af704a0ad3f1a9cc4aafe12) ) /* sprites */
ROM_LOAD( "vid_6g.bin", 0x18000, 0x08000, CRC(45839c9a) SHA1(eaee5767d8b0b62b991c089ef51b922e89850b79) ) /* sprites */
ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE )
ROM_LOAD( "vid_6p.bin", 0x00000, 0x08000, CRC(9eae5f8e) SHA1(ed83b608ca57b9bf69fa866d9b8f55d16b7cff63) )
ROM_LOAD( "vid_6o.bin", 0x08000, 0x08000, CRC(5a10a396) SHA1(12ebed3952ff35a2c275cb27c915f82183048cd4) )
ROM_LOAD( "vid_6n.bin", 0x10000, 0x08000, CRC(7b12cf3f) SHA1(6b9d8cad6e15317df01bab0591fab09199ca6d40) )
ROM_LOAD( "vid_6l.bin", 0x18000, 0x08000, CRC(3cea7eaa) SHA1(1dd194d5672dfe71c2b27d2d7b76f5a611cff76f) )
ROM_REGION( 0x20000, REGION_GFX4, ROMREGION_DISPOSE )
ROM_LOAD( "vid_6f.bin", 0x00000, 0x08000, CRC(9840edd8) SHA1(f19a1a1d932214037144c533ad07ed81256c34e7) )
ROM_LOAD( "vid_6e.bin", 0x08000, 0x08000, CRC(ff65e074) SHA1(513c1bad336ef5d871f15d6ba8943020f98d1f4a) )
ROM_LOAD( "vid_6c.bin", 0x10000, 0x08000, CRC(89868c85) SHA1(f21550f40e7a177e95c40f2726c651f85ca8edce) )
ROM_LOAD( "vid_6b.bin", 0x18000, 0x08000, CRC(35389a7b) SHA1(a887a89f9bbb5979bb589468d80efba1f243690b) )
ROM_REGION( 0x4000, REGION_SOUND1, 0 ) /* ADPCM samples */
ROM_LOAD( "cpu_1f.bin", 0x0000, 0x4000, CRC(3cc98c5a) SHA1(ea1035be939ed1a994f3273b33412c85dda0973e) )
ROM_END
ROM_START( rygarj )
ROM_REGION( 0x18000, REGION_CPU1, 0 )
ROM_LOAD( "cpuj_5p.bin", 0x00000, 0x08000, CRC(b39698ba) SHA1(01a5a12a71973ad117b0bbd763e470f89c439e45) ) /* code */
ROM_LOAD( "cpuj_5m.bin", 0x08000, 0x04000, CRC(3f180979) SHA1(c4c2e9f83b06b8677978800bfcc39f4ba3b344ab) ) /* code */
ROM_LOAD( "cpuj_5j.bin", 0x10000, 0x08000, CRC(69e44e8f) SHA1(e979760a3582e64788c043adf7e475f0e1b75033) ) /* banked at f000-f7ff */
ROM_REGION( 0x10000, REGION_CPU2, 0 )
ROM_LOAD( "cpu_4h.bin", 0x0000, 0x2000, CRC(e4a2fa87) SHA1(ed58187dbbcf59358496a98ffd6c227a87d6c433) )
ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "cpuj_8k.bin", 0x00000, 0x08000, CRC(45047707) SHA1(deb47f5ec4b22e55e0393d8108e4ffb67dd68e12) ) /* characters */
ROM_REGION( 0x20000, REGION_GFX2, ROMREGION_DISPOSE )
ROM_LOAD( "vid_6k.bin", 0x00000, 0x08000, CRC(aba6db9e) SHA1(43eb6f4f92afb5fbc11adc7e2ab04878ab56cb17) ) /* sprites */
ROM_LOAD( "vid_6j.bin", 0x08000, 0x08000, CRC(ae1f2ed6) SHA1(6e6a33e665ba0884b7f57e9ad69d3f51e41d9e7b) ) /* sprites */
ROM_LOAD( "vid_6h.bin", 0x10000, 0x08000, CRC(46d9e7df) SHA1(a24e0bea310a03636af704a0ad3f1a9cc4aafe12) ) /* sprites */
ROM_LOAD( "vid_6g.bin", 0x18000, 0x08000, CRC(45839c9a) SHA1(eaee5767d8b0b62b991c089ef51b922e89850b79) ) /* sprites */
ROM_REGION( 0x20000, REGION_GFX3, ROMREGION_DISPOSE )
ROM_LOAD( "vid_6p.bin", 0x00000, 0x08000, CRC(9eae5f8e) SHA1(ed83b608ca57b9bf69fa866d9b8f55d16b7cff63) )
ROM_LOAD( "vid_6o.bin", 0x08000, 0x08000, CRC(5a10a396) SHA1(12ebed3952ff35a2c275cb27c915f82183048cd4) )
ROM_LOAD( "vid_6n.bin", 0x10000, 0x08000, CRC(7b12cf3f) SHA1(6b9d8cad6e15317df01bab0591fab09199ca6d40) )
ROM_LOAD( "vid_6l.bin", 0x18000, 0x08000, CRC(3cea7eaa) SHA1(1dd194d5672dfe71c2b27d2d7b76f5a611cff76f) )
ROM_REGION( 0x20000, REGION_GFX4, ROMREGION_DISPOSE )
ROM_LOAD( "vid_6f.bin", 0x00000, 0x08000, CRC(9840edd8) SHA1(f19a1a1d932214037144c533ad07ed81256c34e7) )
ROM_LOAD( "vid_6e.bin", 0x08000, 0x08000, CRC(ff65e074) SHA1(513c1bad336ef5d871f15d6ba8943020f98d1f4a) )
ROM_LOAD( "vid_6c.bin", 0x10000, 0x08000, CRC(89868c85) SHA1(f21550f40e7a177e95c40f2726c651f85ca8edce) )
ROM_LOAD( "vid_6b.bin", 0x18000, 0x08000, CRC(35389a7b) SHA1(a887a89f9bbb5979bb589468d80efba1f243690b) )
ROM_REGION( 0x4000, REGION_SOUND1, 0 ) /* ADPCM samples */
ROM_LOAD( "cpu_1f.bin", 0x0000, 0x4000, CRC(3cc98c5a) SHA1(ea1035be939ed1a994f3273b33412c85dda0973e) )
ROM_END
ROM_START( silkworm )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
ROM_LOAD( "silkworm.4", 0x00000, 0x10000, CRC(a5277cce) SHA1(3886a3f3d1230d49d541f884c5b29938e13f98c8) ) /* c000-ffff is not used */
ROM_LOAD( "silkworm.5", 0x10000, 0x10000, CRC(a6c7bb51) SHA1(75f6625459ab65f2d47a282c1295d4db38f5fe51) ) /* banked at f000-f7ff */
ROM_REGION( 0x20000, REGION_CPU2, 0 )
ROM_LOAD( "silkworm.3", 0x0000, 0x8000, CRC(b589f587) SHA1(0be5e2bf3daf3e28d63fdc8c89bb6fe7c48c6c3f) )
ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "silkworm.2", 0x00000, 0x08000, CRC(e80a1cd9) SHA1(ef16feb1113acc7401f8951158b25f6f201196f2) ) /* characters */
ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE )
ROM_LOAD( "silkworm.6", 0x00000, 0x10000, CRC(1138d159) SHA1(3b938606d448c4effdfe414bbf495b50cc3bc1c1) ) /* sprites */
ROM_LOAD( "silkworm.7", 0x10000, 0x10000, CRC(d96214f7) SHA1(a5b2be3ae6a6eb8afef2c18c865a998fbf4adf93) ) /* sprites */
ROM_LOAD( "silkworm.8", 0x20000, 0x10000, CRC(0494b38e) SHA1(03255f153824056e430a0b8595103f3b58b1fd97) ) /* sprites */
ROM_LOAD( "silkworm.9", 0x30000, 0x10000, CRC(8ce3cdf5) SHA1(635248514c4e1e5aab7a2ed4d620a5b970d4a43a) ) /* sprites */
ROM_REGION( 0x40000, REGION_GFX3, ROMREGION_DISPOSE )
ROM_LOAD( "silkworm.10", 0x00000, 0x10000, CRC(8c7138bb) SHA1(0cfd69fa77d5b546f7dad80537d8d2497ae758bc) ) /* tiles #1 */
ROM_LOAD( "silkworm.11", 0x10000, 0x10000, CRC(6c03c476) SHA1(79ad800a2f4ba6d44ba5a31210cbd8566bb357b6) ) /* tiles #1 */
ROM_LOAD( "silkworm.12", 0x20000, 0x10000, CRC(bb0f568f) SHA1(b66c6d0407ed0b068c6bf07987f1b923d4a6e4f8) ) /* tiles #1 */
ROM_LOAD( "silkworm.13", 0x30000, 0x10000, CRC(773ad0a4) SHA1(f7576e1ac8c779b33d7ec393555fd097a34257fa) ) /* tiles #1 */
ROM_REGION( 0x40000, REGION_GFX4, ROMREGION_DISPOSE )
ROM_LOAD( "silkworm.14", 0x00000, 0x10000, CRC(409df64b) SHA1(cada970bf9cc8f6522e7a71e00fe873568852873) ) /* tiles #2 */
ROM_LOAD( "silkworm.15", 0x10000, 0x10000, CRC(6e4052c9) SHA1(e2e3d7221b75cb044449a25a076a93c3def1f11b) ) /* tiles #2 */
ROM_LOAD( "silkworm.16", 0x20000, 0x10000, CRC(9292ed63) SHA1(70aa46fcc187b8200c5d246870e2e2dc4b2985cb) ) /* tiles #2 */
ROM_LOAD( "silkworm.17", 0x30000, 0x10000, CRC(3fa4563d) SHA1(46e3cc41491d63efcdda43c84c7ac1385a1926d0) ) /* tiles #2 */
ROM_REGION( 0x8000, REGION_SOUND1, 0 ) /* ADPCM samples */
ROM_LOAD( "silkworm.1", 0x0000, 0x8000, CRC(5b553644) SHA1(5d39d2251094c17f7b732b4861401b3516fce9b1) )
ROM_END
ROM_START( silkwrm2 )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
ROM_LOAD( "r4", 0x00000, 0x10000, CRC(6df3df22) SHA1(9d6201c2df014bdb6877dfff936dddde1fe6fbd0) ) /* c000-ffff is not used */
ROM_LOAD( "silkworm.5", 0x10000, 0x10000, CRC(a6c7bb51) SHA1(75f6625459ab65f2d47a282c1295d4db38f5fe51) ) /* banked at f000-f7ff */
ROM_REGION( 0x20000, REGION_CPU2, 0 )
ROM_LOAD( "r3", 0x0000, 0x8000, CRC(b79848d0) SHA1(d8162ab847bd0768572454d9775b0e9ed92b9519) )
ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "silkworm.2", 0x00000, 0x08000, CRC(e80a1cd9) SHA1(ef16feb1113acc7401f8951158b25f6f201196f2) ) /* characters */
ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE )
ROM_LOAD( "silkworm.6", 0x00000, 0x10000, CRC(1138d159) SHA1(3b938606d448c4effdfe414bbf495b50cc3bc1c1) ) /* sprites */
ROM_LOAD( "silkworm.7", 0x10000, 0x10000, CRC(d96214f7) SHA1(a5b2be3ae6a6eb8afef2c18c865a998fbf4adf93) ) /* sprites */
ROM_LOAD( "silkworm.8", 0x20000, 0x10000, CRC(0494b38e) SHA1(03255f153824056e430a0b8595103f3b58b1fd97) ) /* sprites */
ROM_LOAD( "silkworm.9", 0x30000, 0x10000, CRC(8ce3cdf5) SHA1(635248514c4e1e5aab7a2ed4d620a5b970d4a43a) ) /* sprites */
ROM_REGION( 0x40000, REGION_GFX3, ROMREGION_DISPOSE )
ROM_LOAD( "silkworm.10", 0x00000, 0x10000, CRC(8c7138bb) SHA1(0cfd69fa77d5b546f7dad80537d8d2497ae758bc) ) /* tiles #1 */
ROM_LOAD( "silkworm.11", 0x10000, 0x10000, CRC(6c03c476) SHA1(79ad800a2f4ba6d44ba5a31210cbd8566bb357b6) ) /* tiles #1 */
ROM_LOAD( "silkworm.12", 0x20000, 0x10000, CRC(bb0f568f) SHA1(b66c6d0407ed0b068c6bf07987f1b923d4a6e4f8) ) /* tiles #1 */
ROM_LOAD( "silkworm.13", 0x30000, 0x10000, CRC(773ad0a4) SHA1(f7576e1ac8c779b33d7ec393555fd097a34257fa) ) /* tiles #1 */
ROM_REGION( 0x40000, REGION_GFX4, ROMREGION_DISPOSE )
ROM_LOAD( "silkworm.14", 0x00000, 0x10000, CRC(409df64b) SHA1(cada970bf9cc8f6522e7a71e00fe873568852873) ) /* tiles #2 */
ROM_LOAD( "silkworm.15", 0x10000, 0x10000, CRC(6e4052c9) SHA1(e2e3d7221b75cb044449a25a076a93c3def1f11b) ) /* tiles #2 */
ROM_LOAD( "silkworm.16", 0x20000, 0x10000, CRC(9292ed63) SHA1(70aa46fcc187b8200c5d246870e2e2dc4b2985cb) ) /* tiles #2 */
ROM_LOAD( "silkworm.17", 0x30000, 0x10000, CRC(3fa4563d) SHA1(46e3cc41491d63efcdda43c84c7ac1385a1926d0) ) /* tiles #2 */
ROM_REGION( 0x8000, REGION_SOUND1, 0 ) /* ADPCM samples */
ROM_LOAD( "silkworm.1", 0x0000, 0x8000, CRC(5b553644) SHA1(5d39d2251094c17f7b732b4861401b3516fce9b1) )
ROM_END
ROM_START( gemini )
ROM_REGION( 0x20000, REGION_CPU1, 0 )
ROM_LOAD( "gw04-5s.rom", 0x00000, 0x10000, CRC(ff9de855) SHA1(34167af8456a081f68b338f10d4319ce1e703fd4) ) /* c000-ffff is not used */
ROM_LOAD( "gw05-6s.rom", 0x10000, 0x10000, CRC(5a6947a9) SHA1(18b7aeb0f0e2c396bc759118dd7c45fd6070b804) ) /* banked at f000-f7ff */
ROM_REGION( 0x10000, REGION_CPU2, 0 )
ROM_LOAD( "gw03-5h.rom", 0x0000, 0x8000, CRC(9bc79596) SHA1(61de9ddd45140e8ed88173294bd26147e2abfa21) )
ROM_REGION( 0x08000, REGION_GFX1, ROMREGION_DISPOSE )
ROM_LOAD( "gw02-3h.rom", 0x00000, 0x08000, CRC(7acc8d35) SHA1(05056e9f077e7571b314390b508c72d56ad0f43b) ) /* characters */
ROM_REGION( 0x40000, REGION_GFX2, ROMREGION_DISPOSE )
ROM_LOAD( "gw06-1c.rom", 0x00000, 0x10000, CRC(4ea51631) SHA1(9aee0f1ba210ac953dc193cfc739322966b6de8a) ) /* sprites */
ROM_LOAD( "gw07-1d.rom", 0x10000, 0x10000, CRC(da42637e) SHA1(9885c52823279f26871092c77bdbe027df08268f) ) /* sprites */
ROM_LOAD( "gw08-1f.rom", 0x20000, 0x10000, CRC(0b4e8d70) SHA1(55069f3df1c8db83f306d46b8262fd23585e6013) ) /* sprites */
ROM_LOAD( "gw09-1h.rom", 0x30000, 0x10000, CRC(b65c5e4c) SHA1(699e1a9e72b8d94edae7382ba119fe5da113514d) ) /* sprites */
ROM_REGION( 0x40000, REGION_GFX3, ROMREGION_DISPOSE )
ROM_LOAD( "gw10-1n.rom", 0x00000, 0x10000, CRC(5e84cd4f) SHA1(e85320291027a16619c87fc2365448367bda454a) ) /* tiles #1 */
ROM_LOAD( "gw11-2na.rom", 0x10000, 0x10000, CRC(08b458e1) SHA1(b3426faa57dca51dc053db44fa4968425d8bf3ee) ) /* tiles #1 */
ROM_LOAD( "gw12-2nb.rom", 0x20000, 0x10000, CRC(229c9714) SHA1(f4f47d6b379c973c22f9ae7d7bec7041cdf3f737) ) /* tiles #1 */
ROM_LOAD( "gw13-3n.rom", 0x30000, 0x10000, CRC(c5dfaf47) SHA1(c3202ca8c7f3c5c7dc9acdc09c1c894e168ef9fe) ) /* tiles #1 */
ROM_REGION( 0x40000, REGION_GFX4, ROMREGION_DISPOSE )
ROM_LOAD( "gw14-1r.rom", 0x00000, 0x10000, CRC(9c10e5b5) SHA1(a81399b85d8f3ddca26883ec3535cb9044c35ada) ) /* tiles #2 */
ROM_LOAD( "gw15-2ra.rom", 0x10000, 0x10000, CRC(4cd18cfa) SHA1(c197a098a7c1e5220aad039383a40702fe7c4f21) ) /* tiles #2 */
ROM_LOAD( "gw16-2rb.rom", 0x20000, 0x10000, CRC(f911c7be) SHA1(3f49f6c4734f2b644d93c4a54249aae6ff080e1d) ) /* tiles #2 */
ROM_LOAD( "gw17-3r.rom", 0x30000, 0x10000, CRC(79a9ce25) SHA1(74e3917b8e7a920ceb2135d7ef8fb2f2c5176b21) ) /* tiles #2 */
ROM_REGION( 0x8000, REGION_SOUND1, 0 ) /* ADPCM samples */
ROM_LOAD( "gw01-6a.rom", 0x0000, 0x8000, CRC(d78afa05) SHA1(b02a739b045f5cddf943ce59226ef234463eeebe) )
ROM_END
/*
video_type is used to distinguish Rygar, Silkworm and Gemini Wing.
This is needed because there is a difference in the tile and sprite indexing.
*/
DRIVER_INIT( rygar ) { tecmo_video_type = 0; }
DRIVER_INIT( silkworm ) { tecmo_video_type = 1; }
DRIVER_INIT( gemini ) { tecmo_video_type = 2; }
GAME( 1986, rygar, 0, rygar, rygar, rygar, ROT0, "Tecmo", "Rygar (US set 1)", 0 )
GAME( 1986, rygar2, rygar, rygar, rygar, rygar, ROT0, "Tecmo", "Rygar (US set 2)", 0 )
GAME( 1986, rygarj, rygar, rygar, rygar, rygar, ROT0, "Tecmo", "Argus no Senshi (Japan)", 0 )
GAME( 1987, gemini, 0, gemini, gemini, gemini, ROT90, "Tecmo", "Gemini Wing", 0 )
GAME( 1988, silkworm, 0, silkworm, silkworm, silkworm, ROT0, "Tecmo", "Silk Worm (set 1)", 0 )
GAME( 1988, silkwrm2, silkworm, silkworm, silkworm, silkworm, ROT0, "Tecmo", "Silk Worm (set 2)", 0 )
| 44.199297 | 135 | 0.74081 |
16af30e2cbcb0e3d058f85ef175c305db9af5573 | 8,680 | c | C | src/crypto.c | xingfeng2510/pandora-c-sdk | c4db84793fc8934d255b9d0bd69443ffeaa744d5 | [
"MIT"
] | 3 | 2018-03-22T07:19:30.000Z | 2018-07-26T13:56:05.000Z | src/crypto.c | xingfeng2510/pandora-c-sdk | c4db84793fc8934d255b9d0bd69443ffeaa744d5 | [
"MIT"
] | 4 | 2018-07-25T04:11:45.000Z | 2020-03-27T15:58:31.000Z | src/crypto.c | xingfeng2510/pandora-c-sdk | c4db84793fc8934d255b9d0bd69443ffeaa744d5 | [
"MIT"
] | 3 | 2018-07-19T02:18:59.000Z | 2021-05-11T07:08:56.000Z | #include <string.h>
#include "crypto.h"
/* a bit faster & bigger, if defined */
#define UNROLL_LOOPS
/* NIST's proposed modification to SHA */
#define USE_MODIFIED_SHA
/* SHA f()-functions */
#define f1(x,y,z) ((x & y) | (~x & z))
#define f2(x,y,z) (x ^ y ^ z)
#define f3(x,y,z) ((x & y) | (x & z) | (y & z))
#define f4(x,y,z) (x ^ y ^ z)
/* SHA constants */
#define CONST1 0x5a827999L
#define CONST2 0x6ed9eba1L
#define CONST3 0x8f1bbcdcL
#define CONST4 0xca62c1d6L
/* 32-bit rotate */
#define ROT32(x,n) ((x << n) | (x >> (32 - n)))
#define FUNC(n,i) \
temp = ROT32(A,5) + f##n(B,C,D) + E + W[i] + CONST##n; \
E = D; D = C; C = ROT32(B,30); B = A; A = temp
/** size of the SHA1 DIGEST */
#define SHA1_DIGESTSIZE 20
#define SHA_BLOCKSIZE 64
typedef struct sha1_ctx_t sha1_ctx_t;
/**
* SHA1 context structure
*/
struct sha1_ctx_t {
/** message digest */
unsigned int digest[5];
/** 64-bit bit counts */
unsigned int count_lo, count_hi;
/** SHA data buffer */
unsigned int data[16];
/** unprocessed amount in data */
int local;
};
/* initialize the SHA digest */
void sha1_init(sha1_ctx_t *sha_info)
{
sha_info->digest[0] = 0x67452301L;
sha_info->digest[1] = 0xefcdab89L;
sha_info->digest[2] = 0x98badcfeL;
sha_info->digest[3] = 0x10325476L;
sha_info->digest[4] = 0xc3d2e1f0L;
sha_info->count_lo = 0L;
sha_info->count_hi = 0L;
sha_info->local = 0;
}
union endianTest {
long Long;
char Char[sizeof(long)];
};
static char isLittleEndian(void)
{
static union endianTest u;
u.Long = 1;
return (u.Char[0] == 1);
}
static void maybe_byte_reverse(unsigned int *buffer, int count)
{
int i;
unsigned char ct[4], *cp;
if (isLittleEndian()) { /* do the swap only if it is little endian */
count /= sizeof(unsigned int);
cp = (unsigned char *) buffer;
for (i = 0; i < count; ++i) {
ct[0] = cp[0];
ct[1] = cp[1];
ct[2] = cp[2];
ct[3] = cp[3];
cp[0] = ct[3];
cp[1] = ct[2];
cp[2] = ct[1];
cp[3] = ct[0];
cp += sizeof(unsigned int);
}
}
}
/* do SHA transformation */
static void sha_transform(sha1_ctx_t *sha_info)
{
int i;
unsigned int temp, A, B, C, D, E, W[80];
for (i = 0; i < 16; ++i) {
W[i] = sha_info->data[i];
}
for (i = 16; i < 80; ++i) {
W[i] = W[i-3] ^ W[i-8] ^ W[i-14] ^ W[i-16];
#ifdef USE_MODIFIED_SHA
W[i] = ROT32(W[i], 1);
#endif /* USE_MODIFIED_SHA */
}
A = sha_info->digest[0];
B = sha_info->digest[1];
C = sha_info->digest[2];
D = sha_info->digest[3];
E = sha_info->digest[4];
#ifdef UNROLL_LOOPS
FUNC(1, 0); FUNC(1, 1); FUNC(1, 2); FUNC(1, 3); FUNC(1, 4);
FUNC(1, 5); FUNC(1, 6); FUNC(1, 7); FUNC(1, 8); FUNC(1, 9);
FUNC(1,10); FUNC(1,11); FUNC(1,12); FUNC(1,13); FUNC(1,14);
FUNC(1,15); FUNC(1,16); FUNC(1,17); FUNC(1,18); FUNC(1,19);
FUNC(2,20); FUNC(2,21); FUNC(2,22); FUNC(2,23); FUNC(2,24);
FUNC(2,25); FUNC(2,26); FUNC(2,27); FUNC(2,28); FUNC(2,29);
FUNC(2,30); FUNC(2,31); FUNC(2,32); FUNC(2,33); FUNC(2,34);
FUNC(2,35); FUNC(2,36); FUNC(2,37); FUNC(2,38); FUNC(2,39);
FUNC(3,40); FUNC(3,41); FUNC(3,42); FUNC(3,43); FUNC(3,44);
FUNC(3,45); FUNC(3,46); FUNC(3,47); FUNC(3,48); FUNC(3,49);
FUNC(3,50); FUNC(3,51); FUNC(3,52); FUNC(3,53); FUNC(3,54);
FUNC(3,55); FUNC(3,56); FUNC(3,57); FUNC(3,58); FUNC(3,59);
FUNC(4,60); FUNC(4,61); FUNC(4,62); FUNC(4,63); FUNC(4,64);
FUNC(4,65); FUNC(4,66); FUNC(4,67); FUNC(4,68); FUNC(4,69);
FUNC(4,70); FUNC(4,71); FUNC(4,72); FUNC(4,73); FUNC(4,74);
FUNC(4,75); FUNC(4,76); FUNC(4,77); FUNC(4,78); FUNC(4,79);
#else /* !UNROLL_LOOPS */
for (i = 0; i < 20; ++i) {
FUNC(1,i);
}
for (i = 20; i < 40; ++i) {
FUNC(2,i);
}
for (i = 40; i < 60; ++i) {
FUNC(3,i);
}
for (i = 60; i < 80; ++i) {
FUNC(4,i);
}
#endif /* !UNROLL_LOOPS */
sha_info->digest[0] += A;
sha_info->digest[1] += B;
sha_info->digest[2] += C;
sha_info->digest[3] += D;
sha_info->digest[4] += E;
}
/* update the SHA digest */
void sha1_update(sha1_ctx_t *sha_info, const char *buffer, unsigned int count)
{
unsigned int i;
if ((sha_info->count_lo + ((unsigned int) count << 3)) < sha_info->count_lo) {
++sha_info->count_hi;
}
sha_info->count_lo += (unsigned int) count << 3;
sha_info->count_hi += (unsigned int) count >> 29;
if (sha_info->local) {
i = SHA_BLOCKSIZE - sha_info->local;
if (i > count) {
i = count;
}
memcpy(((unsigned char *) sha_info->data) + sha_info->local, buffer, i);
count -= i;
buffer += i;
sha_info->local += i;
if (sha_info->local == SHA_BLOCKSIZE) {
maybe_byte_reverse(sha_info->data, SHA_BLOCKSIZE);
sha_transform(sha_info);
}
else {
return;
}
}
while (count >= SHA_BLOCKSIZE) {
memcpy(sha_info->data, buffer, SHA_BLOCKSIZE);
buffer += SHA_BLOCKSIZE;
count -= SHA_BLOCKSIZE;
maybe_byte_reverse(sha_info->data, SHA_BLOCKSIZE);
sha_transform(sha_info);
}
memcpy(sha_info->data, buffer, count);
sha_info->local = count;
}
/* finish computing the SHA digest */
void sha1_final(unsigned char digest[SHA1_DIGESTSIZE], sha1_ctx_t *sha_info)
{
int count, i, j;
unsigned int lo_bit_count, hi_bit_count, k;
lo_bit_count = sha_info->count_lo;
hi_bit_count = sha_info->count_hi;
count = (int) ((lo_bit_count >> 3) & 0x3f);
((unsigned char *) sha_info->data)[count++] = 0x80;
if (count > SHA_BLOCKSIZE - 8) {
memset(((unsigned char *) sha_info->data) + count, 0, SHA_BLOCKSIZE - count);
maybe_byte_reverse(sha_info->data, SHA_BLOCKSIZE);
sha_transform(sha_info);
memset((unsigned char *) sha_info->data, 0, SHA_BLOCKSIZE - 8);
}
else {
memset(((unsigned char *) sha_info->data) + count, 0,
SHA_BLOCKSIZE - 8 - count);
}
maybe_byte_reverse(sha_info->data, SHA_BLOCKSIZE);
sha_info->data[14] = hi_bit_count;
sha_info->data[15] = lo_bit_count;
sha_transform(sha_info);
for (i = 0, j = 0; j < SHA1_DIGESTSIZE; i++) {
k = sha_info->digest[i];
digest[j++] = (unsigned char) ((k >> 24) & 0xff);
digest[j++] = (unsigned char) ((k >> 16) & 0xff);
digest[j++] = (unsigned char) ((k >> 8) & 0xff);
digest[j++] = (unsigned char) (k & 0xff);
}
}
void hmac_sha1(unsigned char hmac[20], const unsigned char *key, int key_len,
const unsigned char *message, int message_len)
{
unsigned char kopad[64], kipad[64];
int i;
unsigned char digest[SHA1_DIGESTSIZE];
sha1_ctx_t context;
if (key_len > 64) {
key_len = 64;
}
for (i = 0; i < key_len; i++) {
kopad[i] = key[i] ^ 0x5c;
kipad[i] = key[i] ^ 0x36;
}
for ( ; i < 64; i++) {
kopad[i] = 0 ^ 0x5c;
kipad[i] = 0 ^ 0x36;
}
sha1_init(&context);
sha1_update(&context, (const char *)kipad, 64);
sha1_update(&context, (const char *)message, (unsigned int)message_len);
sha1_final(digest, &context);
sha1_init(&context);
sha1_update(&context, (const char *)kopad, 64);
sha1_update(&context, (const char *)digest, 20);
sha1_final(hmac, &context);
}
int base64_encode(const unsigned char *in, int inLen, char *out)
{
static const char *ENC = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
char *orig_out = out;
while (inLen) {
// first 6 bits of char 1
*out++ = ENC[*in >> 2];
if (!--inLen) {
// last 2 bits of char 1, 4 bits of 0
*out++ = ENC[(*in & 0x3) << 4];
*out++ = '=';
*out++ = '=';
break;
}
// last 2 bits of char 1, first 4 bits of char 2
*out++ = ENC[((*in & 0x3) << 4) | (*(in + 1) >> 4)];
in++;
if (!--inLen) {
// last 4 bits of char 2, 2 bits of 0
*out++ = ENC[(*in & 0xF) << 2];
*out++ = '=';
break;
}
// last 4 bits of char 2, first 2 bits of char 3
*out++ = ENC[((*in & 0xF) << 2) | (*(in + 1) >> 6)];
in++;
// last 6 bits of char 3
*out++ = ENC[*in & 0x3F];
in++, inLen--;
}
*out = '\0';
return (out - orig_out);
} | 28.933333 | 96 | 0.532488 |
55513055d4386075fab747d83dac1b4a8134bee1 | 616 | h | C | XcodeHeaders/IDEKit/AAVITunesConnectProxy.h | alloy/AxeMode | 323641da993b3f5990740f29021e081a184543c7 | [
"MIT"
] | 69 | 2015-02-18T13:32:26.000Z | 2021-03-21T19:07:21.000Z | XcodeHeaders/IDEKit/AAVITunesConnectProxy.h | alloy/AxeMode | 323641da993b3f5990740f29021e081a184543c7 | [
"MIT"
] | 13 | 2015-02-18T13:22:45.000Z | 2015-07-17T21:42:42.000Z | XcodeHeaders/IDEKit/AAVITunesConnectProxy.h | alloy/AxeMode | 323641da993b3f5990740f29021e081a184543c7 | [
"MIT"
] | 3 | 2015-03-16T17:49:27.000Z | 2015-06-16T08:54:26.000Z | /*
* Generated by class-dump 3.4 (64 bit).
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2012 by Steve Nygard.
*/
#import "NSObject.h"
@interface AAVITunesConnectProxy : NSObject
{
}
+ (id)applicationsWithContentHostedInAppPurchasesUsingSession:(id)arg1;
+ (id)service;
+ (id)uploadApplicationArchiveAtPath:(id)arg1 username:(id)arg2 password:(id)arg3 willBeginCallback:(id)arg4 updatePercentageCallback:(void)arg5 updateMessageCallback:(id)arg6 shouldContinueCallback:(void)arg7 didCompleteCallback:(id)arg8;
+ (id)validateApplicationArchiveAtPath:(id)arg1 usingSession:(id)arg2;
@end
| 30.8 | 239 | 0.769481 |
5c3294f1f0aaa5d102d2a58727361756005f01aa | 900 | h | C | wznmcmbd/WznmGen/SqkWznmGen.h | mpsitech/wznm-WhizniumSBE | 4911d561b28392d485c46e98fb915168d82b3824 | [
"MIT"
] | 3 | 2020-09-20T16:24:48.000Z | 2021-12-01T19:44:51.000Z | wznmcmbd/WznmGen/SqkWznmGen.h | mpsitech/wznm-WhizniumSBE | 4911d561b28392d485c46e98fb915168d82b3824 | [
"MIT"
] | null | null | null | wznmcmbd/WznmGen/SqkWznmGen.h | mpsitech/wznm-WhizniumSBE | 4911d561b28392d485c46e98fb915168d82b3824 | [
"MIT"
] | null | null | null | /**
* \file SqkWznmGen.h
* squawk generation for operation pack WznmGen (declarations)
* \copyright (C) 2016-2020 MPSI Technologies GmbH
* \author Alexander Wirthmueller (auto-generation)
* \date created: 28 Nov 2020
*/
// IP header --- ABOVE
#ifndef SQKWZNMGEN_H
#define SQKWZNMGEN_H
#include "WznmGen_blks.h"
/**
* SqkWznmGen
*/
namespace SqkWznmGen {
std::string getSquawkBase(DbsWznm* dbswznm, DpchInvWznmGenBase* dpchinv);
std::string getSquawkCal(DbsWznm* dbswznm, DpchInvWznmGenCal* dpchinv);
std::string getSquawkChk(DbsWznm* dbswznm, DpchInvWznmGenChk* dpchinv);
std::string getSquawkDetui(DbsWznm* dbswznm, DpchInvWznmGenDetui* dpchinv);
std::string getSquawkJob(DbsWznm* dbswznm, DpchInvWznmGenJob* dpchinv);
std::string getSquawkQtb(DbsWznm* dbswznm, DpchInvWznmGenQtb* dpchinv);
std::string getSquawkSysvec(DbsWznm* dbswznm, DpchInvWznmGenSysvec* dpchinv);
};
#endif
| 31.034483 | 78 | 0.77 |
384d284489a570001e5f59d58461c1c475f22970 | 3,103 | h | C | Applications/TVDiagnostics/DADeviceLocal.h | lechium/tvOS124Headers | 11d1b56dd4c0ffd88b9eac43f87a5fd6f7228475 | [
"MIT"
] | 4 | 2019-08-27T18:03:47.000Z | 2021-09-18T06:29:00.000Z | Applications/TVDiagnostics/DADeviceLocal.h | lechium/tvOS124Headers | 11d1b56dd4c0ffd88b9eac43f87a5fd6f7228475 | [
"MIT"
] | null | null | null | Applications/TVDiagnostics/DADeviceLocal.h | lechium/tvOS124Headers | 11d1b56dd4c0ffd88b9eac43f87a5fd6f7228475 | [
"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 "NSObject.h"
#import "DADevice.h"
#import "DADeviceConnectionDelegate.h"
#import "DATestQueueDelegate.h"
#import "DKAssetResponder.h"
@class DADeviceState, DATestQueue, DKDiagnosticManager, DKReportManager, NSString;
@interface DADeviceLocal : NSObject <DKAssetResponder, DADeviceConnectionDelegate, DATestQueueDelegate, DADevice>
{
_Bool _testsSuspended; // 8 = 0x8
NSString *_bundleIdentifier; // 16 = 0x10
id <DADeviceConnection> _connection; // 24 = 0x18
DKDiagnosticManager *_diagnosticsManager; // 32 = 0x20
DKReportManager *_reportManager; // 40 = 0x28
DATestQueue *_testQueue; // 48 = 0x30
DADeviceState *_state; // 56 = 0x38
}
@property(retain, nonatomic) DADeviceState *state; // @synthesize state=_state;
@property(retain, nonatomic) DATestQueue *testQueue; // @synthesize testQueue=_testQueue;
@property(nonatomic, getter=areTestsSuspended) _Bool testsSuspended; // @synthesize testsSuspended=_testsSuspended;
@property(retain, nonatomic) DKReportManager *reportManager; // @synthesize reportManager=_reportManager;
@property(retain, nonatomic) DKDiagnosticManager *diagnosticsManager; // @synthesize diagnosticsManager=_diagnosticsManager;
@property(retain, nonatomic) id <DADeviceConnection> connection; // @synthesize connection=_connection;
- (void).cxx_destruct; // IMP=0x000000010000e2b8
@property(retain, nonatomic) NSString *bundleIdentifier; // @synthesize bundleIdentifier=_bundleIdentifier;
- (id)_IMEI; // IMP=0x000000010000e1cc
- (id)_userAssignedName; // IMP=0x000000010000e1ac
- (id)_marketingName; // IMP=0x000000010000e18c
- (id)_productClass; // IMP=0x000000010000e16c
- (id)_serialNumber; // IMP=0x000000010000e14c
- (id)_deviceMaskName; // IMP=0x000000010000e0b4
- (id)_deviceImageName; // IMP=0x000000010000dfc8
- (id)_deviceAttributes; // IMP=0x000000010000dd54
- (void)getAsset:(id)arg1 completion:(CDUnknownBlockType)arg2; // IMP=0x000000010000db3c
- (void)deviceConnection:(id)arg1 didRecieveCommand:(id)arg2; // IMP=0x000000010000dac4
- (void)profileWithCommand:(id)arg1; // IMP=0x000000010000d05c
- (void)cancelTestWithCommand:(id)arg1; // IMP=0x000000010000cfa0
- (void)startTestWithCommand:(id)arg1; // IMP=0x000000010000cdbc
- (void)executeTestWithTestAttributes:(id)arg1 parameters:(id)arg2 completion:(CDUnknownBlockType)arg3; // IMP=0x000000010000cce4
- (void)end; // IMP=0x000000010000cb4c
- (void)resumeTests; // IMP=0x000000010000ca6c
- (void)suspendTests; // IMP=0x000000010000c95c
- (void)idle; // IMP=0x000000010000c91c
- (void)start; // IMP=0x000000010000c8dc
- (void)connect; // IMP=0x000000010000c8d8
@property(readonly, nonatomic, getter=isLocal) _Bool local;
@property(readonly, copy) NSString *description;
- (_Bool)isEqual:(id)arg1; // IMP=0x000000010000c6f8
@property(readonly) unsigned long long hash;
- (id)init; // IMP=0x000000010000c3f8
// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly) Class superclass;
@end
| 46.313433 | 129 | 0.773767 |
e1f18962a168a55245035a891e499f783ae1fee2 | 1,486 | h | C | Cores/Mednafen/mednafen-1.21/src/general.h | werminghoff/Provenance | de61b4a64a3eb8e2774e0a8ed53488c6c7aa6cb2 | [
"BSD-3-Clause"
] | 2 | 2021-02-04T22:41:57.000Z | 2021-03-27T07:28:02.000Z | Cores/Mednafen/mednafen-1.21/src/general.h | werminghoff/Provenance | de61b4a64a3eb8e2774e0a8ed53488c6c7aa6cb2 | [
"BSD-3-Clause"
] | null | null | null | Cores/Mednafen/mednafen-1.21/src/general.h | werminghoff/Provenance | de61b4a64a3eb8e2774e0a8ed53488c6c7aa6cb2 | [
"BSD-3-Clause"
] | 3 | 2019-02-19T12:55:12.000Z | 2019-05-30T08:33:23.000Z | #ifndef __MDFN_GENERAL_H
#define __MDFN_GENERAL_H
#if 0
class FilePathMaker
{
void SetBaseDirectory(const char* path);
std::string GetBaseDirectory(void);
void BuildPath(unsigned type, int id1, const char* cd1);
static void GetFileBase(
};
#endif
void MDFN_SetBaseDirectory(const std::string& dir);
std::string MDFN_GetBaseDirectory(void);
void GetFileBase(const char *f);
// File-inclusion for-read-only path, for PSF and CUE/TOC sheet usage.
// throws exception if not safe(and/or on other error).
void MDFN_CheckFIROPSafe(const std::string &path);
std::string MDFN_MakeFName(int type, int id1, const char *cd1);
typedef enum
{
MDFNMKF_STATE = 0,
MDFNMKF_SNAP,
MDFNMKF_SAV,
MDFNMKF_SAVBACK,
MDFNMKF_CHEAT,
MDFNMKF_PALETTE,
MDFNMKF_IPS,
MDFNMKF_MOVIE,
MDFNMKF_AUX,
MDFNMKF_SNAP_DAT,
MDFNMKF_CHEAT_TMP,
MDFNMKF_FIRMWARE,
MDFNMKF_PGCONFIG
} MakeFName_Type;
std::string MDFN_MakeFName(MakeFName_Type type, int id1, const char *cd1);
INLINE std::string MDFN_MakeFName(MakeFName_Type type, int id1, const std::string& cd1) { return MDFN_MakeFName(type, id1, cd1.c_str()); }
//
// Note: It IS permissible for an output to point to the same string as the file_path reference.
//
void MDFN_GetFilePathComponents(const std::string &file_path, std::string *dir_path_out, std::string *file_base_out = NULL, std::string *file_ext_out = NULL);
std::string MDFN_EvalFIP(const std::string &dir_path, const std::string &rel_path, bool skip_safety_check = false);
#endif
| 26.070175 | 158 | 0.770525 |
33f64478bed4d111504073512046392cea9dd22e | 2,004 | h | C | usr/libexec/locationd/CLFallMslSink.h | lechium/iOS1351Headers | 6bed3dada5ffc20366b27f7f2300a24a48a6284e | [
"MIT"
] | 2 | 2021-11-02T09:23:27.000Z | 2022-03-28T08:21:57.000Z | usr/libexec/locationd/CLFallMslSink.h | lechium/iOS1351Headers | 6bed3dada5ffc20366b27f7f2300a24a48a6284e | [
"MIT"
] | null | null | null | usr/libexec/locationd/CLFallMslSink.h | lechium/iOS1351Headers | 6bed3dada5ffc20366b27f7f2300a24a48a6284e | [
"MIT"
] | 1 | 2022-03-28T08:21:59.000Z | 2022-03-28T08:21:59.000Z | //
// 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>
@interface CLFallMslSink : NSObject
{
struct list<CMMsl::Item *, std::__1::allocator<CMMsl::Item *>> fOrderedSample; // 8 = 0x8
struct ImpactEvent fImpactEvent; // 32 = 0x20
_Bool fIncludeDerivedFeatures; // 230 = 0xe6
}
- (id).cxx_construct; // IMP=0x0000000100696d78
- (void).cxx_destruct; // IMP=0x0000000100696d70
- (void)cleanUp; // IMP=0x0000000100696d60
- (void)cleanUpIncludingDerivedFeatures:(_Bool)arg1; // IMP=0x0000000100696c80
- (void)sendData:(id)arg1 completion:(CDUnknownBlockType)arg2; // IMP=0x00000001006966c0
- (void)logSuppressionFeartures:(const FalsePositiveSuppressionFeatures_8c0e6519 *)arg1; // IMP=0x0000000100696510
- (void)logFallStats:(const struct ImpactEvent *)arg1; // IMP=0x0000000100695f78
- (void)logFallState:(const struct ImpactEvent *)arg1; // IMP=0x0000000100695e08
- (void)logWristState:(const WristState_948f25b1 *)arg1; // IMP=0x0000000100695cdc
- (void)logHeartRate:(const struct CLCatherineData *)arg1; // IMP=0x0000000100695b48
- (void)logPressure:(const Pressure_bceab11c *)arg1; // IMP=0x0000000100695a8c
- (void)logFilteredPressure:(const FilteredPressure_54a5c05a *)arg1; // IMP=0x00000001006959d0
- (void)logDeviceMotion:(const struct ImpactData *)arg1; // IMP=0x00000001006958b0
- (void)logGyro200:(const struct ImpactData *)arg1; // IMP=0x00000001006957bc
- (void)logGyro100:(id)arg1 startTime:(double)arg2 timestamp:(unsigned long long)arg3; // IMP=0x000000010069560c
- (void)logAccel800:(const struct ImpactData *)arg1; // IMP=0x0000000100695518
- (void)logAccel100:(id)arg1 startTime:(double)arg2 timestamp:(unsigned long long)arg3; // IMP=0x0000000100695368
- (void)dealloc; // IMP=0x000000010069531c
- (id)initInUniverse:(id)arg1; // IMP=0x00000001006952e0
- (void)_insertSample:(struct Item *)arg1; // IMP=0x00000001006950b0
@end
| 51.384615 | 120 | 0.762974 |
98ab1ac1bcd8de261b5f37297bc0035ffd557a09 | 6,665 | c | C | modules/Geometry/src/BezierCurve.c | akb825/DeepSea | fff790d0a472cf2f9f89de653e0b4470ce605d24 | [
"Apache-2.0"
] | 5 | 2018-11-17T23:13:22.000Z | 2021-09-30T13:37:04.000Z | modules/Geometry/src/BezierCurve.c | akb825/DeepSea | fff790d0a472cf2f9f89de653e0b4470ce605d24 | [
"Apache-2.0"
] | null | null | null | modules/Geometry/src/BezierCurve.c | akb825/DeepSea | fff790d0a472cf2f9f89de653e0b4470ce605d24 | [
"Apache-2.0"
] | 2 | 2019-09-23T12:23:35.000Z | 2020-04-07T05:31:06.000Z | /*
* Copyright 2018 Aaron Barany
*
* 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 <DeepSea/Geometry/BezierCurve.h>
#include <DeepSea/Core/Assert.h>
#include <DeepSea/Core/Error.h>
#include <DeepSea/Math/Matrix44.h>
#include <DeepSea/Math/Vector4.h>
// Left and right subdivision matrices from http://algorithmist.net/docs/subdivision.pdf
static const dsMatrix44d leftBezierMatrix =
{{
{1.0, 0.5, 0.25, 0.125},
{0.0, 0.5, 0.5 , 0.375},
{0.0, 0.0, 0.25, 0.375},
{0.0, 0.0, 0.0 , 0.125}
}};
static const dsMatrix44d rightBezierMatrix =
{{
{0.125, 0.0 , 0.0, 0.0},
{0.375, 0.25, 0.0, 0.0},
{0.375, 0.5 , 0.5, 0.0},
{0.125, 0.25, 0.5, 1.0}
}};
static const dsVector4d bezierMid = {{0.125, 0.375, 0.375, 0.125}};
static bool isBezierStraight(const dsBezierCurve* curve, double chordalTolerance)
{
// Check to see if the midpoint is within the chordal tolerance.
double dist2 = 0.0;
for (uint32_t i = 0; i < curve->axisCount; ++i)
{
double midCurve = dsVector4_dot(curve->controlPoints[i], bezierMid);
double midLine = (curve->controlPoints[i].x + curve->controlPoints[i].w)*0.5;
double diff = midCurve - midLine;
dist2 += dsPow2(diff);
}
return dist2 <= dsPow2(chordalTolerance);
}
static bool tessellateRec(const dsBezierCurve* curve, double chordalTolerance,
uint32_t maxRecursions, dsCurveSampleFunction sampleFunc, void* userData, double t,
uint32_t level)
{
// Left side.
double middlePoint[3];
dsBezierCurve nextCurve;
nextCurve.axisCount = curve->axisCount;
for (uint32_t i = 0; i < curve->axisCount; ++i)
{
dsMatrix44_transform(nextCurve.controlPoints[i], leftBezierMatrix, curve->controlPoints[i]);
middlePoint[i] = nextCurve.controlPoints[i].w;
}
if (level < maxRecursions && !isBezierStraight(&nextCurve, chordalTolerance))
{
if (!tessellateRec(&nextCurve, chordalTolerance, maxRecursions, sampleFunc, userData, t,
level + 1))
{
return false;
}
}
// The middle point is guaranteed to be on the curve.
double middleT = t + 1.0/(double)(1ULL << level);
if (!sampleFunc(userData, middlePoint, curve->axisCount, middleT))
return false;
// Right side.
for (uint32_t i = 0; i < curve->axisCount; ++i)
{
dsMatrix44_transform(nextCurve.controlPoints[i], rightBezierMatrix,
curve->controlPoints[i]);
}
if (level < maxRecursions && !isBezierStraight(&nextCurve, chordalTolerance))
{
if (!tessellateRec(&nextCurve, chordalTolerance, maxRecursions, sampleFunc, userData, middleT,
level + 1))
{
return false;
}
}
return true;
}
bool dsBezierCurve_initialize(dsBezierCurve* curve, uint32_t axisCount,
const void* p0, const void* p1, const void* p2, const void* p3)
{
if (!curve || axisCount < 2 || axisCount > 3 || !p0 || !p1 || !p2 || !p3)
{
errno = EINVAL;
return false;
}
curve->axisCount = axisCount;
for (uint32_t i = 0; i < axisCount; ++i)
{
curve->controlPoints[i].x = ((const double*)p0)[i];
curve->controlPoints[i].y = ((const double*)p1)[i];
curve->controlPoints[i].z = ((const double*)p2)[i];
curve->controlPoints[i].w = ((const double*)p3)[i];
}
return true;
}
bool dsBezierCurve_initializeQuadratic(dsBezierCurve* curve, uint32_t axisCount,
const void* p0, const void* p1, const void* p2)
{
if (!curve || axisCount < 2 || axisCount > 3 || !p0 || !p1 || !p2)
{
errno = EINVAL;
return false;
}
// https://stackoverflow.com/questions/3162645/convert-a-quadratic-bezier-to-a-cubic
curve->axisCount = axisCount;
const float controlT = 2.0f/3.0f;
for (uint32_t i = 0; i < axisCount; ++i)
{
double start = ((const double*)p0)[i];
double control = ((const double*)p1)[i];
double end = ((const double*)p2)[i];
curve->controlPoints[i].x = start;
curve->controlPoints[i].y = start + (control - start)*controlT;
curve->controlPoints[i].z = end + (control - end)*controlT;
curve->controlPoints[i].w = end;
}
return true;
}
bool dsBezierCurve_evaluate(void* outPoint, const dsBezierCurve* curve, double t)
{
if (!outPoint || !curve)
{
errno = EINVAL;
return false;
}
if (t < 0.0 || t > 1.0)
{
errno = ERANGE;
return false;
}
DS_ASSERT(curve->axisCount >= 2 && curve->axisCount <= 3);
double invT = 1.0 - t;
for (uint32_t i = 0; i < curve->axisCount; ++i)
{
((double*)outPoint)[i] =
dsPow3(invT)*curve->controlPoints[i].x +
3.0*dsPow2(invT)*t*curve->controlPoints[i].y +
3.0*dsPow2(t)*invT*curve->controlPoints[i].z +
dsPow3(t)*curve->controlPoints[i].w;
}
return true;
}
bool dsBezierCurve_evaluateTangent(void* outTangent, const dsBezierCurve* curve, double t)
{
if (!outTangent || !curve)
{
errno = EINVAL;
return false;
}
if (t < 0.0 || t > 1.0)
{
errno = ERANGE;
return false;
}
DS_ASSERT(curve->axisCount >= 2 && curve->axisCount <= 3);
double invT = 1.0 - t;
for (uint32_t i = 0; i < curve->axisCount; ++i)
{
((double*)outTangent)[i] =
3.0*dsPow2(invT)*(curve->controlPoints[i].y - curve->controlPoints[i].x) +
6.0*invT*t*(curve->controlPoints[i].z - curve->controlPoints[i].y) +
3.0*dsPow2(t)*(curve->controlPoints[i].w - curve->controlPoints[i].z);
}
return true;
}
bool dsBezierCurve_tessellate(const dsBezierCurve* curve, double chordalTolerance,
uint32_t maxRecursions, dsCurveSampleFunction sampleFunc, void* userData)
{
if (!curve || chordalTolerance <= 0.0 || maxRecursions > DS_MAX_CURVE_RECURSIONS || !sampleFunc)
{
errno = EINVAL;
return false;
}
DS_ASSERT(curve->axisCount >= 2 && curve->axisCount <= 3);
double endPoint[3];
// First point.
for (uint32_t i = 0; i < curve->axisCount; ++i)
endPoint[i] = curve->controlPoints[i].x;
if (!sampleFunc(userData, endPoint, curve->axisCount, 0.0))
return false;
// Subdivide the bazier: http://algorithmist.net/docs/subdivision.pdf
// Don't check chordal tolerance for the first point since it might pass through the center
// line.
if (maxRecursions > 0)
{
if (!tessellateRec(curve, chordalTolerance, maxRecursions, sampleFunc, userData, 0.0, 1))
return false;
}
// Last point.
for (uint32_t i = 0; i < curve->axisCount; ++i)
endPoint[i] = curve->controlPoints[i].w;
return sampleFunc(userData, endPoint, curve->axisCount, 1.0);
}
| 27.887029 | 97 | 0.68042 |
472eec9171aa6b9902b9187e4bc1218ea878c925 | 1,787 | c | C | dsc/dns_source_port_index.c | b4ldr/dsc-collector | ab788f9e2bb27f322e71b5eaf156eae8fba6b992 | [
"BSD-3-Clause"
] | null | null | null | dsc/dns_source_port_index.c | b4ldr/dsc-collector | ab788f9e2bb27f322e71b5eaf156eae8fba6b992 | [
"BSD-3-Clause"
] | null | null | null | dsc/dns_source_port_index.c | b4ldr/dsc-collector | ab788f9e2bb27f322e71b5eaf156eae8fba6b992 | [
"BSD-3-Clause"
] | null | null | null | #include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <netdb.h>
#include <memory.h>
#include "dns_message.h"
#include "md_array.h"
/* dns_source_port_indexer */
/* Indexes the source port of DNS messages */
static unsigned int f_index[65536];
static unsigned short r_index[65536];
static unsigned int largest = 0;
int
dns_source_port_indexer(const void *vp)
{
const dns_message *m = vp;
unsigned short p = m->tm->src_port;
if (0 == f_index[p]) {
f_index[p] = ++largest;
r_index[largest] = p;
}
return f_index[p];
}
static int next_iter = 0;
int
dns_source_port_iterator(char **label)
{
static char label_buf[20];
if (NULL == label) {
next_iter = 0;
return largest + 1;
}
if (next_iter > largest)
return -1;
snprintf(*label = label_buf, 20, "%hu", r_index[next_iter++]);
return next_iter;
}
void
dns_source_port_reset(void)
{
memset(f_index, 0, sizeof f_index);
memset(r_index, 0, sizeof r_index);
largest = 0;
}
/* dns_sport_range_indexer */
/* Indexes the "range" of a TCP/UDP source port of DNS messages */
/* "Range" is defined as port/1024. */
static int range_largest = 0;
static int range_next_iter = 0;
int
dns_sport_range_indexer(const void *vp)
{
const dns_message *m = vp;
int r = (int) m->tm->src_port >> 10;
if (r > range_largest)
range_largest = r;
return r;
}
int
dns_sport_range_iterator(char **label)
{
static char label_buf[20];
if (NULL == label) {
range_next_iter = 0;
return range_largest + 1;
}
if (range_next_iter > range_largest)
return -1;
snprintf(*label = label_buf, 20, "%d-%d",
(range_next_iter << 10),
((range_next_iter+1) << 10) - 1);
return ++range_next_iter;
}
void
dns_sport_range_reset(void)
{
range_largest = 0;
}
| 19.423913 | 66 | 0.663682 |
ed76a9edea378150fdb3300432d7e5e599b571f6 | 534 | c | C | recipes/libvorbis/libvorbis-1.2.3/patch-lib_codebook.c | srobo-legacy/openembedded | f28a367b54624446c66d0939ee8d229da4e982ce | [
"MIT"
] | 70 | 2015-02-23T04:18:51.000Z | 2022-03-15T02:01:27.000Z | recipes/libvorbis/libvorbis-1.2.3/patch-lib_codebook.c | srobo-legacy/openembedded | f28a367b54624446c66d0939ee8d229da4e982ce | [
"MIT"
] | 1 | 2020-09-07T15:33:56.000Z | 2020-09-07T15:33:56.000Z | recipes/libvorbis/libvorbis-1.2.3/patch-lib_codebook.c | srobo-legacy/openembedded | f28a367b54624446c66d0939ee8d229da4e982ce | [
"MIT"
] | 88 | 2015-02-11T12:03:16.000Z | 2022-03-30T11:33:42.000Z | $FreeBSD: ports/audio/libvorbis/files/patch-lib_codebook.c,v 1.3 2009/11/24 21:32:39 naddy Exp $
--- lib/codebook.c.orig 2009-07-09 11:12:08.000000000 +0200
+++ lib/codebook.c 2009-11-24 21:46:47.000000000 +0100
@@ -198,6 +198,7 @@ int vorbis_staticbook_unpack(oggpack_buf
for(i=0;i<s->entries;){
long num=oggpack_read(opb,_ilog(s->entries-i));
if(num==-1)goto _eofout;
+ if(length>32)goto _errout;
for(j=0;j<num && i<s->entries;j++,i++)
s->lengthlist[i]=length;
length++;
| 44.5 | 96 | 0.625468 |
54feca41d41e1f24fa249e24db40c2ee323c437f | 388 | h | C | ipadtest2/ipadtest2/models/optionals.h | ken-ch/childrencodingpratice | 20e17aa533160fa2d99f9c900d47ac46eb63fd1e | [
"MIT"
] | null | null | null | ipadtest2/ipadtest2/models/optionals.h | ken-ch/childrencodingpratice | 20e17aa533160fa2d99f9c900d47ac46eb63fd1e | [
"MIT"
] | null | null | null | ipadtest2/ipadtest2/models/optionals.h | ken-ch/childrencodingpratice | 20e17aa533160fa2d99f9c900d47ac46eb63fd1e | [
"MIT"
] | null | null | null | //
// optionals.h
// ipadtest2
//
// Created by kench on 2018/5/31.
// Copyright © 2018年 kench. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface optionals : NSObject
@property(nonatomic,copy)NSString *name;
@property(nonatomic,copy)NSString *mean;
-(instancetype)initWithDict:(NSDictionary *)dict;
+(instancetype)optionalsWithDict:(NSDictionary *)dict;
@end
| 18.47619 | 54 | 0.734536 |
e68a9dcc1771978c20a90d138ce0488427a8e840 | 13,812 | c | C | test/value/src/assign_number_obj.c | uhayat/corto | 159c741a7a8cd3b0ecfd57d40e91aaa5ad1a1a06 | [
"MIT"
] | 95 | 2015-09-24T02:08:51.000Z | 2021-01-27T05:15:12.000Z | test/value/src/assign_number_obj.c | uhayat/corto | 159c741a7a8cd3b0ecfd57d40e91aaa5ad1a1a06 | [
"MIT"
] | 368 | 2015-08-27T03:58:07.000Z | 2018-11-27T18:32:35.000Z | test/value/src/assign_number_obj.c | Seldomberry/cortex | 159c741a7a8cd3b0ecfd57d40e91aaa5ad1a1a06 | [
"MIT"
] | 16 | 2015-11-05T06:00:15.000Z | 2019-04-03T19:27:21.000Z | /* This is a managed file. Do not delete this comment. */
#include <include/test.h>
void test_assign_number_obj_tc_byref_fromobj_byref(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_REFERENCE;
right.ref_kind = CORTO_BY_REFERENCE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() == 1);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byref_fromobj_bytype(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_REFERENCE;
right.ref_kind = CORTO_BY_TYPE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() == 1);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byref_fromobj_byval(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_REFERENCE;
right.ref_kind = CORTO_BY_VALUE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() == 1);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byref_fromptr_byref(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_pointer(bar, corto_int32_o);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_REFERENCE;
right.ref_kind = CORTO_BY_VALUE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() == 1);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byref_fromptr_bytype(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_pointer(bar, corto_int32_o);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_REFERENCE;
right.ref_kind = CORTO_BY_TYPE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() == 1);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byref_fromptr_byval(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_pointer(bar, corto_int32_o);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_REFERENCE;
right.ref_kind = CORTO_BY_VALUE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() == 1);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_bytype_fromobj_byref(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_TYPE;
right.ref_kind = CORTO_BY_REFERENCE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() == 1);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_bytype_fromobj_bytype(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_TYPE;
right.ref_kind = CORTO_BY_TYPE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret == 0);
test_assertint(*foo, 10);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_bytype_fromobj_byval(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_TYPE;
right.ref_kind = CORTO_BY_VALUE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret == 0);
test_assertint(*foo, 10);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_bytype_fromptr_byref(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_pointer(bar, corto_int32_o);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_TYPE;
right.ref_kind = CORTO_BY_REFERENCE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() != 0);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_bytype_fromptr_bytype(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_pointer(bar, corto_int32_o);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_TYPE;
right.ref_kind = CORTO_BY_TYPE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret == 0);
test_assertint(*foo, 10);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_bytype_fromptr_byval(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_pointer(bar, corto_int32_o);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_TYPE;
right.ref_kind = CORTO_BY_VALUE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret == 0);
test_assertint(*foo, 10);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byval_fromobj_byref(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_VALUE;
right.ref_kind = CORTO_BY_REFERENCE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() != 0);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byval_fromobj_bytype(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_VALUE;
right.ref_kind = CORTO_BY_TYPE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret == 0);
test_assertint(*foo, 10);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byval_fromobj_byval(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_VALUE;
right.ref_kind = CORTO_BY_VALUE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret == 0);
test_assertint(*foo, 10);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byval_fromptr_byref(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_VALUE;
right.ref_kind = CORTO_BY_REFERENCE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret != 0);
test_assert(ut_catch() != 0);
test_assertint(*foo, 0);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byval_fromptr_bytype(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_pointer(bar, corto_int32_o);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_VALUE;
right.ref_kind = CORTO_BY_TYPE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret == 0);
test_assertint(*foo, 10);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
void test_assign_number_obj_tc_byval_fromptr_byval(
test_assign_number_obj this)
{
int32_t *foo = corto_create(NULL, NULL, corto_int32_o);
test_assert(foo != NULL);
int32_t *bar = corto_create(NULL, NULL, corto_int32_o);
test_assert(bar != NULL);
*bar = 10;
corto_value left = corto_value_object(foo, NULL);
corto_value right = corto_value_object(bar, NULL);
corto_value result = corto_value_init();
left.ref_kind = CORTO_BY_VALUE;
right.ref_kind = CORTO_BY_VALUE;
int16_t ret = corto_value_binaryOp(CORTO_ASSIGN, &left, &right, &result);
test_assert(ret == 0);
test_assertint(*foo, 10);
test_assert(corto_delete(foo) == 0);
test_assert(corto_delete(bar) == 0);
}
| 25.816822 | 77 | 0.696134 |
8ef33940a726bfc5e774117f463ada53894083bf | 1,617 | h | C | System/Library/Frameworks/ClassKit.framework/CLSCollectionItem.h | lechium/iOS1351Headers | 6bed3dada5ffc20366b27f7f2300a24a48a6284e | [
"MIT"
] | 2 | 2021-11-02T09:23:27.000Z | 2022-03-28T08:21:57.000Z | System/Library/Frameworks/ClassKit.framework/CLSCollectionItem.h | lechium/iOS1351Headers | 6bed3dada5ffc20366b27f7f2300a24a48a6284e | [
"MIT"
] | null | null | null | System/Library/Frameworks/ClassKit.framework/CLSCollectionItem.h | lechium/iOS1351Headers | 6bed3dada5ffc20366b27f7f2300a24a48a6284e | [
"MIT"
] | 1 | 2022-03-28T08:21:59.000Z | 2022-03-28T08:21:59.000Z | /*
* This header is generated by classdump-dyld 1.5
* on Friday, April 30, 2021 at 11:37:24 AM Mountain Standard Time
* Operating System: Version 13.5.1 (Build 17F80)
* Image Source: /System/Library/Frameworks/ClassKit.framework/ClassKit
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by Elias Limneos. Updated by Kevin Bradley.
*/
#import <ClassKit/CLSObject.h>
#import <libobjc.A.dylib/CLSRelationable.h>
@class NSString;
@interface CLSCollectionItem : CLSObject <CLSRelationable> {
long long _type;
NSString* _referenceObjectID;
}
@property (readonly) unsigned long long hash;
@property (readonly) Class superclass;
@property (copy,readonly) NSString * description;
@property (copy,readonly) NSString * debugDescription;
@property (assign,nonatomic) long long type; //@synthesize type=_type - In the implementation block
@property (nonatomic,copy) NSString * referenceObjectID; //@synthesize referenceObjectID=_referenceObjectID - In the implementation block
+(BOOL)supportsSecureCoding;
+(id)relations;
-(NSString *)description;
-(long long)type;
-(void)setType:(long long)arg1 ;
-(void)encodeWithCoder:(id)arg1 ;
-(id)initWithCoder:(id)arg1 ;
-(id)_init;
-(id)dictionaryRepresentation;
-(id)initWithType:(long long)arg1 ;
-(void)mergeWithObject:(id)arg1 ;
-(BOOL)validateObject:(id*)arg1 ;
-(id)initWithHandout:(id)arg1 ;
-(void)setReferenceObjectID:(NSString *)arg1 ;
-(NSString *)referenceObjectID;
@end
| 36.75 | 150 | 0.680891 |
1185eba5675faec8411de5160d1cf6be5d7a8b99 | 4,109 | h | C | Effective Debugging: 66 Specific Ways to Debug Software and Systems/src/big_widgets/GitQlientSettings.h | juliagoda/BookProjects | d2c2da993cc9fcbfead696b78d3bf98c66e3373c | [
"Unlicense"
] | null | null | null | Effective Debugging: 66 Specific Ways to Debug Software and Systems/src/big_widgets/GitQlientSettings.h | juliagoda/BookProjects | d2c2da993cc9fcbfead696b78d3bf98c66e3373c | [
"Unlicense"
] | null | null | null | Effective Debugging: 66 Specific Ways to Debug Software and Systems/src/big_widgets/GitQlientSettings.h | juliagoda/BookProjects | d2c2da993cc9fcbfead696b78d3bf98c66e3373c | [
"Unlicense"
] | null | null | null | #pragma once
/****************************************************************************************
** GitQlient is an application to manage and operate one or several Git repositories. With
** GitQlient you will be able to add commits, branches and manage all the options Git provides.
** Copyright (C) 2020 Francesc Martinez
**
** LinkedIn: www.linkedin.com/in/cescmm/
** Web: www.francescmm.com
**
** This program is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2 of the License, or (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
***************************************************************************************/
#include <QSettings>
#include <QVector>
/*!
\brief The GitQlientSettings is an overloaded implementation of the QSettings that tries to help the user when a config
parameter is modified by triggering a signal to notify the UI.
*/
class GitQlientSettings
{
public:
/*!
\brief Default constructor.
*/
GitQlientSettings() = default;
/*!
\brief Sets a value for a given \p key.
\param key The key.
\param value The new value for the key.
*/
void setGlobalValue(const QString &key, const QVariant &value);
/**
* @brief getGlobalValue Returns the value for a given @p key.
* @param key The key.
* @param defaultValue (optional) A default value in case the key doesn't exist.
*/
QVariant globalValue(const QString &key, const QVariant &defaultValue = QVariant());
/**
* @brief setLocalValue Sets a value for a given @p repo with a @p key and @p value.
* @param repo The local repo to store the config value.
* @param key The key.
* @param value The new value for the key.
*/
void setLocalValue(const QString &repo, const QString &key, const QVariant &value);
/**
* @brief getLocalValue Returns the value for a given @p repo and a given @p key.
* @param repo The repo to retrieve where the key from.
* @param key The key
* @param defaultValue (optional) A default value in case the key doesn't exist.
*/
QVariant localValue(const QString &repo, const QString &key, const QVariant &defaultValue = QVariant());
/*!
\brief Stores that a project is opened. This is used to recalculate which projects are the most used.
\param projectPath The project path of the repository.
*/
void setProjectOpened(const QString &projectPath);
/*!
* \brief Gets all the recent used projects.
*
* \return QVector<QString> Projects list.
*/
QStringList getRecentProjects() const;
/*!
* \brief saveRecentProjects Saves the project in \p projectPath in the recent projects config value.
* \param projectPath The project path to save.
*/
void saveRecentProjects(const QString &projectPath);
/**
* @brief clearRecentProjects Clears the recent projects list.
*/
void clearRecentProjects();
/*!
* \brief saveMostUsedProjects Saves the project in \p projectPath in the most used projects config value.
* \param projectPath The project path to save.
*/
void saveMostUsedProjects(const QString &projectPath);
/**
* @brief clearMostUsedProjects Clears the most used projects list.
*/
void clearMostUsedProjects();
/*!
\brief Gets all the most used projects.
\return QStringList Projects list.
*/
QStringList getMostUsedProjects() const;
static QString PinnedRepos;
static QString SplitFileDiffView;
private:
QSettings globalSettings;
};
| 34.241667 | 120 | 0.673643 |
fb7b407a5a9148ed2197711f2a567a6254a4f7cd | 290 | h | C | JLHideNavigationBarDemo/WithNavTestViewController.h | wangjunling888/JLHideNavgationBar | f93e9cb7fa000f7806b863fe2052d924d9ed6f8b | [
"MIT"
] | null | null | null | JLHideNavigationBarDemo/WithNavTestViewController.h | wangjunling888/JLHideNavgationBar | f93e9cb7fa000f7806b863fe2052d924d9ed6f8b | [
"MIT"
] | null | null | null | JLHideNavigationBarDemo/WithNavTestViewController.h | wangjunling888/JLHideNavgationBar | f93e9cb7fa000f7806b863fe2052d924d9ed6f8b | [
"MIT"
] | null | null | null | //
// WithNavTestViewController.h
// JLHideNavigationBarDemo
//
// Created by 王俊岭 on 2020/3/20.
// Copyright © 2020 王俊岭. All rights reserved.
// 有导航
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface WithNavTestViewController : UIViewController
@end
NS_ASSUME_NONNULL_END
| 16.111111 | 55 | 0.758621 |
c1c73992e40ec4023132da28958fb6de5109ffdb | 5,063 | h | C | CI/rule/pclint/pclint_include/include_linux/c++/4.8.2/java/awt/Window.h | chewaiwai/huaweicloud-sdk-c-obs | fbcd3dadd910c22af3a91aeb73ca0fee94d759fb | [
"Apache-2.0"
] | 22 | 2019-06-13T01:16:44.000Z | 2022-03-29T02:42:39.000Z | CI/rule/pclint/pclint_include/include_linux/c++/4.8.2/java/awt/Window.h | chewaiwai/huaweicloud-sdk-c-obs | fbcd3dadd910c22af3a91aeb73ca0fee94d759fb | [
"Apache-2.0"
] | 26 | 2019-09-20T06:46:05.000Z | 2022-03-11T08:07:14.000Z | CI/rule/pclint/pclint_include/include_linux/c++/4.8.2/java/awt/Window.h | chewaiwai/huaweicloud-sdk-c-obs | fbcd3dadd910c22af3a91aeb73ca0fee94d759fb | [
"Apache-2.0"
] | 14 | 2019-07-15T06:42:39.000Z | 2022-02-15T10:32:28.000Z |
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
#ifndef __java_awt_Window__
#define __java_awt_Window__
#pragma interface
#include <java/awt/Container.h>
#include <gcj/array.h>
extern "Java"
{
namespace java
{
namespace awt
{
class AWTEvent;
class BufferCapabilities;
class Component;
class Container;
class Cursor;
class Event;
class Frame;
class GraphicsConfiguration;
class Toolkit;
class Window;
namespace event
{
class WindowEvent;
class WindowFocusListener;
class WindowListener;
class WindowStateListener;
}
namespace image
{
class BufferStrategy;
}
}
}
namespace javax
{
namespace accessibility
{
class AccessibleContext;
}
}
}
class java::awt::Window : public ::java::awt::Container
{
public: // actually package-private
Window();
Window(::java::awt::GraphicsConfiguration *);
public:
Window(::java::awt::Frame *);
Window(::java::awt::Window *);
Window(::java::awt::Window *, ::java::awt::GraphicsConfiguration *);
virtual void addNotify();
virtual void pack();
virtual void show();
virtual void hide();
virtual void dispose();
virtual void toBack();
virtual void toFront();
virtual ::java::awt::Toolkit * getToolkit();
virtual ::java::lang::String * getWarningString();
virtual ::java::util::Locale * getLocale();
virtual void setCursor(::java::awt::Cursor *);
virtual ::java::awt::Window * getOwner();
virtual JArray< ::java::awt::Window * > * getOwnedWindows();
virtual void addWindowListener(::java::awt::event::WindowListener *);
virtual void removeWindowListener(::java::awt::event::WindowListener *);
virtual JArray< ::java::awt::event::WindowListener * > * getWindowListeners();
virtual JArray< ::java::awt::event::WindowFocusListener * > * getWindowFocusListeners();
virtual JArray< ::java::awt::event::WindowStateListener * > * getWindowStateListeners();
virtual void addWindowFocusListener(::java::awt::event::WindowFocusListener *);
virtual void addWindowStateListener(::java::awt::event::WindowStateListener *);
virtual void removeWindowFocusListener(::java::awt::event::WindowFocusListener *);
virtual void removeWindowStateListener(::java::awt::event::WindowStateListener *);
virtual JArray< ::java::util::EventListener * > * getListeners(::java::lang::Class *);
public: // actually package-private
virtual void dispatchEventImpl(::java::awt::AWTEvent *);
public: // actually protected
virtual void processEvent(::java::awt::AWTEvent *);
virtual void processWindowEvent(::java::awt::event::WindowEvent *);
public:
virtual jboolean isActive();
virtual jboolean isFocused();
virtual ::java::awt::Component * getFocusOwner();
virtual ::java::awt::Component * getMostRecentFocusOwner();
public: // actually package-private
virtual void setFocusOwner(::java::awt::Component *);
public:
virtual jboolean postEvent(::java::awt::Event *);
virtual jboolean isShowing();
virtual void setLocationRelativeTo(::java::awt::Component *);
virtual void createBufferStrategy(jint);
virtual void createBufferStrategy(jint, ::java::awt::BufferCapabilities *);
virtual ::java::awt::image::BufferStrategy * getBufferStrategy();
virtual void applyResourceBundle(::java::util::ResourceBundle *);
virtual void applyResourceBundle(::java::lang::String *);
virtual ::javax::accessibility::AccessibleContext * getAccessibleContext();
virtual ::java::awt::GraphicsConfiguration * getGraphicsConfiguration();
public: // actually protected
virtual void processWindowFocusEvent(::java::awt::event::WindowEvent *);
virtual void processWindowStateEvent(::java::awt::event::WindowEvent *);
public:
virtual jboolean isFocusableWindow();
virtual jboolean getFocusableWindowState();
virtual void setFocusableWindowState(jboolean);
virtual jboolean isFocusCycleRoot();
virtual void setFocusCycleRoot(jboolean);
virtual ::java::awt::Container * getFocusCycleRootAncestor();
virtual jboolean isAlwaysOnTop();
virtual void setAlwaysOnTop(jboolean);
public: // actually package-private
virtual ::java::lang::String * generateName();
virtual jboolean eventTypeEnabled(jint);
private:
static jlong getUniqueLong();
static const jlong serialVersionUID = 4497834738069338734LL;
::java::lang::String * __attribute__((aligned(__alignof__( ::java::awt::Container)))) warningString;
jint windowSerializedDataVersion;
jint state;
jboolean focusableWindowState;
jboolean alwaysOnTop;
::java::util::Vector * ownedWindows;
::java::awt::event::WindowListener * windowListener;
::java::awt::event::WindowFocusListener * windowFocusListener;
::java::awt::event::WindowStateListener * windowStateListener;
jboolean shown;
public: // actually package-private
::java::awt::Component * windowFocusOwner;
private:
static jlong next_window_number;
public:
static ::java::lang::Class class$;
};
#endif // __java_awt_Window__
| 35.405594 | 102 | 0.713609 |
7c930825cb4e7b219bced63a135f8a9da87f5d05 | 1,794 | h | C | RayEngine/Include/DX12/DX12DynamicUploadHeap.h | Mumsfilibaba/RayEngine | 68496966c1d7b91bc8fbdd305226ece9b9f596b2 | [
"Apache-2.0"
] | null | null | null | RayEngine/Include/DX12/DX12DynamicUploadHeap.h | Mumsfilibaba/RayEngine | 68496966c1d7b91bc8fbdd305226ece9b9f596b2 | [
"Apache-2.0"
] | null | null | null | RayEngine/Include/DX12/DX12DynamicUploadHeap.h | Mumsfilibaba/RayEngine | 68496966c1d7b91bc8fbdd305226ece9b9f596b2 | [
"Apache-2.0"
] | null | null | null | /*////////////////////////////////////////////////////////////
Copyright 2018 Alexander Dahlin
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 SOFTWARE IS PROVIDED "AS IS". MEANING NO WARRANTY
OR SUPPORT IS PROVIDED OF ANY KIND.
In event of any damages, direct or indirect that can
be traced back to the use of this software, shall no
contributor be held liable. This includes computer
failure and or malfunction of any kind.
////////////////////////////////////////////////////////////*/
#pragma once
#include <Interfaces/IObject.h>
#if defined(RE_PLATFORM_WINDOWS)
#include "DX12Resource.h"
namespace RayEngine
{
namespace Graphics
{
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class IDevice;
class DX12Device;
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
class DX12DynamicUploadHeap final : public DX12Resource, public IObject
{
RE_IMPLEMENT_INTERFACE(DX12DynamicUploadHeap);
public:
DX12DynamicUploadHeap(IDevice* pDevice, uint32 alignment, uint32 sizeInBytes);
~DX12DynamicUploadHeap();
inline ID3D12Heap* GetD3D12Heap() const
{
return m_Heap.Get();
}
void SetData(const void* pData, int32 size);
CounterType Release() override final;
CounterType AddRef() override final;
private:
void Create(uint32 alignment, uint32 sizeInBytes);
private:
DX12Device* m_Device;
Microsoft::WRL::ComPtr<ID3D12Heap> m_Heap;
int32 m_SizeInBytes;
CounterType m_References;
};
}
}
#endif | 25.267606 | 124 | 0.591973 |
6b1f28225a7356f010ab760ea8c48e31c6d8a7fa | 86,322 | c | C | Tools/STM32FW/STM32Cube_FW_F7_V1.16.2/Projects/STM32F769I_EVAL/Demonstrations/STemWin/Core/Src/k_modules_res.c | ramkumarkoppu/NUCLEO-F767ZI-ESW | 85e129d71ee8eccbd0b94b5e07e75b6b91679ee8 | [
"MIT"
] | null | null | null | Tools/STM32FW/STM32Cube_FW_F7_V1.16.2/Projects/STM32F769I_EVAL/Demonstrations/STemWin/Core/Src/k_modules_res.c | ramkumarkoppu/NUCLEO-F767ZI-ESW | 85e129d71ee8eccbd0b94b5e07e75b6b91679ee8 | [
"MIT"
] | null | null | null | Tools/STM32FW/STM32Cube_FW_F7_V1.16.2/Projects/STM32F769I_EVAL/Demonstrations/STemWin/Core/Src/k_modules_res.c | ramkumarkoppu/NUCLEO-F767ZI-ESW | 85e129d71ee8eccbd0b94b5e07e75b6b91679ee8 | [
"MIT"
] | null | null | null | /**
******************************************************************************
* @file k_modules_res.c
* @author MCD Application Team
* @brief This file contains the Hex dumps of the images available
******************************************************************************
* @attention
*
* Copyright (c) 2016 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "k_modules_res.h"
/** @addtogroup CORE
* @{
*/
/** @defgroup KERNEL_MODULES_RES
* @brief Kernel modules resources
* @{
*/
/* External variables --------------------------------------------------------*/
/* Private typedef -----------------------------------------------------------*/
/* Private defines -----------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
extern GUI_CONST_STORAGE GUI_BITMAP bmjumper1_2;
#if defined ( __ICCARM__ )
#pragma location="ExtQSPIFlashSection"
#else
__attribute__((section(".ExtQSPIFlashSection")))
#endif
static GUI_CONST_STORAGE unsigned char _acjumper1_2[] = {
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xF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x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x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FF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF
};
GUI_CONST_STORAGE GUI_BITMAP bmjumper1_2 = {
50, /* xSize */
50, /* ySize */
150, /* BytesPerLine */
24, /* BitsPerPixel */
(unsigned char *)_acjumper1_2, /* Pointer to picture data */
NULL, /* Pointer to palette */
GUI_DRAW_BMPAM565
};
extern GUI_CONST_STORAGE GUI_BITMAP bmjumper2_3;
#if defined ( __ICCARM__ )
#pragma location="ExtQSPIFlashSection"
#else
__attribute__((section(".ExtQSPIFlashSection")))
#endif
static GUI_CONST_STORAGE unsigned char _acjumper2_3[] = {
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0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0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0x33,0x52, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0x7E,0x3F, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00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, 0x00,0xFF,0xFF,
0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF, 0x00,0xFF,0xFF
};
GUI_CONST_STORAGE GUI_BITMAP bmjumper2_3 = {
50, /* xSize */
50, /* ySize */
150, /* BytesPerLine */
24, /* BitsPerPixel */
(unsigned char *)_acjumper2_3, /* Pointer to picture data */
NULL, /* Pointer to palette */
GUI_DRAW_BMPAM565
};
/**
* @brief draw a 3D rectangle
* @param x0: Upper left X-position
* @param y0: Upper left Y-position
* @param width: width of the rectangle
* @param height: height of the rectangle
* @retval None.
*/
void DrawRect3D(int x0, int y0, int width, int height)
{
GUI_SetColor(GUI_BLACK);
GUI_DrawRect(x0, y0, (x0 + width), (y0 + height));
GUI_DrawHLine((y0 + height - 1), (x0 + 1), (x0 + width - 1));
GUI_DrawVLine((x0 + width - 1), (y0 + 1), (y0 + height - 1));
GUI_SetColor(GUI_WHITE);
GUI_DrawVLine((x0 + 1), (y0 + 1), (y0 + height - 2));
GUI_DrawHLine((y0 + 1), (x0 + 1), (x0 + width - 2));
}
/**
* @}
*/
/**
* @}
*/
| 169.591356 | 248 | 0.713607 |
87826d298d68eb7be0561cf5583fa1a63832de68 | 891 | h | C | BuildingEscape/Source/BuildingEscape/Triggerable.h | MihaiUnreal/BuildingEscape | b13f0b48f6babff5d06e45ca68fd0649a3ae01ea | [
"MIT"
] | null | null | null | BuildingEscape/Source/BuildingEscape/Triggerable.h | MihaiUnreal/BuildingEscape | b13f0b48f6babff5d06e45ca68fd0649a3ae01ea | [
"MIT"
] | null | null | null | BuildingEscape/Source/BuildingEscape/Triggerable.h | MihaiUnreal/BuildingEscape | b13f0b48f6babff5d06e45ca68fd0649a3ae01ea | [
"MIT"
] | null | null | null | // Copyright @ Mihai Bairac
#pragma once
#include "CoreMinimal.h"
#include "Components/ActorComponent.h"
#include "GameFramework/Actor.h"
#include "Triggerable.generated.h"
class UPressable;
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FTriggerEvent);
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class BUILDINGESCAPE_API UTriggerable : public UActorComponent
{
GENERATED_BODY()
public:
// Sets default values for this component's properties
UTriggerable();
protected:
// Called when the game starts
virtual void BeginPlay() override;
public:
UPROPERTY(BlueprintAssignable)
FTriggerEvent OnTriggerEvent;
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
private:
UPROPERTY(EditAnywhere)
AActor* TriggerButton = nullptr;
};
| 22.846154 | 123 | 0.763187 |
f0c7a31927cb1e59e9b398997253bf8a1b8fb462 | 304 | h | C | Plugins/VoxelPlugin-master/Source/VoxelEditor/Private/VoxelMessagesEditor.h | drakelinglabs/breakup | 04cc209605082a61399f52a174057eda56b797f2 | [
"MIT"
] | 3 | 2020-10-05T18:52:08.000Z | 2020-12-01T15:14:36.000Z | Plugins/VoxelPlugin-master/Source/VoxelEditor/Private/VoxelMessagesEditor.h | Bluedrake42/breakup | 04cc209605082a61399f52a174057eda56b797f2 | [
"MIT"
] | null | null | null | Plugins/VoxelPlugin-master/Source/VoxelEditor/Private/VoxelMessagesEditor.h | Bluedrake42/breakup | 04cc209605082a61399f52a174057eda56b797f2 | [
"MIT"
] | 2 | 2020-10-10T20:16:12.000Z | 2020-11-01T13:11:40.000Z | // Copyright 2020 Phyronnaz
#pragma once
#include "CoreMinimal.h"
#include "VoxelMessages.h"
namespace FVoxelMessagesEditor
{
void LogMessage(const TSharedRef<FTokenizedMessage>& Message, EVoxelShowNotification ShouldShow);
void ShowNotification(const FVoxelMessages::FNotification& Notification);
} | 25.333333 | 98 | 0.822368 |
0b2c1cd55e9c84bb9c40d8cc51132d7eec217178 | 67 | h | C | ios/Pods/Headers/Private/FirebaseDatabase/FIRDatabaseConfig.h | crowdbotics-apps/chipstacks-rn-1201 | 70d23e46a373da576a2117d4d2c6ababdef49ea2 | [
"CC-BY-3.0",
"Apache-2.0"
] | 47 | 2019-01-30T19:01:27.000Z | 2021-12-09T22:13:22.000Z | ios/Pods/Headers/Private/FirebaseDatabase/FIRDatabaseConfig.h | bernardo-rodriguez/cryptogains | ba16f0391c607e00c823622624421d48f4255fb4 | [
"Apache-2.0"
] | 8 | 2019-08-08T08:29:23.000Z | 2022-01-22T03:30:30.000Z | ios/Pods/Headers/Private/FirebaseDatabase/FIRDatabaseConfig.h | bernardo-rodriguez/cryptogains | ba16f0391c607e00c823622624421d48f4255fb4 | [
"Apache-2.0"
] | 16 | 2019-03-04T17:28:54.000Z | 2022-01-24T21:44:43.000Z | ../../../FirebaseDatabase/Firebase/Database/Api/FIRDatabaseConfig.h | 67 | 67 | 0.791045 |
bca296751edd639cf13455f0d77016b799722b71 | 3,887 | h | C | dss_town/src/fx.h | mudlord/demos | 359bada56a27ddbd4fcb846c0ff34bc474cb7f05 | [
"Unlicense"
] | 20 | 2017-12-12T16:37:25.000Z | 2022-02-19T10:35:46.000Z | dss_town/src/fx.h | mudlord/demos | 359bada56a27ddbd4fcb846c0ff34bc474cb7f05 | [
"Unlicense"
] | null | null | null | dss_town/src/fx.h | mudlord/demos | 359bada56a27ddbd4fcb846c0ff34bc474cb7f05 | [
"Unlicense"
] | 7 | 2017-12-29T23:19:18.000Z | 2021-08-17T09:53:15.000Z | #include "sys/msys.h"
#include "intro.h"
typedef struct _tagRGB {
BYTE r, g, b;
}RGB;
#ifndef PI
#define PI 3.141592653589794
#endif
//plasma implementation
int plasma_w = 256;
int plasma_h = 256;
BYTE *plasma_data;
RGB plasma_palette[256];
BYTE *m_plasma1;
BYTE *m_plasma2;
int plasma_texsize;
GLuint plasma_texture;
sprite plasma_spr;
sprite plasma_spr2;
void plasma_palleteupdate()
{
double factor=(double)GetTickCount();
for (int i=0; i<256; ++i)
{
plasma_palette[i].r=(BYTE)(128+127*sin(i*PI/64+factor/133));
plasma_palette[i].g=(BYTE)(128-127*cos(i*PI/128+factor/61));
plasma_palette[i].b=(BYTE)(128+127*sin(i*PI/64+factor/72));
}
}
BOOL plasma_init()
{
plasma_texsize=plasma_w*plasma_h*3; // RGB occupy 3 bytes
plasma_data=new BYTE[plasma_texsize];
ZeroMemory(plasma_data, plasma_texsize);
m_plasma1=new BYTE[plasma_w*plasma_h*4]; // plasma buffer will 4 times bigger than texture.
if (NULL==m_plasma1)return FALSE;
m_plasma2=new BYTE[plasma_w*plasma_h*4]; // plasma buffer will 4 times bigger than texture.
if (NULL==m_plasma2)return FALSE;
int width=plasma_w*2;
int height=plasma_h*2;
int offs=0;
for (int y=0; y<height; ++y)
{
for (int x=0; x<width; ++x)
{
m_plasma1[offs]=(BYTE)(128+127*sin((double)hypot(x, plasma_h-y)/48));
m_plasma2[offs]=(BYTE)(128+127*sin((float)x/(37+15*cos((float)y/74)))
*cos((float)y/(31-21*sin((float)x/57))));
++offs;
}
}
glGenTextures(1, &plasma_texture);
glBindTexture(GL_TEXTURE_2D, plasma_texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, 3, plasma_w, plasma_w, 0, GL_RGB, GL_UNSIGNED_BYTE,NULL);
glBindTexture(GL_TEXTURE_2D,0);
plasma_spr2.xsize =47;
plasma_spr2.ysize = 47;
plasma_spr2.texture = plasma_texture;
plasma_spr2.x = XRES-96;
plasma_spr2.y = 220;
plasma_spr.xsize = 190;
plasma_spr.ysize = 190;
plasma_spr.x = XRES-96;
plasma_spr.y = 90;
plasma_spr.texture = plasma_texture;
return TRUE;
}
void plasma_run()
{
// half size of texture's width and height.
static int half_width =plasma_w/2;
static int half_height=plasma_h/2;
// the following lines to determine a movement on every plasma.
// method from Alex Champandard's tutorial "The art of demomaking"
// URL: http://www.flipcode.com/demomaking/
// "09/13/99 - Issue 04 - Per Pixel Control"
int x1, y1; // top-left point in m_plasma1 buffer.
int x2, y2; // top-left point in m_plasma2 buffer.
int offs1, offs2, dst;
BYTE col;
double factor=(double)(GetTickCount()>>4);
x1=half_width + (int)((half_width-1) * sin(factor/128) );
x2=half_width + (int)((half_width-1) * cos(factor/-74) );
y1=half_height + (int)((half_height-1) * cos(factor/-113) );
y2=half_height + (int)((half_height-1) * sin(factor/33) );
offs1=y1*plasma_w*2+x1;
offs2=y2*plasma_w*2+x2;
plasma_palleteupdate();
// do it.
dst=0;
for (int y=0; y<plasma_h; ++y)
{
for (int x=0; x<plasma_w; ++x)
{
col=m_plasma1[offs1]+m_plasma1[offs2]+
m_plasma2[offs1]+m_plasma2[offs2];
// because we working under RGB mode, so we just select color
// from our custom palette, and set corresponding RGB channel
// to texture buffer.
plasma_data[dst ]=plasma_palette[col].r;
plasma_data[dst+1]=plasma_palette[col].g;
plasma_data[dst+2]=plasma_palette[col].b;
++offs1; ++offs2; dst+=3;
}
offs1+=plasma_w; offs2+=plasma_w;
}
glBindTexture(GL_TEXTURE_2D,plasma_texture);
glTexImage2D(GL_TEXTURE_2D, 0, 3,plasma_w, plasma_h, 0, GL_RGB, GL_UNSIGNED_BYTE,
plasma_data);
glBindTexture(GL_TEXTURE_2D,0);
draw_sprite(plasma_spr, XRES, YRES, false);
draw_sprite(plasma_spr2, XRES, YRES, false);
}
//smoke
sprite smoke_spr;
GLuint smoke_tex;
void smoke_init()
{
}
void smoke_run()
{
}
void fx_init()
{
plasma_init();
}
void fx_do()
{
plasma_run();
} | 23.846626 | 92 | 0.707486 |
5d87f733bb513de33f96a5413d07748ad3c3be87 | 3,637 | h | C | hull3/assign/uniform/CUP_RU_MOD_WD.h | dancemoox/hull3 | 2706bc3e5aec11f7ab4a8b113d083016de0c6d6c | [
"MIT"
] | 7 | 2015-05-11T15:22:11.000Z | 2021-08-08T13:50:24.000Z | hull3/assign/uniform/CUP_RU_MOD_WD.h | dancemoox/hull3 | 2706bc3e5aec11f7ab4a8b113d083016de0c6d6c | [
"MIT"
] | 90 | 2015-01-23T09:05:51.000Z | 2021-08-07T19:35:42.000Z | hull3/assign/uniform/CUP_RU_MOD_WD.h | dancemoox/hull3 | 2706bc3e5aec11f7ab4a8b113d083016de0c6d6c | [
"MIT"
] | 27 | 2015-02-15T16:52:48.000Z | 2021-11-12T10:52:36.000Z | class CUP_RU_MOD_WD {
class Rifleman {
headGear = "CUP_H_RUS_6B47_v2_Summer";
goggles = "";
uniform = "CUP_U_O_RUS_Soldier_VKPO_VDV_EMR_gloves_pads";
vest = "CUP_Vest_RUS_6B45_Sh117_ARM";
backpack = "ark_backpack_med";
};
class Leader : Rifleman {
uniform = "CUP_U_O_RUS_Soldier_VKPO_VDV_EMR_rolled_up_gloves_pads";
vest = "CUP_Vest_RUS_6B45_Sh117_VOG_ARM";
};
class Officer : Leader {
headGear = "CUP_H_RUS_Beret_VDV";
};
class Crew : Rifleman {
headGear = "H_Tank_eaf_F";
uniform = "CUP_U_O_RUS_Soldier_VKPO_VDV_EMR_rolled_up_gloves_pads";
backpack = "ark_backpack_small";
};
class CO : Officer {
vest = "CUP_Vest_RUS_6B45_Sh117_VOG_Del_Nut_ARM";
};
class XO : CO {
vest = "CUP_Vest_RUS_6B45_Sh117_VOG_Del_ARM";
backpack = "ark_backpack_large";
};
class SL : Officer {
};
class Medic : Rifleman {
headGear = "CUP_H_RUS_6B47_v2_GogglesClosed_Summer";
backpack = "ark_backpack_large";
};
class FTL : Leader {
vest = "CUP_Vest_RUS_6B45_Sh117_VOG_Full_ARM";
};
class AR : Rifleman {
headGear = "CUP_H_RUS_6B47_v2_GogglesUp_Summer";
goggles = "CUP_G_RUS_Balaclava_Ratnik";
vest = "CUP_Vest_RUS_6B45_Sh117_PKP_Del_ARM";
};
class AAR : Rifleman {
goggles = "CUP_G_RUS_Balaclava_Ratnik_v2";
vest = "CUP_Vest_RUS_6B45_Sh117_Del_Nut_ARM";
backpack = "ark_backpack_large";
};
class RAT : Rifleman {
headGear = "CUP_H_RUS_6B47_v2_GogglesDown_Summer";
uniform = "CUP_U_O_RUS_Soldier_VKPO_VDV_EMR_rolled_up_gloves_pads";
vest = "CUP_Vest_RUS_6B45_Sh117_Del_Nut_ARM";
};
class MMGG : AR {
backpack = "ark_backpack_large";
};
class MMGAG : AAR {
};
class HMGG : AR {
};
class HMGAG : AAR {
};
class HMGAC : AAR {
};
class MATG : RAT {
backpack = "ark_backpack_large";
};
class MATAG : AAR {
};
class MATAC : MATAG {
};
class HATG : RAT {
backpack = "ark_backpack_large";
};
class HATAG : AAR {
};
class HATAC : HATAG {
};
class DHATG : AR {
};
class DHATAG : AAR {
};
class DHATAC : AAR {
};
class SAMG : AR {
};
class SAMAG : AAR {
};
class SAMAC : AAR {
};
class GMGG : AR {
};
class GMGAG : AAR {
};
class GMGAC : AAR {
};
class MTRG : AR {
};
class MTRAG : AAR {
};
class MTRAC : AAR {
};
class ENG : Rifleman {
headGear = "CUP_H_RUS_6B47_v2_GogglesUp_Summer";
uniform = "CUP_U_O_RUS_Soldier_VKPO_VDV_EMR_rolled_up_gloves_pads";
vest = "CUP_Vest_RUS_6B45_Sh117_Full_ARM";
backpack = "ark_backpack_large";
};
class ENGA : ENG {
headGear = "CUP_H_RUS_6B47_v2_GogglesDown_Summer";
goggles = "CUP_G_RUS_Balaclava_Ratnik_v2";
uniform = "CUP_U_O_RUS_Soldier_VKPO_VDV_EMR_gloves_pads";
};
class SN : Rifleman {
headGear = "CUP_H_RUS_6B47_v2_GogglesClosed_Summer";
goggles = "CUP_G_RUS_Balaclava_Ratnik_v2";
vest = "CUP_Vest_RUS_6B45_Sh117_Full_ARM";
backpack = "ark_backpack_small";
};
class SP : SN {
goggles = "CUP_G_RUS_Balaclava_Ratnik";
};
class VC : Crew {
};
class VG : Crew {
};
class VD : Crew {
};
class P : Crew {
headGear = "CUP_H_RUS_ZSH_Shield_Up";
backpack = "B_Parachute";
};
class PCM : P {
};
};
| 20.432584 | 75 | 0.591696 |
42af798eaadf6c07590791610a101df84b6c682c | 5,744 | h | C | Pods/Headers/Public/CYLTabBarController/UIColor+CYLTabBarControllerExtention.h | Andy0570/ShoppingCartDemo | c8fd047ce3bab7129ed21cb51ba7232c84e13f0b | [
"MIT"
] | 1 | 2020-12-18T02:21:52.000Z | 2020-12-18T02:21:52.000Z | HQLTableViewDemo/Pods/Headers/Public/CYLTabBarController/UIColor+CYLTabBarControllerExtention.h | lcf15980849273/CYLTaBarDemo | 09e189139c54ff2680ed18ea5c8588716cd7e528 | [
"MIT"
] | null | null | null | HQLTableViewDemo/Pods/Headers/Public/CYLTabBarController/UIColor+CYLTabBarControllerExtention.h | lcf15980849273/CYLTaBarDemo | 09e189139c54ff2680ed18ea5c8588716cd7e528 | [
"MIT"
] | 1 | 2020-12-28T14:04:09.000Z | 2020-12-28T14:04:09.000Z | //
// UIColor+CYLTabBarControllerExtention.h
// CYLTabBarController
//
// v1.21.x Created by 微博@iOS程序犭袁 ( http://weibo.com/luohanchenyilong/ ) on 16/2/26.
// Copyright © 2019年 https://github.com/ChenYilong .All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CYLConstants.h"
NS_ASSUME_NONNULL_BEGIN
@interface UIColor (CYLTabBarControllerExtention)
@property (class, nonatomic, readonly) UIColor *cyl_systemRedColor;
@property (class, nonatomic, readonly) UIColor *cyl_systemGreenColor;
@property (class, nonatomic, readonly) UIColor *cyl_systemBlueColor;
@property (class, nonatomic, readonly) UIColor *cyl_systemOrangeColor;
@property (class, nonatomic, readonly) UIColor *cyl_systemYellowColor;
@property (class, nonatomic, readonly) UIColor *cyl_systemPinkColor;
@property (class, nonatomic, readonly) UIColor *cyl_systemPurpleColor;
@property (class, nonatomic, readonly) UIColor *cyl_systemTealColor;
@property (class, nonatomic, readonly) UIColor *cyl_systemIndigoColor;
/* Shades of gray. systemGray is the base gray color.
*/
@property (class, nonatomic, readonly) UIColor *cyl_systemGrayColor;
@property (class, nonatomic, readonly) UIColor *cyl_systemGray2Color;
@property (class, nonatomic, readonly) UIColor *cyl_systemGray3Color;
@property (class, nonatomic, readonly) UIColor *cyl_systemGray4Color;
@property (class, nonatomic, readonly) UIColor *cyl_systemGray5Color;
@property (class, nonatomic, readonly) UIColor *cyl_systemGray6Color;
#pragma mark Foreground colors
/* Foreground colors for static text and related elements.
*/
@property (class, nonatomic, readonly) UIColor *cyl_labelColor;
@property (class, nonatomic, readonly) UIColor *cyl_secondaryLabelColor;
@property (class, nonatomic, readonly) UIColor *cyl_tertiaryLabelColor ;
@property (class, nonatomic, readonly) UIColor *cyl_quaternaryLabelColor;
/* Foreground color for standard system links.
*/
@property (class, nonatomic, readonly) UIColor *cyl_linkColor;
/* Foreground color for placeholder text in controls or text fields or text views.
*/
@property (class, nonatomic, readonly) UIColor *cyl_placeholderTextColor;
/* Foreground colors for separators (thin border or divider lines).
* `separatorColor` may be partially transparent, so it can go on top of any content.
* `opaqueSeparatorColor` is intended to look similar, but is guaranteed to be opaque, so it will
* completely cover anything behind it. Depending on the situation, you may need one or the other.
*/
@property (class, nonatomic, readonly) UIColor *cyl_separatorColor;
@property (class, nonatomic, readonly) UIColor *cyl_opaqueSeparatorColor;
#pragma mark Background colors
/* We provide two design systems (also known as "stacks") for structuring an iOS app's backgrounds.
*
* Each stack has three "levels" of background colors. The first color is intended to be the
* main background, farthest back. Secondary and tertiary colors are layered on top
* of the main background, when appropriate.
*
* Inside of a discrete piece of UI, choose a stack, then use colors from that stack.
* We do not recommend mixing and matching background colors between stacks.
* The foreground colors above are designed to work in both stacks.
*
* 1. systemBackground
* Use this stack for views with standard table views, and designs which have a white
* primary background in light mode.
*/
@property (class, nonatomic, readonly) UIColor *cyl_systemBackgroundColor;
@property (class, nonatomic, readonly) UIColor *cyl_secondarySystemBackgroundColor;
@property (class, nonatomic, readonly) UIColor *cyl_tertiarySystemBackgroundColor;
/* 2. systemGroupedBackground
* Use this stack for views with grouped content, such as grouped tables and
* platter-based designs. These are like grouped table views, but you may use these
* colors in places where a table view wouldn't make sense.
*/
@property (class, nonatomic, readonly) UIColor *cyl_systemGroupedBackgroundColor;
@property (class, nonatomic, readonly) UIColor *cyl_secondarySystemGroupedBackgroundColor;
@property (class, nonatomic, readonly) UIColor *cyl_tertiarySystemGroupedBackgroundColor;
#pragma mark Fill colors
/* Fill colors for UI elements.
* These are meant to be used over the background colors, since their alpha component is less than 1.
*
* systemFillColor is appropriate for filling thin and small shapes.
* Example: The track of a slider.
*/
@property (class, nonatomic, readonly) UIColor *cyl_systemFillColor;
/* secondarySystemFillColor is appropriate for filling medium-size shapes.
* Example: The background of a switch.
*/
@property (class, nonatomic, readonly) UIColor *cyl_secondarySystemFillColor;
/* tertiarySystemFillColor is appropriate for filling large shapes.
* Examples: Input fields, search bars, buttons.
*/
@property (class, nonatomic, readonly) UIColor *cyl_tertiarySystemFillColor;
/* quaternarySystemFillColor is appropriate for filling large areas containing complex content.
* Example: Expanded table cells.
*/
@property (class, nonatomic, readonly) UIColor *cyl_quaternarySystemFillColor;
#pragma mark Other colors
/* lightTextColor is always light, and darkTextColor is always dark, regardless of the current UIUserInterfaceStyle.
* When possible, we recommend using `labelColor` and its variants, instead.
*/
@property(class, nonatomic, readonly) UIColor *cyl_lightTextColor; // for a dark background
@property(class, nonatomic, readonly) UIColor *cyl_darkTextColor; // for a light background
@end
#pragma mark - Deprecated API
@interface UIColor (CYLTabBarControllerDeprecated)
@property (class, nonatomic, readonly) UIColor *cyl_systemBrownColor CYL_DEPRECATED("Deprecated in 1.27.5.");
@end
NS_ASSUME_NONNULL_END
| 42.865672 | 116 | 0.784297 |
eddc4615a92bd3b8dc93c174138011e77d9044cf | 24,561 | h | C | Appacitive.framework/Versions/A/Headers/APConnection.h | neilunadkat/ToDoRealm-Appacitive | f858dd5906be748283cbd79e5048a8881f3f14a5 | [
"Apache-2.0"
] | 1 | 2018-05-17T03:12:56.000Z | 2018-05-17T03:12:56.000Z | Appacitive.framework/Versions/A/Headers/APConnection.h | neilunadkat/ToDoRealm-Appacitive | f858dd5906be748283cbd79e5048a8881f3f14a5 | [
"Apache-2.0"
] | null | null | null | Appacitive.framework/Versions/A/Headers/APConnection.h | neilunadkat/ToDoRealm-Appacitive | f858dd5906be748283cbd79e5048a8881f3f14a5 | [
"Apache-2.0"
] | null | null | null | //
// APConnection.h
// Appacitive-iOS-SDK
//
// Created by Kauserali Hafizji on 03/09/12.
// Copyright (c) 2012 Appacitive Software Pvt. Ltd.. All rights reserved.
//
#import "APResponseBlocks.h"
#import "APObject.h"
#import "APQuery.h"
@class APObject;
/**
A Connection is represents an edge in a graph and is used to connect two APObjects.
A Connection itself can store data in its properties and attributes fields.
*/
@interface APConnection : NSObject <APObjectPropertyMapping> {
NSMutableDictionary *_snapShot;
}
@property (nonatomic, strong) NSString *createdBy;
@property (nonatomic, strong) NSString *objectAId;
@property (nonatomic, strong) NSString *objectBId;
@property (nonatomic, strong) APObject *objectA;
@property (nonatomic, strong) APObject *objectB;
@property (nonatomic, strong) NSString *objectId;
@property (nonatomic, strong) NSString *labelA;
@property (nonatomic, strong) NSString *labelB;
@property (nonatomic, strong) NSString *typeA;
@property (nonatomic, strong) NSString *typeB;
@property (nonatomic, strong) NSString *relationId;
@property (nonatomic, strong) NSString *relationType;
@property (nonatomic, strong, readonly) NSString *lastModifiedBy;
@property (nonatomic, strong, readonly) NSDate *utcDateCreated;
@property (nonatomic, strong, readonly) NSDate *utcLastModifiedDate;
@property (nonatomic, strong, readonly) NSNumber *revision;
@property (nonatomic, strong, readonly) NSMutableArray *properties;
@property (nonatomic, strong, readonly) NSMutableDictionary *attributes;
@property (nonatomic, strong) NSArray *tags;
@property (nonatomic, strong) NSMutableSet *tagsToAdd;
@property (nonatomic, strong) NSMutableSet *tagsToRemove;
/** @name Initializing an APConnection instance*/
/**
Initialize and return an APConnection for the provided relation type.
@param relationType The name of the relation. This is specified while creating the type.
*/
+ (instancetype) connectionWithRelationType:(NSString*)relationType;
/**
Initialize and return an APConnection for the provided relation type.
@param relationType The name of the relation. This is specified while creating the type.
*/
- (instancetype) initWithRelationType:(NSString*)relationType;
/** @name Creating APConnection */
/**
@see createConnectionWithSuccessHandler:failureHandler:
*/
- (void) create;
/**
@see createConnectionWithSuccessHandler:failureHandler:
*/
- (void) createConnectionWithFailureHandler:(APFailureBlock)failureBlock;
/**
Create an APConnection between two APObjects on the remote server.
This method requires the objectAId, objectBId, labelA and labelB properties to be set.
@param successBlock Block invoked when the create operation is successful.
@param failureBlock Block invoked when the create operation fails.
*/
- (void) createConnectionWithSuccessHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see createConnectionWithObjectA:objectB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectA:(APObject*)objectA objectB:(APObject*)objectB;
/**
@see createConnectionWithObjectA:objectB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectA:(APObject*)objectA objectB:(APObject*)objectB failureHandler:(APFailureBlock)failureBlock;
/**
Creates an APConnection between two APObjects.
This method will set labelA and labelB as the typeName of objectA and objectB.
@param objectA The object to create a connection from.
@param objectB The object to create a connection to.
@param successBlock Block invoked when the create operation is successful.
@param failureBlock Block invoked when the create operation fails.
*/
- (void) createConnectionWithObjectA:(APObject*)objectA objectB:(APObject*)objectB successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see createConnectionWithObjectA:objectB:labelA:labelB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectA:(APObject*)objectA objectB:(APObject*)objectB labelA:(NSString*)labelA labelB:(NSString*)labelB;
/**
@see createConnectionWithObjectA:objectB:labelA:labelB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectA:(APObject*)objectA objectB:(APObject*)objectB labelA:(NSString*)labelA labelB:(NSString*)labelB failureHandler:(APFailureBlock)failureBlock;
/**
Creates an APConnection between two APObjects. The labels on either side of the connection are specified as parameters.
@param objectA The object to create a connection from.
@param objectB The object to create a connection to.
@param labelA The label at the starting vertex of the connection.
@param labelB The label at the end vertex of the connection.
@param successBlock Block invoked when the create operation is successful.
@param failureBlock Block invoked when the create operation fails.
*/
- (void) createConnectionWithObjectA:(APObject*)objectA objectB:(APObject*)objectB labelA:(NSString*)labelA labelB:(NSString*)labelB successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see createConnectionWithObjectA:objectB:labelA:labelB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectAId:(NSString*)objectAId objectBId:(NSString*)objectBId labelA:(NSString*)labelA labelB:(NSString*)labelB;
/**
@see createConnectionWithObjectA:objectB:labelA:labelB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectAId:(NSString*)objectAId objectBId:(NSString*)objectBId labelA:(NSString*)labelA labelB:(NSString*)labelB failureHandler:(APFailureBlock)failureBlock;
/**
Creates an APConnection between two APObjects. The labels on either side of the connection are specified as parameters.
@param objectAId Object Id of the object to create a connection from.
@param objectBId Object Id of the object to create a connection to.
@param labelA The label at the starting vertex of the connection.
@param labelB The label at the end vertex of the connection.
@param successBlock Block invoked when the create operation is successful.
@param failureBlock Block invoked when the create operation fails.
*/
- (void) createConnectionWithObjectAId:(NSString*)objectAId objectBId:(NSString*)objectBId labelA:(NSString*)labelA labelB:(NSString*)labelB successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see createConnectionWithObjectA:objectBId:labelA:labelB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectA:(APObject*)objectA objectBId:(NSString*)objectBId labelA:(NSString*)labelA labelB:(NSString*)labelB;
/**
@see createConnectionWithObjectA:objectBId:labelA:labelB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectA:(APObject*)objectA objectBId:(NSString*)objectBId labelA:(NSString*)labelA labelB:(NSString*)labelB failureHandler:(APFailureBlock)failureBlock;
/**
Creates an APConnection between a new and an existing objects. The labels on either side of the connection are specified as parameters.
@param objectA The object to create a connection from.
@param objectBId Object Id of the object to create a connection to.
@param labelA The label at the starting vertex of the connection.
@param labelB The label at the end vertex of the connection.
@param successBlock Block invoked when the create operation is successful.
@param failureBlock Block invoked when the create operation fails.
*/
- (void) createConnectionWithObjectA:(APObject*)objectA objectBId:(NSString*)objectBId labelA:(NSString*)labelA labelB:(NSString*)labelB successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see createConnectionWithObjectA:objectBId:labelA:labelB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectAId:(NSString*)objectAId objectB:(APObject*)objectB labelA:(NSString*)labelA labelB:(NSString*)labelB;
/**
@see createConnectionWithObjectA:objectBId:labelA:labelB:successHandler:failureHandler:
*/
- (void) createConnectionWithObjectAId:(NSString*)objectAId objectB:(APObject*)objectB labelA:(NSString*)labelA labelB:(NSString*)labelB failureHandler:(APFailureBlock)failureBlock;
/**
Creates an APConnection between a new and an existing objects. The labels on either side of the connection are specified as parameters.
@param objectAId Object Id of the object to create a connection from.
@param objectB The object to create a connection to.
@param labelA The label at the starting vertex of the connection.
@param labelB The label at the end vertex of the connection.
@param successBlock Block invoked when the create operation is successful.
@param failureBlock Block invoked when the create operation fails.
*/
- (void) createConnectionWithObjectAId:(NSString*)objectAId objectB:(APObject*)objectB labelA:(NSString*)labelA labelB:(NSString*)labelB successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/** @name Updating APConnection */
/**
@see updateConnectionWithRevisionNumber:successHandler:failureHandler:
*/
- (void) updateConnection;
/**
@see updateConnectionWithRevisionNumber:successHandler:failureHandler:
*/
- (void) updateConnectionWithFailureHandler:(APFailureBlock)failureBlock;
/**
@see updateConnectionWithRevisionNumber:successHandler:failureHandler:
*/
- (void) updateConnectionWithSuccessHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
Method used to update an APConnection.
@param revision Revision number to use for update
@param successBlock Block invoked when the update operation is successful.
@param failureBlock Block invoked when the update operation fails.
*/
- (void) updateConnectionWithRevisionNumber:(NSNumber*)revision successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/** @name Fetching APConnection */
/**
@see fetchConnectionWithPropertiesToFetch:successHandler:failureHandler:
*/
- (void) fetchConnection;
/**
@see fetchConnectionWithPropertiesToFetch:successHandler:failureHandler:
*/
- (void) fetchConnectionWithFailureHandler:(APFailureBlock)failureBlock;
/**
@see fetchConnectionWithPropertiesToFetch:successHandler:failureHandler:
*/
- (void) fetchConnectionWithSuccessHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
Fetch a connection. This method will use the objectId property to fetch the connection.
@param propertiesToFetch Array of properties to be fetched excluding all other.
@param successBlock Block invoked when the connection is fetched
@param failureBlock Block invoked when the fetch call fails
*/
- (void) fetchConnectionWithPropertiesToFetch:(NSArray*)propertiesToFetch successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/** @name Deleting APConnection */
/**
@see deleteConnectionWithSuccessHandler:failureHandler:
*/
- (void) deleteConnection;
/**
@see deleteConnectionWithSuccessHandler:failureHandler:
*/
- (void) deleteConnectionWithFailureHandler:(APFailureBlock)failureBlock;
/**
Deletes an APConnection.
This method requires the relationType and objectId to be set.
@param successBlock Block invoked when delete is successful.
@param failureBlock Block invoked when delete fails.
*/
- (void) deleteConnectionWithSuccessHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/** @name Setting and Getting properties, attributes and tags of APObject */
/**
Method used to add a property to the APObject.
@param keyName key of the data item to be stored.
@param object Corresponding value to the key.
*/
- (void) addPropertyWithKey:(NSString*)keyName value:(id) object;
/**
Method used to update an existing property.
Call update after this method call to persist the update.
@param keyName key of the data item to be updated.
@param object Corresponding value to the key.
*/
- (void) updatePropertyWithKey:(NSString*)keyName value:(id) object;
/**
Method used to delete a property.
Call update after this method call to persist the change.
@param keyName key of the data item to be removed.
*/
- (void) removePropertyWithKey:(NSString*)keyName;
/**
Method used to retrieve a property using its key.
@param keyName key of the date item to be removed.
*/
- (instancetype) getPropertyWithKey:(NSString*)keyName;
/**
Method used to add an attibute to the APObject. Attributes are used to store extra information.
@param keyName key of the data item to be stored.
@param object Corresponding value to the key.
*/
- (void) addAttributeWithKey:(NSString*)keyName value:(id) object;
/**
Method used to update an attribute.
Call update after this method call to persist the change
@param keyName key of the attribute to be updated.
@param object Corresponding value to the key.
*/
- (void) updateAttributeWithKey:(NSString*)keyName value:(id) object;
/**
Method used to remove an attribute.
Call update after this method call to persist the change
@param keyName key of the attribute to be removed.
*/
- (void) removeAttributeWithKey:(NSString*)keyName;
@end
/**
Helper class for APConnection performing class level operations.
*/
@interface APConnections : NSObject
/** @name Searching for APConnection */
/**
@see searchAllConnectionsWithRelationType:successHandler:failureHandler:
*/
+ (void) searchAllConnectionsWithRelationType:(NSString*)relationType successHandler:(APPagedResultSuccessBlock)successBlock;
/**
Search for all APConnections of a particular relation type.
@param relationType The relation type that the connections should belong to.
@param successBlock Block invoked when the search call is successful.
@param failureBlock Block invoked when the search call fails.
*/
+ (void) searchAllConnectionsWithRelationType:(NSString*)relationType successHandler:(APPagedResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see searchAllConnectionsWithRelationType:withQuery:successHandler:failureHandler:
*/
+ (void) searchAllConnectionsWithRelationType:(NSString*)relationType withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock;
/**
Searches for APConnections and filters the result according to the query provided.
@param relationType The relation type that the connections should belong to.
@param query String representation of an APQuery instance.
@param successBlock Block invoked when the search call is successful.
@param failureBlock Block invoked when the search call fails.
*/
+ (void) searchAllConnectionsWithRelationType:(NSString*)relationType withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see searchAllConnectionsWithRelationType:byObjectId:withLabel:withQuery:successHandler:failureHandler:
*/
+ (void) searchAllConnectionsWithRelationType:(NSString*)relationType byObjectId:(NSString*)objectId withLabel:(NSString*)label withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock;
/**
Searches for APConnections of a particular relation type by endpoint.
@param relationType The relation type that the connections should belong to.
@param objectId The object Id of the object of the connection.
@param label The label of the endpoint of the connection.
@param query String representation of an APQuery instance.
@param successBlock Block invoked when the search call is successful.
@param failureBlock Block invoked when the search call fails.
*/
+ (void) searchAllConnectionsWithRelationType:(NSString*)relationType byObjectId:(NSString*)objectId withLabel:(NSString*)label withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see searchAllConnectionsWithRelationType:fromObjectId:toObjectId:labelB:withQuery:successHandler:failureHandler:
*/
+ (void) searchAllConnectionsWithRelationType:(NSString*)relationType fromObjectId:(NSString *)objectAId toObjectId:(NSString *)objectBId labelB:(NSString*)labelB withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock;
/**
Searches for APConnections and from a specific object to a specific object.
@param relationType The relation type that the connections should belong to.
@param objectAId The object Id of the object the connection is from.
@param objectBId The object Id of the object the connection is to.
@param labelB The label for objectB endpoint, only required if objectA and objectB are both of the same type.
@param query String representation of an APQuery instance.
@param successBlock Block invoked when the search call is successful.
@param failureBlock Block invoked when the search call fails.
*/
+ (void) searchAllConnectionsWithRelationType:(NSString*)relationType fromObjectId:(NSString *)objectAId toObjectId:(NSString *)objectBId labelB:(NSString*)labelB withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see searchAllConnectionsFromObjectId:toObjectId:withQuery:successHandler:failureHandler:
*/
+ (void) searchAllConnectionsFromObjectId:(NSString *)objectAId toObjectId:(NSString *)objectBId withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock;
/**
Searches for Connections between the single object and any of the objects in the list and returns the paginated list of all connections .
@param objectAId - ID of the APObject from which the connections are to be retrieved.
@param objectBId - ID of the APObject to which the connections are to be retrieved.
@param query String representation of an APQuery instance.
@param successBlock Block invoked when the search call is successful.
@param failureBlock Block invoked when the search call fails.
*/
+ (void) searchAllConnectionsFromObjectId:(NSString *)objectAId toObjectId:(NSString *)objectBId withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see searchAllConnectionsFromObjectId:toObjectIds:withQuery:successHandler:failureHandler:
*/
+ (void) searchAllConnectionsFromObjectId:(NSString *)objectId toObjectIds:(NSArray *)objectIds withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock;
/**
Searches for Connections between the single object and any of the objects in the list and returns the paginated list of all connections .
@param objectId The id of the APObject for which the connections are to be retrieved.
@param objectIds An array of objectIds.
@param query String representation of an APQuery instance.
@param successBlock Block invoked when the search call is successful.
@param failureBlock Block invoked when the search call fails.
*/
+ (void) searchAllConnectionsFromObjectId:(NSString *)objectId toObjectIds:(NSArray *)objectIds withQuery:(NSString*)query successHandler:(APPagedResultSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/** @name Fetching APConnection */
/**
@see fetchConnectionWithRelationType:connectionObjectId:propertiesToFetch:successHandler:failureHandler:
*/
+ (void) fetchConnectionWithRelationType:(NSString*)relationType connectionObjectId:(NSString*)objectId successHandler:(APObjectsSuccessBlock)successBlock;
/**
@see fetchConnectionWithRelationType:connectionObjectId:propertiesToFetch:successHandler:failureHandler:
*/
+ (void) fetchConnectionWithRelationType:(NSString*)relationType connectionObjectId:(NSString*)objectId successHandler:(APObjectsSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
Fetch an APConnection of a particular relation type.
@param relationType The name of the relation. A connection of this relation name is retrieved.
@param objectId The id of the connection to retrieve.
@param propertiesToFetch Array of properties to be fetched excluding all other.
@param successBlock Block invoked when the fetch call is successful. The block returns the results in the form of an array of objects.
@param failureBlock Block invoked when the fetch call operation fails.
*/
+ (void) fetchConnectionWithRelationType:(NSString*)relationType connectionObjectId:(NSString*)objectId propertiesToFetch:(NSArray*)propertiesToFetch successHandler:(APObjectsSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see fetchConnectionsWithRelationType:connectionObjectIds:propertiesToFetch:successHandler:failureHandler:
*/
+ (void) fetchConnectionsWithRelationType:(NSString*)relationType connectionObjectIds:(NSArray*)objectIds successHandler:(APObjectsSuccessBlock)successBlock;
/**
@see fetchConnectionsWithRelationType:connectionObjectIds:propertiesToFetch:successHandler:failureHandler:
*/
+ (void) fetchConnectionsWithRelationType:(NSString*)relationType connectionObjectIds:(NSArray*)objectIds successHandler:(APObjectsSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
Fetches multiple APConnections from the remote server.
@param relationType The name of the relation. Connections of this relation are retrieved.
@param objectIds An array of objectIds. Connections with these object ids are fetched.
@param propertiesToFetch Array of properties to be fetched excluding all other.
@param successBlock Block invoked when the fetch call is successful. The block returns the results in the form of an array of objects.
@param failureBlock Block invoked when the fetch call operation fails.
*/
+ (void) fetchConnectionsWithRelationType:(NSString*)relationType connectionObjectIds:(NSArray*)objectIds propertiesToFetch:(NSArray*)propertiesToFetch successHandler:(APObjectsSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
@see fetchObjectsConnectedToObjectOfType:withObjectId:withRelationType:fetchConnections:successHandler:failureHandler:
*/
+ (void) fetchObjectsConnectedToObjectOfType:(NSString*)objectType withObjectId:(NSString*)objectId withRelationType:(NSString*)relationType fetchConnections:(BOOL)fetchConnections successHandler:(APObjectsSuccessBlock)successBlock;
+ (void) fetchObjectsConnectedToObjectOfType:(NSString*)objectType withObjectId:(NSString*)objectId withRelationType:(NSString*)relationType fetchConnections:(BOOL)fetchConnections successHandler:(APObjectsSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/**
Fetches nodes of coonected objects with connections.
@param objectType Type of the object to fetch the connected objects from.
@param objectId Object Id of the object to fetch the connected objects from.
@param relationType The name of the relation. Connections of this relation are retrieved.
@param fetchConnections BOOL value indicating whether the connections between the objects need to be fetched.
@param propertiesToFetch Array of properties to be fetched excluding all other.
@param successBlock Block invoked when the fetch call is successful. The block returns the results in the form of an array of APGraphNodes.
@param failureBlock Block invoked when the fetch call operation fails.
*/
+ (void) fetchObjectsConnectedToObjectOfType:(NSString*)objectType withObjectId:(NSString*)objectId withRelationType:(NSString*)relationType fetchConnections:(BOOL)fetchConnections propertiesToFetch:(NSArray*)propertiesToFetch successHandler:(APObjectsSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
/** @name Deleting APConnection */
/**
@see deleteConnectionsWithRelationType:objectIds:successHandler:failureHandler:
*/
+ (void) deleteConnectionsWithRelationType:(NSString*)relationType objectIds:(NSArray*)objectIds;
/**
@see deleteConnectionsWithRelationType:objectIds:successHandler:failureHandler:
*/
+ (void) deleteConnectionsWithRelationType:(NSString*)relationType objectIds:(NSArray*)objectIds failureHandler:(APFailureBlock)failureBlock;
/**
Deletes multiple APConnections.
@param relationType The name of the relation. Connections of this relation name will be deleted.
@param objectIds An array of objectIds. APConnections having these object ids will be deleted.
@param successBlock Block invoked when the delete call is successful.
@param failureBlock Block invoked when the delete call fails.
*/
+ (void) deleteConnectionsWithRelationType:(NSString*)relationType objectIds:(NSArray*)objectIds successHandler:(APSuccessBlock)successBlock failureHandler:(APFailureBlock)failureBlock;
@end
| 46.872137 | 322 | 0.810553 |
9faaf5fe2e23d187736e55e278dcda4a6b0315f7 | 2,534 | c | C | src/main.c | real-watson/linux-basic | b0c967e40279a98285f9f13e51e92ed3297e792a | [
"BSD-2-Clause"
] | null | null | null | src/main.c | real-watson/linux-basic | b0c967e40279a98285f9f13e51e92ed3297e792a | [
"BSD-2-Clause"
] | 5 | 2020-03-21T09:50:24.000Z | 2020-07-25T09:53:37.000Z | src/main.c | real-watson/linux-basic | b0c967e40279a98285f9f13e51e92ed3297e792a | [
"BSD-2-Clause"
] | null | null | null | #include <stdio.h>
#include <string.h>
#include "data.h"
#include "file.h"
#include "endian.h"
#include "algorithm.h"
#include "util.h"
#define DEBUG_LAST_VERSION 0
/*main function*/
int main(void)
{
#if DEBUG_LAST_VERSION
int a[10];
random_number_callback(a,10,get_random_number);
printf("back to interviewing\n");
printf("The size of them are %lu for struct, %lu for union in same data \n", SIZEOFSTRUCT, SIZEOFUNION); printf("The fixed structs is %lu\n",SIZEOFALL);
int res1,res2; int x = 9; int y = 29; char *string = NULL;
char *str = NULL;
res1 = file_size_withf("../file/test.txt");
res2 = file_size_withoutf("../file/test.txt");
printf("The size of file is %d,and %d\n",res1,res2);
printf("The biggest one is %d %d\n",MAX_2(1,2),MAX_3(1,2,3));
self_swap_number(&x,&y);
printf("The swap numnber is %d %d\n",x,y);
self_all_number();
size_space_full();
get_memory(&string,100);/*pass the ptr*/
strcpy(string,"hello");
printf("The string is %s\n",string);
printf("The add is %p\n",&string);
res_get_memory();
get_memory_zero(2);
printf("The second is %d\n",SECOND_YEAR);
char dst[64] = "";
char src[64] = "watson";
self_strcpy(dst,src);
printf("The dst is %s\n",dst);
printf("The dst string is %s\n",copy_string(src));
memory_divide();
/*get digits*/
char srcstr[32] = "0i0ii1j1j1j888";
self_get_digits(srcstr);
int mess[10] = {12,23,2,33,22,1123,3,44,5,42};
int i;
bubble_sort(mess,10);
for(i=0;i<10;i++)
printf("The sort like %d\n",mess[i]);
int be = 99;
int af = 88;
printf("before the be is %d af is %d\n",be,af);
SWAP_NUMBER(&be,&af);
printf("after the be is %d af is %d\n",be,af);
const char source[32] = "ihelloworld";
char destination[32] = "ihelloworld";
int ret;
ret = self_strcmp(source,destination);
printf("The ret is %d\n",ret);
ret = self_strncmp(source,destination,8);
printf("The ret is %d\n",ret);
char strlenstr[32] = "Iamfromyours";
printf("The len of str is %d\n",self_strlen1(strlenstr));
printf("The len of str is %d\n",self_strlen2(strlenstr));
self_memset(strlenstr, 0, 0);
printf("The strlenstr is %s\n",strlenstr);
char cpy[32] = "watsonnew";
char new[32] = "";
char old[32] = "";
self_memcpy(new,cpy,sizeof(cpy));
self_memmove(old,cpy,sizeof(cpy));
printf("The new is %s\n",new);
printf("The old is %s\n",old);
calculate(10,19);
char move[32] = "123456789";
move_nstr(move,3);
printf("The move is %s\n",move);
int bit = 0x07;
reset_nbit(bit,9);
#endif
print_version();
char cmd[32] = "ls";
running_command(cmd);
return 0;
}
| 29.811765 | 153 | 0.668508 |
ba0045e7225e0ab408268cf7c2cf6473f1a4072f | 9,277 | h | C | tdbtg_preorderer.h | google/topdown-btg-preordering | 32b78760a987821e669de4b36406eca6c575d15e | [
"Apache-2.0"
] | 21 | 2016-01-24T05:25:33.000Z | 2022-01-28T01:56:41.000Z | tdbtg_preorderer.h | google/topdown-btg-preordering | 32b78760a987821e669de4b36406eca6c575d15e | [
"Apache-2.0"
] | null | null | null | tdbtg_preorderer.h | google/topdown-btg-preordering | 32b78760a987821e669de4b36406eca6c575d15e | [
"Apache-2.0"
] | 7 | 2016-02-09T11:11:00.000Z | 2021-10-12T03:17:14.000Z | // Copyright 2015 Google 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.
// Top-Down BTG-based preorderer.
#ifndef TDBTG_PREORDERER_H_
#define TDBTG_PREORDERER_H_
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
#include "mini_hash_map.h"
class TDBTGPreorderer {
public:
static constexpr int kNumFeatures = 3; // Number of features for each token.
typedef std::vector<std::string> Token;
typedef std::vector<Token> Sentence;
// The index of the original token for each token in pre-ordered sentence.
typedef std::vector<int> Order;
// The indices of the target tokens aligned to each source token.
typedef std::vector<std::set<int> > Alignment;
// Read annotated data.
static void ReadSentences(std::ifstream *file,
std::vector<Sentence> *sentences);
// Read alignment data.
static void ReadAlignments(std::ifstream *file,
std::vector<Alignment> *alignments);
TDBTGPreorderer();
~TDBTGPreorderer();
// Set parameters for the instance.
// The following keys and values are accepted:
// - key="beam_width", value=(integer greater than 0)
// Set the number of candidates considered in beam search of BTG parsing.
// - key="training_iterations", value=(integer greater than 0)
// Set the number of training iterations of online Perceptron.
// - key="min_updates", value=(integer)
// Set the minimum number of updates that features are not dropped.
void Configure(const std::string &key, const std::string &value);
void ReadModel(std::ifstream *file);
void WriteModel(std::ofstream *file) const;
// Pre-order the given sentence, and return the best result.
void Preorder(const Sentence &sentence, Order *order) const;
// Preorder the given sentence, and return the (<rank_in_nbest> + 1)-th best
// result in the n-best results.
void NbestPreorder(const Sentence &sentence, int rank_in_nbest,
Order *order) const;
// Preorder the given sentence, and return the BTG-bracketed sentence.
void Bracket(const Sentence &sentence, std::string *bracket) const;
// Train model parameters using the given sentences and word alignments.
void Train(const std::vector<Sentence> &sentences,
const std::vector<Alignment> &alignments);
private:
// Identity hash function.
struct Hash {
std::size_t operator()(uint64_t x) const {
return x;
}
};
// Feature set of a sentence.
struct FeatureSet {
size_t length; // Sentence length.
std::vector<std::vector<uint64_t> > sentence_fp; // Fingerprints of tokens.
};
// Word order constraints.
typedef std::vector<int> Constraint;
// Parser action represented with pivot and label, which means to split a span
// [bgn, end) into [bgn, pivot) and [pivot, end) with label.
typedef std::pair<int, bool> ParserAction;
// Span that is covered by a subtree.
struct ParserSpan {
int bgn; // Beginning position of the span.
int end; // Ending position of the span.
int action_id; // Id of the action which made this span.
ParserSpan(int bgn_, int end_, int action_id_)
: bgn(bgn_), end(end_), action_id(action_id_) {
}
bool operator==(const struct ParserSpan &x) const {
return (x.bgn == bgn && x.end == end && x.action_id == action_id);
}
};
// State of the incremental parser.
struct ParserState {
double score; // Accumulated score.
bool valid; // Whether the tree constructed so far satisfies constraints.
std::vector<ParserSpan> stack; // Stack of open spans.
std::vector<ParserAction> actions; // History of actions.
// Make an initial state for the sentences with <len> tokens.
explicit ParserState(int len) : score(0.0), valid(true) {
if (len >= 2) {
stack.emplace_back(0, len, -1);
}
}
// Make a new state by applying <action> to the old state.
ParserState(const ParserState &state, const ParserAction &action,
double new_score, bool new_valid)
: stack(state.stack), actions(state.actions) {
Advance(action, new_score, new_valid);
}
// Change the state by applying the specified action.
void Advance(const ParserAction &action, double new_score, bool new_valid) {
score = new_score;
valid = new_valid;
const ParserSpan span = stack.back();
stack.pop_back();
if (action.first - span.bgn >= 2) {
stack.emplace_back(span.bgn, action.first, actions.size());
}
if (span.end - action.first >= 2) {
stack.emplace_back(action.first, span.end, actions.size());
}
actions.push_back(action);
}
bool operator<(const ParserState &rhs) const {
// Elements with smaller scores have higher priorities.
return (score > rhs.score);
}
};
typedef std::priority_queue<ParserState> Agenda;
struct Subtree {
int bgn;
int end;
int pivot;
bool label;
Subtree(int bgn_, int end_, int pivot_, bool label_)
: bgn(bgn_), end(end_), pivot(pivot_), label(label_) {
}
bool operator==(const struct Subtree &x) const {
return (x.bgn == bgn && x.end == end && x.pivot == pivot &&
x.label == label);
}
};
// Parse the given sentence, and obtain n-best results.
// In training, <constraint> should be the word order constraint, and
// <oracle_actions> returns the action sequence satisfying the constraint.
// In testing, <constraint> should be nullptr.
void Parse(const FeatureSet &feature_set, const Constraint *constraint,
std::vector<std::vector<ParserAction> > *nbest_actions,
std::vector<ParserAction> *oracle_actions) const;
// Check the validity of <sentence>, and convert it to a feature set.
static void ValidateSentence(const Sentence &sentence,
FeatureSet *feature_set);
// Make a feature set from <sentence>.
static void MakeFeatureSet(const Sentence &sentence, FeatureSet *feature_set);
// Convert the action sequence to pre-ordered token indices.
static void ActionsToOrder(const std::vector<ParserAction> &actions,
Order *order);
// Convert the action sequence to a BTG-bracketed string.
static void ActionsToTree(const Sentence &sentence,
const std::vector<ParserAction> &actions,
std::string *tree);
// Convert the action sequence to a subtree sequence.
static void ActionsToSubtrees(const std::vector<ParserAction> &actions,
std::vector<Subtree> *subtrees);
// Check if the constraint is BTG-parsable.
static bool BTGParsable(const Constraint &constraint);
// Convert word alignment to word order constraint.
static bool AlignmentToConstraint(const Alignment &alignment,
Constraint *constraint);
// Order relation for two source tokens with word alignment information.
static bool LessOrEqualAlignment(const std::set<int> &lhs,
const std::set<int> &rhs);
// Add a new parser state to the agenda.
void AddState(const ParserState &state, const std::vector<uint64_t> &features,
const ParserAction &action, bool valid,
const Constraint *constraint, Agenda *agenda,
double *oracle_score, std::vector<ParserAction> *oracle_actions,
int *num_valid) const;
// Update feature weights.
void UpdateWeights(const FeatureSet &feature_set,
const std::vector<ParserAction> &actions_ref,
const std::vector<ParserAction> &actions_sys,
double coefficient);
// Generate features for the given configuration.
static void MakeFeatures(const FeatureSet &feature_set,
const ParserState &state, const ParserSpan &span,
int pivot, std::vector<uint64_t> *features);
// Beam width in parsing.
int beam_width_;
// Number of training iterations of Perceptron.
int training_iterations_;
// Minimum updates for features not to be dropped.
int min_updates_;
// Weights of features.
// The size of this vector is 2 (STR and INV).
std::vector<MiniHashMap<uint64_t, float, Hash> > weights_;
// Weights of features used in training.
// The size of this vector is 2 (STR and INV).
std::vector<MiniHashMap<uint64_t, float, Hash> > cached_weights_;
// Number that each feature was updated.
// The size of this vector is 2 (STR and INV).
std::vector<MiniHashMap<uint64_t, int, Hash> > num_updates_;
};
#endif // TDBTG_PREORDERER_H_
| 35.957364 | 80 | 0.665517 |
68597af10e6fb37de03df09fe26bb1b5b5146088 | 3,264 | h | C | src/storage/sqlite3_storage_engine.h | mrofisr/ProcMon-for-Linux | b35d4cc583ec747dfc18dabef974d1a6e5a3eeb0 | [
"MIT"
] | 2,391 | 2020-07-17T01:09:10.000Z | 2021-05-08T21:21:36.000Z | src/storage/sqlite3_storage_engine.h | jarmar/ProcMon-for-Linux | b35d4cc583ec747dfc18dabef974d1a6e5a3eeb0 | [
"MIT"
] | 48 | 2021-02-15T19:21:30.000Z | 2022-02-24T00:57:21.000Z | src/storage/sqlite3_storage_engine.h | jarmar/ProcMon-for-Linux | b35d4cc583ec747dfc18dabef974d1a6e5a3eeb0 | [
"MIT"
] | 138 | 2020-07-17T01:09:26.000Z | 2021-01-16T05:30:46.000Z | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
#pragma once
#include <map>
#include <sqlite3.h>
#include <string>
#include <vector>
#include "storage_engine.h"
#include "../common/telemetry.h"
#include "../display/screen_configuration.h"
class Sqlite3StorageEngine : public IStorageEngine
{
private:
bool ready;
// Since we are only expecting only one writer to access the storage engine at a time,
// this is okay for now. However once more writers are introduced, telemetryCount should
// declared as an atomic.
uint telemetryCount;
std::vector<Event> syscallList;
sqlite3* dbConnection;
std::string addPidFilterToSQLQuery(const std::string initialQuery, std::vector<pid_t> pids, const bool first);
std::string addSyscallFilterToSQLQuery(const std::string initialQuery, std::vector<Event> events, const bool first);
void prepareAndGetFromSqlite3(const std::string raw_sql_statement, std::vector<ITelemetry>& results);
void prepareAndGetIdsFromSqlite3(const std::string raw_sql_statement, std::vector<int>& results);
ITelemetry parseSqlite3Row(sqlite3_stmt *preppedSqlStmt);
std::vector<ITelemetry> getFromSqlite3(sqlite3_stmt* preppedSqlStmt);
std::vector<int> getIdsFromSqlite3(sqlite3_stmt* preppedSqlStmt);
public:
Sqlite3StorageEngine(): ready(false) {};
~Sqlite3StorageEngine();
bool Initialize(const std::vector<Event>& syscalls) override;
// Query API
std::vector<ITelemetry> QueryByPid(pid_t pid, const std::vector<Event>& syscalls = {}) override;
std::vector<ITelemetry> QueryByPids(std::vector<pid_t> pids, const std::vector<Event>& syscalls = {}) override;
std::vector<ITelemetry> QueryByPidInTimespan(
pid_t pid, double start_time = 0.0, double end_time = 0.0, const std::vector<Event>& syscalls = {}) override;
std::vector<ITelemetry> QueryByPidsInTimespan(
std::vector<pid_t> pids, double start_time = 0.0, double end_time = 0.0, const std::vector<Event>& syscalls = {}) override;
std::vector<ITelemetry> QueryByResultCodeInTimespan(
int resultCode, double start_time = 0.0, double end_time = 0.0, const std::vector<Event>& syscalls = {}) override;
std::vector<ITelemetry> QueryByEventsinPage(
std::vector<pid_t> pids, uint pageNumber, uint eventsPerPage, ScreenConfiguration::sort orderBy, bool asc, const std::vector<Event>& syscalls = {}) override;
std::vector<ITelemetry> QueryByFilteredEventsinPage(
std::string filter, std::vector<pid_t> pids, uint pageNumber, uint eventsPerPage, ScreenConfiguration::sort orderBy, bool asc, const std::vector<Event>& syscalls = {}) override;
std::vector<int> QueryIdsBySearch(
std::string search, std::vector<pid_t> pids, ScreenConfiguration::sort orderBy, bool asc, const std::vector<Event>& syscalls = {}) override;
// Store API
bool Store(ITelemetry data) override;
bool StoreMany(std::vector<ITelemetry> data) override;
bool Clear() override;
// Load API
std::tuple<uint64_t, std::string> Load(std::string filePath) override;
// Debug API
int Size() override;
bool Export(std::tuple<uint64_t, std::string> startTime, std::string filePath) override;
}; | 39.804878 | 185 | 0.72212 |
9c5a42aed6d37612d3e02ae100656bf2b6d9478d | 1,039 | c | C | c/isogram/isogram.c | tfoliva/exercism | abf186a96056e8a201d83e792a34edd6b91e9281 | [
"MIT"
] | null | null | null | c/isogram/isogram.c | tfoliva/exercism | abf186a96056e8a201d83e792a34edd6b91e9281 | [
"MIT"
] | null | null | null | c/isogram/isogram.c | tfoliva/exercism | abf186a96056e8a201d83e792a34edd6b91e9281 | [
"MIT"
] | null | null | null | #include "isogram.h"
bool repeated_char(const char* letters, const char x) {
int rep_count = 0;
char c;
while ((c = *letters++))
if (x == c) rep_count++;
return rep_count;
}
bool is_isogram(const char* phrase) {
if (!phrase) return false; // if pointer is NULL or 0
char p = 0;
char letters[26] = {0}; // at max, phrase could contain the whole
// alphabet without repetition
for (int i = 0; (p = *phrase++); ++i) {
if (p < 'A') {
letters[i] = -1;
continue;
}
// guarantee that all letters are lowercase
if (p >= 'A' && p <= 'Z') // if uppercase
p += 32; // convert to lowercase
if (repeated_char(letters, p))
return false;
else
letters[i] = p;
}
return true;
}
| 27.342105 | 74 | 0.41001 |
8418c0985e2e35c46a591adaaf15a9c4f02dd350 | 12,379 | c | C | Amdb32/cookies.c | cixonline/ameol | 21424f53e4bad1ee471ac626d7db9175f2057d62 | [
"Apache-2.0"
] | 1 | 2019-11-08T09:34:53.000Z | 2019-11-08T09:34:53.000Z | Amdb32/cookies.c | cixonline/ameol | 21424f53e4bad1ee471ac626d7db9175f2057d62 | [
"Apache-2.0"
] | 2 | 2016-08-24T10:29:05.000Z | 2021-11-08T13:56:40.000Z | Amdb32/cookies.c | cixonline/ameol | 21424f53e4bad1ee471ac626d7db9175f2057d62 | [
"Apache-2.0"
] | 1 | 2020-12-22T17:24:08.000Z | 2020-12-22T17:24:08.000Z | /* COOKIES.C - Functions that handle cookies
*
* Copyright 1993-2015 CIX Online Ltd, 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 "warnings.h"
#include <windows.h>
#include <windowsx.h>
#include <assert.h>
#include <string.h>
#include "amlib.h"
#include "amuser.h"
#include "amctrls.h"
#include "amdbi.h"
#include "cookie.h"
#define THIS_FILE __FILE__
#define COOKIE_FILENAME "cookie.ini"
#define MAX_COOKIES 20
#pragma pack(1)
typedef struct tagCOOKIEHEADER {
WORD cbIndex; /* Size of index */
WORD cCookies; /* Number of cookies */
} COOKIEHEADER;
#pragma pack()
#pragma pack(1)
typedef struct tagCOOKIEINDEX {
WORD dwSize; /* Size of cookie */
DWORD dwOffset; /* Offset of cookie in file */
} COOKIEINDEX;
#pragma pack()
typedef struct tagCOOKIE {
COOKIEHEADER hdr; /* Header */
COOKIEINDEX FAR * lpIndex; /* Pointer to index */
HNDFILE fh; /* File handle */
} COOKIE, FAR * LPCOOKIE;
LPCOOKIE FASTCALL OpenCookieFile( PTL, BOOL );
BOOL FASTCALL LoadCookie( LPCOOKIE, int, char *, int );
BOOL FASTCALL SaveCookie( LPCOOKIE, int, char *, int );
void FASTCALL CloseCookieFile( LPCOOKIE );
static BOOL fHasCookieFile = FALSE;
static char szCookieFile[ _MAX_PATH ];
/* As from Ameol 2.10, cookies are no longer binary files but a single
* COOKIES.INI file. This function scans every topic and attempts to
* migrate cookies from the *.CKE file to the COOKIES.INI file.
*/
BOOL WINAPI EXPORT Amdb_MigrateCookies( void )
{
PCAT pcat;
PCL pcl;
PTL ptl;
for( pcat = pcatFirst; pcat; pcat = pcat->pcatNext )
for( pcl = pcat->pclFirst; pcl; pcl = pcl->pclNext )
for( ptl = pcl->ptlFirst; ptl; ptl = ptl->ptlNext )
{
LPCOOKIE lpCookie;
if( NULL != ( lpCookie = OpenCookieFile( ptl, FALSE ) ) )
{
char szFileName[ _MAX_FNAME ];
char cBuf[ 256 ];
/* Migrate the settings across.
*/
if( LoadCookie( lpCookie, 0, cBuf, 256 ) )
Amdb_SetCookie( ptl, NEWS_SERVER_COOKIE, cBuf );
if( LoadCookie( lpCookie, 1, cBuf, 256 ) )
Amdb_SetCookie( ptl, FDL_PATH_COOKIE, cBuf );
if( LoadCookie( lpCookie, 2, cBuf, 256 ) )
Amdb_SetCookie( ptl, MAIL_REPLY_TO_COOKIE_1, cBuf );
if( LoadCookie( lpCookie, 2, cBuf, 256 ) )
Amdb_SetCookie( ptl, NEWS_REPLY_TO_COOKIE, cBuf );
if( LoadCookie( lpCookie, 3, cBuf, 256 ) )
Amdb_SetCookie( ptl, NEWS_FULLNAME_COOKIE, cBuf );
if( LoadCookie( lpCookie, 4, cBuf, 256 ) )
Amdb_SetCookie( ptl, NEWS_EMAIL_COOKIE, cBuf );
CloseCookieFile( lpCookie );
/* Vape the cookie file.
*/
wsprintf( szFileName, "%s.CKE", (LPSTR)ptl->tlItem.szFileName );
Amdb_DeleteFile( szFileName );
}
}
return( TRUE );
}
/* This function writes a string to the topic cookie file.
*/
BOOL WINAPI EXPORT Amdb_SetCookie( PTL ptl, LPSTR lpKey, LPSTR lpValue )
{
char szSection[ 256 ];
if( !fHasCookieFile )
{
Amuser_GetActiveUserDirectory( szCookieFile, _MAX_PATH );
strcat( szCookieFile, "\\" COOKIE_FILENAME );
fHasCookieFile = TRUE;
}
/*
!!SM!! - Check we don't write out strings with just spaces in them
*/
StripLeadingTrailingSpaces( lpValue );
wsprintf( szSection, "%s/%s", ptl->pcl->clItem.szFolderName, ptl->tlItem.szTopicName );
return( 0 != WritePrivateProfileString( szSection, lpKey, lpValue, szCookieFile ) );
}
/* This function retrieves a string from the topic cookie file.
*/
BOOL WINAPI EXPORT Amdb_GetCookie( PTL ptl, LPSTR lpKey, LPSTR lpBuf, LPSTR lpDef, int cbMax )
{
char szSection[ 256 ];
BOOL ret;
if( !fHasCookieFile )
{
Amuser_GetActiveUserDirectory( szCookieFile, _MAX_PATH );
strcat( szCookieFile, "\\" COOKIE_FILENAME );
fHasCookieFile = TRUE;
}
/* It turns out that ParseFolderPathname doesn't always return a PTL, it can return
a PCL or PCAT. So we have to check and if it's not a PTL then return the default.
*/
if( Amdb_IsTopicPtr( ptl ) )
wsprintf( szSection, "%s/%s", ptl->pcl->clItem.szFolderName, ptl->tlItem.szTopicName );
else
wsprintf( szSection, "%s/%s", "Oh_I_Dont_Know", "Think_Of_Something_Amusing" );
ret = ( 0 != GetPrivateProfileString( szSection, lpKey, lpDef, lpBuf, cbMax, szCookieFile ));
if (lpBuf[0]=='\x0')
strcpy(lpBuf,lpDef);
return( ret );
}
/* This function moves cookies for a topic to another folder.
*/
void FASTCALL Amdb_MoveCookies( PTL ptl, PCL pclOld )
{
char szSectionOld[ 256 ];
LPSTR lpBuf;
INITIALISE_PTR(lpBuf);
if( !fHasCookieFile )
{
Amuser_GetActiveUserDirectory( szCookieFile, _MAX_PATH );
strcat( szCookieFile, "\\" COOKIE_FILENAME );
fHasCookieFile = TRUE;
}
/* If pclOld is NULL, delete the section.
*/
if( NULL == pclOld )
{
wsprintf( szSectionOld, "%s/%s", ptl->pcl->clItem.szFolderName, ptl->tlItem.szTopicName );
WritePrivateProfileString( szSectionOld, NULL, NULL, szCookieFile );
return;
}
/* Copy across cookies to the new folder, if
* one was specified.
*/
wsprintf( szSectionOld, "%s/%s", pclOld->clItem.szFolderName, ptl->tlItem.szTopicName );
if( fNewMemory( &lpBuf, 32767 ) )
{
if( GetPrivateProfileString( szSectionOld, NULL, "", lpBuf, 32767, szCookieFile ) )
{
char szSection[ 256 ];
LPSTR lpBufPtr;
wsprintf( szSection, "%s/%s", ptl->pcl->clItem.szFolderName, ptl->tlItem.szTopicName );
for( lpBufPtr = lpBuf; *lpBufPtr; lpBufPtr += strlen( lpBufPtr ) + 1 )
{
char szData[ 256 ];
GetPrivateProfileString( szSectionOld, lpBufPtr, "", szData, 256, szCookieFile );
WritePrivateProfileString( szSection, lpBufPtr, szData, szCookieFile );
}
}
FreeMemory( &lpBuf );
}
WritePrivateProfileString( szSectionOld, NULL, NULL, szCookieFile );
}
/* This function opens the cookie file for the specified
* topic. If it doesn't exist and fCreate is TRUE, then we
* create it.
*/
LPCOOKIE FASTCALL OpenCookieFile( PTL ptl, BOOL fCreate )
{
char szFileName[ 13 ];
LPCOOKIE lpCookie;
HNDFILE fh;
INITIALISE_PTR(lpCookie);
/* If cookie loaded, just reopen the file.
*/
wsprintf( szFileName, "%s.CKE", (LPSTR)ptl->tlItem.szFileName );
/* Open the cookie file.
*/
if( HNDFILE_ERROR == ( fh = Amdb_OpenFile( szFileName, AOF_READWRITE ) ) )
{
if( fCreate )
{
/* Create the file and initialise it.
*/
fh = Amdb_CreateFile( szFileName, 0 );
if( HNDFILE_ERROR != fh )
{
COOKIEINDEX FAR * lpidxCookie;
COOKIEHEADER cookieHdr;
INITIALISE_PTR(lpidxCookie);
cookieHdr.cCookies = 0;
cookieHdr.cbIndex = MAX_COOKIES * sizeof(COOKIEINDEX);
if( (COOKIEINDEX FAR *)fNewMemory( &lpidxCookie, cookieHdr.cbIndex ) )
{
memset( lpidxCookie, 0, cookieHdr.cbIndex );
if( !fNewMemory( &lpCookie, sizeof(COOKIE) ) )
FreeMemory( &lpidxCookie );
else
{
lpCookie->hdr = cookieHdr;
lpCookie->lpIndex = lpidxCookie;
lpCookie->fh = fh;
/* Write to the cookie file.
*/
Amfile_Write( fh, (LPSTR)&cookieHdr, sizeof(COOKIEHEADER) );
Amfile_Write( fh, (LPSTR)lpidxCookie, cookieHdr.cbIndex );
}
}
/* Failed? Close file.
*/
if( NULL == lpCookie )
Amfile_Close( fh );
}
}
return( lpCookie );
}
/* If we got our cookie file, read the
* fixed-size header.
*/
if( HNDFILE_ERROR != fh )
{
COOKIEHEADER cookieHdr;
int cRead;
cRead = Amfile_Read( fh, &cookieHdr, sizeof(COOKIEHEADER) );
if( cRead == sizeof(COOKIEHEADER) )
{
COOKIEINDEX FAR * lpidxCookie;
INITIALISE_PTR(lpidxCookie);
/* Allocate memory for the index.
*/
if( (COOKIEINDEX FAR *)fNewMemory( &lpidxCookie, cookieHdr.cbIndex ) )
{
cRead = Amfile_Read( fh, lpidxCookie, cookieHdr.cbIndex );
if( cRead == (int)cookieHdr.cbIndex )
{
/* Allocate a cookie header.
*/
if( !fNewMemory( &lpCookie, sizeof(COOKIE) ) )
FreeMemory( &lpidxCookie );
else
{
lpCookie->hdr = cookieHdr;
lpCookie->lpIndex = lpidxCookie;
lpCookie->fh = fh;
}
}
}
}
/* Failed? Close file.
*/
if( NULL == lpCookie )
Amfile_Close( fh );
}
/* All okay?
*/
return( lpCookie );
}
/* This function closes the open cookie file handle.
*/
void FASTCALL CloseCookieFile( LPCOOKIE lpCookie )
{
if( HNDFILE_ERROR != lpCookie->fh )
{
Amfile_Close( lpCookie->fh );
lpCookie->fh = HNDFILE_ERROR;
}
}
/* This function loads a cookie.
*/
BOOL FASTCALL LoadCookie( LPCOOKIE lpCookie, int nCookie, char * lpstr, int cbMax )
{
/* No cookie if index is out of range or the size of the
* entry is zero.
*/
if( nCookie < MAX_COOKIES )
if( 0L != lpCookie->lpIndex[ nCookie ].dwSize )
{
/* Seek to the file and load the cookie.
*/
if( lpCookie->lpIndex[ nCookie ].dwSize < (DWORD)cbMax )
cbMax = lpCookie->lpIndex[ nCookie ].dwSize;
Amfile_SetPosition( lpCookie->fh, lpCookie->lpIndex[ nCookie ].dwOffset, ASEEK_BEGINNING );
if( (UINT)cbMax == Amfile_Read( lpCookie->fh, lpstr, cbMax ) )
return( TRUE );
}
return( FALSE );
}
/* This function handles renaming of a topic/folder with cookies..
*/
BOOL WINAPI EXPORT Amdb_RenameCookies( LPSTR lpOldName, LPVOID lpNewPtr, BOOL fIsTopic )
{
char szSectionOld[ 8192 ];
LPSTR lpBuf;
PTL newptl;
INITIALISE_PTR(lpBuf);
if( !fHasCookieFile )
{
Amuser_GetActiveUserDirectory( szCookieFile, _MAX_PATH );
strcat( szCookieFile, "\\" COOKIE_FILENAME );
fHasCookieFile = TRUE;
}
newptl = (PTL)lpNewPtr;
if( fIsTopic )
wsprintf( szSectionOld, "%s/%s", newptl->pcl->clItem.szFolderName, lpOldName );
else
wsprintf( szSectionOld, "%s/%s", lpOldName, newptl->tlItem.szTopicName );
/* Copy across cookies to the new folder, if
* one was specified.
*/
if( fNewMemory( &lpBuf, 32767 ) )
{
if( GetPrivateProfileString( szSectionOld, NULL, "", lpBuf, 32767, szCookieFile ) )
{
char szSection[ 256 ];
LPSTR lpBufPtr;
wsprintf( szSection, "%s/%s", newptl->pcl->clItem.szFolderName, newptl->tlItem.szTopicName );
for( lpBufPtr = lpBuf; *lpBufPtr; lpBufPtr += strlen( lpBufPtr ) + 1 )
{
char szData[ 256 ];
GetPrivateProfileString( szSectionOld, lpBufPtr, "", szData, 256, szCookieFile );
WritePrivateProfileString( szSection, lpBufPtr, szData, szCookieFile );
WritePrivateProfileString( szSectionOld, NULL, NULL, szCookieFile );
}
}
FreeMemory( &lpBuf );
}
return( TRUE );
}
| 31.18136 | 102 | 0.589304 |
80c88bcb337344c404733b751273b95cf229d37f | 1,409 | c | C | packages/PIPS/validation/Scilab/COLD-1.0.5.sub/t19.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 51 | 2015-01-31T01:51:39.000Z | 2022-02-18T02:01:50.000Z | packages/PIPS/validation/Scilab/COLD-1.0.5.sub/t19.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 7 | 2017-05-29T09:29:00.000Z | 2019-03-11T16:01:39.000Z | packages/PIPS/validation/Scilab/COLD-1.0.5.sub/t19.c | DVSR1966/par4all | 86b33ca9da736e832b568c5637a2381f360f1996 | [
"MIT"
] | 12 | 2015-03-26T08:05:38.000Z | 2022-02-18T02:01:51.000Z | /*
* (c) HPC Project - 2010-2011 - All rights reserved
*
*/
#include "scilab_rt.h"
int __lv0;
int __lv1;
int __lv2;
int __lv3;
/*----------------------------------------------------*/
/*----------------------------------------------------*/
int main(int argc, char* argv[])
{
scilab_rt_init(argc, argv, COLD_MODE_STANDALONE);
int _tmpxx0[1][2];
_tmpxx0[0][0]=1;
_tmpxx0[0][1]=2;
int _u_a[1][2];
scilab_rt_sub_i2_i2(1,2,_tmpxx0,1,2,_u_a);
scilab_rt_display_s0i2_("a",1,2,_u_a);
int _tmpxx1[1][2];
_tmpxx1[0][0]=1;
_tmpxx1[0][1]=2;
int _u_b[1][2];
scilab_rt_sub_i2_i2(1,2,_tmpxx1,1,2,_u_b);
scilab_rt_display_s0i2_("b",1,2,_u_b);
int _tmpxx2[1][2];
_tmpxx2[0][0]=1;
_tmpxx2[0][1]=2;
int _u_c[1][2];
scilab_rt_sub_i2_i2(1,2,_tmpxx2,1,2,_u_c);
scilab_rt_display_s0i2_("c",1,2,_u_c);
int _tmpxx3[1][2];
_tmpxx3[0][0]=1;
_tmpxx3[0][1]=2;
int _u_d[1][2];
scilab_rt_sub_i2_i2(1,2,_tmpxx3,1,2,_u_d);
scilab_rt_display_s0i2_("d",1,2,_u_d);
double _tmpxx4 = scilab_rt_cos_d0_((SCILAB_PI / 4.));
double _u_e = (-_tmpxx4);
scilab_rt_display_s0d0_("e",_u_e);
double _u_aa[10][10];
scilab_rt_ones_i0i0_d2(10,10,10,10,_u_aa);
double _tmpxx5 = _u_aa[0][0];
double _tmpxx6 = _u_aa[0][1];
double _tmpxx7 = (-_tmpxx5);
double _tmpxx8 = (_tmpxx6*2);
double _u_f = (_tmpxx7-_tmpxx8);
scilab_rt_display_s0d0_("f",_u_f);
scilab_rt_terminate();
}
| 22.725806 | 56 | 0.607523 |
f34edc6bedb119c40b6117b3f3bdcdb23f82532c | 3,019 | h | C | apps/statistics/store.h | VersiraSec/epsilon-cfw | d12b44c6c6668ecc14b60d8dd098ba5c230b1291 | [
"FSFAP"
] | 1,442 | 2017-08-28T19:39:45.000Z | 2022-03-30T00:56:14.000Z | apps/statistics/store.h | VersiraSec/epsilon-cfw | d12b44c6c6668ecc14b60d8dd098ba5c230b1291 | [
"FSFAP"
] | 1,321 | 2017-08-28T23:03:10.000Z | 2022-03-31T19:32:17.000Z | apps/statistics/store.h | VersiraSec/epsilon-cfw | d12b44c6c6668ecc14b60d8dd098ba5c230b1291 | [
"FSFAP"
] | 421 | 2017-08-28T22:02:39.000Z | 2022-03-28T20:52:21.000Z | #ifndef STATISTICS_STORE_H
#define STATISTICS_STORE_H
#include "../shared/memoized_curve_view_range.h"
#include "../shared/double_pair_store.h"
namespace Statistics {
class Store : public Shared::MemoizedCurveViewRange, public Shared::DoublePairStore {
public:
Store();
uint32_t barChecksum() const;
// Histogram bars
double barWidth() const { return m_barWidth; }
void setBarWidth(double barWidth);
double firstDrawnBarAbscissa() const { return m_firstDrawnBarAbscissa; }
void setFirstDrawnBarAbscissa(double firstDrawnBarAbscissa) { m_firstDrawnBarAbscissa = firstDrawnBarAbscissa;}
double heightOfBarAtIndex(int series, int index) const;
double heightOfBarAtValue(int series, double value) const;
double startOfBarAtIndex(int series, int index) const;
double endOfBarAtIndex(int series, int index) const;
double numberOfBars(int series) const;
// return true if the window has scrolled
bool scrollToSelectedBarIndex(int series, int index);
bool isEmpty() const override;
bool seriesIsEmpty(int series) const override;
bool frequenciesAreInteger(int series) const;
int numberOfNonEmptySeries() const override;
// Calculation
double sumOfOccurrences(int series) const;
double maxValueForAllSeries() const;
double minValueForAllSeries() const;
double maxValue(int series) const;
double minValue(int series) const;
double range(int series) const;
double mean(int series) const;
double variance(int series) const;
double standardDeviation(int series) const;
double sampleStandardDeviation(int series) const;
double firstQuartile(int series) const;
double thirdQuartile(int series) const;
double quartileRange(int series) const;
double median(int series) const;
double sum(int series) const;
double squaredValueSum(int series) const;
double squaredOffsettedValueSum(int series, double offset) const;
constexpr static double k_maxNumberOfBars = 10000.0;
constexpr static float k_displayTopMarginRatio = 0.1f;
constexpr static float k_displayRightMarginRatio = 0.04f;
constexpr static int k_bottomMargin = 20;
constexpr static float k_displayLeftMarginRatio = 0.04f;
// DoublePairStore
void set(double f, int series, int i, int j) override;
void deletePairOfSeriesAtIndex(int series, int j) override;
void deleteAllPairsOfSeries(int series) override;
void updateNonEmptySeriesCount();
private:
double defaultValue(int series, int i, int j) const override;
double sumOfValuesBetween(int series, double x1, double x2) const;
double sortedElementAtCumulatedFrequency(int series, double k, bool createMiddleElement = false) const;
double sortedElementAtCumulatedPopulation(int series, double population, bool createMiddleElement = false) const;
int minIndex(double * bufferValues, int bufferLength) const;
// Histogram bars
double m_barWidth;
double m_firstDrawnBarAbscissa;
bool m_seriesEmpty[k_numberOfSeries];
int m_numberOfNonEmptySeries;
};
typedef double (Store::*CalculPointer)(int) const;
}
#endif
| 38.21519 | 115 | 0.787016 |
27fc8f3e38788a50d94216255139d0ec1f1e26d9 | 567 | h | C | Contact.h | OthingsTechnologies/Agenda-con-archivos-en-c- | 3674305edd4e63448eea62ab57b08210dbc22835 | [
"MIT"
] | null | null | null | Contact.h | OthingsTechnologies/Agenda-con-archivos-en-c- | 3674305edd4e63448eea62ab57b08210dbc22835 | [
"MIT"
] | null | null | null | Contact.h | OthingsTechnologies/Agenda-con-archivos-en-c- | 3674305edd4e63448eea62ab57b08210dbc22835 | [
"MIT"
] | null | null | null | //
// Created by emmanuel on 24/05/18.
//
#ifndef METODOSDEORDENAMIENTO_CONTACT_H
#define METODOSDEORDENAMIENTO_CONTACT_H
#include <iostream>
using namespace std;
class Contact {
public:
Contact();
Contact(string name , string phone_number);
Contact *nextContact;
Contact *previousContact;
string getName();
string getPhoneNumber();
void setName(string name);
void setPhoneNumber(string phone_number);
int getId();
private:
int id;
string name;
string phone_number;
};
#endif //METODOSDEORDENAMIENTO_CONTACT_H
| 16.676471 | 47 | 0.714286 |
7dd91d3de600185bc5616612ed8244dfe91a6ae9 | 536 | h | C | pkg/core/src/atpg_mgr.h | DavidLin2015/AtpgSystem | 818b6233cbdfb850c880a328e124e5fde3612f30 | [
"CECILL-B"
] | null | null | null | pkg/core/src/atpg_mgr.h | DavidLin2015/AtpgSystem | 818b6233cbdfb850c880a328e124e5fde3612f30 | [
"CECILL-B"
] | null | null | null | pkg/core/src/atpg_mgr.h | DavidLin2015/AtpgSystem | 818b6233cbdfb850c880a328e124e5fde3612f30 | [
"CECILL-B"
] | 1 | 2021-01-26T08:26:15.000Z | 2021-01-26T08:26:15.000Z | #ifndef _CORE_ATPG_MGR_H_
#define _CORE_ATPG_MGR_H_
#include "atpg.h"
namespace CoreNs {
typedef std::vector<Atpg*> AtpgVec;
class AtpgMgr {
public:
AtpgMgr();
~AtpgMgr();
Circuit *cir_;
FaultMgr *f_mgr_;
PatternMgr *pat_mgr_;
private:
AtpgVec atpgs_;
}; //AtpgMgr
inline AtpgMgr::AtpgMgr() {
cir_ = NULL;
f_mgr_ = NULL;
pat_mgr_ = NULL;
}
inline AtpgMgr::~AtpgMgr() {
//TODO
}
}; //CoreNs
#endif //_CORE_CMD_MGR_H_
| 14.486486 | 37 | 0.565299 |
47bc12f84a64dca66c09050f216232706641277d | 54,813 | c | C | testsuite/EXP_1/test2211.c | ishiura-compiler/CF3 | 0718aa176d0303a4ea8a46bd6c794997cbb8fabb | [
"MIT"
] | 34 | 2017-07-04T14:16:12.000Z | 2021-04-22T21:04:43.000Z | testsuite/EXP_1/test2211.c | ishiura-compiler/CF3 | 0718aa176d0303a4ea8a46bd6c794997cbb8fabb | [
"MIT"
] | 1 | 2017-07-06T03:43:44.000Z | 2017-07-06T03:43:44.000Z | testsuite/EXP_1/test2211.c | ishiura-compiler/CF3 | 0718aa176d0303a4ea8a46bd6c794997cbb8fabb | [
"MIT"
] | 6 | 2017-07-04T16:30:42.000Z | 2019-10-16T05:37:29.000Z |
/*
CF3
Copyright (c) 2015 ishiura-lab.
Released under the MIT license.
https://github.com/ishiura-compiler/CF3/MIT-LICENSE.md
*/
#include<stdio.h>
#include<stdint.h>
#include<stdlib.h>
#include"test1.h"
int64_t t0 = -2111114LL;
volatile uint32_t t3 = 0U;
int16_t x18 = -332;
volatile int32_t t4 = -3282;
uint64_t x22 = 238624108548897719LLU;
int8_t x23 = INT8_MIN;
uint32_t x26 = 950254509U;
int8_t x28 = INT8_MIN;
int32_t x31 = -1;
int16_t x34 = -4640;
uint16_t x39 = UINT16_MAX;
volatile int64_t x50 = INT64_MIN;
static volatile int64_t x55 = 142329180686909LL;
int64_t t12 = INT64_MAX;
static int16_t x60 = INT16_MIN;
uint64_t x62 = 47003613800909045LLU;
int8_t x65 = -14;
static volatile uint64_t x69 = 3724846933360588LLU;
int32_t x70 = INT32_MIN;
static int32_t x75 = -1;
volatile int32_t x77 = -90390381;
volatile uint32_t t19 = 45722U;
int64_t x86 = INT64_MIN;
volatile int64_t t20 = -27850919805LL;
volatile uint16_t x90 = 6257U;
int16_t x92 = INT16_MIN;
uint8_t x93 = 51U;
int16_t x94 = -7;
int64_t x96 = INT64_MIN;
uint8_t x101 = 6U;
int8_t x104 = INT8_MIN;
int32_t t24 = -14849909;
uint32_t x107 = 7984290U;
static int64_t x111 = INT64_MAX;
uint64_t t28 = 2265602545121064467LLU;
int32_t x126 = 2930;
int32_t t30 = INT32_MIN;
volatile int8_t x130 = INT8_MIN;
volatile int64_t x133 = INT64_MIN;
uint16_t x140 = 23550U;
uint64_t x142 = 84460885LLU;
static volatile int32_t x149 = 0;
static volatile int32_t x151 = INT32_MIN;
uint64_t x152 = 4405690452646LLU;
volatile uint64_t x153 = 6843002433201LLU;
int64_t x163 = INT64_MIN;
static uint64_t t39 = 1130LLU;
static int32_t x170 = -1;
int64_t x180 = 1LL;
uint32_t x181 = 5869U;
volatile uint16_t x189 = UINT16_MAX;
int32_t x200 = INT32_MIN;
static uint16_t x201 = 6921U;
uint8_t x203 = 21U;
static volatile int32_t t50 = 3155450;
volatile int64_t t51 = 64LL;
volatile uint32_t x221 = UINT32_MAX;
volatile int32_t x224 = INT32_MIN;
uint16_t x225 = 2U;
int16_t x238 = INT16_MAX;
static volatile uint8_t x246 = UINT8_MAX;
int32_t t60 = 1260;
int32_t x251 = -1;
uint8_t x253 = 7U;
int32_t x254 = INT32_MIN;
uint8_t x263 = 91U;
int32_t x264 = INT32_MAX;
int32_t t65 = -18896;
uint32_t x278 = 80911835U;
volatile uint64_t t68 = 342405473312LLU;
int64_t t69 = 1LL;
int32_t x289 = 6;
volatile int64_t t73 = 1401492781392042LL;
uint8_t x320 = 75U;
static uint64_t t75 = 545971093LLU;
static int8_t x321 = INT8_MAX;
static int64_t x325 = INT64_MIN;
volatile int16_t x326 = INT16_MAX;
static volatile int8_t x332 = -51;
uint32_t x337 = UINT32_MAX;
static volatile uint8_t x341 = 0U;
static int64_t x342 = 2LL;
int32_t x343 = INT32_MIN;
int32_t x345 = INT32_MIN;
uint32_t x348 = UINT32_MAX;
volatile uint32_t t82 = UINT32_MAX;
uint64_t x349 = 4597320LLU;
uint8_t x355 = UINT8_MAX;
int8_t x356 = INT8_MIN;
int16_t x362 = INT16_MIN;
static int64_t x364 = INT64_MAX;
static volatile int32_t x367 = 13;
uint32_t x376 = UINT32_MAX;
static int32_t x378 = -1;
static int32_t x379 = -1;
volatile uint64_t t90 = 10084264388112LLU;
uint64_t x387 = 59290392746061LLU;
uint64_t t92 = 1366LLU;
uint16_t x394 = UINT16_MAX;
int32_t x395 = -1;
uint16_t x398 = 0U;
static uint32_t x399 = 72919195U;
static uint32_t t95 = 170748286U;
int16_t x401 = -1;
uint16_t x406 = 38U;
volatile uint32_t t98 = UINT32_MAX;
uint16_t x414 = 40U;
volatile int64_t x418 = INT64_MIN;
int64_t t102 = 76LL;
int8_t x444 = -15;
int64_t x451 = INT64_MAX;
static int8_t x468 = -28;
uint64_t x472 = 15LLU;
volatile uint64_t t113 = 567819800379792943LLU;
static int32_t x473 = INT32_MIN;
uint16_t x474 = UINT16_MAX;
int64_t x482 = 64035337LL;
int8_t x484 = 5;
static uint32_t x491 = UINT32_MAX;
uint16_t x492 = 50U;
volatile uint16_t x494 = UINT16_MAX;
static int16_t x498 = 14556;
static int64_t x501 = 1369190754LL;
int8_t x505 = -1;
volatile int32_t t124 = -45657;
int32_t x527 = -1;
volatile int8_t x530 = 3;
int8_t x531 = -1;
int64_t x532 = -1LL;
static uint8_t x550 = 1U;
int16_t x554 = INT16_MAX;
int16_t x562 = INT16_MIN;
uint16_t x563 = 297U;
int16_t x565 = -1;
uint64_t x575 = 1147LLU;
int64_t x577 = INT64_MIN;
volatile int16_t x585 = -1;
volatile uint8_t x591 = UINT8_MAX;
int64_t x593 = INT64_MAX;
int64_t x595 = 15399300567975956LL;
static volatile int8_t x596 = INT8_MIN;
int64_t t144 = 856023LL;
int64_t x600 = 4225429277233770106LL;
int16_t x605 = INT16_MIN;
uint16_t x607 = 30U;
int16_t x614 = -28;
volatile int64_t t149 = 21LL;
volatile uint64_t t150 = 2413483144392604897LLU;
int8_t x624 = INT8_MIN;
static int8_t x626 = INT8_MIN;
volatile uint64_t x634 = UINT64_MAX;
volatile uint32_t t155 = 25U;
volatile int8_t x646 = 0;
volatile uint32_t x660 = 485U;
int64_t x675 = 6984LL;
static volatile uint64_t t164 = 556311689948975LLU;
int32_t x679 = INT32_MIN;
volatile uint32_t x687 = 255869018U;
int8_t x689 = -1;
static uint32_t x692 = 745832U;
volatile uint64_t t168 = 502490297211589736LLU;
static volatile uint16_t x699 = 31U;
int16_t x709 = 55;
uint64_t t172 = UINT64_MAX;
volatile uint64_t x713 = UINT64_MAX;
int8_t x719 = INT8_MIN;
int8_t x726 = INT8_MIN;
int8_t x729 = INT8_MAX;
int32_t x732 = 18694136;
static uint64_t t177 = 268342508LLU;
uint8_t x734 = UINT8_MAX;
int64_t x737 = INT64_MAX;
int32_t x740 = -1;
static uint16_t x746 = UINT16_MAX;
static volatile uint8_t x757 = UINT8_MAX;
volatile uint32_t x760 = 4U;
static volatile uint64_t t184 = 23LLU;
uint64_t x769 = 80126526LLU;
int64_t x770 = INT64_MIN;
static int32_t t189 = -4294;
volatile uint8_t x781 = UINT8_MAX;
static int8_t x782 = INT8_MIN;
uint32_t x786 = 553U;
int8_t x788 = -1;
int16_t x793 = -15;
volatile int32_t t193 = -808115;
int16_t x801 = INT16_MIN;
volatile uint64_t t196 = UINT64_MAX;
int16_t x810 = 345;
int32_t x818 = -1;
void f0(void) {
static volatile int8_t x1 = INT8_MIN;
int32_t x2 = INT32_MIN;
int16_t x3 = INT16_MAX;
int64_t x4 = 170383981282904457LL;
t0 = (((x1&x2)/x3)|x4);
if (t0 != -65537LL) { NG(); } else { ; }
}
void f1(void) {
int32_t x5 = INT32_MIN;
volatile int32_t x6 = INT32_MIN;
int32_t x7 = INT32_MIN;
static uint32_t x8 = 1266202096U;
volatile uint32_t t1 = 6U;
t1 = (((x5&x6)/x7)|x8);
if (t1 != 1266202097U) { NG(); } else { ; }
}
void f2(void) {
int8_t x9 = 25;
volatile int32_t x10 = -8;
int16_t x11 = INT16_MIN;
int64_t x12 = INT64_MIN;
int64_t t2 = INT64_MIN;
t2 = (((x9&x10)/x11)|x12);
if (t2 != INT64_MIN) { NG(); } else { ; }
}
void f3(void) {
int32_t x13 = -1008;
int32_t x14 = INT32_MAX;
uint32_t x15 = UINT32_MAX;
int32_t x16 = 3201573;
t3 = (((x13&x14)/x15)|x16);
if (t3 != 3201573U) { NG(); } else { ; }
}
void f4(void) {
int8_t x17 = INT8_MAX;
int8_t x19 = 1;
int32_t x20 = -218;
t4 = (((x17&x18)/x19)|x20);
if (t4 != -202) { NG(); } else { ; }
}
void f5(void) {
static volatile uint16_t x21 = UINT16_MAX;
int64_t x24 = INT64_MIN;
volatile uint64_t t5 = 31LLU;
t5 = (((x21&x22)/x23)|x24);
if (t5 != 9223372036854775808LLU) { NG(); } else { ; }
}
void f6(void) {
static volatile uint64_t x25 = 14719426LLU;
static int16_t x27 = INT16_MIN;
uint64_t t6 = 264047392LLU;
t6 = (((x25&x26)/x27)|x28);
if (t6 != 18446744073709551488LLU) { NG(); } else { ; }
}
void f7(void) {
volatile uint64_t x29 = UINT64_MAX;
int64_t x30 = -15216700LL;
static int8_t x32 = INT8_MIN;
static uint64_t t7 = 88310314889LLU;
t7 = (((x29&x30)/x31)|x32);
if (t7 != 18446744073709551488LLU) { NG(); } else { ; }
}
void f8(void) {
int64_t x33 = INT64_MIN;
uint16_t x35 = UINT16_MAX;
int8_t x36 = INT8_MIN;
int64_t t8 = -4315137243393618887LL;
t8 = (((x33&x34)/x35)|x36);
if (t8 != -128LL) { NG(); } else { ; }
}
void f9(void) {
int64_t x37 = INT64_MIN;
int16_t x38 = INT16_MAX;
int8_t x40 = INT8_MIN;
volatile int64_t t9 = 256181808497LL;
t9 = (((x37&x38)/x39)|x40);
if (t9 != -128LL) { NG(); } else { ; }
}
void f10(void) {
volatile int64_t x41 = -1LL;
static int16_t x42 = INT16_MAX;
volatile uint64_t x43 = 74619895671LLU;
int16_t x44 = INT16_MIN;
uint64_t t10 = 42117757776LLU;
t10 = (((x41&x42)/x43)|x44);
if (t10 != 18446744073709518848LLU) { NG(); } else { ; }
}
void f11(void) {
static int16_t x49 = INT16_MIN;
volatile int8_t x51 = -34;
int64_t x52 = 152626LL;
int64_t t11 = 42596628669664760LL;
t11 = (((x49&x50)/x51)|x52);
if (t11 != 271275648142792691LL) { NG(); } else { ; }
}
void f12(void) {
static uint8_t x53 = 18U;
int16_t x54 = INT16_MIN;
static volatile int64_t x56 = INT64_MAX;
t12 = (((x53&x54)/x55)|x56);
if (t12 != INT64_MAX) { NG(); } else { ; }
}
void f13(void) {
int64_t x57 = -1LL;
int8_t x58 = INT8_MIN;
uint64_t x59 = UINT64_MAX;
static uint64_t t13 = 22583LLU;
t13 = (((x57&x58)/x59)|x60);
if (t13 != 18446744073709518848LLU) { NG(); } else { ; }
}
void f14(void) {
volatile uint16_t x61 = 2689U;
int16_t x63 = -1;
uint32_t x64 = 676570U;
static uint64_t t14 = 217LLU;
t14 = (((x61&x62)/x63)|x64);
if (t14 != 676570LLU) { NG(); } else { ; }
}
void f15(void) {
volatile int16_t x66 = INT16_MAX;
static int8_t x67 = INT8_MIN;
int64_t x68 = -4730220590017090LL;
int64_t t15 = -7LL;
t15 = (((x65&x66)/x67)|x68);
if (t15 != -65LL) { NG(); } else { ; }
}
void f16(void) {
int16_t x71 = INT16_MIN;
int64_t x72 = -227LL;
volatile uint64_t t16 = 557490973492378LLU;
t16 = (((x69&x70)/x71)|x72);
if (t16 != 18446744073709551389LLU) { NG(); } else { ; }
}
void f17(void) {
static volatile int16_t x73 = INT16_MAX;
volatile uint64_t x74 = 3165542LLU;
int16_t x76 = -207;
volatile uint64_t t17 = 30668LLU;
t17 = (((x73&x74)/x75)|x76);
if (t17 != 18446744073709551409LLU) { NG(); } else { ; }
}
void f18(void) {
volatile uint8_t x78 = UINT8_MAX;
int16_t x79 = INT16_MAX;
uint64_t x80 = UINT64_MAX;
uint64_t t18 = UINT64_MAX;
t18 = (((x77&x78)/x79)|x80);
if (t18 != UINT64_MAX) { NG(); } else { ; }
}
void f19(void) {
static volatile int32_t x81 = -1;
uint32_t x82 = 357668220U;
uint8_t x83 = 81U;
uint16_t x84 = UINT16_MAX;
t19 = (((x81&x82)/x83)|x84);
if (t19 != 4456447U) { NG(); } else { ; }
}
void f20(void) {
static int16_t x85 = 16;
uint8_t x87 = UINT8_MAX;
static uint32_t x88 = UINT32_MAX;
t20 = (((x85&x86)/x87)|x88);
if (t20 != 4294967295LL) { NG(); } else { ; }
}
void f21(void) {
static uint8_t x89 = 0U;
static int32_t x91 = -1;
int32_t t21 = -10124974;
t21 = (((x89&x90)/x91)|x92);
if (t21 != -32768) { NG(); } else { ; }
}
void f22(void) {
uint32_t x95 = UINT32_MAX;
volatile int64_t t22 = INT64_MIN;
t22 = (((x93&x94)/x95)|x96);
if (t22 != INT64_MIN) { NG(); } else { ; }
}
void f23(void) {
static int32_t x97 = INT32_MIN;
int64_t x98 = INT64_MIN;
volatile uint32_t x99 = 212485570U;
int32_t x100 = -1;
volatile int64_t t23 = 15488690LL;
t23 = (((x97&x98)/x99)|x100);
if (t23 != -1LL) { NG(); } else { ; }
}
void f24(void) {
int16_t x102 = -1;
volatile int32_t x103 = 41421799;
t24 = (((x101&x102)/x103)|x104);
if (t24 != -128) { NG(); } else { ; }
}
void f25(void) {
uint32_t x105 = 7472608U;
static int32_t x106 = -160491470;
int64_t x108 = -131707740LL;
int64_t t25 = 4LL;
t25 = (((x105&x106)/x107)|x108);
if (t25 != -131707740LL) { NG(); } else { ; }
}
void f26(void) {
int32_t x109 = 29;
int8_t x110 = 1;
uint8_t x112 = UINT8_MAX;
int64_t t26 = -3637996933LL;
t26 = (((x109&x110)/x111)|x112);
if (t26 != 255LL) { NG(); } else { ; }
}
void f27(void) {
int8_t x113 = INT8_MIN;
static volatile int8_t x114 = 1;
uint32_t x115 = 143286171U;
static int16_t x116 = INT16_MIN;
uint32_t t27 = 127465726U;
t27 = (((x113&x114)/x115)|x116);
if (t27 != 4294934528U) { NG(); } else { ; }
}
void f28(void) {
static uint64_t x117 = UINT64_MAX;
static volatile int16_t x118 = INT16_MAX;
volatile int64_t x119 = INT64_MAX;
int32_t x120 = INT32_MIN;
t28 = (((x117&x118)/x119)|x120);
if (t28 != 18446744071562067968LLU) { NG(); } else { ; }
}
void f29(void) {
uint8_t x121 = 6U;
static volatile uint32_t x122 = UINT32_MAX;
volatile int64_t x123 = INT64_MIN;
int64_t x124 = 331424692794224685LL;
int64_t t29 = 7425210426059LL;
t29 = (((x121&x122)/x123)|x124);
if (t29 != 331424692794224685LL) { NG(); } else { ; }
}
void f30(void) {
static volatile int32_t x125 = INT32_MIN;
uint16_t x127 = 6607U;
int32_t x128 = INT32_MIN;
t30 = (((x125&x126)/x127)|x128);
if (t30 != INT32_MIN) { NG(); } else { ; }
}
void f31(void) {
int64_t x129 = INT64_MAX;
uint16_t x131 = 8U;
uint16_t x132 = UINT16_MAX;
volatile int64_t t31 = -9705176170734542LL;
t31 = (((x129&x130)/x131)|x132);
if (t31 != 1152921504606846975LL) { NG(); } else { ; }
}
void f32(void) {
uint16_t x134 = UINT16_MAX;
static int16_t x135 = -1;
int16_t x136 = INT16_MAX;
int64_t t32 = -410LL;
t32 = (((x133&x134)/x135)|x136);
if (t32 != 32767LL) { NG(); } else { ; }
}
void f33(void) {
int8_t x137 = -1;
static int32_t x138 = INT32_MIN;
uint8_t x139 = UINT8_MAX;
int32_t t33 = -14151;
t33 = (((x137&x138)/x139)|x140);
if (t33 != -8421378) { NG(); } else { ; }
}
void f34(void) {
uint8_t x141 = 0U;
int16_t x143 = INT16_MAX;
uint32_t x144 = 21187U;
uint64_t t34 = 7639279059LLU;
t34 = (((x141&x142)/x143)|x144);
if (t34 != 21187LLU) { NG(); } else { ; }
}
void f35(void) {
uint8_t x145 = UINT8_MAX;
uint32_t x146 = 124261171U;
uint8_t x147 = 13U;
int32_t x148 = INT32_MIN;
static uint32_t t35 = 47U;
t35 = (((x145&x146)/x147)|x148);
if (t35 != 2147483651U) { NG(); } else { ; }
}
void f36(void) {
volatile uint16_t x150 = 1729U;
uint64_t t36 = 262065814252LLU;
t36 = (((x149&x150)/x151)|x152);
if (t36 != 4405690452646LLU) { NG(); } else { ; }
}
void f37(void) {
int32_t x154 = INT32_MIN;
int8_t x155 = 30;
int64_t x156 = INT64_MIN;
uint64_t t37 = 741811583462291LLU;
t37 = (((x153&x154)/x155)|x156);
if (t37 != 9223372264917539225LLU) { NG(); } else { ; }
}
void f38(void) {
static int16_t x157 = -1;
uint64_t x158 = 474986LLU;
int32_t x159 = 8;
uint32_t x160 = 686772587U;
uint64_t t38 = 348555593LLU;
t38 = (((x157&x158)/x159)|x160);
if (t38 != 686815215LLU) { NG(); } else { ; }
}
void f39(void) {
uint64_t x161 = 522252LLU;
volatile int64_t x162 = INT64_MIN;
static volatile int32_t x164 = 981853;
t39 = (((x161&x162)/x163)|x164);
if (t39 != 981853LLU) { NG(); } else { ; }
}
void f40(void) {
int16_t x165 = 9;
uint32_t x166 = 243U;
int64_t x167 = INT64_MIN;
static int64_t x168 = INT64_MIN;
volatile int64_t t40 = INT64_MIN;
t40 = (((x165&x166)/x167)|x168);
if (t40 != INT64_MIN) { NG(); } else { ; }
}
void f41(void) {
int32_t x169 = INT32_MIN;
static volatile uint16_t x171 = UINT16_MAX;
uint32_t x172 = 1113U;
volatile uint32_t t41 = 510U;
t41 = (((x169&x170)/x171)|x172);
if (t41 != 4294935641U) { NG(); } else { ; }
}
void f42(void) {
uint64_t x173 = 151224LLU;
int16_t x174 = 3368;
static uint32_t x175 = 219U;
uint8_t x176 = UINT8_MAX;
uint64_t t42 = 91363453LLU;
t42 = (((x173&x174)/x175)|x176);
if (t42 != 255LLU) { NG(); } else { ; }
}
void f43(void) {
static int32_t x177 = 1;
int8_t x178 = INT8_MIN;
int16_t x179 = INT16_MIN;
volatile int64_t t43 = 13703845606LL;
t43 = (((x177&x178)/x179)|x180);
if (t43 != 1LL) { NG(); } else { ; }
}
void f44(void) {
uint32_t x182 = 93963U;
int8_t x183 = INT8_MIN;
volatile int64_t x184 = -1772895329032159LL;
int64_t t44 = 4908868LL;
t44 = (((x181&x182)/x183)|x184);
if (t44 != -1772895329032159LL) { NG(); } else { ; }
}
void f45(void) {
volatile int16_t x185 = -1;
uint32_t x186 = 2123275973U;
static int64_t x187 = -1360668753270LL;
uint64_t x188 = UINT64_MAX;
volatile uint64_t t45 = UINT64_MAX;
t45 = (((x185&x186)/x187)|x188);
if (t45 != UINT64_MAX) { NG(); } else { ; }
}
void f46(void) {
uint8_t x190 = UINT8_MAX;
int8_t x191 = INT8_MIN;
int16_t x192 = INT16_MIN;
volatile int32_t t46 = 3970;
t46 = (((x189&x190)/x191)|x192);
if (t46 != -1) { NG(); } else { ; }
}
void f47(void) {
int64_t x193 = -1LL;
uint8_t x194 = UINT8_MAX;
int16_t x195 = -439;
uint8_t x196 = 27U;
static int64_t t47 = -3792204202LL;
t47 = (((x193&x194)/x195)|x196);
if (t47 != 27LL) { NG(); } else { ; }
}
void f48(void) {
uint32_t x197 = UINT32_MAX;
int8_t x198 = -1;
volatile int16_t x199 = INT16_MIN;
volatile uint32_t t48 = 216871U;
t48 = (((x197&x198)/x199)|x200);
if (t48 != 2147483649U) { NG(); } else { ; }
}
void f49(void) {
volatile int16_t x202 = INT16_MIN;
uint32_t x204 = 61518U;
volatile uint32_t t49 = 230925U;
t49 = (((x201&x202)/x203)|x204);
if (t49 != 61518U) { NG(); } else { ; }
}
void f50(void) {
int32_t x205 = 182016877;
volatile int32_t x206 = INT32_MIN;
static int8_t x207 = -26;
uint8_t x208 = 31U;
t50 = (((x205&x206)/x207)|x208);
if (t50 != 31) { NG(); } else { ; }
}
void f51(void) {
int32_t x209 = INT32_MAX;
volatile int64_t x210 = 643LL;
volatile int8_t x211 = -1;
volatile uint8_t x212 = 8U;
t51 = (((x209&x210)/x211)|x212);
if (t51 != -643LL) { NG(); } else { ; }
}
void f52(void) {
int32_t x213 = INT32_MIN;
int32_t x214 = INT32_MAX;
static uint64_t x215 = 370LLU;
uint8_t x216 = UINT8_MAX;
uint64_t t52 = 276414537337465LLU;
t52 = (((x213&x214)/x215)|x216);
if (t52 != 255LLU) { NG(); } else { ; }
}
void f53(void) {
int16_t x217 = -1;
volatile int32_t x218 = INT32_MIN;
uint32_t x219 = 58472U;
int64_t x220 = INT64_MAX;
static int64_t t53 = INT64_MAX;
t53 = (((x217&x218)/x219)|x220);
if (t53 != INT64_MAX) { NG(); } else { ; }
}
void f54(void) {
uint32_t x222 = 11691464U;
int16_t x223 = -2890;
volatile uint32_t t54 = 1533674U;
t54 = (((x221&x222)/x223)|x224);
if (t54 != 2147483648U) { NG(); } else { ; }
}
void f55(void) {
static int64_t x226 = INT64_MIN;
int64_t x227 = INT64_MIN;
static uint16_t x228 = 9U;
volatile int64_t t55 = -88032529463LL;
t55 = (((x225&x226)/x227)|x228);
if (t55 != 9LL) { NG(); } else { ; }
}
void f56(void) {
static int8_t x229 = INT8_MIN;
static int16_t x230 = 36;
uint64_t x231 = 20LLU;
static int32_t x232 = -76507754;
volatile uint64_t t56 = 51386LLU;
t56 = (((x229&x230)/x231)|x232);
if (t56 != 18446744073633043862LLU) { NG(); } else { ; }
}
void f57(void) {
static int8_t x233 = 12;
uint64_t x234 = 30809LLU;
uint8_t x235 = 62U;
int64_t x236 = -281264824088675LL;
volatile uint64_t t57 = 1081085517573LLU;
t57 = (((x233&x234)/x235)|x236);
if (t57 != 18446462808885462941LLU) { NG(); } else { ; }
}
void f58(void) {
int32_t x237 = -1;
volatile int64_t x239 = 7356108LL;
volatile uint32_t x240 = 988U;
int64_t t58 = 779708673288060LL;
t58 = (((x237&x238)/x239)|x240);
if (t58 != 988LL) { NG(); } else { ; }
}
void f59(void) {
volatile int16_t x241 = INT16_MAX;
int64_t x242 = -1LL;
uint64_t x243 = 17915806524LLU;
static int64_t x244 = INT64_MIN;
volatile uint64_t t59 = 828358048LLU;
t59 = (((x241&x242)/x243)|x244);
if (t59 != 9223372036854775808LLU) { NG(); } else { ; }
}
void f60(void) {
int32_t x245 = INT32_MIN;
static uint8_t x247 = 33U;
uint8_t x248 = UINT8_MAX;
t60 = (((x245&x246)/x247)|x248);
if (t60 != 255) { NG(); } else { ; }
}
void f61(void) {
int16_t x249 = -1;
static uint64_t x250 = 1017942634199698LLU;
int32_t x252 = -1;
uint64_t t61 = UINT64_MAX;
t61 = (((x249&x250)/x251)|x252);
if (t61 != UINT64_MAX) { NG(); } else { ; }
}
void f62(void) {
int8_t x255 = -1;
volatile int8_t x256 = INT8_MAX;
volatile int32_t t62 = -37;
t62 = (((x253&x254)/x255)|x256);
if (t62 != 127) { NG(); } else { ; }
}
void f63(void) {
int32_t x257 = INT32_MAX;
static int32_t x258 = INT32_MAX;
uint16_t x259 = UINT16_MAX;
volatile int32_t x260 = INT32_MIN;
volatile int32_t t63 = 43680;
t63 = (((x257&x258)/x259)|x260);
if (t63 != -2147450880) { NG(); } else { ; }
}
void f64(void) {
static uint32_t x261 = 7308183U;
int8_t x262 = -1;
uint32_t t64 = 136118874U;
t64 = (((x261&x262)/x263)|x264);
if (t64 != 2147483647U) { NG(); } else { ; }
}
void f65(void) {
int16_t x265 = INT16_MIN;
int8_t x266 = -1;
uint8_t x267 = 13U;
int16_t x268 = -3691;
t65 = (((x265&x266)/x267)|x268);
if (t65 != -2115) { NG(); } else { ; }
}
void f66(void) {
int8_t x269 = INT8_MAX;
volatile int8_t x270 = -1;
uint32_t x271 = UINT32_MAX;
volatile uint32_t x272 = 125356031U;
uint32_t t66 = 1U;
t66 = (((x269&x270)/x271)|x272);
if (t66 != 125356031U) { NG(); } else { ; }
}
void f67(void) {
int32_t x273 = INT32_MIN;
static int64_t x274 = INT64_MAX;
int64_t x275 = -57827141LL;
int8_t x276 = -5;
int64_t t67 = 3LL;
t67 = (((x273&x274)/x275)|x276);
if (t67 != -5LL) { NG(); } else { ; }
}
void f68(void) {
uint16_t x277 = UINT16_MAX;
volatile int16_t x279 = INT16_MIN;
volatile uint64_t x280 = 1544437842061218155LLU;
t68 = (((x277&x278)/x279)|x280);
if (t68 != 1544437842061218155LLU) { NG(); } else { ; }
}
void f69(void) {
int8_t x285 = -1;
uint16_t x286 = UINT16_MAX;
static int64_t x287 = INT64_MIN;
int16_t x288 = INT16_MIN;
t69 = (((x285&x286)/x287)|x288);
if (t69 != -32768LL) { NG(); } else { ; }
}
void f70(void) {
volatile uint64_t x290 = UINT64_MAX;
int8_t x291 = INT8_MIN;
uint32_t x292 = 89762150U;
uint64_t t70 = 31347LLU;
t70 = (((x289&x290)/x291)|x292);
if (t70 != 89762150LLU) { NG(); } else { ; }
}
void f71(void) {
volatile uint16_t x293 = UINT16_MAX;
int16_t x294 = -1;
int32_t x295 = INT32_MIN;
static int8_t x296 = INT8_MIN;
volatile int32_t t71 = -11;
t71 = (((x293&x294)/x295)|x296);
if (t71 != -128) { NG(); } else { ; }
}
void f72(void) {
int16_t x301 = INT16_MIN;
static uint16_t x302 = 3369U;
static int16_t x303 = INT16_MIN;
volatile uint64_t x304 = UINT64_MAX;
uint64_t t72 = UINT64_MAX;
t72 = (((x301&x302)/x303)|x304);
if (t72 != UINT64_MAX) { NG(); } else { ; }
}
void f73(void) {
volatile uint16_t x305 = 24U;
static int8_t x306 = INT8_MAX;
volatile int64_t x307 = INT64_MIN;
int8_t x308 = -1;
t73 = (((x305&x306)/x307)|x308);
if (t73 != -1LL) { NG(); } else { ; }
}
void f74(void) {
int32_t x313 = 402805;
int16_t x314 = -3981;
int16_t x315 = -108;
int64_t x316 = INT64_MIN;
int64_t t74 = 7906LL;
t74 = (((x313&x314)/x315)|x316);
if (t74 != -3717LL) { NG(); } else { ; }
}
void f75(void) {
uint64_t x317 = 322670607325151LLU;
uint32_t x318 = 213816U;
uint32_t x319 = 19881U;
t75 = (((x317&x318)/x319)|x320);
if (t75 != 79LLU) { NG(); } else { ; }
}
void f76(void) {
static uint8_t x322 = 2U;
uint64_t x323 = 5338601553717437LLU;
uint16_t x324 = 8569U;
volatile uint64_t t76 = 5435640354LLU;
t76 = (((x321&x322)/x323)|x324);
if (t76 != 8569LLU) { NG(); } else { ; }
}
void f77(void) {
volatile int64_t x327 = INT64_MIN;
uint16_t x328 = UINT16_MAX;
volatile int64_t t77 = -441041834162903911LL;
t77 = (((x325&x326)/x327)|x328);
if (t77 != 65535LL) { NG(); } else { ; }
}
void f78(void) {
uint8_t x329 = UINT8_MAX;
uint64_t x330 = UINT64_MAX;
int32_t x331 = 105;
static volatile uint64_t t78 = 5168885875917488257LLU;
t78 = (((x329&x330)/x331)|x332);
if (t78 != 18446744073709551567LLU) { NG(); } else { ; }
}
void f79(void) {
uint64_t x333 = UINT64_MAX;
uint32_t x334 = 158568001U;
int8_t x335 = -1;
int8_t x336 = -1;
volatile uint64_t t79 = UINT64_MAX;
t79 = (((x333&x334)/x335)|x336);
if (t79 != UINT64_MAX) { NG(); } else { ; }
}
void f80(void) {
uint64_t x338 = 248511217315887LLU;
int64_t x339 = 2758351798320LL;
volatile int16_t x340 = 3259;
static uint64_t t80 = 37628740215113LLU;
t80 = (((x337&x338)/x339)|x340);
if (t80 != 3259LLU) { NG(); } else { ; }
}
void f81(void) {
int8_t x344 = INT8_MIN;
int64_t t81 = -1LL;
t81 = (((x341&x342)/x343)|x344);
if (t81 != -128LL) { NG(); } else { ; }
}
void f82(void) {
int8_t x346 = INT8_MAX;
int16_t x347 = -28;
t82 = (((x345&x346)/x347)|x348);
if (t82 != UINT32_MAX) { NG(); } else { ; }
}
void f83(void) {
int64_t x350 = INT64_MAX;
int32_t x351 = INT32_MIN;
uint8_t x352 = UINT8_MAX;
volatile uint64_t t83 = 391996148494LLU;
t83 = (((x349&x350)/x351)|x352);
if (t83 != 255LLU) { NG(); } else { ; }
}
void f84(void) {
uint8_t x353 = 6U;
uint64_t x354 = 249480594581576LLU;
static uint64_t t84 = 6478622389544LLU;
t84 = (((x353&x354)/x355)|x356);
if (t84 != 18446744073709551488LLU) { NG(); } else { ; }
}
void f85(void) {
static int16_t x357 = -1;
uint64_t x358 = UINT64_MAX;
static int64_t x359 = INT64_MIN;
int32_t x360 = INT32_MIN;
uint64_t t85 = 36600679777LLU;
t85 = (((x357&x358)/x359)|x360);
if (t85 != 18446744071562067969LLU) { NG(); } else { ; }
}
void f86(void) {
volatile int16_t x361 = INT16_MIN;
int16_t x363 = INT16_MIN;
static int64_t t86 = INT64_MAX;
t86 = (((x361&x362)/x363)|x364);
if (t86 != INT64_MAX) { NG(); } else { ; }
}
void f87(void) {
int8_t x365 = 5;
static int8_t x366 = 1;
static int64_t x368 = INT64_MAX;
volatile int64_t t87 = INT64_MAX;
t87 = (((x365&x366)/x367)|x368);
if (t87 != INT64_MAX) { NG(); } else { ; }
}
void f88(void) {
int16_t x369 = -1;
int32_t x370 = INT32_MAX;
int8_t x371 = INT8_MAX;
int64_t x372 = -1LL;
static int64_t t88 = 742501415684LL;
t88 = (((x369&x370)/x371)|x372);
if (t88 != -1LL) { NG(); } else { ; }
}
void f89(void) {
volatile uint16_t x373 = UINT16_MAX;
uint8_t x374 = UINT8_MAX;
int16_t x375 = INT16_MAX;
volatile uint32_t t89 = UINT32_MAX;
t89 = (((x373&x374)/x375)|x376);
if (t89 != UINT32_MAX) { NG(); } else { ; }
}
void f90(void) {
uint64_t x377 = 1250602039251365838LLU;
int8_t x380 = INT8_MAX;
t90 = (((x377&x378)/x379)|x380);
if (t90 != 127LLU) { NG(); } else { ; }
}
void f91(void) {
static int8_t x381 = -1;
volatile int8_t x382 = INT8_MAX;
int16_t x383 = -1036;
volatile int16_t x384 = -4876;
volatile int32_t t91 = -4;
t91 = (((x381&x382)/x383)|x384);
if (t91 != -4876) { NG(); } else { ; }
}
void f92(void) {
int32_t x385 = INT32_MAX;
volatile int16_t x386 = -1;
volatile uint64_t x388 = 11252310LLU;
t92 = (((x385&x386)/x387)|x388);
if (t92 != 11252310LLU) { NG(); } else { ; }
}
void f93(void) {
uint16_t x389 = UINT16_MAX;
uint64_t x390 = 8259275973742421344LLU;
int64_t x391 = INT64_MIN;
static volatile uint64_t x392 = 6785667502936LLU;
volatile uint64_t t93 = 7509270LLU;
t93 = (((x389&x390)/x391)|x392);
if (t93 != 6785667502936LLU) { NG(); } else { ; }
}
void f94(void) {
int32_t x393 = INT32_MAX;
static int32_t x396 = 0;
volatile int32_t t94 = 915578;
t94 = (((x393&x394)/x395)|x396);
if (t94 != -65535) { NG(); } else { ; }
}
void f95(void) {
volatile int16_t x397 = 9508;
static volatile int16_t x400 = 80;
t95 = (((x397&x398)/x399)|x400);
if (t95 != 80U) { NG(); } else { ; }
}
void f96(void) {
int16_t x402 = 3817;
volatile int64_t x403 = -413918844248186375LL;
int32_t x404 = INT32_MIN;
int64_t t96 = 2030476LL;
t96 = (((x401&x402)/x403)|x404);
if (t96 != -2147483648LL) { NG(); } else { ; }
}
void f97(void) {
int8_t x405 = -1;
int64_t x407 = -35343777415505LL;
uint8_t x408 = 1U;
volatile int64_t t97 = -98LL;
t97 = (((x405&x406)/x407)|x408);
if (t97 != 1LL) { NG(); } else { ; }
}
void f98(void) {
static int8_t x409 = INT8_MAX;
uint32_t x410 = 3168246U;
int8_t x411 = INT8_MAX;
int16_t x412 = -1;
t98 = (((x409&x410)/x411)|x412);
if (t98 != UINT32_MAX) { NG(); } else { ; }
}
void f99(void) {
volatile int16_t x413 = INT16_MIN;
static volatile uint32_t x415 = 2492409U;
int32_t x416 = 1807;
volatile uint32_t t99 = 63402215U;
t99 = (((x413&x414)/x415)|x416);
if (t99 != 1807U) { NG(); } else { ; }
}
void f100(void) {
static volatile int32_t x417 = INT32_MIN;
uint8_t x419 = UINT8_MAX;
int64_t x420 = -13343399998577LL;
volatile int64_t t100 = -3322984582709026LL;
t100 = (((x417&x418)/x419)|x420);
if (t100 != -2155905137LL) { NG(); } else { ; }
}
void f101(void) {
int16_t x421 = -1;
static int32_t x422 = INT32_MIN;
volatile int8_t x423 = 2;
uint16_t x424 = UINT16_MAX;
volatile int32_t t101 = -859;
t101 = (((x421&x422)/x423)|x424);
if (t101 != -1073676289) { NG(); } else { ; }
}
void f102(void) {
static int16_t x425 = -4097;
int16_t x426 = -1;
uint32_t x427 = 3757380U;
int64_t x428 = 21277704548LL;
t102 = (((x425&x426)/x427)|x428);
if (t102 != 21277705591LL) { NG(); } else { ; }
}
void f103(void) {
volatile uint16_t x429 = 8152U;
int64_t x430 = INT64_MIN;
uint8_t x431 = 21U;
int64_t x432 = 533834125927LL;
volatile int64_t t103 = -395415501946058LL;
t103 = (((x429&x430)/x431)|x432);
if (t103 != 533834125927LL) { NG(); } else { ; }
}
void f104(void) {
int64_t x433 = INT64_MIN;
static int32_t x434 = INT32_MIN;
int64_t x435 = INT64_MIN;
volatile int16_t x436 = INT16_MAX;
volatile int64_t t104 = 37970LL;
t104 = (((x433&x434)/x435)|x436);
if (t104 != 32767LL) { NG(); } else { ; }
}
void f105(void) {
static int64_t x437 = 32382869065201LL;
uint64_t x438 = 50006407282431LLU;
int32_t x439 = -155;
int32_t x440 = INT32_MIN;
volatile uint64_t t105 = 27394260094060130LLU;
t105 = (((x437&x438)/x439)|x440);
if (t105 != 18446744071562067968LLU) { NG(); } else { ; }
}
void f106(void) {
volatile int64_t x441 = INT64_MIN;
volatile uint16_t x442 = 99U;
uint16_t x443 = 325U;
volatile int64_t t106 = -455952LL;
t106 = (((x441&x442)/x443)|x444);
if (t106 != -15LL) { NG(); } else { ; }
}
void f107(void) {
int16_t x445 = INT16_MIN;
uint16_t x446 = 0U;
uint64_t x447 = UINT64_MAX;
int32_t x448 = INT32_MAX;
uint64_t t107 = 2033452LLU;
t107 = (((x445&x446)/x447)|x448);
if (t107 != 2147483647LLU) { NG(); } else { ; }
}
void f108(void) {
uint32_t x449 = 108536U;
int32_t x450 = -36049196;
int8_t x452 = INT8_MAX;
volatile int64_t t108 = -11414802LL;
t108 = (((x449&x450)/x451)|x452);
if (t108 != 127LL) { NG(); } else { ; }
}
void f109(void) {
int64_t x453 = 43877LL;
uint8_t x454 = 0U;
int64_t x455 = -133874985485LL;
int64_t x456 = -1LL;
int64_t t109 = -317332815418LL;
t109 = (((x453&x454)/x455)|x456);
if (t109 != -1LL) { NG(); } else { ; }
}
void f110(void) {
volatile uint64_t x457 = UINT64_MAX;
int32_t x458 = INT32_MIN;
volatile uint16_t x459 = 1U;
int8_t x460 = INT8_MAX;
uint64_t t110 = 1866516341863053LLU;
t110 = (((x457&x458)/x459)|x460);
if (t110 != 18446744071562068095LLU) { NG(); } else { ; }
}
void f111(void) {
uint16_t x461 = 644U;
int64_t x462 = INT64_MAX;
uint64_t x463 = 135917632805676512LLU;
int32_t x464 = -1;
uint64_t t111 = UINT64_MAX;
t111 = (((x461&x462)/x463)|x464);
if (t111 != UINT64_MAX) { NG(); } else { ; }
}
void f112(void) {
int64_t x465 = INT64_MIN;
volatile uint64_t x466 = 237286256LLU;
uint8_t x467 = UINT8_MAX;
uint64_t t112 = 7958872179LLU;
t112 = (((x465&x466)/x467)|x468);
if (t112 != 18446744073709551588LLU) { NG(); } else { ; }
}
void f113(void) {
uint64_t x469 = 0LLU;
volatile int32_t x470 = -21388;
int16_t x471 = -232;
t113 = (((x469&x470)/x471)|x472);
if (t113 != 15LLU) { NG(); } else { ; }
}
void f114(void) {
int32_t x475 = INT32_MAX;
int32_t x476 = -1;
int32_t t114 = 2869162;
t114 = (((x473&x474)/x475)|x476);
if (t114 != -1) { NG(); } else { ; }
}
void f115(void) {
int64_t x477 = INT64_MAX;
int32_t x478 = 162;
uint32_t x479 = 980U;
uint16_t x480 = 563U;
int64_t t115 = -233569253810559LL;
t115 = (((x477&x478)/x479)|x480);
if (t115 != 563LL) { NG(); } else { ; }
}
void f116(void) {
volatile int32_t x481 = 13;
int64_t x483 = INT64_MIN;
volatile int64_t t116 = 14370LL;
t116 = (((x481&x482)/x483)|x484);
if (t116 != 5LL) { NG(); } else { ; }
}
void f117(void) {
volatile uint32_t x485 = 11235U;
static int8_t x486 = -1;
static volatile int64_t x487 = INT64_MAX;
int8_t x488 = INT8_MIN;
volatile int64_t t117 = 2946670953403063LL;
t117 = (((x485&x486)/x487)|x488);
if (t117 != -128LL) { NG(); } else { ; }
}
void f118(void) {
static volatile int64_t x489 = INT64_MIN;
static int8_t x490 = -1;
volatile int64_t t118 = 2420576259178595806LL;
t118 = (((x489&x490)/x491)|x492);
if (t118 != -2147483598LL) { NG(); } else { ; }
}
void f119(void) {
uint16_t x493 = UINT16_MAX;
int16_t x495 = -1;
volatile int32_t x496 = -2993;
volatile int32_t t119 = -5473049;
t119 = (((x493&x494)/x495)|x496);
if (t119 != -2993) { NG(); } else { ; }
}
void f120(void) {
int8_t x497 = -1;
int32_t x499 = 61645;
int8_t x500 = -1;
volatile int32_t t120 = -244;
t120 = (((x497&x498)/x499)|x500);
if (t120 != -1) { NG(); } else { ; }
}
void f121(void) {
uint16_t x502 = 31U;
int64_t x503 = -1LL;
uint32_t x504 = UINT32_MAX;
int64_t t121 = 8347LL;
t121 = (((x501&x502)/x503)|x504);
if (t121 != -1LL) { NG(); } else { ; }
}
void f122(void) {
uint16_t x506 = UINT16_MAX;
volatile int16_t x507 = -58;
int8_t x508 = INT8_MIN;
volatile int32_t t122 = 1110;
t122 = (((x505&x506)/x507)|x508);
if (t122 != -105) { NG(); } else { ; }
}
void f123(void) {
int8_t x509 = -1;
int64_t x510 = INT64_MAX;
volatile int16_t x511 = INT16_MIN;
static volatile int32_t x512 = -1;
static int64_t t123 = -263LL;
t123 = (((x509&x510)/x511)|x512);
if (t123 != -1LL) { NG(); } else { ; }
}
void f124(void) {
int32_t x513 = INT32_MIN;
int16_t x514 = -390;
static uint8_t x515 = UINT8_MAX;
volatile int8_t x516 = INT8_MIN;
t124 = (((x513&x514)/x515)|x516);
if (t124 != -128) { NG(); } else { ; }
}
void f125(void) {
int16_t x517 = INT16_MIN;
static int16_t x518 = INT16_MIN;
uint64_t x519 = 46878182083LLU;
volatile uint32_t x520 = 1154054U;
volatile uint64_t t125 = 90002LLU;
t125 = (((x517&x518)/x519)|x520);
if (t125 != 393608279LLU) { NG(); } else { ; }
}
void f126(void) {
int16_t x521 = INT16_MAX;
static uint32_t x522 = UINT32_MAX;
int64_t x523 = INT64_MAX;
static uint64_t x524 = 112894530550745132LLU;
uint64_t t126 = 251263789LLU;
t126 = (((x521&x522)/x523)|x524);
if (t126 != 112894530550745132LLU) { NG(); } else { ; }
}
void f127(void) {
int16_t x525 = INT16_MIN;
int64_t x526 = 38LL;
volatile uint8_t x528 = UINT8_MAX;
int64_t t127 = -943161756901669LL;
t127 = (((x525&x526)/x527)|x528);
if (t127 != 255LL) { NG(); } else { ; }
}
void f128(void) {
static int16_t x529 = 52;
volatile int64_t t128 = -510798LL;
t128 = (((x529&x530)/x531)|x532);
if (t128 != -1LL) { NG(); } else { ; }
}
void f129(void) {
static volatile int32_t x533 = INT32_MAX;
volatile uint32_t x534 = 45015203U;
static int8_t x535 = INT8_MIN;
int32_t x536 = INT32_MIN;
volatile uint32_t t129 = 1661671U;
t129 = (((x533&x534)/x535)|x536);
if (t129 != 2147483648U) { NG(); } else { ; }
}
void f130(void) {
static volatile uint64_t x537 = 10548LLU;
static int16_t x538 = -140;
int8_t x539 = -1;
int64_t x540 = INT64_MIN;
uint64_t t130 = 20408228283856837LLU;
t130 = (((x537&x538)/x539)|x540);
if (t130 != 9223372036854775808LLU) { NG(); } else { ; }
}
void f131(void) {
volatile uint32_t x541 = 719244U;
static uint8_t x542 = UINT8_MAX;
int8_t x543 = -1;
uint64_t x544 = UINT64_MAX;
volatile uint64_t t131 = UINT64_MAX;
t131 = (((x541&x542)/x543)|x544);
if (t131 != UINT64_MAX) { NG(); } else { ; }
}
void f132(void) {
uint32_t x545 = 18U;
uint16_t x546 = UINT16_MAX;
volatile int16_t x547 = INT16_MIN;
int64_t x548 = -2839LL;
int64_t t132 = 308LL;
t132 = (((x545&x546)/x547)|x548);
if (t132 != -2839LL) { NG(); } else { ; }
}
void f133(void) {
int8_t x549 = -1;
int16_t x551 = 3357;
volatile int32_t x552 = -1;
int32_t t133 = -265706;
t133 = (((x549&x550)/x551)|x552);
if (t133 != -1) { NG(); } else { ; }
}
void f134(void) {
volatile int64_t x553 = INT64_MAX;
int8_t x555 = INT8_MIN;
static volatile int32_t x556 = 3873298;
volatile int64_t t134 = 92LL;
t134 = (((x553&x554)/x555)|x556);
if (t134 != -237LL) { NG(); } else { ; }
}
void f135(void) {
volatile int32_t x557 = INT32_MAX;
static int16_t x558 = 48;
int64_t x559 = INT64_MAX;
int64_t x560 = -11388LL;
volatile int64_t t135 = -71490LL;
t135 = (((x557&x558)/x559)|x560);
if (t135 != -11388LL) { NG(); } else { ; }
}
void f136(void) {
static volatile uint64_t x561 = 42060LLU;
volatile int16_t x564 = INT16_MAX;
volatile uint64_t t136 = 8905585744621LLU;
t136 = (((x561&x562)/x563)|x564);
if (t136 != 32767LLU) { NG(); } else { ; }
}
void f137(void) {
int8_t x566 = 0;
int32_t x567 = INT32_MIN;
int16_t x568 = INT16_MIN;
volatile int32_t t137 = 1;
t137 = (((x565&x566)/x567)|x568);
if (t137 != -32768) { NG(); } else { ; }
}
void f138(void) {
uint64_t x569 = UINT64_MAX;
static int32_t x570 = INT32_MAX;
uint8_t x571 = 118U;
int32_t x572 = INT32_MAX;
static uint64_t t138 = 834210LLU;
t138 = (((x569&x570)/x571)|x572);
if (t138 != 2147483647LLU) { NG(); } else { ; }
}
void f139(void) {
int8_t x573 = 0;
uint16_t x574 = 31947U;
uint32_t x576 = 3U;
volatile uint64_t t139 = 17251846900425LLU;
t139 = (((x573&x574)/x575)|x576);
if (t139 != 3LLU) { NG(); } else { ; }
}
void f140(void) {
volatile uint32_t x578 = UINT32_MAX;
uint32_t x579 = 44913240U;
static int64_t x580 = INT64_MIN;
int64_t t140 = INT64_MIN;
t140 = (((x577&x578)/x579)|x580);
if (t140 != INT64_MIN) { NG(); } else { ; }
}
void f141(void) {
static int8_t x581 = INT8_MIN;
int32_t x582 = INT32_MIN;
uint64_t x583 = UINT64_MAX;
int32_t x584 = 3489;
volatile uint64_t t141 = 7LLU;
t141 = (((x581&x582)/x583)|x584);
if (t141 != 3489LLU) { NG(); } else { ; }
}
void f142(void) {
int64_t x586 = 8247447669478LL;
static volatile int64_t x587 = INT64_MIN;
int32_t x588 = INT32_MIN;
int64_t t142 = -31LL;
t142 = (((x585&x586)/x587)|x588);
if (t142 != -2147483648LL) { NG(); } else { ; }
}
void f143(void) {
int16_t x589 = INT16_MAX;
uint16_t x590 = 25U;
volatile int64_t x592 = -473168234197694LL;
volatile int64_t t143 = 950172614994LL;
t143 = (((x589&x590)/x591)|x592);
if (t143 != -473168234197694LL) { NG(); } else { ; }
}
void f144(void) {
int64_t x594 = INT64_MAX;
t144 = (((x593&x594)/x595)|x596);
if (t144 != -42LL) { NG(); } else { ; }
}
void f145(void) {
static int64_t x597 = INT64_MIN;
uint64_t x598 = UINT64_MAX;
uint32_t x599 = UINT32_MAX;
static volatile uint64_t t145 = 1073673924760883LLU;
t145 = (((x597&x598)/x599)|x600);
if (t145 != 4225429279381253754LLU) { NG(); } else { ; }
}
void f146(void) {
static int8_t x601 = INT8_MIN;
volatile int16_t x602 = INT16_MAX;
volatile uint32_t x603 = 6071730U;
volatile int8_t x604 = INT8_MIN;
uint32_t t146 = 2637U;
t146 = (((x601&x602)/x603)|x604);
if (t146 != 4294967168U) { NG(); } else { ; }
}
void f147(void) {
int32_t x606 = 3727;
int16_t x608 = INT16_MIN;
volatile int32_t t147 = 12439379;
t147 = (((x605&x606)/x607)|x608);
if (t147 != -32768) { NG(); } else { ; }
}
void f148(void) {
uint16_t x609 = 1U;
int16_t x610 = 12993;
int64_t x611 = -4810235LL;
static int16_t x612 = INT16_MIN;
int64_t t148 = -26LL;
t148 = (((x609&x610)/x611)|x612);
if (t148 != -32768LL) { NG(); } else { ; }
}
void f149(void) {
uint16_t x613 = 12U;
volatile int8_t x615 = 1;
int64_t x616 = -1LL;
t149 = (((x613&x614)/x615)|x616);
if (t149 != -1LL) { NG(); } else { ; }
}
void f150(void) {
volatile uint64_t x617 = 8318141LLU;
uint64_t x618 = UINT64_MAX;
static int64_t x619 = -1LL;
int8_t x620 = INT8_MAX;
t150 = (((x617&x618)/x619)|x620);
if (t150 != 127LLU) { NG(); } else { ; }
}
void f151(void) {
int64_t x621 = INT64_MIN;
int16_t x622 = 0;
int32_t x623 = INT32_MIN;
static int64_t t151 = 1100018LL;
t151 = (((x621&x622)/x623)|x624);
if (t151 != -128LL) { NG(); } else { ; }
}
void f152(void) {
int32_t x625 = INT32_MIN;
uint16_t x627 = 3U;
int8_t x628 = -1;
int32_t t152 = 0;
t152 = (((x625&x626)/x627)|x628);
if (t152 != -1) { NG(); } else { ; }
}
void f153(void) {
int8_t x629 = INT8_MIN;
int16_t x630 = -63;
static int8_t x631 = INT8_MIN;
volatile uint8_t x632 = 2U;
int32_t t153 = 0;
t153 = (((x629&x630)/x631)|x632);
if (t153 != 3) { NG(); } else { ; }
}
void f154(void) {
int8_t x633 = 61;
int32_t x635 = 59875415;
int32_t x636 = -1;
uint64_t t154 = UINT64_MAX;
t154 = (((x633&x634)/x635)|x636);
if (t154 != UINT64_MAX) { NG(); } else { ; }
}
void f155(void) {
static volatile uint32_t x637 = UINT32_MAX;
int32_t x638 = 3734;
uint16_t x639 = 1U;
volatile uint32_t x640 = 17840U;
t155 = (((x637&x638)/x639)|x640);
if (t155 != 20406U) { NG(); } else { ; }
}
void f156(void) {
static int32_t x641 = -1;
uint16_t x642 = 1630U;
uint64_t x643 = 199302248452LLU;
static volatile int16_t x644 = INT16_MAX;
uint64_t t156 = 63031773790661LLU;
t156 = (((x641&x642)/x643)|x644);
if (t156 != 32767LLU) { NG(); } else { ; }
}
void f157(void) {
int8_t x645 = 0;
int32_t x647 = INT32_MIN;
int64_t x648 = INT64_MIN;
volatile int64_t t157 = INT64_MIN;
t157 = (((x645&x646)/x647)|x648);
if (t157 != INT64_MIN) { NG(); } else { ; }
}
void f158(void) {
static volatile uint16_t x649 = UINT16_MAX;
volatile uint8_t x650 = UINT8_MAX;
static uint64_t x651 = 2876LLU;
uint16_t x652 = 1330U;
volatile uint64_t t158 = 77LLU;
t158 = (((x649&x650)/x651)|x652);
if (t158 != 1330LLU) { NG(); } else { ; }
}
void f159(void) {
int32_t x653 = -1;
int32_t x654 = INT32_MIN;
static int16_t x655 = 5;
int64_t x656 = INT64_MIN;
volatile int64_t t159 = -9551LL;
t159 = (((x653&x654)/x655)|x656);
if (t159 != -429496729LL) { NG(); } else { ; }
}
void f160(void) {
int8_t x657 = INT8_MIN;
static uint32_t x658 = 150964311U;
static uint64_t x659 = 1009700424LLU;
uint64_t t160 = 2023491229134LLU;
t160 = (((x657&x658)/x659)|x660);
if (t160 != 485LLU) { NG(); } else { ; }
}
void f161(void) {
static int32_t x661 = INT32_MIN;
volatile int8_t x662 = INT8_MAX;
static uint64_t x663 = 276923743236909700LLU;
int64_t x664 = -9645098894LL;
uint64_t t161 = 331016596451764249LLU;
t161 = (((x661&x662)/x663)|x664);
if (t161 != 18446744064064452722LLU) { NG(); } else { ; }
}
void f162(void) {
int64_t x665 = -1LL;
static int32_t x666 = -1;
static int16_t x667 = INT16_MIN;
uint32_t x668 = UINT32_MAX;
volatile int64_t t162 = -40092657178778641LL;
t162 = (((x665&x666)/x667)|x668);
if (t162 != 4294967295LL) { NG(); } else { ; }
}
void f163(void) {
static int16_t x669 = INT16_MAX;
static volatile int32_t x670 = -1;
int8_t x671 = INT8_MIN;
uint32_t x672 = 456467115U;
volatile uint32_t t163 = 90169U;
t163 = (((x669&x670)/x671)|x672);
if (t163 != 4294967211U) { NG(); } else { ; }
}
void f164(void) {
volatile uint64_t x673 = UINT64_MAX;
volatile int8_t x674 = -1;
int64_t x676 = INT64_MIN;
t164 = (((x673&x674)/x675)|x676);
if (t164 != 9226013323234172937LLU) { NG(); } else { ; }
}
void f165(void) {
int16_t x677 = INT16_MIN;
uint64_t x678 = 51510833830216LLU;
int16_t x680 = -1;
uint64_t t165 = UINT64_MAX;
t165 = (((x677&x678)/x679)|x680);
if (t165 != UINT64_MAX) { NG(); } else { ; }
}
void f166(void) {
volatile int8_t x685 = INT8_MIN;
uint16_t x686 = 34U;
volatile int16_t x688 = INT16_MAX;
uint32_t t166 = 14U;
t166 = (((x685&x686)/x687)|x688);
if (t166 != 32767U) { NG(); } else { ; }
}
void f167(void) {
int64_t x690 = INT64_MAX;
int16_t x691 = 959;
int64_t t167 = -23LL;
t167 = (((x689&x690)/x691)|x692);
if (t167 != 9617697640770923LL) { NG(); } else { ; }
}
void f168(void) {
int32_t x693 = 153;
uint64_t x694 = 2756095682187718LLU;
uint16_t x695 = UINT16_MAX;
int32_t x696 = INT32_MIN;
t168 = (((x693&x694)/x695)|x696);
if (t168 != 18446744071562067968LLU) { NG(); } else { ; }
}
void f169(void) {
int64_t x697 = INT64_MAX;
uint64_t x698 = 115027183LLU;
static volatile uint16_t x700 = 405U;
volatile uint64_t t169 = 1768027317LLU;
t169 = (((x697&x698)/x699)|x700);
if (t169 != 3710943LLU) { NG(); } else { ; }
}
void f170(void) {
uint32_t x701 = 386010U;
int8_t x702 = -1;
int64_t x703 = INT64_MIN;
int64_t x704 = 58338LL;
volatile int64_t t170 = 84930259LL;
t170 = (((x701&x702)/x703)|x704);
if (t170 != 58338LL) { NG(); } else { ; }
}
void f171(void) {
static int8_t x705 = -1;
uint32_t x706 = 5611U;
uint64_t x707 = 4034802LLU;
static int8_t x708 = INT8_MIN;
static uint64_t t171 = 8260804392660801LLU;
t171 = (((x705&x706)/x707)|x708);
if (t171 != 18446744073709551488LLU) { NG(); } else { ; }
}
void f172(void) {
static uint32_t x710 = UINT32_MAX;
uint64_t x711 = 78361761655895LLU;
uint64_t x712 = UINT64_MAX;
t172 = (((x709&x710)/x711)|x712);
if (t172 != UINT64_MAX) { NG(); } else { ; }
}
void f173(void) {
static int8_t x714 = -1;
volatile int32_t x715 = INT32_MAX;
uint32_t x716 = 463984U;
uint64_t t173 = 531964691266558LLU;
t173 = (((x713&x714)/x715)|x716);
if (t173 != 8590398580LLU) { NG(); } else { ; }
}
void f174(void) {
uint64_t x717 = UINT64_MAX;
static int64_t x718 = -196020550LL;
int32_t x720 = INT32_MIN;
uint64_t t174 = 4297005306848166LLU;
t174 = (((x717&x718)/x719)|x720);
if (t174 != 18446744071562067968LLU) { NG(); } else { ; }
}
void f175(void) {
int16_t x721 = 8283;
uint16_t x722 = 818U;
static int16_t x723 = INT16_MAX;
int16_t x724 = -1;
static volatile int32_t t175 = 10381;
t175 = (((x721&x722)/x723)|x724);
if (t175 != -1) { NG(); } else { ; }
}
void f176(void) {
static volatile int16_t x725 = -1;
int16_t x727 = INT16_MIN;
int32_t x728 = INT32_MIN;
volatile int32_t t176 = INT32_MIN;
t176 = (((x725&x726)/x727)|x728);
if (t176 != INT32_MIN) { NG(); } else { ; }
}
void f177(void) {
static int8_t x730 = -7;
volatile uint64_t x731 = 4782LLU;
t177 = (((x729&x730)/x731)|x732);
if (t177 != 18694136LLU) { NG(); } else { ; }
}
void f178(void) {
int64_t x733 = INT64_MIN;
volatile int64_t x735 = -1LL;
int16_t x736 = 1792;
int64_t t178 = -1858378153856386972LL;
t178 = (((x733&x734)/x735)|x736);
if (t178 != 1792LL) { NG(); } else { ; }
}
void f179(void) {
uint64_t x738 = 208LLU;
uint32_t x739 = 7669214U;
volatile uint64_t t179 = UINT64_MAX;
t179 = (((x737&x738)/x739)|x740);
if (t179 != UINT64_MAX) { NG(); } else { ; }
}
void f180(void) {
static int16_t x741 = 1;
int32_t x742 = -734650;
uint8_t x743 = UINT8_MAX;
int16_t x744 = INT16_MIN;
int32_t t180 = 5;
t180 = (((x741&x742)/x743)|x744);
if (t180 != -32768) { NG(); } else { ; }
}
void f181(void) {
int16_t x745 = INT16_MAX;
uint8_t x747 = 2U;
static int64_t x748 = INT64_MIN;
volatile int64_t t181 = 224LL;
t181 = (((x745&x746)/x747)|x748);
if (t181 != -9223372036854759425LL) { NG(); } else { ; }
}
void f182(void) {
uint8_t x749 = UINT8_MAX;
volatile int8_t x750 = INT8_MIN;
int16_t x751 = INT16_MIN;
int32_t x752 = -931456880;
static volatile int32_t t182 = -387;
t182 = (((x749&x750)/x751)|x752);
if (t182 != -931456880) { NG(); } else { ; }
}
void f183(void) {
uint8_t x753 = UINT8_MAX;
int32_t x754 = -822;
volatile int64_t x755 = -1327LL;
uint16_t x756 = UINT16_MAX;
int64_t t183 = 2119118107LL;
t183 = (((x753&x754)/x755)|x756);
if (t183 != 65535LL) { NG(); } else { ; }
}
void f184(void) {
static volatile uint64_t x758 = 198310LLU;
volatile uint8_t x759 = UINT8_MAX;
t184 = (((x757&x758)/x759)|x760);
if (t184 != 4LLU) { NG(); } else { ; }
}
void f185(void) {
volatile int16_t x761 = -1;
int64_t x762 = 2185911707LL;
int32_t x763 = INT32_MIN;
int8_t x764 = 21;
int64_t t185 = 2229349862064264LL;
t185 = (((x761&x762)/x763)|x764);
if (t185 != -1LL) { NG(); } else { ; }
}
void f186(void) {
int8_t x765 = 0;
static uint32_t x766 = 1451796707U;
int64_t x767 = -1LL;
int64_t x768 = -115748684731LL;
static volatile int64_t t186 = 111620560LL;
t186 = (((x765&x766)/x767)|x768);
if (t186 != -115748684731LL) { NG(); } else { ; }
}
void f187(void) {
uint8_t x771 = UINT8_MAX;
uint64_t x772 = 415383448LLU;
uint64_t t187 = 5907794LLU;
t187 = (((x769&x770)/x771)|x772);
if (t187 != 415383448LLU) { NG(); } else { ; }
}
void f188(void) {
static int64_t x773 = INT64_MIN;
volatile int32_t x774 = INT32_MIN;
volatile uint32_t x775 = 363U;
int8_t x776 = 7;
volatile int64_t t188 = 54964108877LL;
t188 = (((x773&x774)/x775)|x776);
if (t188 != -25408738393539321LL) { NG(); } else { ; }
}
void f189(void) {
volatile int16_t x777 = -1;
int32_t x778 = 7;
static uint8_t x779 = UINT8_MAX;
int32_t x780 = -12;
t189 = (((x777&x778)/x779)|x780);
if (t189 != -12) { NG(); } else { ; }
}
void f190(void) {
static int64_t x783 = INT64_MIN;
volatile int32_t x784 = -1;
int64_t t190 = -11091303999009582LL;
t190 = (((x781&x782)/x783)|x784);
if (t190 != -1LL) { NG(); } else { ; }
}
void f191(void) {
int64_t x785 = 120184997353377927LL;
volatile uint32_t x787 = 940159685U;
int64_t t191 = -18LL;
t191 = (((x785&x786)/x787)|x788);
if (t191 != -1LL) { NG(); } else { ; }
}
void f192(void) {
volatile int16_t x789 = -9;
uint64_t x790 = 6313056230254058471LLU;
int64_t x791 = INT64_MAX;
int32_t x792 = 283633;
static uint64_t t192 = 39237LLU;
t192 = (((x789&x790)/x791)|x792);
if (t192 != 283633LLU) { NG(); } else { ; }
}
void f193(void) {
static volatile int32_t x794 = INT32_MIN;
volatile uint16_t x795 = 123U;
volatile int32_t x796 = -1;
t193 = (((x793&x794)/x795)|x796);
if (t193 != -1) { NG(); } else { ; }
}
void f194(void) {
static int8_t x797 = INT8_MIN;
int16_t x798 = -1;
int32_t x799 = INT32_MIN;
int32_t x800 = 24;
int32_t t194 = -13299295;
t194 = (((x797&x798)/x799)|x800);
if (t194 != 24) { NG(); } else { ; }
}
void f195(void) {
uint8_t x802 = UINT8_MAX;
int16_t x803 = -1;
static uint64_t x804 = 610149971333LLU;
volatile uint64_t t195 = 6545198336700715LLU;
t195 = (((x801&x802)/x803)|x804);
if (t195 != 610149971333LLU) { NG(); } else { ; }
}
void f196(void) {
uint32_t x805 = UINT32_MAX;
int64_t x806 = INT64_MIN;
int64_t x807 = INT64_MAX;
uint64_t x808 = UINT64_MAX;
t196 = (((x805&x806)/x807)|x808);
if (t196 != UINT64_MAX) { NG(); } else { ; }
}
void f197(void) {
int16_t x809 = -3843;
int64_t x811 = INT64_MIN;
static volatile int64_t x812 = INT64_MAX;
int64_t t197 = INT64_MAX;
t197 = (((x809&x810)/x811)|x812);
if (t197 != INT64_MAX) { NG(); } else { ; }
}
void f198(void) {
uint16_t x813 = 23U;
volatile uint32_t x814 = 1806272859U;
volatile int16_t x815 = INT16_MIN;
int8_t x816 = 8;
volatile uint32_t t198 = 44308U;
t198 = (((x813&x814)/x815)|x816);
if (t198 != 8U) { NG(); } else { ; }
}
void f199(void) {
uint32_t x817 = 981600909U;
volatile uint32_t x819 = 295U;
int64_t x820 = -1LL;
static int64_t t199 = -5LL;
t199 = (((x817&x818)/x819)|x820);
if (t199 != -1LL) { NG(); } else { ; }
}
int main(void) {
f0();
f1();
f2();
f3();
f4();
f5();
f6();
f7();
f8();
f9();
f10();
f11();
f12();
f13();
f14();
f15();
f16();
f17();
f18();
f19();
f20();
f21();
f22();
f23();
f24();
f25();
f26();
f27();
f28();
f29();
f30();
f31();
f32();
f33();
f34();
f35();
f36();
f37();
f38();
f39();
f40();
f41();
f42();
f43();
f44();
f45();
f46();
f47();
f48();
f49();
f50();
f51();
f52();
f53();
f54();
f55();
f56();
f57();
f58();
f59();
f60();
f61();
f62();
f63();
f64();
f65();
f66();
f67();
f68();
f69();
f70();
f71();
f72();
f73();
f74();
f75();
f76();
f77();
f78();
f79();
f80();
f81();
f82();
f83();
f84();
f85();
f86();
f87();
f88();
f89();
f90();
f91();
f92();
f93();
f94();
f95();
f96();
f97();
f98();
f99();
f100();
f101();
f102();
f103();
f104();
f105();
f106();
f107();
f108();
f109();
f110();
f111();
f112();
f113();
f114();
f115();
f116();
f117();
f118();
f119();
f120();
f121();
f122();
f123();
f124();
f125();
f126();
f127();
f128();
f129();
f130();
f131();
f132();
f133();
f134();
f135();
f136();
f137();
f138();
f139();
f140();
f141();
f142();
f143();
f144();
f145();
f146();
f147();
f148();
f149();
f150();
f151();
f152();
f153();
f154();
f155();
f156();
f157();
f158();
f159();
f160();
f161();
f162();
f163();
f164();
f165();
f166();
f167();
f168();
f169();
f170();
f171();
f172();
f173();
f174();
f175();
f176();
f177();
f178();
f179();
f180();
f181();
f182();
f183();
f184();
f185();
f186();
f187();
f188();
f189();
f190();
f191();
f192();
f193();
f194();
f195();
f196();
f197();
f198();
f199();
return 0;
}
| 19.409703 | 61 | 0.605422 |
a4f0d4998b3ab10b719507388d24609cc8d826dd | 485 | h | C | iFootageFramework/iFootageFramework/Main/Controllers/iFMainViewController.h | 414039949/iFootageFramework | 25dada05a2605811bff4ac9d9fb4e1e233462684 | [
"MIT"
] | null | null | null | iFootageFramework/iFootageFramework/Main/Controllers/iFMainViewController.h | 414039949/iFootageFramework | 25dada05a2605811bff4ac9d9fb4e1e233462684 | [
"MIT"
] | null | null | null | iFootageFramework/iFootageFramework/Main/Controllers/iFMainViewController.h | 414039949/iFootageFramework | 25dada05a2605811bff4ac9d9fb4e1e233462684 | [
"MIT"
] | null | null | null | //
// iFMainViewController.h
// iFootage
//
// Created by 黄品源 on 16/6/7.
// Copyright © 2016年 iFootage. All rights reserved.
//
#import "iFRootViewController.h"
#import "iFButton.h"
#import "iFLabel.h"
@interface iFMainViewController : iFRootViewController
@property (nonatomic, strong)UIButton * sendBtn;
@property (nonatomic, strong)UIButton * drawBtn;
@property (nonatomic, strong)UITextView * contextTF;
@property (nonatomic, strong)UILabel * equipmentNameLabel;
@end
| 18.653846 | 58 | 0.742268 |
00b5dfb6f8f3823be06e05292181ad4b376db46f | 1,562 | h | C | TestProject/include/actions/GetOre.h | Catchouli/Planning | 2b56202d3a3f7d12c301e92febb9c4bb9fbf2ecf | [
"0BSD"
] | 3 | 2016-07-21T21:19:05.000Z | 2017-03-25T16:35:34.000Z | TestProject/include/actions/GetOre.h | catchouli/Planning | 2b56202d3a3f7d12c301e92febb9c4bb9fbf2ecf | [
"0BSD"
] | null | null | null | TestProject/include/actions/GetOre.h | catchouli/Planning | 2b56202d3a3f7d12c301e92febb9c4bb9fbf2ecf | [
"0BSD"
] | 1 | 2016-07-21T21:19:10.000Z | 2016-07-21T21:19:10.000Z | #ifndef GET_ORE_H
#define GET_ORE_H
#include <entity/Entity.h>
#include <goap/Action.h>
#include "../data/WorldStates.h"
#include "../data/ItemIds.h"
#include "../entities/objects/Chest.h"
#include "../entities/objects/Inventory.h"
class GetOre
: public goap::Action
{
public:
GetOre();
bool checkProceduralPreconditions() override;
void activateAction() override;
};
GetOre::GetOre()
{
mNeedsTarget = true;
addPrecondition(STATE_HAS_ORE, false);
addPrecondition(STATE_ORE_AVAILABLE, true);
addEffect(STATE_HAS_ORE, true);
addEffect(STATE_ORE_AVAILABLE, false);
}
bool GetOre::checkProceduralPreconditions()
{
// Find chest
std::shared_ptr<Chest> chest = goap::entityCollection.findEntityByType<Chest>().lock();
std::shared_ptr<Inventory> chestInv = chest->findComponentByType<Inventory>().lock();
if (chestInv->getItemCount(ITEM_ORE) <= 0)
return false;
// Store target
mTarget = chest;
return true;
}
void GetOre::activateAction()
{
// Remove ore from the chest
// Get nearest chest's inventory
std::shared_ptr<Chest> chest = std::dynamic_pointer_cast<Chest>(mTarget.lock());
std::shared_ptr<Inventory> chestInv = chest->findComponentByType<Inventory>().lock();
chestInv->removeItem(ITEM_ORE, 1);
// Add ore to inventory
// Get actor's inventory
std::shared_ptr<Inventory> actorInv = mActor->findComponentByType<Inventory>().lock();
actorInv->addItem(ITEM_ORE, 1);
}
#endif /* GET_ORE_H */ | 24.030769 | 92 | 0.676697 |
9273954e3ba3c4d9326892d01956418c26f36ddb | 1,508 | h | C | pubg/PrivateHeaders/GADMRewardBasedVideoAdConnectorDelegate-Protocol.h | cara-ksa-so4/PUBC | 1065b983d7bb1c4ad2104c2c4943487c7f17fa44 | [
"MIT"
] | 14 | 2019-07-23T20:33:14.000Z | 2022-03-09T23:29:36.000Z | fc/PrivateHeaders/GADMRewardBasedVideoAdConnectorDelegate-Protocol.h | lechium/FControl | 1203a3d6345b5ce9c738d238e0e7075e27c4d21c | [
"MIT"
] | 5 | 2019-07-22T03:59:20.000Z | 2020-03-02T14:50:48.000Z | fc/PrivateHeaders/GADMRewardBasedVideoAdConnectorDelegate-Protocol.h | lechium/FControl | 1203a3d6345b5ce9c738d238e0e7075e27c4d21c | [
"MIT"
] | 8 | 2019-07-23T20:35:34.000Z | 2022-03-03T05:51:30.000Z | //
// Generated by class-dump 3.5 (64 bit).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.
//
@class GADAdReward, GADMRewardBasedVideoAdNetworkConnector, GADRewardBasedVideoAd, NSError;
@protocol GADMRewardBasedVideoAdConnectorDelegate
- (void)connector:(GADMRewardBasedVideoAdNetworkConnector *)arg1 didReceiveAdMetadataChange:(GADRewardBasedVideoAd *)arg2;
- (void)connectorWillLeaveApplication:(GADMRewardBasedVideoAdNetworkConnector *)arg1;
- (void)connectorDidCloseRewardBasedVideoAd:(GADMRewardBasedVideoAdNetworkConnector *)arg1;
- (void)connectorDidCompletePlayingRewardBasedVideoAd:(GADMRewardBasedVideoAdNetworkConnector *)arg1;
- (void)connectorDidStartPlayingRewardBasedVideoAd:(GADMRewardBasedVideoAdNetworkConnector *)arg1;
- (void)connectorDidOpenRewardBasedVideoAd:(GADMRewardBasedVideoAdNetworkConnector *)arg1;
- (void)connector:(GADMRewardBasedVideoAdNetworkConnector *)arg1 didRewardUserWithReward:(GADAdReward *)arg2;
- (void)connectorDidReceiveClick:(GADMRewardBasedVideoAdNetworkConnector *)arg1;
- (void)connector:(GADMRewardBasedVideoAdNetworkConnector *)arg1 didFailToReceiveRewardBasedVideoAdWithError:(NSError *)arg2;
- (void)connectorDidReceiveRewardBasedVideoAd:(GADMRewardBasedVideoAdNetworkConnector *)arg1;
- (void)connector:(GADMRewardBasedVideoAdNetworkConnector *)arg1 didFailToSetUpRewardBasedVideoAdWithError:(NSError *)arg2;
- (void)connectorDidSetUpRewardBasedVideoAd:(GADMRewardBasedVideoAdNetworkConnector *)arg1;
@end
| 62.833333 | 125 | 0.849469 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.