text
stringlengths
3.08k
12.5k
#include <cstring> #include <chrono> #include <stdexcept> #include <string> #include <iostream> #include <vector> #define VERIFY(condition, message) \ if (!(condition)) { \ throw std::runtime_error(std::string("File: ") + \ std::string(__FILE__) + \ st...
/** Author: <NAME> 3/29/18 Email: <EMAIL> Short Description: This software provides an attitude heading and reference system (AHRS) implementation for the purpose of instrumenting a custom flight simulator cockpit. An STM32F4 microcontroller is paired with an LSTM9DS1 9-DOF inertial measurement unit (IMU) to gath...
#include "gross/Support/Log.h" #include "gross/Graph/Graph.h" #include "gross/Graph/NodeUtils.h" #include "gross/Graph/NodeMarker.h" #include "Parser.h" using namespace gross; template<IrOpcode::ID OC> bool Parser::ParseTypeDecl(NodeBuilder<OC>& NB) { gross_unreachable("Unimplemented"); return false; } namespace ...
#include <getopt.h> #include <iostream> #include <fstream> #include <set> #include "common.hpp" #include "socket.hpp" #include "dns.hpp" #include "query.hpp" static void usage(); static bool parse_resolver_list(std::istream &s, std::vector<SocketAddress> &res); static bool parse_query_list(std::istream &s, std::vecto...
std::mt19937 TreapRandomGenerator(42424242); std::uniform_int_distribution<int> TreapPriorityGenerator(0, std::numeric_limits<int>::max()); template<class K, class V> class tTreap { struct cNode { K mKey; V mValue; int mPriority; cNode *mLeft=nullptr, *mRight=nullptr; int mSize=1; void FixSize() { ...
/* * Copyright (C) 2015 HEPfit Collaboration * All rights reserved. * * For the licensing terms see doc/COPYING. */ #include "myModel.h" /* Define mandatory model parameters here. */ const std::string myModel::myModelvars[NmyModelvars] = {"Api0", "Api2", "AK0", "A4pi0", "Aetet_r", "Aetetp_r", ...
/* * Copyright 2013 <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 to in writin...
// Copyright (c) 2019 Graphcore Ltd. All rights reserved. #define BOOST_TEST_MODULE Add0InplaceTest #include <../test_runner.hpp> #include <boost/test/unit_test.hpp> #include <elementwisebinary_testcase.hpp> #include <popart/op/add.hpp> #include <popart/patterns/pattern.hpp> #include <popart/tensors.hpp> using namesp...
#include "cinder/app/AppBasic.h" #include "cinder/ArcBall.h" #include "cinder/Rand.h" #include "cinder/Camera.h" #include "cinder/Surface.h" #include "cinder/gl/Vbo.h" #include "cinder/ImageIo.h" using namespace ci; using namespace ci::app; class ImageHFApp : public AppBasic { public: void setup(); void resi...
#include <cstdlib> #include <iostream> #include <fstream> #include <vector> #include "lores_model.h" #include "sphere.h" #include "cylinder.h" #include "ellipsoid.h" #include "Point3D.h" using namespace std; void test_calculateIQ(LORESModel &lm); void WritePointsCoor(vector<Point3D> &vp){ ofstream outfile("testcc....
/* created by <NAME> at CU Boulder, 07/18/2017 */ #include "SolidElementMPM.h" using namespace std; using namespace MPM; SolidElementMPM::SolidElementMPM(){ } SolidElementMPM::SolidElementMPM(int type){ if (type==1) { fShape=ShapeBaseT::create(1); }else{ throw "\n!! SolidElementMPM...
/********** Copyright 2017 Xilinx, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softw...
#include <minigui/common.h> #include <minigui/minigui.h> #include <minigui/gdi.h> #include <minigui/window.h> #include <minigui/control.h> #include "mdolphin_app.h" #include "mdolphin_animation.h" #include "mdolphin_transform.h" #include "mdolphin_pageview.h" #include "mdolphin_skin.h" #if USE_FTIMER #include "ftimer...
/****************************** LICENSE ******************************* * (C) Copyright 1996-2017 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the pr...
/* * VirtualMemoryManager implementation * * Used to facilitate demand paging through providing a means by which page * faults can be handled and pages loaded from and stored to disk. */ #include <stdlib.h> #include <machine.h> #include "virtualmemorymanager.h" #include "system.h" VirtualMemoryManager::VirtualMem...
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim: set ts=8 sts=2 et sw=2 tw=80: */ /* This code is made available to you under your choice of the following sets * of licensing terms: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If ...
/** Author: <NAME> (msp3430) * * Inspired by: * - https://github.com/sourishg/stereo-calibration/blob/master/calib_intrinsic.cpp * - https://github.com/daviddoria/Examples/blob/master/c%2B%2B/OpenCV/CheckerBoardCalibration/CalibrateAndDisplay.cxx * - https://docs.opencv.org/3.1.0/d4/d94/tutorial_camera...
#include <algorithm> #include <iostream> #include <regex> #include <sstream> #include <string> #include <vector> #include <unordered_map> #include <unordered_set> struct Program { std::string name; long weight; std::vector<std::string> children; mutable long total_weight; Program(std::string&& nam...
/*========================================================================= Program: Visualization Toolkit Module: otherFieldData.cxx Copyright (c) <NAME>, <NAME>, <NAME> All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHO...
/////////////////////////////////////////////////////////////////////////////// // Copyright <NAME> 2015 - 2016. // Copyright <NAME> 2015 - 2016. // 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) // Th...
// Copyright (c) 2006, <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 an...
/* * Copyright 2001-2010 DarkWyrm <<EMAIL>> * Copyright 2014 <NAME> <<EMAIL>> * Distributed under the terms of the MIT License. * * Authors: * DarkWyrm, <EMAIL> * <NAME>, <EMAIL> */ #include "LicenseManager.h" #include <Box.h> #include <Button.h> #include <Catalog.h> #include <Directory.h> #include <Entry....
#include "ssvm.hpp" #include "common.hpp" #include <algorithm> #include <unordered_map> namespace ssvm { class executer_t { private: const op_t *ip; body_data_t *ptr_sensor; body_data_t *ptr_other; data_type stack[32]; int stack_ptr; int waiting; void push(data_type data); data_type pop(); void kil...
//============================================================== // Copyright (C) Intel Corporation // // SPDX-License-Identifier: MIT // ============================================================= #include <string.h> #include <memory> #include "utils.h" #include <CL/sycl.hpp> #define A_VALUE 0.128f #define B_VA...
#include <traj_builder/traj_builder.h> //has almost all the headers we need #include <std_msgs/Float64.h> #include <nav_msgs/Odometry.h> //global vars, equivalent to member vars of class geometry_msgs::Twist g_halt_twist; nav_msgs::Odometry g_end_state; nav_msgs::Odometry g_start_state; geometry_msgs::PoseStamped g_st...
#include "mex.h" #include "../../../clib/src/ct.h" #include "ctmatutils.h" static void thermoset( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[] ) { //if (nrhs != 4) { // mexErrMsgTxt("wrong number of input parameters."); //} int ierr = 0; double vv; int th = g...
#include <vector> #include "lib/Eigen327/Dense" #include "lib/Eigen327/Sparse" #include "lib/Eigen327/Eigenvalues" #include "matrixops.h" double TOL = 1e-6; // For calculating steady state SpMat diff_mat(int n, double h, double c) { // c: Neumann=1, Dirichlet=2, Dirichlet mid=3; SpMat ret(n,n); ...
#include <iostream> #include <fstream> #include <functional> #include <vector> #include <map> static const int INPUT_PART1 = 1; static const int INPUT_PART2 = 5; enum OPCODE { ADD = 1, MUL = 2, IN = 3, OUT = 4, JMPT = 5, JMPF = 6, LT = 7, EQ = 8, HALT = 99, }; enum PARAM_...
#include "stdafx.h" #include "level.h" using namespace TMX; using namespace pyrodactyl::stat; using namespace pyrodactyl::anim; using namespace pyrodactyl::level; using namespace pyrodactyl::image; using namespace pyrodactyl::people; using namespace pyrodactyl::input; //-----------------------------------------------...
#pragma once // The base object class #include "gc.hh" #include "utils.hh" #include <iterator> #include <vector> #include <unordered_map> struct Type; struct Object; // Whether it is a type object bool is_type(Object *o); // Function that calls the visitor on all objects to traverse typedef std::function<void(Obje...
/* -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* * Scheduler.cpp --- AP_HAL_SMACCM scheduler. * * Copyright (C) 2012, Galois, Inc. * All Rights Reserved. * * This software is released under the "BSD3" license. Read the file * "LICENSE" for more information. * * Written by <NAME> <<EMAIL>>,...
/* Copyright 2014 <NAME>, all rights reserved. */ #include <granary.h> GRANARY_USING_NAMESPACE granary; GRANARY_DEFINE_mask(address_mask, std::numeric_limits<uintptr_t>::max(), "Mask that is used to filter addresses. If all bits are set then all " "addresses are accepted.\n" "\n" "If `(addr & addr_ma...
/* Copyright (c) 2010, 2015, 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 as published by the Free Software Foundation; version 2 of the License. This program is distributed in the h...
/** * Copyright (c) Glow Contributors. See CONTRIBUTORS file. * * 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 b...
/* * Copyright (c) 2018-2020, <NAME> <<EMAIL>> * 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 ...
/* _ _ * | | (_) * | | __ _ _ _ _ * | | / _` || | | || | * | || (_| || |_| || | * |_| \__, | \__,_||_| * __/ | * |___/ * * Copyright (c) 2015-22 frank256 * * License (BSD): * * Redistribution and use in source and binary forms, with or without modification, * ar...
#include <iostream> #include <string> #include <sstream> #include <avatar_locomanipulation/feasibility/feasibility_data_generator.hpp> #include <avatar_locomanipulation/bridge/rviz_visualizer.hpp> void initialize_config(Eigen::VectorXd & q_init, std::shared_ptr<RobotModel> & robot_model){ Eigen::VectorXd q_start; ...
// -*- C++ -*- // // Package: RPCTrigger // Class : RPCConeBuilderFromES // // Implementation: // <Notes on implementation> // // Original Author: // Created: Mon Mar 3 13:34:20 CET 2008 // // system include files // user include files #include "L1Trigger/RPCTrigger/interface/RPCConeBuilderFrom...
#include <bits/stdc++.h> using namespace std; template <typename M, typename D> struct SegLazy { using Op = function<M(const M&, const M&)>; using D2M = function<void(M&, const D&)>; using D2D = function<void(D&, const D&)>; M ID; D UN; Op op; D2M d2m; D2D d2d; int N, L; ...
/** @file A brief file description @section license License 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 und...
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* * Main authors: * <NAME> <<EMAIL>> * * Copyright: * <NAME>, 2004 * * Last modified: * $Date: 2009-05-14 02:59:23 +0200 (Do, 14 Mai 2009) $ by $Author: tack $ * $Revision: 9099 $ * * This file is part of Gecode, the gener...
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include "DexCommon.h" #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #inclu...
/** * \file logger.cpp * \copyright The 3-clause BSD license is applied to this software. * \author <NAME> * \author <NAME> * \author <NAME> - ParisTech * \date 2016-2019 */ #include <string> #include <iostream> #include <cstdlib> #include <cstdio> #include <ctime> #include <cstring> #include <cstdarg> #inclu...
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
#include "ModelLoader.h" ModelLoader::ModelLoader() : dev_(nullptr), devcon_(nullptr), meshes_(), directory_(), textures_loaded_(), hwnd_(nullptr) { // empty } ModelLoader::~ModelLoader() { // empty } bool ModelLoader::Load(HWND hwnd, ID3D11Device * dev, ID3D...
#include "engine.h" #include <sstream> const char* PrecNames[4] = { "float", "double", "cfloat", "cdouble" }; const PrecTerm PrecTerms[4] = { { 4, CU_AD_FORMAT_FLOAT, 1, }, { 8, CU_AD_FORMAT_UNSIGNED_INT32, 2 }, { 8, CU_AD_FORMAT_FLOAT, 2 }, { 16, CU_AD_FORMAT_UNSIGNED_INT32, 4 } }; int IndexFromVT(int vt) {...
/*========================================================================= Program: Visualization Toolkit Module: vtkPerlinNoise.cxx Copyright (c) <NAME>, <NAME>, <NAME> All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distribu...
#include <iostream> #include <fstream> #include <sstream> #include <string> using namespace std; //ahahaha struct timeInfo{ int startHours; int startMins; int endHours; int endMins; string event; string ampm; string name; timeInfo *freetime; timeInfo *next; timeInfo *previous; }; class timeSlot...
#include "Geometry/MuonNumbering/interface/DD4hep_RPCNumberingScheme.h" #include "Geometry/MuonNumbering/interface/DD4hep_MuonNumbering.h" #include "DataFormats/MuonDetId/interface/RPCDetId.h" #include "Geometry/MuonNumbering/interface/MuonBaseNumber.h" #include <FWCore/Utilities/interface/Exception.h> #include <casse...
/* * Copyright 2015 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #define EGL_EGL_PROTOTYPES 1 #include <EGL/egl.h> #include <EGL/eglext.h> #include "include/gpu/gl/GrGLAssembleInterface.h" #include "src/gpu/gl/GrGLDefines.h" #include "too...
/* * MIT License * * Copyright (c) 2020 <NAME> <<EMAIL>> * * This file is part of QtTWAIN project https://git.semlanik.org/semlanik/QtTWAIN * * 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 Soft...
#include "UIUtils.h" #include "inc/natives.h" #include "inc/enums.h" #include "fmt/format.h" #include <algorithm> #include "../Constants.h" #include "../ScriptSettings.hpp" extern ScriptSettings g_settings; namespace { const size_t maxStringLength = 99; int notificationHandle = 0; } void showNotification(c...
// solving A * X = B // A symmetric // driver function sysv() #define BOOST_NUMERIC_BINDINGS_POOR_MANS_TRAITS #define BOOST_NO_FUNCTION_TEMPLATE_ORDERING #include <cstddef> #include <iostream> #include <complex> #include <boost/numeric/bindings/lapack/sysv.hpp> #include <boost/numeric/bindings/traits/ublas_matrix.h...
#include "scene.h" #include <QDir> #include <QTextStream> #include <iostream> #include <qdebug.h> #include "vsexception.h" #include <QStringBuilder> const QString Scene::VID_DATA_FILE = "video_data.txt"; const QString Scene::PREROLL_FILENAME = "preroll.jpg"; Scene::Scene() {} Scene::Scene(QString path) { qDebug(...
// Gmsh - Copyright (C) 1997-2012 <NAME>, J.-B-> Remacle // // See the LICENSE.txt file for license information. Please report all // issues on https://gitlab.onelab.info/gmsh/gmsh/issues. #include "BasisFactory.h" #include "GmshDefines.h" #include "polynomialBasis.h" #include "pyramidalBasis.h" #include "bezierBasis....
// Copyright 2013 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 "components/precache/core/precache_database.h" #include "base/bind.h" #include "base/files/file_path.h" #include "base/message_loop/message_loop...
#include <glad/glad.h> #include <GLFW/glfw3.h> #include <stdio.h> #include <math.h> #include <stdlib.h> #include <string> #include "utils.h" #include "glsl.h" // OpenGL Helpers void glAssert( unsigned int obj, GLenum statusType, void ( APIENTRY* ivFun )( GLuint, GLenum, GLint* ), void ( APIENTRY* infoLogFun )( G...
/************************************************************************ * Copyright 2013 <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...
/* Siconos is a program dedicated to modeling, simulation and control * of non smooth dynamical systems. * * Copyright 2020 INRIA. * * 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 * ...
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "extensions/common/permissions/socket_permission_entry.h" #include <cstdlib> #include <sstream> #include <vector> #include "base/logging.h" #in...
#include "App.h" #include "Render.h" #include "SceneManager.h" #include "SceneControl.h" #include "SceneBattle.h" #include "GuiMenuMagic.h" #include "GuiManager.h" #include "Defs.h" #include "Log.h" GuiMenuMagic::GuiMenuMagic(iPoint Position, SceneControl* moduleObserver) { active = false; initialPos = Position; S...
/* * MIT License * * Copyright (c) 2021 CSCS, ETH Zurich * 2021 University of Basel * * 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 with...
/* The MIT License (MIT) Copyright (c) 2013-2015 SRS(ossrs) 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, merg...
// Copyright (c) 2016, <NAME>, <EMAIL> // 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 cond...
#include "AssemblyParser.h" #include <iostream> #include <thread> #include "Constants.hpp" const char kFunctionBraceOpen = '<'; const char kFunctionBraceClose = '>'; // Public AssemblyParser::AssemblyParser() { error = false; } AssemblyParser::~AssemblyParser() { return; } void AssemblyPars...
#include "base/Primitives.h" #include "base/PlannerSettings.h" #include "utils/PlannerUtils.hpp" ompl::base::State *base::StateFromXYT(double x, double y, double theta) { ompl::base::State *state = global::settings.ompl.state_space->allocState(); state->as<State>()->setX(x); state->as<State>()->setY(y); state...
// Copyright (c) 2013, Facebook, Inc. All rights reserved. // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. #include <set> #inc...
#include "galleryObjects.h" #include "gameElements.h" #include "houseObjects.h" #include "minorGems/graphics/filters/FastBlurFilter.h" typedef struct galleryObjectRecord { int id; char *name; char *description; SpriteHandle sprite; } galleryObjectR...
#include "color_helpers.hpp" #include <sstream> #include <stdexcept> std::tuple<std::uint8_t, std::uint8_t, std::uint8_t> jt::ColorHelpers::hsv2rgb( float h, float s, float v) { s /= 100.0f; v /= 100.0f; v *= 255.0f; float hh, p, q, t, ff; long i; std::tuple<std::uint8_t, std::uint8_t, std...
#include "dp.h" #include "dp_data.h" #include "dp_global.h" using namespace dp; void DPlacer::doLegalMove(const Move& move, bool updateNet) { // const Move& move = moves[targetCell]; Cell* targetCell = move.target.cell; vector<Net*> updateList; if (updateNet) { if (targetCell) { fo...
// // 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 bin...
#include "stdafx.h" // For use of precompiled headers #include "resource.h" #include "TrajectoryControl.h" #include "Mach4View.h" #include "Engine.h" #include "rs274ngc.h" #include "XMLProfile.h" #include "MachDevice.h" #include "G100-Structs.h" // Includes protocol messages and common G100 library #include "G100Co...
#include "osk.hpp" #include <getopt.h> #include <iostream> #include <linux/input-event-codes.h> #include "util/clara.hpp" #define ABC_TOGGLE 0x12345678 #define NUM_TOGGLE 0x87654321 #define IS_COMMAND(x) ((x) == ABC_TOGGLE || (x) == NUM_TOGGLE) #define USE_SHIFT 0x10000000 namespace wf { namespace osk { ...
#pragma once namespace couchbase::operations { struct bucket_settings { enum class bucket_type { unknown, couchbase, memcached, ephemeral }; enum class compression_mode { unknown, off, active, passive }; enum class eviction_policy { unknown, /** * During ejection, everything (incl...
#include <algorithm> #include <iostream> #include <vector> #include "ctpl_stl.h" #include "timer_milisec.h" using namespace std; void sorting_thread(int id, vector<int> &nvector, int left_id, int right_id, int threshold, ctpl::thread_pool &tp); void do_parallel_sort(vector<int> &numbers_vector, in...
#include "SimpleSample.h" #include <Engine\D3D11Impl\ImageBuffers\D3D11Texture2D.h> #include <filesystem> #include <rw_engine/rw_camera/rw_camera.h> #include <rw_engine/rw_im2d/rw_im2d.h> #include <rw_engine/rw_macro_constexpr.h> #include <rw_engine/rw_tex_dict/rw_tex_dict.h> #include <rw_engine/rw_texture/rw_texture.h...
/************************************************************************* * Copyright (c) 2015, Synopsys, Inc. * * All rights reserved. * * * * Redistribution and...
#include <memory> #include <boost/test/unit_test.hpp> #include "raft_node.h" #include "raft_test_context.h" void test_become_leader(uint64_t node_id, raft_test_context *ctx, uint64_t term) { bool at_most_one_leader = ctx->check_at_most_one_leader_per_term(node_id, term, true); BOOST_CHECK(at_most_one_leader); bo...
/* * Copyright (C) 2013 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
// Spatial Index Library // // Copyright (C) 2002 Navel Ltd. // // This library 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.1 of the License, or (at your option) any later vers...
/** * 5. Rainfall Statistics Modification * * Modify the Rainfall Statistics program you wrote for * Programming Challenge 2 of Chapter 7. The program * should display a list of months, sorted in order of * rainfall, from highest to lowest. * **/ #include <iostream> #include <vector> using namespace std; ...
#include "SQLiteCpp.h" #include "manager.hpp" #include "cmeans.hpp" #include "tsp.hpp" #include "log.hpp" #include <iostream> #include <benchmark.hpp> using DVector = std::unordered_map<Manager::Student, double>; using DMatrix = std::unordered_map<Manager::Student, DVector>; tsp<Manager::Student> route ( const M...
/**************************************************************************** * Copyright (C) from 2009 to Present EPAM Systems. * * This file is part of Indigo toolkit. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You ma...
/* Copyright 2014 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 writ...
// MiniTerm #include <inttypes.h> #include <stdio.h> #include <string.h> #include <memory.h> #include <math.h> #include "core.h" #include "gpu.h" #include "uart.h" #include "sdcard.h" #include "console.h" #include "elf.h" volatile uint32_t branchaddress = 0x10000; /*void loadfile(char *commandline) { FIL fp; F...
/* Copyright (c) 2008, 2021, Oracle and/or its affiliates. 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 b...
#include "L3RelayUnitEx.h" #include "inet/linklayer/common/Ieee802Ctrl.h" #include "microsoft/dcqcn/common/BufferUsage_m.h" #include "microsoft/dcqcn/common/CNPMessage_m.h" using namespace std; using namespace inet; using namespace dcqcn; using namespace commons; Define_Module(L3RelayUnitEx); const static int ECN_C...
// Copyright (c) Lawrence Livermore National Security, LLC and other Conduit // Project developers. See top-level LICENSE AND COPYRIGHT files for dates and // other details. No copyright assignment is required to contribute to Conduit. //----------------------------------------------------------------------------- ///...
//===- StringExtrasTest.cpp - Unit tests for String extras ----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
#include <cassert> #include <iostream> #include <tuple> #include "Geometry/TrackerGeometryBuilder/interface/phase1PixelTopology.h" namespace { // original code from CMSSW_4_4 std::tuple<int,bool> localXori(int mpx) { const float m_pitchx=1.f; int binoffx = int(mpx); // truncate to int fl...
#include "ZBufferRaster.h" /***********************************************************************************/ /*********************************** Constructor ***********************************/ /***********************************************************************************/ cAppliZBufferRaster::cAppliZBufferR...
#include "MyMotionValidator.h" MyMotionValidator::MyMotionValidator(const ob::SpaceInformationPtr &si) : ob::MotionValidator(si) { } void MyMotionValidator::setMap(const nav_msgs::OccupancyGrid_<std::allocator<void>>::ConstPtr &map) { map_ = map; res_ = map_->info.resolution; width_ = map_->info.width * res_;...
// _ _ // _ _|_ _ _|o_|__|_ // (_||_||_(_)(_|| | | // // automatic differentiation made easier in C++ // https://github.com/autodiff/autodiff // // Licensed under the MIT License <http://opensource.org/licenses/MIT>. // // Copyright (c) 2018-2020 <NAME> // // Permission is hereby granted, free of...
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #include "frc/Ultrasonic.h" #include <utility> #include <hal/FRCUsageReporting.h> #include <wpi/NullDeleter.h> #includ...
#include <string> #include <vector> #include <iostream> #include <exception> #include <set> #include <thread> #include <cstdlib> // Workarround Boost's new behaivur #define BOOST_BIND_GLOBAL_PLACEHOLDERS #include <tgbot/tgbot.h> #include "BotDatabase.hpp" #include "BotConfig.hpp" #include "PasswordHash.hpp" using n...
#include "LcpFinderWrapper.h" #include "Point.h" #include <map> LcpFinderWrapper::LcpFinderWrapper(std::shared_ptr<Quadtree> quadtree, Rcpp::NumericVector _startPoint) : startPoint{_startPoint}{ startNode = quadtree->getNode(Point(startPoint[0], startPoint[1])); lcpFinder = LcpFinder(quadtree,Point(startPoin...
#include "ReadWrite.h" #include "FFT/fft.c" #include "FFT/fft2D.c" #include <fstream> #include <string> #include <vector> #include <algorithm> // Function to save magnitude or phase of signal to external file void outputMagnitude(const std::vector<float> & signal, const std::string & fileName); // Generate the blac...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/cert_store_impl.h" #include <algorithm> #include <functional> #include "base/bind.h" #include "base/stl_util.h" #include "...
// This file is part of comma, a generic and flexible library // Copyright (c) 2011 The University of Sydney // 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 cod...
#include <torch/extension.h> #include <vector> namespace multihead_attn { namespace self_bias { namespace cublas_gemmex { std::vector<torch::Tensor> fwd_cuda(bool use_time_mask, bool is_training, int heads, torch::Tensor const &inputs, torch::Tensor const &input_weights, torch::Tensor const &output_...