text stringlengths 3.08k 12.5k |
|---|
/*=============================================================================
Copyright (c) 2001-2003 <NAME>
http://spirit.sourceforge.net/
Use, modification and distribution is subject to the Boost Software
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.... |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2014-2021 ArangoDB GmbH, Cologne, Germany
/// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except... |
/** \file
*
* $Date: 2015/07/10
* \author <NAME>
* Updated from class DTROS8FileReader to a new class: DTNewROS8FileReader
* to read ROS8 for MB1 GIF++ 2015 data (for CMSSW_5X versions)
* include also the PU Data (Chamber Trigger info)
*
*/
#include <IORawData/DTCommissioning/plugins/DTNewROS8... |
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or a... |
/*
*
* Copyright 2015 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agree... |
/**
* ============================================================================
*
* Copyright (C) 2018, Hisilicon Technologies Co., Ltd. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
... |
#include <Logger/Logger.h>
#include <Reactor/Channel.h>
#include <Reactor/EventLoop.h>
#include <Socket/Epoll.h>
#include <assert.h>
#include <sys/epoll.h>
using namespace TA;
namespace EventFd { //命名空间EventFd包含了一些epoll函数的封装
int createEpollFd() {
int epfd = epoll_create1(EPOLL_CLOEXEC);
if (epfd < 0)... |
/**
* From the OpenGL Programming wikibook: http://en.wikibooks.org/wiki/Opengl::Programming
* This file is in the public domain.
* Contributors: <NAME>, <NAME>
*/
#include "gltext.hpp"
int screen_width=800, screen_height=600;
const char *font_filepath = "fonts/FreeSans.ttf";
const char *vshader = "glsl/text.v.gl... |
//===--- SILFunctionBuilder.cpp -------------------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/L... |
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
#define gc getchar_unlocked()
#define pc(x) putchar_unlocked(x)
template<typename T> void scan(T &x){x = 0;bool _=0;T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&c<58;c=gc)x=(x<<3)+(x<<1)+(c&15);x=_?-x:x;}
template<type... |
/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:
#ident "$Id$"
/*======
This file is part of PerconaFT.
Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
PerconaFT is free software: you can redistribute it and/or modif... |
#include <Windows.h>
#include <string>
#include <fstream>
#include <sstream>
#include "Game.h"
#include "../Core.h"
#include "Il2Cpp.h"
#include "../Utils/Assertion.h"
#include "../Utils/Logging/Logger.h"
#include "../Utils/Encoding.h"
#pragma comment(lib,"version.lib")
char* Game::ApplicationPath = NULL;
char* Game::... |
//
// AnimBlendLinearMove.cpp
//
// Created by <NAME> on 10/22/15.
// Copyright (c) 2015 High Fidelity, Inc. All rights reserved.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include "AnimBlendLinearMove.h"
#in... |
#include "trackpoint.h"
#include <QDebug>
#include <QStringList>
#include <QString>
#include <QDateTime>
#include <math.h>
TrackPoint::TrackPoint(QString time, QString lats, QString lngs, QString alts) {
qDebug() << "asGPS: Trackpoint created:" << lats << "/" << lngs;
this->time = QDateTime::fromString(time,... |
/***************************************************************************
vidhrdw.c
Functions to emulate the video hardware of the machine.
***************************************************************************/
#include "driver.h"
#include "vidhrdw/generic.h"
static int palettebank,flipscreen;
/*... |
#include <glad/glad.h>
#include <GLFW/glfw3.h>
#include <iostream>
//-------------------------------------------------
// Shader source code stored as char arrays
//-------------------------------------------------
const char* vertexShaderCode = "#version 330 core\n"
"layout (location = 0) in vec3 aPos;\n"
"layout (... |
#include <gtest/gtest.h>
#include <string.h>
extern "C" {
#include "../libft.h"
}
TEST(TestFtSplit, Basic0) {
char **got = ft_split("apple,car,door,lamp", ',');
EXPECT_STREQ("apple", *got) << *got;
EXPECT_STREQ("car", *++got) << *got;
EXPECT_STREQ("door", *++got) << *got;
EXPECT_STREQ("lamp", *... |
#include <stdio.h>
#include <string>
#include <fcntl.h>
#include <regex>
#include <utility>
#include <map>
#include <vector>
#include <errno.h>
#include <unistd.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include <iostream>
#include "sim.h"
#include "exec_op.h"
#include "load_op.h"
#include "myutil.h"
#... |
/************************************************************************************
Filename : OVR_System.cpp
Content : General kernel initialization/cleanup, including that
of the memory allocator.
Created : September 19, 2012
Notes :
Copyright : Copyright 2014-2... |
//
// File : ES_Synow_Spectrum.cc
// ------------------------------
//
// ES: Elementary Supernova Spectrum Synthesis, Copyright (c) 2010, The
// Regents of the University of California, through Lawrence Berkeley
// National Laboratory (subject to receipt of any required approvals
// from the U.S. Dept. of Energy).... |
#include <algorithm>
#include <stdexcept>
#include "decks.hpp"
const int minCardId = 0;
const int maxCardId = 853;
const int maxMonId = 682;
const int exodiaId = 671;
const int deckSize = 40;
const int maxCopyCount = 3;
const int minExodiaId = 54;
const int maxExodiaId = 58;
Deck::Deck(int leader, Rank rank, std::ve... |
/*
* Copyright (c) 1999-2008 <NAME> and <NAME>
* 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 condit... |
#include "hcurltriangle.h"
using namespace std;
int hcurltriangle::count(int order)
{
if (order < 0)
return 0;
if (order == 0)
return 3;
return (order-1)*(order+1) + 3*(order+1);
}
int hcurltriangle::count(int order, int dim, int num)
{
// The 'num' input argument is not require... |
/**
* @file TestPseudoInverse.cpp
* @brief Unit test for MatrixPseudoInverse
* @author <NAME>
*/
#include <gtest/gtest.h>
#include <swift_vio/VectorNormalizationJacobian.hpp>
#include <okvis/kinematics/MatrixPseudoInverse.hpp>
TEST(matrixTestSuite, pseudoInverseSymmSqrtFullRank) {
double rootScale = 5;
... |
/*
* Lightweight URL & URI parser (RFC 1738, RFC 3986)
* Copyright (C) 2015 <NAME> (<EMAIL>)
* All rights reserved.
* https://github.com/corporateshark/LUrlParser
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
... |
#include "diagnostics.h"
#include <iostream>
#include <sstream>
#include <vector>
#include "abort.h"
#ifdef __unix__
#include <unistd.h>
#endif
std::string_view
ToStringView(Severity severity) noexcept
{
switch (severity) {
case Severity::Note:
return "note";
case Severity::Warning:
return "wa... |
#include "controller.h"
#include "player.h"
#include <SFML/Window/Joystick.hpp>
#include <SFML/Window/Window.hpp>
#include <SFML/Window/Event.hpp>
#include "geometry.h"
#include <math.h>
#include <stdio.h>
#include "parameters.h"
#include "engine.h"
using namespace sf;
enum JoystickFlags {JF_ANALOG_USED=1, JF_DV_USE... |
/*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to subStructFiles in the COPYRIGHT directory ***/
#include "structFileExtract.h"
#include "miscServerFunct.hpp"
#include "syncMountedColl.h"
#include "rsStructFileExtract.hpp"
#include "dataObjOpr.hpp"... |
//===-- view/gui.hh - Gui class definition ---------------------*- C++ -*-===//
///
/// \file
/// Definition of the Box enum and declaration of the Gui class, which is
/// responsible for graphically rendering and managing the graphical user
/// interface elements.
/// Gui is owned and called by the Canvas class (Canva... |
//
// buffer.cpp
//
// This file implements the EditorBuffer class using the abstraction
// of a pair of character stacks. Everything before the current
// cursor position is considered to be in the 'before stack'. Everything
// after the cursor is in the 'after stack'.
//
// It has been augmented to support operatio... |
#include "stdafx.h"
#include <filesystem>
#include "AstImport.h"
#include "AstModule.h"
#include "AstContext.h"
#include "AstClass.h"
#include "AstDef.h"
#include "modules.h"
#include "../CodeGenerate/ClassMemberGen.h"
#include "../Type/ClassInstanceType.h"
#include "../FunctionInstance.h"
#include <llvm/Support/Dynam... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2016-2020 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of... |
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ui/gfx/win/physical_size.h"
#include <windows.h>
#include <setupapi.h>
#include <iostream>
#include <memory>
#include "base/logging.h"
#inclu... |
//========================================================================
//
// Parser.cc
//
// Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
#include <xpdf-aconf.h>
#ifdef USE_GCC_PRAGMAS
#pragma implementation
#endif
#include <stddef.h>
#include... |
#include <iostream>
#include <unordered_map>
#include <memory>
class User;
class Book;
class OnlineBookReaderSystem;
class UserManager;
class Library;
class Display;
class OnlineBookReaderSystem {
public:
std::shared_ptr<Library> get_library() const {
return library;
}
std::sha... |
#include "stdafx.h"
// Copyright (c) advancedfx.org
//
// Last changes:
// 2017-02-09 dominik.matrixstorm.com
//
// First changes:
// 2017-02-09 dominik.matrixstorm.com
#include "csgo_GlowOverlay.h"
#include "addresses.h"
#include "SourceInterfaces.h"
#include "csgo_MemAlloc.h"
#include <shared/de... |
/**************************************************************************
* Copyright(c) 1998-2016, ALICE Experiment at CERN, All rights reserved. *
* *
* Author: The ALICE Off-line Project. *
* Contributors ... |
// attributes.cc
// Class to manage partition attribute codes. These are binary bit fields,
// of which only four are currently (2/2011) documented on Wikipedia, and
// two others found from other sources.
/* This program is copyright (c) 2009-2013 by <NAME>. It is distributed
under the terms of the GNU GPL version ... |
/**
* Copyright (C) 2021 Xilinx, Inc
*
* 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... |
// See Copyright Notice in gmMachine.h
#include "NetClient.h"
#include <windows.h>
#include <process.h>
#include <stddef.h>
#include <stdlib.h>
#include <conio.h>
#include <winsock.h>
#include <math.h>
#undef SendMessage // stupid windows
struct nPacket
{
int id; // id == 0x4fe27d9a
int len;
};
///////////////... |
#include "amr-wind/incflo.H"
#include "amr-wind/wind_energy/ABL.H"
#include "amr-wind/utilities/tagging/RefinementCriteria.H"
#include "amr-wind/equation_systems/PDEBase.H"
#include "amr-wind/utilities/IOManager.H"
#include "amr-wind/utilities/PostProcessing.H"
using namespace amrex;
incflo::incflo ()
: m_sim(*... |
//
// Z80Storage.cpp
// Clock Signal
//
// Created by <NAME> on 01/09/2017.
// Copyright 2017 <NAME>. All rights reserved.
//
#include "../Z80.hpp"
using namespace CPU::Z80;
void ProcessorBase::reset_power_on() {
request_status_ &= ~Interrupt::PowerOn;
last_request_status_ &= ~Interrupt::PowerOn;
}
uint16_t P... |
/**
* elf_parser.cpp - Implementation of ELF binary perser
* @author <NAME> <<EMAIL>>
* Copyright 2013 MIPT-MIPS iLab project
*/
// Genereic C
#include <libelf.h>
#include <cstdio>
#include <unistd.h>
#include <cstring>
#include <fcntl.h>
#include <gelf.h>
#include <cstdlib>
#include <cerrno>
#include <cassert>
/... |
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "lorgnette/sane_client_fake.h"
#include <algorithm>
#include <map>
#include <optional>
#include <utility>
#include <chromeos/dbus/service_co... |
/****************************************************************************/
/// @file MSCFModel_IDM.cpp
/// @author <NAME>
/// @author <NAME>
/// @author <NAME>
/// @date Thu, 03 Sep 2009
/// @version $Id$
///
// The Intelligent Driver Model (IDM) car-following model
/***************************************... |
#include "controllerImpl.h"
#include <utility>
namespace su = simulator_utils;
ControllerImpl::ControllerImpl(params_t params_, init_vals_t init_vals_, gains_t gains_, double dt_)
:params(std::move(params_)), init_vals(std::move(init_vals_)), gains(gains_), dt(dt_)
{
// initialize derivative opera... |
// #define SERIALLOG 1
#include <DLog.h>
#include <Adafruit_SSD1351.h>
#include <SPI.h>
#include <math.h>
#include <Random.h>
#include <TLLogos.h>
#include <Text.h>
#include <Particle.h>
#include <DefaultConfig.h>
const int tlWidth = 40;
const int tlHeight = 33;
const float FIREWORK_CHANCE = 0.05;
const int FIREWOR... |
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: A higher level link library for general use in the game and tools.
//
//===========================================================================//
#include "tier3/tier3.h"
#include "tier0/dbg.h"
#include "istudiorender.h"
#... |
#include<bits/stdc++.h>
using namespace std;
#define FZ(n) memset((n),0,sizeof(n))
#define FMO(n) memset((n),-1,sizeof(n))
#define F first
#define S second
#define PB push_back
#define ALL(x) begin(x),end(x)
#define SZ(x) ((int)(x).size())
#define IOS ios_base::sync_with_stdio(0); cin.tie(0)
template<typename A, typena... |
#include "Platform/Vulkan/VKMesh.hpp"
#include <fstream>
using namespace Kestrel;
template<>
std::shared_ptr<VK_Mesh> VK_MeshRegistry::load_resource( const std::filesystem::path& path ){
PROFILE_FUNCTION();
std::vector<VK_Vertex> verts;
std::vector<uint32_t> indices;
std::ifstream file( path, std::ios::binary ... |
#include <iostream>
#include <chrono>
#include <random>
#include <set>
#include <map>
#include <list>
#include <forward_list>
#include "Allocator.h"
#include <iostream>
#include <omp.h>
const std::size_t growSize = 1024;
const int numberOfIterations = 1024;
const int randomRange = 1024;
template <typename Container>... |
/*
* Copyright 2008 by Idiap Research Institute
* http://www.idiap.ch
*
* See the file COPYING for the licence associated with this software.
*/
#include <cstring>
#include <algorithm>
#include "RtAudioSource.h"
Tracter::RtAudioSource::RtAudioSource(const char* iObjectName)
{
mObjectName =... |
#include "FilesManager.h"
FilesManager* FilesManager::filesManagerInstance =new FilesManager();
FilesManager::FilesManager()
{
}
FilesManager::~FilesManager()
{
delete filesManagerInstance;
}
uint32_t* FilesManager::readImage(const std::string & filePath, int & width, int & height, int & nrChann... |
/* Copyright [2014] <<NAME>>
* ListaDuplaCirc.cpp
*/
#include "Elemento.hpp"
#define ERROLISTAVAZIA -2;
#define ERROPOSICAO -3;
#define ERROLISTACHEIA -1;
template<typename T>
class ListaDuplaCirc {
private:
int qtdElementos;
Elemento<T>* head;
void ValidarPosicaoParaInsercao(const int pos) {
if (pos == 0)
r... |
/**
* Implementation of the SPI source, based on the data provided by the SPIHandler.
* The deposited material is added with the equilibrium distribution of charge states,
* to avoid having to resolve the very fast ionization of the low charge states at the
* usually high temperatures of the plasma the pellet is in... |
//-------------------------------------------------
//
// Class L1MuDTTrackCand
//
// Description: ouput data for DTTF trigger
//
//
// Author List: <NAME> UAM Madrid
//
//
//--------------------------------------------------
//-----------------------
// This Class's Header --
//-----------------------
#include... |
/*
Copyright (c) 2007-2015 Contributors as noted in the AUTHORS file
This file is part of libzmq, the ZeroMQ core engine in C++.
libzmq is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License (LGPL) as published
by the Free Software Found... |
#include "DK/stdafx.h"
#include "DKAudio.h"
bool DKAudio::Init(){
DKDEBUGFUNC();
DKClass::DKCreate("DKAudioJS");
DKClass::DKCreate("DKAudioV8");
if(DKClass::DKAvailable("DKSDLAudio")){
DKClass::DKCreate("DKSDLAudio");
return true;
}
if(DKClass::DKAvailable("DKSDLWav")){
DKClass::DKCreate("DKSDLWav");
ret... |
#include "wt_wave.h"
wt_Wave::wt_Wave(QWidget *parent) :
QLabel(parent) {
int i;
for (i = 0; i < 1000; i++) {
point[i] = 0;
}
num = 0;
IMPFlag = 0;
IMP_X = 0;
IMP_Y = 0;
IMP_Point = 1;
Block_Point = 0;
Red_line = 10;
Green_line = 10;
Test_Shape = 0;
IMPBi... |
/*
* Copyright (c) 2011, <NAME>. 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 ... |
/*******************************************************************************
* Copyright (c) 2009-2016, MAV'RIC Development Team
* 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. R... |
/***************************************************************************
copyright : (C) 2002 - 2008 by <NAME>
email : <EMAIL>
***************************************************************************/
/***************************************************************************... |
/**
Copyright 2009-2018 National Technology and Engineering Solutions of Sandia,
LLC (NTESS). Under the terms of Contract DE-NA-0003525, the U.S. Government
retains certain rights in this software.
Sandia National Laboratories is a multimission laboratory managed and operated
by National Technology and Engineering... |
/*
<NAME>
IIIT Bangalore
*/
#include<bits/stdc++.h>
#define mt make_tuple
#define mp make_pair
#define pu push_back
#define INF 1000000001
#define MOD 1000000007
#define EPS 1e-6
#define ll long long int
#define ld long double
#define fi first
#define se second
#define all(v) v.begin(),v.end()
#define pr(v) { for(int ... |
#include "tuw_rccar/tuw_rccar.h"
#include "tuw_rccar/serial_message.h"
#include <opencv/cv.h>
#include <boost/concept_check.hpp>
using namespace cv;
using namespace tuw;
RCCar::RCCar ( const std::string &ns ) {
tuw::serial::Parameters params;
params.port = "/dev/ttyACM0";
params.baudrate = 115200;
... |
/* Test case for TMR data structures.
*
* (C) Copyright <NAME> 2010.
*
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* 11 September 2010 - Initial Revision (<NAME>)
*/
#include "utility.hpp"
#include ... |
// -*- mode: c++; indent-tabs-mode: nil; -*-
//
// Copyright (c) 2009-2013 Illumina, Inc.
//
// This software is provided under the terms and conditions of the
// Illumina Open Source Software License 1.
//
// You should have received a copy of the Illumina Open Source
// Software License 1 along with this program. If ... |
///////////////////////////////////////////////////////////////////////////////
//
// http://github.com/breese/aware
//
// Copyright (C) 2013 <NAME> <<EMAIL>>
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE... |
#include "ImporterImpl.h"
#include "cdotc/AST/ASTContext.h"
#include "cdotc/AST/Expression.h"
#include "cdotc/Driver/Compiler.h"
#include "cdotc/Lex/Lexer.h"
#include "cdotc/Parse/Parser.h"
#include "cdotc/Sema/SemaPass.h"
#include "cdotc/Support/LiteralParser.h"
#include <clang/Basic/TargetInfo.h>
#include <clang/Fr... |
// Copyright 2012 Cloudera Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in wr... |
/*
Copyright (c) 2009-2016, <NAME>
All rights reserved.
This file is part of Elemental and is under the BSD 2-Clause License,
which can be found in the LICENSE file in the root directory, or at
http://opensource.org/licenses/BSD-2-Clause
*/
#include <El.hpp>
template<typename Real>
void SolveHilbert( E... |
/**************************************************************************/
/*!
@file HardwareEncoder.cpp
@author hathach (tinyusb.org)
@section LICENSE
Software License Agreement (BSD License)
Copyright (c) 2018, Adafruit Industries (adafruit.com)
All rights reserved.
Redistribut... |
#include <fstream>
using std::ofstream;
using std::ifstream;
#include <iostream>
using std::cout;
using std::cin;
using std::cerr;
using std::endl;
#include <string>
using std::string;
#include <cstdlib>
using std::exit;
#include <cryptopp/cryptlib.h>
using CryptoPP::Exception;
#include <cryptop... |
//
// Copyright (c) Microsoft. All rights reserved.
// This code is licensed under the MIT License (MIT).
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
// D... |
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup()
{
// Use GL_TEXTURE_2D Textures (normalized texture coordinates 0..1)
ofDisableArbTex();
// FBO with multiple render targets
ofFbo::Settings fboSettings;
fboSettings.width = ofGetWindowWidth()... |
// RUN: %clangxx -fsycl %s -o %t.out
// RUN: env SYCL_DEVICE_TYPE=HOST %t.out
// This performs basic checks such as reduction creation, getIdentity() method,
// and the combine() method of the aux class 'reducer'.
#include "reduction_utils.hpp"
#include <CL/sycl.hpp>
#include <cassert>
using namespace cl::sycl;
tem... |
//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restrictio... |
//
// PlainWater.cpp
// Alchemy
//
// Created by Kyounghwan on 2014. 3. 1..
//
//
#include "PlainWater.h"
#include "WindTalisman.h"
#include "WaterTalisman.h"
#include "EarthTalisman.h"
#include "FireTalisman.h"
#define DEFAULT_INDEX 0
#define ATTACT_INDEX 1
#define LOOP -1
#define BULLET_SPEED ... |
#include "MAKERPad.h"
#define FREDADAM
#ifdef IAN
int Button[][4] = {{0, 835, 842}, // button 1
{1, 730, 740}, // button 2
{2, 600, 610}, // button 3
{3, 310, 324}, // button 4
{0, 892, 1000}, // button 1 + button 2
{1, 892, 1000}, // button 1 + button 2
{0, 872, 880}, // button 1 + button 3
{2, 872, 880}, // button... |
#include "Geometry/HcalCommonData/interface/CaloSimParametersFromDD.h"
#include "CondFormats/GeometryObjects/interface/CaloSimulationParameters.h"
#include "DetectorDescription/Core/interface/DDFilteredView.h"
#include "DetectorDescription/Core/interface/DDFilter.h"
#include "DetectorDescription/Core/interface/DDValue.... |
/* This file is part of the KDE project
Copyright 2010 <NAME> <<EMAIL>>
Copyright 2005,2007 <NAME> <<EMAIL>>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version ... |
#include <cassert>
#include <cmath>
#include <array>
/** calculate the normal quantile (which is the inverse normal CDF, here calculated by Acklam's algorithm, according to https://stackedboxes.org/2017/05/01/acklams-normal-quantile-function/)
* @param p probability
* @return the p-quantile of the standard normal di... |
#include "base/types.hh"
#include "fi/faultq.hh"
#include "fi/issue_execute_fault.hh"
#include "fi/fi_system.hh"
#include "cpu/o3/comm.hh"
#include "cpu/static_inst.hh"
using namespace std;
Issue_ExecuteFault::Issue_ExecuteFault(std::ifstream &os,bool inherited)
: Rename_IssueFault(os,true)
{
if(!inherited){
s... |
#include <iostream>
#include "../tl/Gestor.h"
#include "utilitario/Validar.h"
using namespace std;
Gestor gestor;
Validar validar;
void menu();
void procesarMenu(int &, bool &);
int ingresarNum(string);
void insertVertice();
void crearArcoManual();
void crearArcoDefault();
void mostrarMatrizAd();
void mostrarMatrizCo... |
/**
* @file statsallocatortest.cc
*
* @section LICENSE
*
* The MIT License
*
* @copyright Copyright (c) 2017 Intel Corporation
*
* 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 w... |
#ifdef CH_LANG_CC
/*
* _______ __
* / ___/ / ___ __ _ / / ___
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
* \___/_//_/\___/_/_/_/_.__/\___/
* Please refer to Copyright.txt, in Chombo's root directory.
*/
#endif
#include "DoubleCartesianCS.H"
#include "CartesianBlockCS.H"
#include "BoxIte... |
#include "Rat.h"
#include "BattleScene.h"
#include "HPCounter.h"
Rat::Rat()
{
}
bool Rat::init()
{
Actor::init();
//copyTable(ActorCommonValues, this);
//copyTable(RatValues, this);
copyData_Rat();
init3D();
initActions();
_AIEnabled = true;
scheduleUpdateWithPriority(1);
return tru... |
#include <iostream>
#include <map>
#include <stdint.h>
#include <stdlib.h>
std::map<unsigned, unsigned> instr_map;
// branch_count[0]: branch taken number
// branch_count[1]: total branches number
int branch_count[2];
// REF: https://github.com/llvm-mirror/llvm/blob/master/lib/IR/Instruction.cpp#L290-L371
const char... |
#include "stdafx.h"
#include "scene.h"
#include "sceneobject.h"
#include "GroupObject.h"
#include "UI_Main.h"
#include "topbar.h"
#include "editorpref.h"
//------------------------------------------------------------------------------
// static part
//-------------------------------------------------------... |
/*
//--------------------------------------------------------------------------------
//--
//-- This file is owned and controlled by Xilinx and must be used solely
//-- for design, simulation, implementation and creation of design files
//-- limited to Xilinx devices or technologies. Use with non-Xilinx
//-- devices or... |
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/download/download_started_animation.h"
#include <gtk/gtk.h>
#include "app/animation.h"
#include "app/resource_bundle.h"
#in... |
/*=========================================================================
Program: GDCM (Grassroots DICOM). A DICOM library
Copyright (c) 2006-2011 <NAME>
All rights reserved.
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY... |
/*
* Copyright © 2012, United States Government, as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All rights reserved.
*
* The NASA Tensegrity Robotics Toolkit (NTRT) v1 platform is licensed
* under the Apache License, Version 2.0 (the "License");
* you may not use this file... |
#include <sstream>
#include <iomanip>
#include <cctype>
#include <algorithm>
#include <utility>
#include <set>
#include <array>
#include <iostream>
#include "scanner.h"
Token::Token(Token::Kind kind, std::string lexeme):
kind(kind), lexeme(std::move(lexeme)) {}
Token:: Kind Token::getKind() const { return kind;... |
#include "pid/pid.h"
#include "ga.h"
#include <random>
#include <memory>
#include <chrono>
constexpr int MAX_GENERATION = 300;
constexpr int MAX_ITERATION = 4500;
constexpr double KP_MAX = 20.0;
constexpr double KI_MAX = 1.0;
constexpr double KD_MAX = 20.0;
int main(int argc, char** argv) {
std::vector<double> ... |
/*******************************************************************************
* Copyright 2016 -- 2021 IBM Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:... |
/*! @file test_dynamics.cpp
* @brief Test dynamics algorithms
*
* Test the dynamics algorithms in DynamicsSimulator and models of Cheetah 3
*/
#include "Dynamics/FloatingBaseModel.h"
#include "Dynamics/Quadruped.h"
#include "Utilities/utilities.h"
//#include "DynamicsSimulator.h"
#include "include/Dynamics/Cheeta... |
/*
* Copyright (C) 2009-2021 Intel Corporation.
* SPDX-License-Identifier: MIT
*/
/*
* Sample buffering tool
*
* This tool collects an address trace, including PC, read/write EA,
* and read/write size, by filling a buffer. When the buffer overflows,
* the callback writes all of the collected records to a fil... |
#include<iostream>
#include<vector>
using namespace std;
vector<uint64_t> fibList; // Fibonacci numbers List
vector<uint64_t> pisanoSequence; // Pisano Sequence list
void generatePisanoSequence(int mod)
{
fibList.push_back((*(fibList.end() - 1) + *(fibList.end() - 2)) % mod); // Get the last digits of the next Fibona... |
//
// MIT License
//
// © ESI Group, 2015
//
// 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, pu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.