text stringlengths 3.08k 12.5k |
|---|
/*
Copyright 2005-2012 Intel Corporation. All Rights Reserved.
The source code contained or described herein and all documents related
to the source code ("Material") are owned by Intel Corporation or its
suppliers or licensors. Title to the Material remains with Intel
Corporation or its supplier... |
/*
* Copyright (c) 2018, the neonavigation authors
* 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 file is part of the EMBTOM project
* Copyright (c) 2018-2020 <NAME>
* (https://github.com/embtom)
*
* 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, inclu... |
#include <cstring>
#include <climits>
#include "DataFormats/HcalRecHit/interface/HcalSpecialTimes.h"
#include "RecoLocalCalo/HcalRecAlgos/interface/HFSimpleTimeCheck.h"
#include "RecoLocalCalo/HcalRecAlgos/interface/HFRecHitAuxSetter.h"
// Phase 1 rechit status bit assignments
#include "DataFormats/METReco/interface... |
/*
* Copyright (c) 2012-2013, 2016-2017 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implementat... |
#include <bits/stdc++.h>
#pragma once
namespace {
template<typename Edge>
class GraphPloter {
public:
explicit GraphPloter(std::vector<std::vector<Edge>> graph)
: graph_(std::move(graph)), n_(graph_.size()), locations_(n_), fixed_(n_), repulsive_forces_(n_), attractive_forces_(n_), rng_(clock()) {
initial... |
#include "global.h"
#include "InputFilter.h"
#include "RageLog.h"
#include "RageInput.h"
#include "RageThreads.h"
InputFilter* INPUTFILTER = NULL; // global and accessable from anywhere in our program
static const float TIME_BEFORE_SLOW_REPEATS = 0.25f;
static const float TIME_BEFORE_FAST_REPEATS = 1.5f;
static con... |
/******************************************************************************
Copyright (c) 2015, Focusrite Audio Engineering 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:
* Redistribu... |
#include "c3.h"
#include "aui_uniqueid.h"
#include "aui_ldl.h"
#include "c3_button.h"
#include "allinonewindow.h"
#include "spnewgametribescreen.h"
#include "ns_tribes.h"
#include "ns_item.h"
ns_ListItem::ns_ListItem(
AUI_ERRCODE *retval,
const MBCHAR *name,
MBCHAR *ldlBlock )
:
aui_ImageBase(ldlBlock)... |
/**
*
* Author: <NAME>(coderemite)
* Email: <EMAIL>
*
*/
// BEGIN CUT HERE
// END CUT HERE
#line 5 "TheHexagonsDivTwo.cpp"
#include <cmath>
#include <cstdio>
#include <ctime>
#include <cctype>
#include <cstring>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <m... |
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
namespace merge_sort_tree
{
vector<ll>tre[1000001];
vector<ll>v(1000001);
vector<ll> merge(vector<ll>&a,vector<ll>&b)
{
ll n=a.size(),m=b.size(),i=0,j=0;
vector<ll>res;
while(i<n&&j<m)
{
if(a... |
/* Copyright 2020 Stanford University
* Copyright 2020 Los Alamos National Laboratory
*
* 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.... |
#include "geniviocf.h"
int initialized = 0;
void monitor_connection(const char *ipv4_address, const char *ipv6_address, void *user_data)
{
appdata_s *ad = (appdata_s *)user_data;
show_graphic_popup(ad, "WiFi Connection Lost. Please Restart!", ICON_DIR"/no-wifi-icon.png", 9);
//ui_app_exit();
}
void send_message(... |
#include <abb.h>
#include <thread>
#include <map>
#include <chrono>
#include <condition_variable>
#include <mutex>
#include <sstream>
#include <iostream>
#define LOG(msg) do { std::cerr << "File " << __FILE__ << ", line " << __LINE__ << ": " << msg << std::endl; } while(0)
typedef std::chrono::system_clock::duration ... |
// Copyright (c) 2020, Lawrence Livermore National Security, LLC.
// See top-level LICENSE file for details.
#include "caliper/CaliperService.h"
#include "caliper/Caliper.h"
#include "caliper/SnapshotRecord.h"
#include "caliper/common/Log.h"
#include "caliper/common/RuntimeConfig.h"
#include <chrono>
#include <vect... |
#include "mvGUISettings.h"
#include "mvHashTable.h"
using std::endl;
// This must be below vtkStandardNewMacro
#if defined(_DEBUG) && defined(MV_DEBUG_MEMORY_LEAKS)
#include <afx.h>
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
mvGUISettings::mvGUISettings()
{
// Crop
crop... |
/**
* Copyright (c) 2021 OceanBase
* OceanBase CE is licensed under Mulan PubL v2.
* You can use this software according to the terms and conditions of the Mulan PubL v2.
* You may obtain a copy of Mulan PubL v2 at:
* http://license.coscl.org.cn/MulanPubL-2.0
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BAS... |
// DelayedFluidSimulator.cpp
// Interfaces to the cDelayedFluidSimulator class representing a fluid simulator that has a configurable delay
// before simulating a block. Each tick it takes a consecutive delay "slot" and simulates only blocks in that slot.
#include "Globals.h"
#include "DelayedFluidSimulator.h"
#inc... |
#include "Shader.hpp"
#include <fstream>
#include <iostream>
#include <sstream>
#include <glm/gtc/type_ptr.hpp>
Shader::Shader(const std::filesystem::path &vertex,
const std::filesystem::path &fragment,
const std::filesystem::path &geo = "") {
// 1. retrieve the vertex/fragment source... |
/*
* $Id: AUD_SequencerReader.cpp 40650 2011-09-28 09:37:50Z nexyon $
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* Copyright 2009-2011 <NAME>
*
* This file is part of AudaSpace.
*
* Audaspace is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as publi... |
#include "FusionEKF.h"
#include <iostream>
#include "Eigen/Dense"
using Eigen::MatrixXd;
using Eigen::VectorXd;
using std::cout;
using std::endl;
using std::vector;
/**
* Constructor.
*/
FusionEKF::FusionEKF() {
is_initialized_ = false;
previous_timestamp_ = 0;
// initializing matrices
R_laser_ = MatrixXd... |
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkAddIntersections.h"
#include "SkOpEdgeBuilder.h"
#include "SkPathOpsCommon.h"
#include "SkPathWriter.h"
static bool bridgeWinding(SkTArray<SkOpContour*, true>& con... |
#include "chunk.h"
#include <glm/gtc/matrix_transform.hpp>
#include "globals.h"
#include "camera.h"
#include <iostream>
using std::cout;
using std::endl;
using std::ostream;
using namespace Noise;
int Chunk::numChunks = 0;
ostream& operator<<(ostream &os, const vec3 &vec){
os << vec.x << " " << vec.y << " " ... |
#include <iostream>
#include <pybind11/pybind11.h>
#include <pybind11/numpy.h>
#include <pybind11/stl.h>
#include "calc_c.h"
#include "pbc_c.h"
using namespace std;
namespace py = pybind11;
py::array_t<double> radial(py::array_t<double> array1, py::array_t<double> array2, double cut, py::array_t<double> cell);
vect... |
/*
* Copyright (c) 2009-2011 Intel Corporation. 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 app... |
/**
* @file Arduboy2Core.cpp
* \brief
* The Arduboy2Core class for Arduboy hardware initilization and control.
*/
#include "Arduboy2Core.h"
ESPboyInit myESPboy;
uint8_t Arduboy2Core::sBuffer[];
uint16_t Arduboy2Core::colors[19] = {
TFT_BLACK, TFT_NAVY, TFT_DARKGREEN, TFT_DARKCYAN, TFT_MAROON,
... |
// Copyright (c) 2012 The Dacrs developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "bloom.h"
#include "core.h"
#include "hash.h"
//#include "script.h"
#include <math.h>
#include <stdlib.h>
#define LN2SQUA... |
#include "Quat.h"
Quat::Quat(const Vec3f &dir, float angle)
{
const float halfangle = angle * MATH_DEG_TO_RAD / 2.0f;
const float sinangle = sinf(halfangle);
x = dir.x * sinangle;
y = dir.y * sinangle;
z = dir.z * sinangle;
w = cosf(halfangle);
}
Quat::Quat(const Vec3f &u, const Vec3f &v)
{
Vec3f w = cross(u, ... |
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <getopt.h>
#include <cassert>
#include <sstream>
#include <fstream>
#include <iostream>
#include <string>
... |
#include <map>
#include <opencv2/calib3d.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <random>
#include "aos/events/shm_event_loop.h"
#include "aos/init.h"
#include "aos/time/time.h"
#include "y2020/vision/sift/sift_generated.h"
#include "y2020/v... |
/*
** ClanLib SDK
** Copyright (c) 1997-2020 The ClanLib Team
**
** This software is provided 'as-is', without any express or implied
** warranty. In no event will the authors be held liable for any damages
** arising from the use of this software.
**
** Permission is granted to anyone to use this software for a... |
/**
* daisy_basic.cpp
* Synthesize Daisy with C++
* Nearly identical to the C version, using basic file I/O
* Compile and run with
* g++ daisy_basic.cpp && ./a.out
*/
#include <iostream>
#include <cstdio>
#include <cmath>
#define SAMPLERATE 44100 // Samplerate in hertz
#define QUARTER 0.180f // Quarter ... |
// Unscoped Enumerations examples
#include <iostream>
#include <vector>
#include <string>
// Used for test1
enum Direction {North =1, South=10, East, West };
// enum Street {Main, North, Elm}; // Error, can't use North again
// Used for test1
// This function expects a Direction paramater
// and returns its strin... |
#include <gtest/gtest.h>
extern "C" {
#include <lunatris/wall/wall.h>
}
class Wall: public testing::Test
{
protected:
wall_t wall;
virtual void SetUp(void);
virtual void TearDown(void);
void SetLine(uint8_t y, uint8_t x_start, uint8_t x_end);
void ExpectLine(uint8_t y, uint8_t expected[WALL_WIDTH]);
};
vo... |
/*
* Copyright 2017 The Polycube 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 Graphcore Ltd. All rights reserved.
#define BOOST_TEST_MODULE ReduceAdd
#include <poplar/Engine.hpp>
#include <poplibs_support/TestDevice.hpp>
// codelets
#include "poplar/Target.hpp"
#include "poplibs_test/Check.hpp"
#include "poplibs_test/Util.hpp"
#include "poplin/Convolution.hpp"
#include "pop... |
/*
Copyright 2016, <NAME>, Institute for Systems Biology
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 i... |
/* stock_icon.cpp
*
* Wireshark - Network traffic analyzer
* By <NAME> <<EMAIL>>
* Copyright 1998 <NAME>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the Lice... |
/**
* @file shapeFlow.cpp
* @brief ShapeFlow plugin for Maya
* @section LICENSE The MIT License
* @section requirements: Eigen library, Maya
* @version 0.10
* @date 01/Nov/2013
* @author <NAME>
*/
#pragma comment(linker, "/export:initializePlugin /export:uninitializePlugin")
#include "StdAfx.h"... |
#include <iostream>
#include <array>
#include <string>
#include <cstring>
// handle global namespace mess
// TODO: config file
#define PORT 1234
#include "Server.h"
#include "../GUI/gui.h"
std::array< std::string, 2 > offlineText = { { "OFFLINE", "Boot Up" } };
std::array< std::string, 2 > onlineText = { { "ONLINE"... |
/*
* Copyright (c) 2020 <NAME> https://gaztin.com/
*
* This software is provided 'as-is', without any express or implied warranty. In no event will
* the authors be held liable for any damages arising from the use of this software.
*
* Permission is granted to anyone to use this software for any purpose, includin... |
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
#define si(x) scanf("%d",&x)
#define sl(x) scanf("%lld",&x)
#define ss(s) scanf("%s",s)
#define pi(x) printf("%d\n",x)
#define pl(x) printf("%lld\n",x)
#define ps(s) printf("%s\n",s)
#define deb(x) cout << #x... |
#include <vector>
#include <fstream>
#include <stdexcept>
#include <cmath>
#include <utility> //pair, replace with tuple?
#include <iostream>
#include "vector.h"
#include "matrix.h"
#include "LU.h"
const int MAX_ITER = 40;
const double THRESHOLD = 0.01;
//make config or params for those and filename
//che... |
#include "NetCDFIO.hpp"
#include "MirrorPlasma.hpp"
// Code for NetCDF interface
//
using namespace netCDF;
NetCDFIO::NetCDFIO()
{
}
void NetCDFIO::Open( const std::string &file )
{
filename = file;
data_file.open( file, netCDF::NcFile::FileMode::replace );
TimeDim = data_file.addDim( "t" );
TimeVar = data_fi... |
/* --------------------------------------------------------------------------
*
* BHAPI++ Copyright (C) 2017, <NAME>, based on Haiku source-code, All Rights Reserved
*
* BHAPI++ library is a freeware; it may be used and distributed according to
* the terms of The MIT License.
*
* Permission is hereby granted, f... |
#include "eos_lib/eos_run.h"
#include "eos/core/Landmark.h"
#include "eos/core/LandmarkMapper.h"
#include "eos/fitting/nonlinear_camera_estimation.h"
#include "eos/fitting/linear_shape_fitting.h"
#include "eos/render/utils.h"
#include "eos/render/texture_extraction.h"
using namespace eos;
using eos::core::Landmark;
u... |
/*
* Copyright 2021 The Modelbox Project 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 requi... |
#include <cstdlib>
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
#include "banner.h"
#include "waveletsample.h"
#include "waveletsampleblock.h"
#include "transforms.h"
#include "delay.h"
#include "cmdlinefuncs.h"
#include "flatparser.h"
void usage()
{
char *tb=GetTsunamiBanner();
char ... |
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_NODE 100
#define UNSEEN (-INT_MAX)
typedef struct node {
int vertex;
int weight;
struct node* next;
}node;
node* G[MAX_NODE];
int check[MAX_NODE];
int parent[MAX_NODE];
FILE* fp;
int nheap = 0;... |
#include <mbgl/geometry/glyph_atlas.hpp>
#include <mbgl/text/font_stack.hpp>
#include <mbgl/platform/gl.hpp>
#include <mbgl/platform/log.hpp>
#include <mbgl/platform/platform.hpp>
#include <cassert>
#include <algorithm>
using namespace mbgl;
GlyphAtlas::GlyphAtlas(uint16_t width_, uint16_t height_)
: width(wi... |
#include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <utility>
#include <memory>
#include <stdexcept>
#include <cstdio>
#include <sstream>
using namespace std;
int svm(const char* cmd) {
char buffer[128];
string result = "";
shared_ptr<FILE> pipe(popen(cmd, "r"), pclose);
... |
// -*- C++ -*-
// Copyright (C) 2005, 2006 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version ... |
//
// Copyright 1998-2012 <NAME>
//
// 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... |
#include "include.h"
#define todo
const bool debug=
0
;
const string compressed_file_path="/home/ilya/projects/em_simulator_data/out_opcode_scan_compressed.txt";
//todo: opcode_scan.h and opcode_compress.h don't work anymore; need to make them use processed_line
//for random scan, just output everything
//don't add ... |
/***************************************************************************
* Copyright (C) 2008-2021 by <NAME> *
* <EMAIL> *
* *
* This program is free softwar... |
#include "Application.h"
#include "Libs/Glew/include/glew.h"
#include "Globals.h"
#include "FileManager.h"
#include "Time.h"
#include "ModuleJson.h"
#include "Libs/parson/parson.h"
Specs Application::GetSpecs()
{
Specs specs;
//CPU
specs.cpu_count = SDL_GetCPUCount();
specs.cache = SDL_GetCPUCacheLineSize();
/... |
/*
Copyright (C) 2003-2014 by <NAME> <<EMAIL>>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercia... |
#include <loco.h>
#include <random>
std::string PHYSICS_BACKEND = loco::config::physics::NONE;
std::string RENDERING_BACKEND = loco::config::rendering::GLVIZ_EDITOR;
const size_t NUM_BOXES = 4;
const size_t NUM_SPHERES = 4;
const size_t NUM_CYLINDERS = 4;
const size_t NUM_CAPSULES = 4;
const size_t NUM_EL... |
/*
Neighand: Neighborhood Handling library
The goal of this project is to find 3D neighbors efficiently.
Read the documentation contained in the article "Query Sphere
Indexing for Neighborhood Requests" for details.
This program compares how the Sphere and Cube performance
for nearest neighbor... |
/**************************************************\
* The MIT License (MIT)
* Copyright (c) 2014 <NAME>
* see LICENSE for full details
\**************************************************/
#pragma once
#include "msgs.hpp"
#include <stdio.h>
// class String: public base_t {
// std::string
// }
class vec_t: publi... |
//
// GameState.cpp
// mcdrunning
//
// Created by chenbingfeng on 15/6/19.
//
//
#include "GameState.h"
#include "ServerConn.h"
#include "../rapidjson/document.h"
#include "../rapidjson/writer.h"
#include "../rapidjson/stringbuffer.h"
#include "format.h"
#include <cstdlib>
#include <ctime>
using namespace cocos... |
/*
* font2c - Command-line utility for converting font glyphs into bitmap images
* embeddable in C source code.
*
* https://github.com/mattbucknall/font2c
*
* Copyright (C) 2022 <NAME>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted.
... |
#pragma ident "$Id: WfdiscRecord.cpp,v 1.2 2011/03/17 20:47:46 dechavez Exp $"
#include <QApplication>
#include <QSysInfo>
#include <QDir>
#include "WfdiscRecord.h"
#include "util.h"
#include "cssio.h"
#ifdef Q_OS_UNIX
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <limits.h>
#include <dirent.h>
#i... |
/*
* 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 ... |
/* ========================================================================== */
/* FLYSPECK - CODE FORMALIZATION */
/* */
/* Chapter: nonlinear inequalities ... |
//////////////////////////////////////////////////////////////////////
// Quadric.cpp - Classes for dealing with 3D Quadrics
//
// Changes Copyright <NAME>, Aug. 1999.
// Originally written by <NAME>, 1997.
#include "Math/Quadric.h"
template <class Vec_T> bool Quadric3<Vec_T>::FindMin(Vec_T& p, typename Vec_T::ElType... |
/*
// Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a
// component of the Texas A&M University System.
// All rights reserved.
// The information and source code contained herein is the exclusive
// property of TEES and may not be disclosed, examined or reproduced
// in whole or in part withou... |
/**************************************************************************/
/* */
/* WWIV Initialization Utility Version 5 */
/* Copyright (C)1998-2020, WWIV Software Services */
/* ... |
//
// SVisual Project
// Copyright (C) 2018 by Contributors <https://github.com/Tyill/SVisual>
//
// This code is licensed under the MIT License.
//
// 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 S... |
/*
* Based on the tutorial: https://ffainelli.github.io/openal-example/
* and the source code: https://github.com/ffainelli/openal-example/blob/master/openal-example.c
*/
#include <iostream>
#include <cassert>
#include <vector>
#include <AL/al.h>
#include <AL/alc.h>
#include <dr_wav.h>
#include <chrono>
#define OP... |
/*
* Copyright (c) 2015 Kaprica Security, Inc.
*
* 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, mer... |
/*
* Copyright (c) 2019, the neonavigation authors
* 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, ... |
#include "GL/freeglut.h"
#include "GL/gl.h"
void drawTriangle()
{
glClearColor(0.4, 0.4, 0.4, 0.4);
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 1.0);
glOrtho(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0);
glBegin(GL_TRIANGLES);
glVertex3f(-0.7, 0.7, 0);
glVertex3f(0.7... |
#include <cstdlib>
#include <new>
#include <limits>
#include <iostream>
#include <vector>
#include <omp.h>
#include <array>
#include <memory_resource>
#include <cxxabi.h>
#include <boost/core/demangle.hpp>
extern "C" {
void* llvm_omp_target_alloc_shared(size_t, int);
}
typedef size_t index; // one of the NEST type... |
// Copyright (c) 2021 PaddlePaddle 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... |
#include "Cylinder.h"
#include <math.h>
Cylinder::Cylinder(float height, float radius, int numSegments) : Mesh()
{
// Construct a cylinder using the given argument
VertexList generatedVertices;
TriangleList generatedTriangles;
int vertexCounter = 0;
// Generate the 'tower' part of the cylinder
for (float i = 0.0... |
// Python extension to accelerate gate applications.
//
#include <Python.h>
#include <stdio.h>
#include <stdlib.h>
#include <complex>
#include <numpy/ndarraytypes.h>
#include <numpy/ufuncobject.h>
#include <numpy/npy_3kcompat.h>
typedef std::complex<double> cmplxd;
typedef std::complex<float> cmplxf;
// apply1 appl... |
#include "stereo_rectifier/stereo_rectifier.hpp"
StereoRectifier::StereoRectifier() {
ros::NodeHandle nhPriv("~");
std::vector<double> E0, _K0, frame_size0, dist_coeff0;
std::vector<double> E1, _K1, frame_size1, dist_coeff1;
// cameras model
if(!nhPriv.getParam("/cam0/T_BS/data", E0)
|| !nhPriv.getParam("/cam0/i... |
#ifndef __SYNTHESIS__
#include <stdio.h>
#endif
#include <stdio.h>
#include <assert.h>
#include "ap_int.h"
#include "hls_stream.h"
void krnl_datamover_core(
ap_uint<512>* srcYImg,
ap_uint<512>* srcUImg,
ap_uint<512>* srcVImg,
unsigned int FRAME_WIDTH,
unsigned int FRAME_HEIGHT,
unsigned int QP,... |
#ifdef __linux__
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <pthread.h>
#endif
#ifdef __APPLE__
#define _DARWIN_C_SOURCE
#include <mach/thread_policy.h>
#include <mach/thread_act.h>
#include <pthread.h>
#endif
#include "sco_scheduler.h"
#include <vector>
#include <unistd.h>
#include "sco_global_queue.h"
#i... |
#include "STKFMM/STKFMM.hpp"
extern pvfmm::PeriodicType pvfmm::periodicType;
namespace stkfmm {
bool get_verbosity() {
char *verbose_env;
verbose_env = getenv("STKFMM_VERBOSE");
if (verbose_env == nullptr || verbose_env[0] == '0')
return false;
return true;
}
const bool verbose = get_verbos... |
/*
This file is part of the Dynarithmic TWAIN Library (DTWAIN).
Copyright (c) 2002-2020 Dynarithmic Software.
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.... |
/*
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... |
#include "../include/categoria.h"
// =========== Metodos Categoria ============================
// ======= Getters
unsigned short Categoria::get_id() {
return id;
}
std::string Categoria::get_nome() {
return nome;
}
// ======= Setters
void Categoria::set_id(unsigned short novoId) {
id = novoId;
}
void Categor... |
// this file is part of notepad++
// Copyright (C)2003 Harry <<EMAIL>>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any la... |
/*
MIT License
Copyright (c) 2017 <NAME>
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, publis... |
#include "DatabaseConfiguration.hh"
#include <iostream>
DatabaseConfiguration::DatabaseConfiguration(const Napi::CallbackInfo& info)
: CouchbaseWrapper(info)
{
auto env = info.Env();
CBL_TYPE_ASSERT(env, info.Length() == 0, CBL_ARGC_ERR_MSG(0));
}
Napi::Value DatabaseConfiguration::get_directory(const Nap... |
/*
* ===========================================================================
* Loom SDK
* Copyright 2011, 2012, 2013
* The Game Engine Company, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy o... |
// stringwrapper.cpp
// Contains the implementations of stringwrapper class functions.
/************************************************************************************
* MIT License *
* ... |
#include "Application.h"
#include "MouseController.h"
#include "KeyboardController.h"
#include "SceneManager.h"
#include "GraphicsManager.h"
//Include GLEW
#include <GL/glew.h>
//Include GLFW
#include <GLFW/glfw3.h>
//Include the standard C++ headers
#include <stdio.h>
#include <stdlib.h>
#include "SceneText.h"
#in... |
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <fstream>
#include <iostream>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#include <map>
#include <algorithm>
#include <stdint.h>
#include "gflags/gflags.h"
#include "glog/logging.h"
#include <boost/shared_p... |
#include "window.h"
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
// global window
struct Window window;
static void _size_callback(GLFWwindow *handle, int width, int height) {
glViewport(0, 0, width, height);
window.size = (ivec2s) {{width, height}};
}
static void _cursor_callback(GLFWwindow ... |
#include<time.h>
#include<iostream>
#include<vector>
#include<fstream>
#include<random>
using namespace std;
#define ld long double
#define INF 1e200
vector<vector<long double>> universe;
vector<long double> temp;
vector<vector<long double>> codebook;
// this function is used to calculate tokura distance between 2 c... |
/*
Copyright (c) 2015 <NAME>
http://www.dumaisnet.ca
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, publ... |
#include <util/unique_handle.hpp>
#include <util/buffer.hpp>
#include <util/cuda_utils.hpp>
#include <util/to_scalar.hpp>
#include <timeprinter/printer.hpp>
#include <cuda.h>
#include <curand.h>
#include <omp.h>
#include <cassert>
#include <iostream>
#include <random>
namespace
{
tp::printer g_tpr;
template... |
// Copyright (c) 2009, Whispersoft s.r.l.
// 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 cond... |
#include "../../include/dicomcodecs/exception.hpp"
#include "../../include/dicomcodecs/image.hpp"
#include "../../include/dicomcodecs/point.hpp"
#include "../../include/dicomcodecs/size.hpp"
#include <limits.h>
#include <ojph_arch.h>
#include <ojph_codestream.h>
#include <ojph_file.h>
#include <ojph_mem.h>
#include <oj... |
/*************************************************************************
> File Name: FordFulkerson.cpp
> Author: Louis1992
> Mail: <EMAIL>
> Blog: http://gzc.github.io
> Created Time: Fri Nov 13 10:04:58 2015
************************************************************************/
#include<iostream>
#include... |
/*
<NAME>
assignment5.cpp
*/
/*
// Part I
#include<iostream>
using namespace std;
void swapValue(int, int);
void swapReference(int &, int &);
int main(){
int
i = 10,
n = 20;
//call the swapValue Method
swapValue(i, n);
//print result of swapValue Method
cout << "\n\n" //1
<< "i = " << i... |
#include "TROOT.h"
#include "TPDF.h"
#include "cli.hpp"
#include "init_ds.hpp"
#include "consts.hpp"
#include "csalg.hpp"
#include "drawing.hpp"
#include "scattyield.hpp"
#include "protonede.hpp"
#include "treewalk.hpp"
#include "cuts_conf.hpp"
#include "rootscript.hpp"
static s13::misc::CliOptions cli_opts;
usi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.