text
stringlengths
3.08k
12.5k
#include "image.h" //Aca lo unico que tenemos que hacer es leer el archivo depth.txt and rgb.txt //Segun el numero de frame que necesitemos //Constructor Image::Image(DataSet * _dataset, int frame_number, int intrinsics){ dataset = _dataset; noframe = frame_number; Intrinsics = new Camera(intrinsics); /...
/* * Tencent is pleased to support the open source community by making IoT Hub available. * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the L...
/*****************************************************************/ /* NAME: <NAME> */ /* ORGN: Dept of Mechanical Eng / CSAIL, MIT Cambridge MA */ /* FILE: SortHandler.cpp */ /* DATE: June 22nd, 2013 ...
#include <jni.h> #include <string> #include <vector> #include "common.h" #include "Reader.h" struct Slice { int *ptr_data; size_t len_data; }; void uncompressLZW( JNIEnv *env, jobject /* this */, jobject jReader, jintArray colorTable, jint transparentColorIndex, ...
#include "j1App.h" #include "j1Textures.h" #include "j1Render.h" #include "j1Particles.h" #include "j1Scene.h" #include "SDL/include/SDL_timer.h" j1Particles::j1Particles() { name.create("Particles"); for (uint i = 0; i < MAX_ACTIVE_PARTICLES; ++i) active[i] = nullptr; } j1Particles::~j1Particles() {} bool j1...
#include <cgv/signal/rebind.h> #include <cgv/base/register.h> #include <cgv/gui/provider.h> #include <cgv/gui/trigger.h> #include <cgv/render/drawable.h> #include <cgv/render/texture.h> #include <cgv/render/frame_buffer.h> #include <cgv/render/shader_program.h> #include <cgv_gl/gl/gl.h> #include <cgv/media/font/font.h>...
/* * Basic Windows DLL injection using CreateRemoteThread and LoadLibrary * Written by <NAME> (@arvanaghi). https://github.com/Arvanaghi/Windows-DLL-Injector * * Usage: DLL_Injector.exe Receiver.exe C:\Windows\System32\cryptext.dll Note: code must be compiled with the bitness (x86 or x64) of the target process. ...
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2008, <NAME>, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * ...
// MIT License // // Copyright (c) 2018 <NAME> (<EMAIL>) // // 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, ...
/* * File: JPEGProcessor.cpp * Author: heshan * * Created on October 5, 2017, 4:02 PM */ #include "JPEGProcessor.h" JPEGProcessor::JPEGProcessor() { } JPEGProcessor::JPEGProcessor(const JPEGProcessor& orig) { } JPEGProcessor::~JPEGProcessor() { } /** * @param height of the image * @return 1 */ int JPE...
#include"../volna_common.h" // macro definitions #include<math.h> #include "../volna_writeVTK.h" // // Checks if error occured during hdf5 process and prints error message // void __check_hdf5_error(herr_t err, const char *file, const int line){ if (err < 0) { printf("%s(%i) : OP2_HDF5_error() Runtime API error ...
// Sprite.cpp: implementation of the CSprite class. // ////////////////////////////////////////////////////////////////////// #include "Sprite.h" #include "icons.h" #include "map.h" #include <d3dutil.h> ////////////////////////////////////////////////////////////////////// // Construction/Destruction ///////////////...
#include <pangolin/pangolin.h> #include <SceneGraph/SceneGraph.h> #include <iostream> #include <iomanip> #include <thread> #include <chrono> using namespace SceneGraph; using namespace pangolin; using namespace std; void Usage() { cout << "Usage: OffscreenRender ModelFilename DestinationDirectory" << endl; } ...
// User includes #include "rosflight_comm/rosflight_comm.hpp" // Callback functions for subscribed messages void rosflight_communication::callback_imu(const sensor_msgs::ImuConstPtr& msg) { sensor_msgs::Imu imu = *msg; // rosflight is in NED frame, we use NWU imu.angular_velocity.y *= -1; imu.angular_velocity...
/* * Copyright (c) 2021 <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...
#include "CLSmith/CLProgramGenerator.h" #include <cassert> #include <cmath> #include <memory> #include <string> #include <iostream> #include "CLSmith/CLExpression.h" #include "CLSmith/CLOptions.h" #include "CLSmith/CLVariable.h" #include "CLSmith/Divergence.h" #include "CLSmith/ExpressionAtomic.h" #include "Expressio...
#include<bits/stdc++.h> #include<iostream> #include<string> #include<vector> #include<cmath> #include<list> #include <algorithm> #include<vector> #include<set> #include <cctype> #include <cstring> #include <cstdio> #include<queue> #include<stack> #include<bitset> #include<time.h> #include<fstream> /******************...
/* Copyright (C) 2013-2020 by Arm Limited. All rights reserved. */ #include "Buffer.h" #include "BufferUtils.h" #include "Logging.h" #include "Protocol.h" #include "Sender.h" #include "lib/Assert.h" #include <cstring> #define mask (mSize - 1) #define FRAME_HEADER_SIZE 1 // single byte of FrameType // Fraction of s...
#include "stdafx.h" #include "cameras/realistic.h" #include <fstream> #include <iostream> RealisticCamera::RealisticCamera(const AnimatedTransform &cam2world, float hither, float yon, float sopen, float sclose, float filmdistance, float aperture_diameter, string specfile, float filmdiag, Film *...
#include "GENIEXSecExtract/XSecLooper.h" #include "TFile.h" #include "TH1.h" #include <PlotUtils/MnvH1D.h> #include <TVector3.h> typedef unsigned int uint; class CCNpMpi0Transverse : public XSec { public: CCNpMpi0Transverse(const char* name) : XSec(name) {} // Override this method from the base class to d...
#include "AutomatedTest.h" void AutomatedTest::setup(PublishQueueAsyncBase *publishQueue) { this->publishQueue = publishQueue; // Configuration of prompt and welcome message commandParser.addCommandHandler("cloud", "cloud connect or disconnect", [this](SerialCommandParserBase *) { CommandParsingState *cps = c...
#include "pc.h" #include "communication/commandparser.hpp" #include "commands/arrivals.hpp" #include "commands/departures.hpp" #include "commands/help.hpp" #include "commands/late.hpp" #include "commands/today.hpp" #include "communication/client.hpp" pugi::xml_document CommandParser::doc{}; std::unordered_se...
/*++ Copyright (c) 2006 Microsoft Corporation Module Name: mpq.cpp Abstract: <abstract> Author: <NAME> (leonardo) 2010-06-21. Revision History: --*/ #include "util/mpq.h" #include "util/rational.h" #include "util/timeit.h" static void tst0() { synch_mpq_manager m; mpq a, b; m.set(a, 2,...
#include "camera.h" #include "ui_camera.h" #include "widget.h" Widget *showmess; void image_cleanup_function(void* p) { qDebug() << "cleanup called\n"; if(p) { free(p); } } camera::camera(QWidget *parent) : QWidget(parent), m_ui(new Ui::camera) { m_ui->setupUi(this); pp = (uns...
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: // // The MIT License (MIT) // This source file is part of LORE // ( Lightweight Object-oriented Rendering Engine ) // // Copyright (c) 2017-2021 <NAME> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of t...
/** * @file tabu_search.cpp * @author vss2sn * @brief Contains the TabuSearchSolution class */ #include "cvrp/tabu_search.hpp" #include <iostream> #include <numeric> TabuSearchSolution::TabuSearchSolution( const std::vector<Node> &nodes, const std::vector<Vehicle> &vehicles, const std::vector<std::vector...
// Attention Circuits Control laboratory - Nunchuck adapter // Event queue // Written by <NAME>. // Copyright (c) 2021 by Vanderbilt University. This work is released under // the Creative Commons Attribution-ShareAlike 4.0 International License. // // Includes #include "neurochuck_includes.h" // // Global variabl...
/* * Copyright (c) 2015-2017 Wind River Systems, Inc. * * SPDX-License-Identifier: Apache-2.0 * */ /** * @file * Wind River Titanium Cloud 'Heartbeat Agent' Alarm Module */ #include <sys/types.h> #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> using namespace std; #ifdef __A...
/* Conditional Random Fields for Object Localization * Master thesis source code * * Authors: * <NAME> (<EMAIL>) * <NAME> (<EMAIL>) * * Department of Computer Science * University of Copenhagen * Denmark * * Date: 27-08-2012 */ // functions for doing model selection using either a validation set or by usi...
#include <math.h> #include "LSPServer/LSPTypes.h" #include "Utils/VectorUtils.h" // This is a trick to pass types with multiple template parameters to a macro. // Extra parentheses are allowed around function arguments, so these templates // make it possible to pass a parenthesized template type to a macro and then /...
#include <iostream> #include <string> #include <dirent.h> #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <string.h> using namespace std; string curr_dir; void init_directory() { char* dir = (char*)malloc(sizeof(char)*64); getcwd(dir, 64); curr_dir = string(dir); free(dir); } void change_...
/* * DynamicSprites.cpp * * Created on: Dec 2, 2013 * Author: cfyz */ #include "Common.hpp" #include <vector> #include <stdlib.h> #include <time.h> #include <string.h> #include <string> #include <map> std::vector<std::wstring> map = { L" ", L" ------ ", //...
#include <stdio.h> #include <stdlib.h> #include <string> #include "betting_abstraction.h" #include "betting_abstraction_params.h" #include "betting_tree.h" #include "board_tree.h" #include "buckets.h" #include "card_abstraction.h" #include "card_abstraction_params.h" #include "cfr_config.h" #include "cfr_params.h" #i...
#include "RayTracingOpenMP.h" #include <boost/math/constants/constants.hpp> #include "Camera.h" #include "KdTree.h" namespace math = boost::math::constants; const Color BACKGROUND_COLOR(0, 0, 0); RayTracingOpenMP::RayTracingOpenMP() { lights = new Light[20]; Ia = Color(0.2, 0.2, 0.2); } RayTracingOpenMP::...
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE gpusimilarity #include <cstdlib> #include <vector> #include <boost/test/unit_test.hpp> #include "calculation_functors.h" #include "fingerprintdb_cuda.h" #include "gpusim.h" using namespace gpusim; using std::vector; using gpusim::GPUSimServer; bool missing_cud...
/* $Id$ */ //=================================================================== // Class AliQuarkoniaEfficiency // // This class will provide the quarkonia reconstruction efficiency // in ALICE without acceptance consideration. // // // Reconstruction efficiency has been evaluated...
//Copyright [2021] <<EMAIL>> #include "DBhasher.hpp" DBhasher::DBhasher(std::string _kDBpath, std::string _new_path, const size_t& _threads_count, std::string _log_level) : threads_count(_threads_count) , src_path(std::move(_kDBpath)) , new_path(std::move(_new_path)) , src_db...
// <NAME>, 2020. // Generates image of scale-symmetric ocean water. It is a first order approximation of water with low amplitude and depth. #include "stdafx.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "imagewrite.h" #include <set> static double seaHeight = -0.1; static Vector3d seaBase = Vector3d(0.1, 0.25, 0....
#include "test_helper.h" #include <gms/representations/graphs/coders/coders-utils/varint_utils.h> using testing::UnorderedElementsAre; TEST(CodersUtils, ToVarint) { std::vector<uint64_t> input{2, 4, 10, 100000, 300}; unsigned char *out = new unsigned char[8]; ASSERT_EQ(toVarint(input[0], out), 1); AS...
#include <iostream> #include <fstream> #include <string> #include <vector> #include <boost/program_options.hpp> #include <TFile.h> #include <TSystem.h> #include <TTree.h> #include <epecur/geometry.hpp> #include <epecur/git-rev-export.hpp> #include "Process2ndPass.hpp" #include "ProcessApp.hpp" #include "ProcessMain...
#include "stdafx.h" #include "Resources.h" #include "Ball.h" #include "GameOver.h" #include "PlayerPaddle.h" #include "Game.h" void Ball::reset() { ball_velocity = generateRandomVelocity(); setPosition(Game::SCREEN_WIDTH / 2 - getWidth() / 2, Game::SCREEN_HEIGHT / 2 - getHeight() / 2); timeSinceStartup = 0.0f; } ...
//=====- AlphaFrameLowering.cpp - Alpha Frame Information ------*- C++ -*-====// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at // the Lawrence Livermore National Laboratory. // LLNL-CODE-743438 // All rights reserved. // This file is part of MGmol. For details, see https://github.com/llnl/mgmol. // Please also read this link https://github.com/llnl/mgmol/LICENSE #in...
// // ZoomHistory // #include "stdafx.h" // AboutDialog dialog ZoomHistory::ZoomHistory() { m_sp = 0; tf = &m_stack[m_sp]; } ZoomHistory::~ZoomHistory() { } void ZoomHistory::set_world(UNIVERSE *u) { world.left = 0.0 - 0.5; world.right = u->width + 0.5; world.top = 0.0 - 0.5; world.bottom = u->height + 0.5; ...
#include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <fstream> #include <vector> #include <future> #include <thread> #include <unistd.h> #include "est/sparse.hpp" #include "est/op.hpp" #include "est/xmesh.hpp" #include "est/matrix.hpp" #include "est/solver.hpp" using namespace std; v...
#include "Mesh.h" sur::Mesh::Mesh(const std::string& file, Vec3f position, Color color, Vec3f origin, const Mat3x3& projection) { this->position = position; this->color = color; this->origin = origin; this->projection = projection; auto replacestr = [](std::string& input, char from, char to) { ...
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <sstream> #include "gtn/gtn.h" using namespace gtn; void asgWithTransducers() { // We can simplify ASG to it's core a...
#include <wfc-test/wfc.hpp> #include <wfc-test/stb_image.h> #include <wfc-test/stb_image_write.h> #include <wfc-test/tileset.hpp> #include <wfc-test/stateSet.hpp> #include <wfc-test/stateDefinition2D.hpp> #include <string.h> #include <unistd.h> #include <getopt.h> using namespace wfc; void dumpPPM(const char *file...
#include "Body.h" #include "Bodyparts.h" Body::Body(Node& rootNode, const Vec2& localPosition, string csbPath, string skinName, EventDispatcher* eventDispatcher, Bodyparts& bodyparts) : GameObject(rootNode, localPosition, csbPath) { CCLOG("Body"); skin = skinName; setScale(0.6); ...
// This file is part of the dune-stuff project: // https://github.com/wwu-numerik/dune-stuff // Copyright holders: <NAME>, <NAME> // License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) #include "config.h" #include <cmath> #include <sys/time.h> #include <vector> #include <map> #include <strin...
/* * j2735dump.cpp * * Created on: Dec 15, 2016 * @author: gmb */ #include <boost/property_tree/ptree.hpp> #include <boost/version.hpp> #include <cstdio> #include <tmx/j2735_messages/J2735MessageFactory.hpp> #include <tmx/messages/message_converter.hpp> #include <PluginExec.h> #include <BsmConverter.h> #if...
/* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related...
/* * Copyright (c) 2016, <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 and...
/* 用时6h,2天,(我的方法思路对,但是出错case无法找到),参考ref实现accept, 100ms === Should learn how to analysis as below === ref: https://leetcode.com/discuss/13964/accepted-c-solution-296-ms 1. hash map holds iterators to linked list 2. linked list holds key and value, key to access hash map items 3. when item is accessed, it's promoted -...
/* * SPDX-License-Identifier: Apache-2.0 */ #include <zephyr/types.h> #include <stddef.h> #include <string.h> #include <errno.h> #include <sys/printk.h> #include <sys/byteorder.h> #include <zephyr.h> #include <kernel_structs.h> // #include <sys/thread_stack.h> // Cannot be found in NCS v1.6.0 // #include <drivers/g...
/**************************************************************************** ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use ** Qt Designer to update this file, preserving your code. ** ** You should not define a construct...
/* Irrahm Engine Developer: <NAME> Dialogue.cpp - System's general definitions, variables and fuctions. Some windows/dialogue boxes build sets. For more informations about the functions in this source file, go to "Dialogue.h". */ #include "video/irrlicht.h" #include "namespaces.h" #include "device.h" #include "vi...
/* * * Copyright (c) 2016 <NAME>, 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...
/** * Copyright (c) 2011-2016 by <NAME>. All rights reserved. * * This file is part of the QCAD project. * * QCAD is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * ...
#include "dgemm.h" void dgemm::dgemm_C_loops(double* matrix_a, double* matrix_b, double* result, int M, int K, int N, int repeats) { double sum; for (int ...
#include "CubeSphere.h" #include "proto_camera.h" #include "../Render/ATTRIB.h" #include "../Render/ShaderConstants.h" #include <glm/ext.hpp> #include <vector> using namespace Scene; using namespace glm; CubeSphere::CubeSphere(unsigned int cell_count, float spacing) { std::vector<unsigned int> indi...
/* Copyright © Bubi Technologies Co., Ltd. 2017 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 ...
#include "stdafx.h" #include "Ftp.h" #include "FileName.h" #include "FtpErr.h" #include "FtpTransport.h" #include "NotePad.h" Ftp ftp; Ftp::Ftp() { WSADATA wsa; int err = WSAStartup(MAKEWORD(2, 2), &wsa); // Required in Windows if (err) {ftpErr.skt(_T("WSAStartup() failed"), err);} } ...
#include <fstream> #include <iostream> #include <sstream> #include <vector> class Passport { public: void setBirthYear( int year ) { birth_year = year; } void setIssueYear( int year ) { issue_year = year; } void setExpirationYear( int year ) { expiration_year = year; }...
#include <iostream> #include <vector> #include <algorithm> #include <memory> #include <queue> #include <limits> using std::vector; using std::cin; using std::cout; using std::queue; using std::numeric_limits; /* class MaxMatching { public: void Solve() { vector<vector<bool>> adj_matrix = ReadData(); vector<...
#include "client_ws.hpp" #include "server_ws.hpp" using namespace std; using WsServer = SimpleWeb::SocketServer<SimpleWeb::WS>; using WsClient = SimpleWeb::SocketClient<SimpleWeb::WS>; void replace_char(string* _str, const char _from, const char _to); int main() { // WebSocket (WS)-server at port 8080 using 1 t...
// // Created by <NAME> on 17.09.17. // #include "HTSPConnection.h" #include <boost/log/trivial.hpp> #include <boost/bind.hpp> using namespace boost::system; HTSPConnection::HTSPConnection(boost::asio::io_service &io_service) : io_service_(io_service), io_service_work_(io_service), resolv...
// -*- C++ -*- // // ---------------------------------------------------------------------- // // <NAME>, U.S. Geological Survey // // This code was developed as part of the Computational Infrastructure // for Geodynamics (http://geodynamics.org). // // Copyright (c) 2010-2017 University of California, Davis // // See ...
/////////////////////////////////////////////////////////////////////////////// // // // lib_cache_manager.cpp // // Copyright (C) Microsoft Corporation. All rights reserved. // ...
#include "../inc/Inventory.h" Inventory::Inventory() : latestInvValue(0.0) { initEconomy(); } //////////////////////////////////////////////////////////////////////////////// // Economy Methods //////////////////////////////////////////////////////////////////////////////// string Inventory::toPreciseString(flo...
#define A0 0 #define A1 1 #define A2 2 #define A3 3 #define A4 4 #define A5 5 #define A6 6 #define A7 21 #define A8 22 #define A9 23 #define A10 24 #define IO0 12 #define IO1 13 #define IO2 14 #define IO3 25 #define IO4 10 #define IO5 11 #define IO6 26 #define IO7 27 #define WE 28 #define OE 29 #include <stdio.h> #in...
#include <iostream> // iostream stands for standard input-output stream. This header file contains definitions of objects like cin, cout, cerr, etc. #include <string> //header for string class #include <sstream> //for using stringstream #include <map> //for using MAP using namespace std; //Typed con...
#include "ctotp.h" #include <QtDebug> #define DEFAULT_NO_OF_DIGITAL 6 #define TOTP_TIME_INTERVAL 30 // in second QByteArray CTOTP::base32Encoding(QByteArray input_raw, bool haspad) { QByteArray ret_value; if(input_raw.isEmpty()) return ret_value; // alphabet set, which ...
//------------------------------------------------------------------------------ // Instancing.cc //------------------------------------------------------------------------------ #include "Pre.h" #include "Core/Main.h" #include "Core/Time/Clock.h" #include "Gfx/Gfx.h" #include "Assets/Gfx/ShapeBuilder.h" #incl...
#include <cstdio> #include <string.h> #include <stdlib.h> #include <sys/stat.h> #include <libgen.h> typedef struct stat *Stat; int width, height, position, *ret, *aux; void print_matrix(){ for(int i = 0; i<height; i++){ for(int j =0; j< width; j++){ printf("%d\t", aux[i * width + j]); } printf("\...
#pragma once // TODO funzia, ma un po' incasinato #include "rewrules.hpp" #include "nodes/skeletons.hpp" #include "visitors/visitors.hpp" #include <unordered_map> using namespace std; typedef unordered_map<string, skel_node*> node_set; typedef pair<skel_node*, skel_node*> pair_node; void combine( skel_nod...
/*- | This source code is part of PATL (Practical Algorithm Template Library) | Released under the BSD License (http://www.opensource.org/licenses/bsd-license.php) | Copyright (c) 2005, 2007..2009, <NAME> (uxnuxn AT gmail.com) | | Find the shortest word ladders stretching between the following pairs | rus: http:/...
#include <iostream> #include <string> #include <vector> #include <set> #include <map> #include <cassert> #include "../shared/Point.h" using namespace std; int COST[] = { 1, 10, 100, 1000 }; //char STATE[] = "BDDACCBDBBACDACA"; char STATE[] = "BDDBACBCABADDACC"; // Part2 //############# //#ab.c.d.e.fg# //###h#l#p#t##...
#include <gtest/gtest.h> #include <gmock/gmock.h> #include <cstdlib> #include <iostream> #include <queue> #include <sstream> #include <vector> #include <time.h> #include "Kart.h" #include "CStack.h" #include "CSimpleList.h" using testing::Eq; using namespace std; TEST(test_1, test_a){ CGrupo grupo1; grupo1.cr...
/*************************************************************************** qgsserviceregistry.cpp Class defining the service manager for QGIS server services. ------------------- begin : 2016-12-05 copyright : (C) 2016 by <NAME> email : dav...
/* Copyright 2015 <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...
#include<cmath> #include<limits> #include<array> #include<vector> #include<random> // c++ -Ofast -fopenmp -mavx2 -mfma NeuNetNaive.cpp -fopt-info-vec -ftree-loop-if-convert-stores // --param max-completely-peel-times=1 #include <omp.h> // #define SCALAR #include "approx_vexp.h" template<typename T> T sigmoid(T ...
#include <cstdio> #include <cstdlib> #include <cassert> #include <cstring> #include <time.h> #include "lowlevel.h" #define NUM_ELEMENTS 128 using namespace RegionRuntime::LowLevel; // Task IDs, some IDs are reserved so start at first available number enum { TOP_LEVEL_TASK = Processor::TASK_ID_FIRST_AVAILABLE+0,...
/////////////////////////////////////////////////////////////////////////////// // Copyright (c) Freescale Semiconductor, Inc. All rights reserved. // // Freescale Semiconductor, Inc. // Proprietary & Confidential // // This source code and the algorithms implemented therein constitute // confidential informat...
// Copyright (c) 2010 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 "base/command_line.h" #include "base/file_path.h" #include "base/string_number_conversions.h" #include "base/utf_string_conversions.h" #inclu...
#include "df.h" #include "../../fft/fft.h" #include "../../linpred/linpred.h" #include <memory> using namespace Eigen; template<typename Derived> static ArrayXd dct(const ArrayBase<Derived>& x, int trunc) { const int N = x.size(); auto dct = DFModelHolder::instance()->dct(N); for (int i = 0; i < N; ...
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> using namespace std; int bc[1<<10]; void make_cand(int m, const vector<string> &G, vector<string> &res) { for (int i=0; i<(int)G.size(); ++i) if (m &...
//===================================================================== // Copyright 2016 (c), Advanced Micro Devices, Inc. All rights reserved. // // 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 So...
#include "tree.hpp" Tree::Tree(std::valarray<std::pair<double, double>> b, int cr, std::vector<Node*> &a, std::vector<Synapse*> &s) : bounds(b), all(&a), all_s(&s) { root = new Neuron(r_vec(bounds), cr); all->push_back(root); // Generate and normalise a vector in a random direction along which the // axon will ...
/* * Copyright (c) 2019 <NAME> * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #include <iostream> #include <math.h> #include "delfem2/vec3.h" // #include "delfem2/cad2_dtri2.h" // ---- #if defined(_MSC_VER) # include <windows.h> ...
#include "ssa_generator.hpp" #include "cfg_cleaner.hpp" #include <vector> #include <stack> SSA_Generator::SSA_Generator(CFGraph in_cfg) : IRTransformer(std::move(in_cfg)) { gInfo = std::make_unique<GraphInfo>(cfg); placePhis(); versionize(); gInfo.reset(); CfgCleaner cleaner(std::move(cfg)); ...
// Copyright 2017 the V8 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. // PLEASE READ BEFORE CHANGING THIS FILE! // // This file implements the support code for the out of bounds signal handler. // Nothing in here actually ...
#include "ArdUI.h" #include "Graphics.h" #include "View.h" #include "ViewGroup.h" #ifdef DEBUG #pragma message("ArdUI DEBUG Mode is ON") #endif // Default Setup callback ArdUI::onInvalidateView = NULL; bool ArdUI::enabled = false; UTFT* ArdUI::LCD = NULL; View* ArdUI::rootView = 0; // NULL ArdUI::TouchTriggerMo...
#include <chrono> #include <filesystem> #include <fstream> #include <iostream> #include <string> #include <vector> #include "version.h" // this define is needed before the include format.h. Otherwise will get an // `undefined reference to `fmt::v8::vformat` compile error #define FMT_HEADER_ONLY #include "fmt/args.h"...
#include "../include/quadrotor_simulation/pose_pub.h" PosePub::PosePub(ros::NodeHandle* nodehandle, string fileName, string delimeter):nh_(*nodehandle), fileName_(fileName), delimeter_(delimeter) { // constructor ROS_INFO("In class constructor of PosePub"); getPath(); initVec(); initSub(); ...
// // MIT License // // Copyright (c) 2019 <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, m...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <GL/glew.h> #include <GLFW/glfw3.h> #include "load_texture.hpp" #include "../util/file.hpp" #define STB_IMAGE_IMPLEMENTATION #include "../lib/stb_image.h" GLuint r3d::load_texture(std::string image_path) { image_path.insert(0, get_running_dir());...
/* Copyright (c) 2003, <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 and the following disc...
#include <cstring> #include <iostream> #include <sstream> #include "l2norm_helper.h" using namespace std; using namespace nvinfer1; namespace { const char* L2NORM_HELPER_PLUGIN_VERSION{"1"}; const char* L2NORM_HELPER_PLUGIN_NAME{"L2Norm_Helper_TRT"}; } // namespace PluginFieldCollection L2NormHelperPluginCreator::m...
#include "Text.h" #include <iostream> #include <cmath> #include "textdefs.h" #include GLFW_INCLUDE_HEADER_LOCATION Text::Text(): Text(getDefaultFont(), getDefaultTextShader()) { } Text::Text(const Font::type &font, const nafy::shader_t &shader): font(font), wrappingWidth(0), overflowHeight(0), lineSpac...