repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
looopTools/sw9-source
src/sw9-source/random_annex_benchmark.cpp
<filename>src/sw9-source/random_annex_benchmark.cpp<gh_stars>0 // Random Annex Benchmmark
lawruble13/hipCUB
hipcub/include/hipcub/backend/rocprim/block/block_raking_layout.hpp
<filename>hipcub/include/hipcub/backend/rocprim/block/block_raking_layout.hpp /****************************************************************************** * Copyright (c) 2011, <NAME>. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source ...
lawruble13/hipCUB
test/hipcub/test_hipcub_util_ptx.cpp
// MIT License // // Copyright (c) 2017-2020 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 Software without restriction, including without lim...
lawruble13/hipCUB
hipcub/include/hipcub/backend/rocprim/block/radix_rank_sort_operations.hpp
/****************************************************************************** * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. * Modifications Copyright (c) 2021, Advanced Micro Devices, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modifi...
ywkim0606/gtsam
gtsam/discrete/tests/testTableFactor.cpp
/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: <NAME>, et al. (see THANKS for the full author list) * See LICENSE for the license information * ------------...
ywkim0606/gtsam
gtsam/slam/tests/testPriorFactor.cpp
<filename>gtsam/slam/tests/testPriorFactor.cpp /** * @file testPriorFactor.cpp * @brief Test PriorFactor * @author <NAME> * @date Nov 4, 2014 */ #include <CppUnitLite/TestHarness.h> #include <gtsam/base/Vector.h> #include <gtsam/navigation/ImuBias.h> #include <gtsam/nonlinear/PriorFactor.h> #include <gtsam/n...
ywkim0606/gtsam
gtsam/geometry/Similarity2.cpp
<reponame>ywkim0606/gtsam<filename>gtsam/geometry/Similarity2.cpp /* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: <NAME>, et al. (see THANKS for the full author ...
ywkim0606/gtsam
gtsam/geometry/tests/testSimilarity2.cpp
<reponame>ywkim0606/gtsam<gh_stars>0 /* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: <NAME>, et al. (see THANKS for the full author list) * See LICENSE for the...
ywkim0606/gtsam
gtsam/sfm/TranslationRecovery.cpp
/* ---------------------------------------------------------------------------- * GTSAM Copyright 2010-2020, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: <NAME>, et al. (see THANKS for the full author list) * See LICENSE for the license information * -------...
ywkim0606/gtsam
gtsam/discrete/TableFactor.cpp
<gh_stars>0 /* ---------------------------------------------------------------------------- * GTSAM Copyright 2010, Georgia Tech Research Corporation, * Atlanta, Georgia 30332-0415 * All Rights Reserved * Authors: <NAME>, et al. (see THANKS for the full author list) * See LICENSE for the license information * ...
EduardoGRocha/coat
examples/cast.cpp
#include <cstdio> #include <vector> #include <numeric> #include <coat/Function.h> #include <coat/ControlFlow.h> int main(){ // allocate buffer uint8_t *buffer = new uint8_t[sizeof(uint64_t)+sizeof(uint32_t)+sizeof(uint8_t)]; // signature of the generated function: taking pointer and size, returning sum using fu...
EduardoGRocha/coat
calculator.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <random> #include <chrono> #include <unistd.h> // for getopt #include "coat/Function.h" #include "coat/ControlFlow.h" struct Table { COAT_NAME("Table"); #define MEMBERS(x) \ x(size_t, ncols) \ x(size_t, nrows) \ x(uint64_t*, data) COAT_DECLARE(M...
EduardoGRocha/coat
examples/vectormean.cpp
#include <cstdio> #include <cstdint> #include <vector> #include <numeric> //#include <signal.h> // for debugging #include <coat/Function.h> #include <coat/ControlFlow.h> #include <coat/Vector.h> // function signature using func_type = void (*)(const uint32_t*, const uint32_t*, uint32_t*, size_t); void mean( const...
EduardoGRocha/coat
examples/sum.cpp
#include <cstdio> #include <vector> #include <numeric> #include <coat/Function.h> #include <coat/ControlFlow.h> int main(){ // generate some data std::vector<uint64_t> data(1 << 25); std::iota(data.begin(), data.end(), 0); // signature of the generated function: taking pointer and size, returning sum using fun...
EduardoGRocha/coat
examples/call.cpp
#include <cstdio> #include <vector> #include <numeric> #include <coat/Function.h> #include <coat/ControlFlow.h> // function to be called, residing outside of generated code int calc(int value){ return value * 2; } int main(){ // signature of the generated function using func_t = int (*)(int value); #ifdef ENABL...
EduardoGRocha/coat
tests.cpp
<reponame>EduardoGRocha/coat<gh_stars>10-100 #include <cstdlib> #include <cstdio> #include <vector> #include "coat/Function.h" #include "coat/ControlFlow.h" #include "coat/datastructs/pod_vector.h" // generate code, in this case just sum all element in array template<class Fn> void assemble_sum_foreach(Fn &fn){ au...
EduardoGRocha/coat
examples/vectorintersection.cpp
#include <cstdio> #include <cstdint> #include <vector> #include <numeric> #include <signal.h> // for debugging #include <coat/Function.h> #include <coat/ControlFlow.h> #include <coat/Vector.h> //TODO: finish implementation to be a real example program int main(){ // function signature using func_type = void (*)(c...
EduardoGRocha/coat
examples/vectormerge.cpp
<reponame>EduardoGRocha/coat #include <cstdio> #include <cstdint> #include <vector> #include <numeric> #include <signal.h> // for debugging #include <coat/Function.h> #include <coat/ControlFlow.h> #include <coat/Vector.h> //TODO: finish implementation to be a real example program int main(){ // function signature ...
EduardoGRocha/coat
fibonacci.cpp
<reponame>EduardoGRocha/coat<filename>fibonacci.cpp #include <cstdlib> #include <cstdio> #include <cstdint> #include <coat/Function.h> #include <coat/ControlFlow.h> uint32_t fib(uint32_t index){ if(index < 2){ return index; }else{ return fib(index-1) + fib(index-2); } } template<class Fn> void assemble_self...
EduardoGRocha/coat
examples/reading_datastruct.cpp
<gh_stars>10-100 #include <cstdio> #include <vector> #include <numeric> #include <coat/Function.h> #include <coat/ControlFlow.h> class my_vector { // annotate type with name of type for better debug info COAT_NAME("my_vector"); // declare all member variables: int *start, *finish, *capacity; // macro adds metadata t...
ZondaX/ledger-matrix-app
deps/ledger-zxlib/tests/hexutils.cpp
<reponame>ZondaX/ledger-matrix-app /******************************************************************************* * (c) 2018 ZondaX GmbH * * 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...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/plan_env/src/edt_environment.cpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/plan_manage/include/plan_manage/plan_container.hpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/traj_utils/src/poly_traj_utils.cpp
<reponame>ZJU-FAST-Lab/Terrestrial-Aerial-Navigation #include <traj_utils/traj_utils.hpp>
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/plan_env/src/obj_predictor.cpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/traj_utils/include/traj_utils/traj_utils.hpp
<gh_stars>1-10 #ifndef TRAJ_UTILS_HPP #define TRAJ_UTILS_HPP #include "root_finder.hpp" #include <vector> #include <list> #include <Eigen/Eigen> // Polynomial order and trajectory dimension are fixed here constexpr int TrajOrder = 5; constexpr int TrajDim = 3; // Type for piece boundary condition and coefficient mat...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/path_searching/src/kinodynamic_astar.cpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/plan_env/src/raycast.cpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/bspline_opt/src/bspline_optimizer.cpp
<filename>src/TIE_navigation/bspline_opt/src/bspline_optimizer.cpp /** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for m...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/plan_env/include/plan_env/linear_obj_model.hpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/traj_utils/src/planning_visualization.cpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/plan_manage/src/traj_server.cpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/plan_manage/src/fast_planner_node.cpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/plan_env/include/plan_env/polynomial_traj.hpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ZJU-FAST-Lab/Terrestrial-Aerial-Navigation
src/TIE_navigation/plan_manage/src/kino_replan_fsm.cpp
/** * This file is part of Fast-Planner. * * Copyright 2019 <NAME>, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by <NAME> <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics/Fast-...
ItghostFan/BreakPadExt
BreakPadExt/Classes/breakpadext/BreakPadExt.hpp
// // BreakPadExt.hpp // BreakPadExt // // Created by ItghostFan on 2022/3/10. // #ifndef BreakPadExt_hpp #define BreakPadExt_hpp #include "Breakpad.hpp" class BreakPadExt : public Breakpad { public: static Breakpad *Create(NSDictionary *parameters); BreakPadExt(); ~BreakPadExt(); }; #endif /* Brea...
ItghostFan/BreakPadExt
BreakPadExt/Classes/breakpadext/Breakpad.hpp
<gh_stars>0 // // Breakpad.hpp // BreakPadExt // // Created by ItghostFan on 2022/3/17. // #ifndef Breakpad_hpp #define Breakpad_hpp #import <Foundation/Foundation.h> #include <sys/sysctl.h> #import "client/mac/handler/exception_handler.h" #import "common/long_string_dictionary.h" #include "client/mac/crash_gener...
Impostor-Language/ImpConstructor
Servers/info.cpp
#include <iostream> #include <game> #include <server> namespace.bat string ( = < 0 ) string( = < 1 ( AmongUs.exe open ( = x open ( server.keys file(system.id open ( = x, z servers.host( = 3 { Among us } server.host( = 1 { server.ip } open(name.json) ...
ahomentc/strategoevaluator
manager/controller.cpp
#include "controller.h" #include <sstream> #include "game.h" using namespace std; /** * Queries the player to setup their pieces * */ MovementResult Controller::Setup(const char * opponentName) { string setup[4] = {"","","",""}; MovementResult query = this->QuerySetup(opponentName, setup); if (query != Moveme...
ahomentc/strategoevaluator
manager/thread_util.cpp
#include "thread_util.h" #include <sstream> #include <string> #include <unistd.h> using namespace std; pthread_mutex_t GetterThread::mutex = PTHREAD_MUTEX_INITIALIZER; void * GetterThread::GetMessage(void * p) { GetterThread * getter = (GetterThread*)(p); stringstream inputStream; char s = fgetc(getter->str...
ahomentc/strategoevaluator
manager/game.cpp
#include "game.h" #include <stdarg.h> #include <string> using namespace std; Game* Game::theGame = NULL; bool Game::gameCreated = false; Game::Game(const char * redPath, const char * bluePath, const char * red_setup, const char * blue_setup, const bool enableGraphics, double newStallTime, const bool allowIllegal, ...
ahomentc/strategoevaluator
manager/graphics.cpp
#include "graphics.h" #include <cmath> #include <cassert> #include <iostream> #ifdef BUILD_GRAPHICS #undef DEBUG //#define DEBUG std::list<SDL_Surface*> Graphics::allTextures = std::list<SDL_Surface*>(); Screen * Graphics::screen = NULL; int Graphics::screenWidth = 0; int Graphics::screenHeight = 0; bool Graphics::...
ahomentc/strategoevaluator
manager/human_controller.cpp
<gh_stars>1-10 #include "human_controller.h" #include "game.h" #include <iostream> //Really I can't be bothered with fscanf any more using namespace std; MovementResult Human_Controller::QuerySetup(const char * opponentName, string setup[]) { static bool shownMessage = false; if (!shownMessage) { if (graphic...
ahomentc/strategoevaluator
manager/stratego.cpp
<filename>manager/stratego.cpp #include "stratego.h" using namespace std; /** * Static variables */ //nothing, boulder, flag, spy, scout, miner, sergeant, lietenant, captain, major, colonel, general, marshal, bomb, error char Piece::tokens[] = {'.','*','F','s','9','8','7','6','5','4','3','2','1','B','?'}; int P...
ahomentc/strategoevaluator
manager/network_controller.cpp
#include "network_controller.h" using namespace std; MovementResult NetworkSender::QuerySetup(const char * opponentName, string setup[]) { //fprintf(stderr," NetworkSender::QuerySetup... "); MovementResult result = controller->QuerySetup(opponentName, setup); for (int ii=0; ii < 4; ++ii) assert(network->SendMe...
ahomentc/strategoevaluator
manager/network.cpp
#include "network.h" #include <stdarg.h> using namespace std; Network::Network(int newPort) : sfd(-1), port(newPort), file(NULL) { sfd = socket(PF_INET, SOCK_STREAM, 0); if (sfd < 0) { perror("Network::Network - Error creating TCP socket"); exit(EXIT_FAILURE); } } Network::~Network() { if (Valid()) { ...
ahomentc/strategoevaluator
manager/agents/basic_cpp/basic_cpp.cpp
/** * "basic_cpp", a sample Stratego AI for the UCC Programming Competition 2012 * Implementations of main function, and Helper functions * * @author <NAME> (matches) [SZM] * @website http://matches.ucc.asn.au/stratego * @email <EMAIL> or <EMAIL> * @git git.ucc.asn.au/progcomp2012.git */ #include "basic_cpp.h"...
clown/clx
example/example_base64.cpp
<reponame>clown/clx<gh_stars>1-10 /* ------------------------------------------------------------------------- */ /* * example_base64.cpp * * Copyright (c) 2004 - 2008, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provi...
clown/clx
example/src2html.cpp
/* ------------------------------------------------------------------------- */ /* * src2html.cpp * * Copyright (c) 2004 - 2009, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are me...
clown/clx
example/example_filetype.cpp
<reponame>clown/clx /* ------------------------------------------------------------------------- */ /* * example_filetype.cpp * * Copyright (c) 2004 - 2010, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the...
clown/clx
example/example_smtps.cpp
/* ------------------------------------------------------------------------- */ /* * example_smtps.cpp * * Copyright (c) 2004 - 2008, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ...
clown/clx
example/example_code_convert_2.cpp
<reponame>clown/clx /* ------------------------------------------------------------------------- */ /* * example_code_convert_2.cpp * * Copyright (c) 2004 - 2009, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
clown/clx
example/example_reverse.cpp
/* ------------------------------------------------------------------------- */ /* * example_reverse.cpp * * Copyright (c) 2004 - 2010, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions...
clown/clx
example/example_scanner.cpp
<filename>example/example_scanner.cpp /* ------------------------------------------------------------------------- */ /* * example_scanner.cpp * * Copyright (c) 2004 - 2008, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted ...
clown/clx
example/example_hmac_sha1.cpp
/* ------------------------------------------------------------------------- */ /* * example_hmac_sha1.cpp * * Copyright (c) 2004 - 2008, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditio...
clown/clx
example/example_constrained_value.cpp
<filename>example/example_constrained_value.cpp<gh_stars>1-10 /* ------------------------------------------------------------------------- */ /* * example_constrained_value.cpp * * Copyright (c) 2004 - 2010, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without...
clown/clx
example/example_filesystem.cpp
/* ------------------------------------------------------------------------- */ /* * example_filesystem.cpp * * Copyright (c) 2004 - 2010, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditi...
clown/clx
example/example_combine.cpp
/* ------------------------------------------------------------------------- */ /* * example_combine.cpp * * Copyright (c) 2004 - 2008, clown. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions...
Nanoatic/Snake
src/GameWindow.cpp
#include "GameWindow.h" #include "TimeManager.h" GameWindow::GameWindow() : run(true) { if (SDL_Init(SDL_INIT_EVERYTHING) == -1) { cout << SDL_GetError << endl; exit(EXIT_FAILURE); } if (Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, MIX_DEFAULT_CHANNELS, 1024) == -1) { printf("%s", Mix_G...
Nanoatic/Snake
src/SnakeGame.cpp
<filename>src/SnakeGame.cpp #include "SnakeGame.h" #include "TimeManager.h" SnakeGame::SnakeGame() : direction(0), feeding(0), deployed(false), score(0), loss(false) { head = new part{1, 1, IDLE, nullptr, nullptr}; tail = head; reset2D = SDL_CreateRGBSurface(0, FAT, FAT, 32, 0, 0, 0, 0); part2D = SDL_...
Nanoatic/Snake
src/TimeManager.cpp
<gh_stars>0 #include <iostream> #include "TimeManager.h" using namespace std::chrono; TimeManager TimeManager::instance; TimeManager& TimeManager::getInstance() { return instance; } void TimeManager::startup() { startTime = high_resolution_clock::now(); lastTime = 0; numberOfFrames = 0; currentNumberOfFrames...
Nanoatic/Snake
src/Source.cpp
#include "SnakeGame.h" int main(int argc, char *argv[]) { SnakeGame sk(30, 30, "Nano Snake", {0, 0, 0}); sk.mainloop(); return 0; }
josh2397/DLSArduino
dls/Queue.hpp
#include <WString.h> // define default capacity of the queue #define SIZE 10 // Class for queue class Queue { String *arr; // array to store queue elements int capacity; // maximum capacity of the queue int front; // front points to front element in the queue (if any) int rear; // rear point...
josh2397/DLSArduino
dls/Queue.cpp
<filename>dls/Queue.cpp #include "Queue.hpp" // TODO - Add error messaging // Constructor to initialize queue Queue::Queue(int size) { arr = new String[size]; capacity = size; front = 0; rear = -1; count = 0; } // Destructor to free memory allocated to the queue Queue::~Queue() { delete arr; ...
josh2397/DLSArduino
dls/Instruction.cpp
<filename>dls/Instruction.cpp #include "Instruction.hpp" /* Rapid positioning Usage: G0 x Description: Moves to the postion defined by x at the maximum possible speed. */ static String G0 = "G0"; /* Linear positioning Usage: G1 x Description: Moves to the postion defined by x at the speed determined b...
josh2397/DLSArduino
dls/Instruction.hpp
#include <WString.h> class Instruction { public: static String G0; static String G1; static String M0; static bool exists(String input); };
zingale/Nyx
Source/HeatCool/integrate_state_vec_3d_stubs.cpp
<gh_stars>0 #include <fstream> #include <iomanip> #include <AMReX_ParmParse.H> #include <AMReX_Geometry.H> #include <AMReX_MultiFab.H> #include <AMReX_Print.H> #include <AMReX_PlotFileUtil.H> #include <AMReX_BLFort.H> #include <Nyx.H> using namespace amrex; /* Private function to check function return values */ sta...
zingale/Nyx
Source/Gravity/Gravity.cpp
#include <AMReX_ParmParse.H> #include <Gravity.H> #include <Nyx.H> #include <constants_cosmo.H> #include <AMReX_MLMG.H> #include <AMReX_MLPoisson.H> using namespace amrex; // MAX_LEV defines the maximum number of AMR levels allowed by the parent "Amr" object #define MAX_LEV 15 int Gravity::verbose = 0; i...
zingale/Nyx
Source/EOS/atomic_rates_data.cpp
<filename>Source/EOS/atomic_rates_data.cpp #include <atomic_rates_data.H> AtomicRates* atomic_rates_glob;
zingale/Nyx
Source/TimeStep/Nyx_advance_particles.cpp
#include <AMReX_BLProfiler.H> #include <Nyx.H> #include <Gravity.H> using namespace amrex; using std::string; Real Nyx::advance_particles_only (Real time, Real dt, int iteration, int ncycle) // Arguments: // time :...
zingale/Nyx
Util/reeber/src/reeber.cpp
#include <vector> #include <string> #include "Nyx.H" #include "reeber.H" #define REEBER_EXTRA_INTEGRAL #define REEBER_COMPUTE_GAS_VELOCITIES // Reeber and DIY includes #include <reeber-real.h> #include <diy/master.hpp> #include <diy/io/block.hpp> #include <diy/io/shared.hpp> #include <diy/resolve.hpp> #include <di...
zingale/Nyx
Source/Driver/Nyx.cpp
<gh_stars>0 #include <iomanip> #include <algorithm> #include <vector> #include <iostream> #include <string> using std::cout; using std::cerr; using std::endl; using std::istream; using std::ostream; using std::pair; using std::string; #include <AMReX_CONSTANTS.H> #include <Nyx.H> #include <Gravity.H> #include <consta...
zingale/Nyx
Source/Hydro/Hydro.cpp
<reponame>zingale/Nyx #include <Hydro.H> #include <Utilities.H> #include <Nyx.H> /** * Set up the source terms to go into the hydro. */ void Nyx::construct_hydro_source( const amrex::MultiFab& S, amrex::MultiFab& sources_for_hydro, amrex::MultiFab& hydro_source, amrex::MultiFab& grav_vector, amrex:...
zingale/Nyx
Source/Forcing/Forcing.cpp
#include <Nyx.H> #include <Forcing.H> using namespace amrex; unsigned long int mt_random(); int StochasticForcing::verbose = 0; int StochasticForcing::SpectralRank = 3; extern "C" {void fort_get_grav_const(Real* Gconst);} // // Default constructor // StochasticForcing::StochasticForcing() { i1 = i2 = 0...
zingale/Nyx
Source/TimeStep/Nyx_advance.cpp
<reponame>zingale/Nyx #include <Nyx.H> #include <Gravity.H> #include <constants_cosmo.H> #ifdef FORCING #include <Forcing.H> #endif using namespace amrex; using std::string; Real Nyx::advance (Real time, Real dt, int iteration, int ncycle) // Arguments: // time ...
zingale/Nyx
Exec/Henson/extract-particles/main.cpp
#include <iostream> #include <Nyx.H> #include <henson/context.h> #include <henson/data.h> int main() { using namespace amrex; Amr* amr; DarkMatterParticleContainer* DMPC; henson_load_pointer("amr", (void**) &amr); henson_load_pointer("dmpc", (void**) &DMPC); Vector<Real> locations; for...
zingale/Nyx
Exec/DrivenTurbulence/Nyx_sources.cpp
#include <Nyx.H> #ifdef FORCING #include <Forcing.H> #endif using namespace amrex; #ifndef NO_HYDRO #ifndef AGN void Nyx::integrate_state_force( amrex::Box const& bx, amrex::Array4<amrex::Real> const& state, amrex::Array4<amrex::Real> const& diag_eos, const amrex::Real* dx, const amrex::Real time, cons...
zingale/Nyx
Source/TimeStep/Nyx_update_state_with_sources.cpp
#include <Nyx.H> #include <Hydro.H> #include <constants_cosmo.H> using namespace amrex; using std::string; void Nyx::update_state_with_sources( MultiFab& S_old, MultiFab& S_new, MultiFab& ext_src_old, MultiFab& hydro_source, MultiFab& grav_vector, Multi...
zingale/Nyx
Source/TimeStep/Nyx_enforce_minimum_density.cpp
#include <Nyx.H> #include <Nyx_enforce_minimum_density.H> #include <constants_cosmo.H> using namespace amrex; void Nyx::enforce_minimum_density( MultiFab& S_old, MultiFab& S_new, MultiFab& reset_e_src, Real dt, Real a_old, Real a_new) { BL_PROFILE("Nyx::enforce_minimum_density()"); ...
zingale/Nyx
Source/Monitors/MemInfo.cpp
<reponame>zingale/Nyx /* MemInfo.cpp: Implementation of the class; see MemInfo.h for detailed explanations, and testMemInfo.cpp for example usage. <NAME>, Berkeley, June 2013 <EMAIL> */ #include <mpi.h> #include <unistd.h> #include <er...
zingale/Nyx
Source/HeatCool/strang_reactions.cpp
#include <Nyx.H> using namespace amrex; using std::string; void Nyx::strang_first_step (Real time, Real dt, MultiFab& S_old, MultiFab& D_old) { BL_PROFILE("Nyx::strang_first_step()"); #ifdef HEATCOOL Gpu::LaunchSafeGuard lsg(true); const Real strt_time = ParallelDescriptor::second(); Real half_dt...
zingale/Nyx
Source/Hydro/Godunov.cpp
#include <Godunov.H> #include <PLM.H> #include <PPM.H> using namespace amrex; extern void trace_ppm(const Box& bx, const int idir, Array4<Real const> const& q_arr, Array4<Real const> const& srcQ, Array4<Real> const& qm, Array4<Real> const& qp, const Box& vbx...
zingale/Nyx
Source/Driver/Nyx_error.cpp
#include "Nyx.H" #include "Prob.H" using namespace amrex; using std::string; void Nyx::error_setup() { std::string amr_prefix = "amr"; ParmParse ppamr(amr_prefix); Vector<std::string> refinement_indicators; ppamr.queryarr("refinement_indicators",refinement_indicators,0,ppamr.countval("refinement_indi...
zingale/Nyx
Source/HeatCool/integrate_state_with_source_3d.cpp
<gh_stars>0 #include <fstream> #include <iomanip> #include <AMReX_ParmParse.H> #include <AMReX_Geometry.H> #include <AMReX_MultiFab.H> #include <AMReX_Print.H> #include <AMReX_PlotFileUtil.H> #include <AMReX_BLFort.H> #include <Nyx.H> #include <f_rhs.H> #include <f_rhs_struct.H> #include <cvode/cvode.h> ...
zingale/Nyx
Source/Driver/Nyx_halos.cpp
#include <iomanip> #include <algorithm> #include <vector> #include <iostream> #include <string> #include <math.h> using std::cout; using std::cerr; using std::endl; using std::istream; using std::ostream; using std::pair; using std::string; #include <AMReX_CONSTANTS.H> #include <Nyx.H> #include <Derive.H> #include <...
zingale/Nyx
Source/TimeStep/Nyx_time_center_sources.cpp
#include <Nyx.H> using namespace amrex; #ifndef NO_HYDRO void Nyx::time_center_source_terms (MultiFab& S_new, MultiFab& ext_src_old, MultiFab& ext_src_new, Real dt) { BL_PROFILE("Nyx::time_center_source_terms()"); ...
zingale/Nyx
Source/DerivedQuantities/Derive_forcing.cpp
#include <AMReX_REAL.H> #include <Derive.H> #include <Nyx.H> using namespace amrex; #ifdef __cplusplus extern "C" { #endif void derforcex(const Box& bx, FArrayBox& derfab, int dcomp, int /*ncomp*/, const FArrayBox& datfab, const Geometry& geomdata, Real /*time*/, const int*...
zingale/Nyx
Source/Hydro/sdc_hydro.cpp
<gh_stars>0 #include <Nyx.H> #include "Gravity.H" using namespace amrex; using std::string; #ifndef NO_HYDRO void Nyx::sdc_hydro (Real time, Real dt, Real a_old, Real a_new) { BL_PROFILE("Nyx::sdc_hydro()"); BL_ASSERT(NUM_GROW == 4); Gpu::LaunchSafeGuard ...
lavanyay/MoonGen
src/pipe.cpp
#include <cstdint> #include <string> #include <cstring> #include "spsc-queue/readerwriterqueue.h" using namespace moodycamel; extern "C" { ReaderWriterQueue<void*>* make_pipe(int capacity = 512) { auto queue = new ReaderWriterQueue<void*>(capacity); return queue; } void enqueue(ReaderWriterQueue<void*>* que...
lavanyay/MoonGen
src/pipe.hpp
#ifndef PIPE_HPP__ #define PIPE_HPP__ #include "spsc-queue/readerwriterqueue.h" #ifdef __cplusplus extern "C" { #endif void* try_dequeue(moodycamel::ReaderWriterQueue<void*>* queue); #ifdef __cplusplus } #endif #endif
arpith20/Comments-Translator
comments_translator.cpp
//============================================================================ // Name : comments_translator.cpp // Author : <NAME> // Version : // Copyright : // Description : Hello World in C, Ansi-style //============================================================================ #include <iostr...
arpith20/Comments-Translator
translator.cpp
/* * translator.cpp * * Created on: 12-Jan-2017 * Author: arpith */ #include <fstream> #include <iostream> #include <array> #include <memory> #include <string.h> #include "translator.h" #include "config.h" using namespace std; translator::translator() { multi_line = false; translated = ""; } /* * Pri...
dotgears/defold
engine/physics/src/physics/debug_draw_2d.cpp
// Copyright 2020 The Defold Foundation // Licensed under the Defold License version 1.0 (the "License"); you may not use // this file except in compliance with the License. // // You may obtain a copy of the License, together with FAQs at // https://www.defold.com/license // // Unless required by applicable law or a...
dotgears/defold
engine/physics/src/box2d/collision/b2_broad_phase.cpp
// 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, modify, merge, p...
dotgears/defold
engine/physics/src/physics/physics_2d.cpp
// Copyright 2020 The Defold Foundation // Licensed under the Defold License version 1.0 (the "License"); you may not use // this file except in compliance with the License. // // You may obtain a copy of the License, together with FAQs at // https://www.defold.com/license // // Unless required by applicable law or agr...
dotgears/defold
engine/dlib/src/dlib/crypt.cpp
<reponame>dotgears/defold // Copyright 2020 The Defold Foundation // Licensed under the Defold License version 1.0 (the "License"); you may not use // this file except in compliance with the License. // // You may obtain a copy of the License, together with FAQs at // https://www.defold.com/license // // Unless require...
dotgears/defold
engine/physics/src/box2d/dynamics/b2_chain_polygon_contact.cpp
// 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, modify, merge, p...
dotgears/defold
engine/physics/src/box2d/collision/b2_collide_circle.cpp
<gh_stars>1-10 // 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...
dotgears/defold
engine/physics/src/box2d/collision/b2_grid_shape.cpp
<gh_stars>1-10 #include <assert.h> #include <string.h> #include "b2_settings.h" #include "b2_grid_shape.h" #include "b2_polygon_shape.h" #include "b2_edge_shape.h" #include "b2_broad_phase.h" #include "b2_fixture.h" #include "b2_world.h" #include "b2_body.h" #include <new> using namespace std; b2GridShape::b2GridShape...
dotgears/defold
engine/physics/src/box2d/dynamics/b2_body.cpp
<filename>engine/physics/src/box2d/dynamics/b2_body.cpp // 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...