repo_name
stringlengths
6
97
path
stringlengths
3
341
text
stringlengths
8
1.02M
belgianguy/OPHD
OPHD/GraphWalker.h
<gh_stars>0 #pragma once #include "Common.h" #include "Map/TileMap.h" #include <NAS2D/Renderer/Point.h> /** * \brief GraphWalker does a basic depth-first connection check * on a TileMap given a starting point. */ class GraphWalker { public: GraphWalker(const NAS2D::Point<int>&, int, TileMap&, TileList&); ~G...
belgianguy/OPHD
OPHD/Constants.h
#pragma once #include "Constants/Numbers.h" #include "Constants/Strings.h" #include "Constants/UiConstants.h"
belgianguy/OPHD
OPHD/ProductPool.h
<gh_stars>0 #pragma once #include "Common.h" #include "Constants.h" #include <NAS2D/Xml/XmlElement.h> #include <array> int storageRequiredPerUnit(ProductType type); class ProductPool { public: using ProductTypeCount = std::array<int, ProductType::PRODUCT_COUNT>; ProductPool() = default; ~ProductPool() = defa...
belgianguy/OPHD
OPHD/UI/FileIo.h
#pragma once #include "Core/Window.h" #include "Core/Button.h" #include "Core/TextField.h" #include "Core/ListBox.h" #include <NAS2D/Signal.h> #include <NAS2D/EventHandler.h> class FileIo : public Window { public: enum FileOperation { FILE_LOAD, FILE_SAVE }; using FileOperationCallback = NAS2D::Signals::Si...
belgianguy/OPHD
OPHD/States/Wrapper.h
<filename>OPHD/States/Wrapper.h #pragma once #include <NAS2D/State.h> #include <stack> /** * Implements a simple wrapper interface around the NAS2D::State object * to allow calls to State::update() and State::initialize() from non * StateManager objects. * * This class is provided as a simple means to implemen...
belgianguy/OPHD
OPHD/UI/ResourceBreakdownPanel.h
#pragma once #include "Core/Control.h" #include "../StorableResources.h" #include <NAS2D/Resources/Font.h> #include <NAS2D/Resources/Image.h> #include <NAS2D/Renderer/RectangleSkin.h> class ResourceBreakdownPanel : public Control { public: ResourceBreakdownPanel(); void playerResources(const StorableResources* r...
belgianguy/OPHD
OPHD/UI/Reports/MineReport.h
<filename>OPHD/UI/Reports/MineReport.h #pragma once #include "ReportInterface.h" #include "../Core/Button.h" #include "../Core/CheckBox.h" #include "../Core/ComboBox.h" #include "../Core/TextArea.h" #include "../StructureListBox.h" #include "../../Common.h" #include <NAS2D/Renderer/Rectangle.h> namespace NAS2D { ...
belgianguy/OPHD
OPHD/Things/Structures/FusionReactor.h
<reponame>belgianguy/OPHD<filename>OPHD/Things/Structures/FusionReactor.h #pragma once #include "PowerStructure.h" #include "../../Constants.h" #include <string> const int FUSION_REACTOR_BASE_PRODUCUCTION = 1000; class FusionReactor : public PowerStructure { public: FusionReactor() : PowerStructure(constants::FUSI...
belgianguy/OPHD
OPHD/StructureCatalogue.h
#pragma once #include "Common.h" #include "Constants.h" #include "Things/Structures/Structures.h" #include "StorableResources.h" #include <array> /** * \class StructureCatalogue * \brief Provides a means of instantiating new structures and getting build * cost / recycle value / population requirements. * * ...
belgianguy/OPHD
OPHD/States/MainMenuState.h
<filename>OPHD/States/MainMenuState.h<gh_stars>0 #pragma once #include "../Constants.h" #include "../UI/UI.h" #include "../UI/FileIo.h" #include <NAS2D/State.h> #include <NAS2D/EventHandler.h> #include <NAS2D/Resources/Image.h> /** * Implements the main menu screen. */ class MainMenuState : public NAS2D::State { ...
belgianguy/OPHD
OPHD/Constants/UiConstants.h
#pragma once #include <NAS2D/Renderer/Color.h> #include <limits> #include <string> namespace constants { const int BOTTOM_UI_HEIGHT = 162; const int MARGIN = 6; const int MARGIN_TIGHT = 2; const int MAIN_BUTTON_SIZE = 30; const int MINI_MAP_BUTTON_SIZE = 20; const int RESOURCE_ICON_SIZE = 16; const int R...
belgianguy/OPHD
OPHD/Constants/Numbers.h
<reponame>belgianguy/OPHD #pragma once /** * Numeric constants */ namespace constants { const int FADE_SPEED = 300; const int PLANET_ANIMATION_SPEED = 50; const int MINIMUM_RESOURCES_REQUIRE_FOR_SMELTING = 20; const int BASE_STORAGE_CAPACITY = 250; const int BASE_PRODUCT_CAPACITY = 100; const int BASE_MI...
belgianguy/OPHD
OPHD/Things/Structures/Structure.h
<reponame>belgianguy/OPHD #pragma once #include "../Thing.h" #include "../../Common.h" #include "../../StorableResources.h" #include "../../UI/StringTable.h" /** * State of an individual Structure. */ enum class StructureState { UnderConstruction, Operational, Idle, Disabled, Destroyed }; class Structure : p...
belgianguy/OPHD
OPHD/Things/Structures/CommTower.h
#pragma once #include "Structure.h" #include "../../Constants.h" class CommTower : public Structure { public: CommTower() : Structure(constants::COMM_TOWER, "structures/communications_tower.sprite", StructureClass::Communication, StructureID::SID_COMM_TOWER) { maxAge(600); turnsToBuild(2); requiresC...
belgianguy/OPHD
OPHD/States/PlanetSelectState.h
#pragma once #include "../UI/UI.h" #include <NAS2D/State.h> #include <NAS2D/Timer.h> #include <NAS2D/EventHandler.h> #include <NAS2D/Resources/Image.h> #include <NAS2D/Resources/Music.h> #include <NAS2D/Resources/Sound.h> #include <NAS2D/Renderer/Point.h> #include <vector> class Planet; class PlanetSelectState :...
belgianguy/OPHD
OPHD/Things/Structures/Residence.h
#pragma once #include "Structure.h" #include <algorithm> const int ResidentialWasteCapacityBase = 1000; const int ResidentialColonistCapacityBase = 25; /** * \class Residence * \brief Base Residential structure. * * Implements the base Residence structures. Upgraded residences should derive * from this clas...
belgianguy/OPHD
OPHD/Things/Robots/Robominer.h
<filename>OPHD/Things/Robots/Robominer.h #pragma once #include "Robot.h" #include "../../Constants/Strings.h" class Robominer: public Robot { public: Robominer(): Robot(constants::ROBOMINER, "robots/robominer.sprite", Robot::Type::Miner) { } void update() override { updateTask(); } };
belgianguy/OPHD
OPHD/StructureManager.h
<filename>OPHD/StructureManager.h #pragma once #include "Things/Structures/Structure.h" namespace NAS2D { namespace Xml { class XmlElement; } } class Tile; class PopulationPool; struct StorableResources; /** * Handles structure updating and resource management for structures. * * Keeps track of which struc...
belgianguy/OPHD
OPHD/Things/Structures/StorageTanks.h
#pragma once #include "Structure.h" const int StorageTanksCapacity = 1000; class StorageTanks : public Structure { public: StorageTanks() : Structure(constants::STORAGE_TANKS, "structures/storage_tanks.sprite", StructureClass::Storage, StructureID::SID_STORAGE_TANKS) { maxAge(500); turnsToBuild(2); re...
belgianguy/OPHD
OPHD/Cache.h
#pragma once #include <NAS2D/Resources/Font.h> #include <NAS2D/Resources/Image.h> #include <NAS2D/Resources/Music.h> #include <NAS2D/Resources/ResourceCache.h> #include <memory> inline NAS2D::ResourceCache<NAS2D::Font, std::string, unsigned int> fontCache; inline NAS2D::ResourceCache<NAS2D::Image, std::string> imag...
belgianguy/OPHD
OPHD/UI/Core/RadioButton.h
<reponame>belgianguy/OPHD<filename>OPHD/UI/Core/RadioButton.h #pragma once #include "TextControl.h" #include "Label.h" #include <NAS2D/Signal.h> #include <NAS2D/EventHandler.h> #include <NAS2D/Resources/Image.h> #include <string> class UIContainer; class RadioButton : public TextControl { public: using ClickCal...
belgianguy/OPHD
OPHD/UI/MajorEventAnnouncement.h
#pragma once #include "Core/Window.h" #include "Core/Button.h" class MajorEventAnnouncement : public Window { public: enum AnnouncementType { ANNOUNCEMENT_COLONY_SHIP_CRASH, ANNOUNCEMENT_COLONY_SHIP_CRASH_WITH_COLONISTS }; MajorEventAnnouncement(); void announcement(AnnouncementType a); void update() o...
belgianguy/OPHD
OPHD/UI/GameOptionsDialog.h
#pragma once #include "Core/Window.h" #include "Core/Button.h" class GameOptionsDialog : public Window { public: using ClickCallback = NAS2D::Signals::Signal<>; GameOptionsDialog(); ~GameOptionsDialog() override; void update() override; ClickCallback& SaveGame() { return mCallbackSave; } ClickCallback& Load...
belgianguy/OPHD
OPHD/Things/Structures/Warehouse.h
#pragma once #include "Structure.h" #include "../../ProductPool.h" class Warehouse : public Structure { public: Warehouse() : Structure(constants::WAREHOUSE, "structures/warehouse.sprite", StructureClass::Warehouse, StructureID::SID_WAREHOUSE) { maxAge(500); turnsToBuild(2); requiresCHAP(false); } ...
belgianguy/OPHD
OPHD/Things/Structures/Smelter.h
#pragma once #include "OreRefining.h" class Smelter : public OreRefining { const int StorageCapacity = 800; public: Smelter() : OreRefining(constants::SMELTER, "structures/smelter.sprite", StructureClass::Smelter, StructureID::SID_SMELTER) { maxAge(600); turnsToBuild(9); requiresCHAP(false); storag...
belgianguy/OPHD
OPHD/UI/WarehouseInspector.h
<filename>OPHD/UI/WarehouseInspector.h #pragma once #include "Core/Window.h" #include "Core/Button.h" class Warehouse; /** * \brief Implements a Factory Production dialog interface. */ class WarehouseInspector : public Window { public: WarehouseInspector(); void warehouse(Warehouse* w); void hide() override; ...
belgianguy/OPHD
OPHD/UI/Reports/WarehouseReport.h
#pragma once #include "ReportInterface.h" #include "../ProductListBox.h" #include "../StructureListBox.h" #include "../Core/Button.h" #include <vector> namespace NAS2D { class Font; class Image; } class Warehouse; class Structure; class WarehouseReport : public ReportInterface { public: WarehouseReport(); ...
belgianguy/OPHD
OPHD/UI/RobotInspector.h
<gh_stars>0 #pragma once #include "Core/Button.h" #include "Core/TextArea.h" #include "Core/Window.h" #include "StringTable.h" #include "../Common.h" #include "../Things/Robots/Robot.h" class RobotInspector : public Window { public: RobotInspector(); void focusOnRobot(Robot*); const Robot* focusedRobot() cons...
belgianguy/OPHD
OPHD/UI/GameOverDialog.h
<gh_stars>0 #pragma once #include "Core/Window.h" #include "Core/Button.h" class GameOverDialog : public Window { public: using ClickCallback = NAS2D::Signals::Signal<>; public: GameOverDialog(); ClickCallback& returnToMainMenu() { return mCallback; } void update() override; private: void btnCloseClicked();...
belgianguy/OPHD
OPHD/Things/Structures/MineFacility.h
#pragma once #include "Structure.h" #include "../../Mine.h" /** * Implements the Mine Facility. */ class MineFacility: public Structure { public: using ExtensionCompleteCallback = NAS2D::Signals::Signal<MineFacility*>; public: MineFacility(Mine* mine); void mine(Mine* mine) { mMine = mine; } void maxDepth(int...
belgianguy/OPHD
OPHD/Things/Structures/RedLightDistrict.h
<reponame>belgianguy/OPHD #pragma once #include "Structure.h" #include "../../Constants.h" class RedLightDistrict : public Structure { public: RedLightDistrict() : Structure(constants::RED_LIGHT_DISTRICT, "structures/red_light_district.sprite", StructureClass::Residence, StructureID::SID_RED_LIGHT_DISTRICT) ...
belgianguy/OPHD
OPHD/PopulationPool.h
#pragma once #include "Population/Population.h" class PopulationPool { public: void population(Population* pop); int populationAvailable(Population::PersonRole role); bool enoughPopulationAvailable(Population::PersonRole role, int amount); bool usePopulation(Population::PersonRole role, int amount); void clea...
belgianguy/OPHD
OPHD/UI/Core/ListBoxBase.h
<filename>OPHD/UI/Core/ListBoxBase.h #pragma once #include "Control.h" #include "Slider.h" #include "../../Constants/UiConstants.h" #include <NAS2D/Signal.h> #include <NAS2D/EventHandler.h> #include <NAS2D/Renderer/Color.h> #include <string> #include <vector> #include <cstddef> /** * Implements a base ListBox con...
belgianguy/OPHD
OPHD/States/GameState.h
<filename>OPHD/States/GameState.h #pragma once #include <NAS2D/State.h> #include <memory> class MainReportsUiState; class MapViewState; class Structure; class Wrapper; class GameState : public NAS2D::State { public: GameState(); ~GameState() override; void mapviewstate(MapViewState*); MainReportsUiState& get...
belgianguy/OPHD
OPHD/Population/Population.h
#pragma once #include "Morale.h" #include <array> #include <vector> class Population { public: enum PersonRole { ROLE_CHILD, ROLE_STUDENT, ROLE_WORKER, ROLE_SCIENTIST, ROLE_RETIRED }; Population(); int size(); int size(PersonRole); int birthCount() const { return mBirthCount; } int deathCount(...
belgianguy/OPHD
OPHD/ProductionCost.h
#pragma once /** * \brief Defines cost in materials per turn. * * Basically just a storage class used to contain resource costs per turn and turn count * needed to produce a particular item. */ class ProductionCost { public: ProductionCost() = default; ProductionCost(int turns, int commonMetals, int commonMin...
belgianguy/OPHD
OPHD/UI/Reports/ReportInterface.h
#pragma once #include "../Core/UIContainer.h" class Structure; /** * Provides an abstract interface for Report UIs used in the MainReportsUiState. * * \note Inherits from UIContainer as the report classes are treated as UI objects. */ class ReportInterface : public UIContainer { public: /** * Callback sign...
belgianguy/OPHD
OPHD/Things/Structures/CommandCenter.h
<filename>OPHD/Things/Structures/CommandCenter.h<gh_stars>0 #pragma once #include "FoodProduction.h" /** * Implements the Command Center structure. */ class CommandCenter: public FoodProduction { public: CommandCenter(): FoodProduction(constants::COMMAND_CENTER, "structures/command_center.sprite", StructureCla...
belgianguy/OPHD
OPHD/UI/Core/CheckBox.h
#pragma once #include "TextControl.h" #include <NAS2D/Signal.h> #include <NAS2D/EventHandler.h> #include <NAS2D/Resources/Image.h> #include <string> class CheckBox : public TextControl { public: using ClickCallback = NAS2D::Signals::Signal<>; CheckBox(std::string newText = ""); ~CheckBox() override; void che...
belgianguy/OPHD
OPHD/Things/Robots/Robodigger.h
#pragma once #include "Robot.h" #include "../../Common.h" #include "../../Constants/Strings.h" class Robodigger: public Robot { public: Robodigger() : Robot(constants::ROBODIGGER, "robots/robodigger.sprite", Robot::Type::Digger), mDirection(Direction::Down) { } void direction(Direction dir) { mDirection = ...
danger21th/deviotauto
arduino_app/mywifi.h
<reponame>danger21th/deviotauto void saveWifi(); void readfileWifi(); extern File configFile; extern String set_ssid; extern String set_password; extern String ssid; extern String password;
danger21th/deviotauto
arduino_app/timeschedule.h
<gh_stars>1-10 void savetime(); void readfileTime(); void savetime_sw(String bnt); void readfileTime_sw(String bnt); String getValue(String data, char separator, int index); extern String _timeschedule1; extern String _timeschedule2; extern String _timeschedule3; extern String _timeschedule4; extern String _timesched...
danger21th/deviotauto
arduino_app/mymqtt.h
<reponame>danger21th/deviotauto<gh_stars>1-10 void saveMQtt(); void readfileMqtt(); extern String mqttServer; extern String mqttUser; extern String mqttPassword; extern String CLIENT_ID; extern int mqttPort; extern File configFile; extern String mqtttopic; extern String mqttget;
ChadChat/ChadChat
backend/src/server.c
<reponame>ChadChat/ChadChat #include "server.h" #include "ws.h" #include "io.h" #include "endpoint.h" #include "endpoints/index.h" #include <stdbool.h> #include <stdint.h> #include <stdlib.h> #include <stdio.h> #include <string.h> //@TODO: make code for e2ee static uint16_t clients_connected = 0; static endp* ep; ...
ChadChat/ChadChat
backend/src/utils/b64.h
/* code taken from: https://github.com/littlstar/b64.c The MIT License (MIT) Copyright (c) 2014 Little Star Media, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, includ...
ChadChat/ChadChat
backend/src/io.c
<reponame>ChadChat/ChadChat #include "io.h" #include <fcntl.h> #include <errno.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <sys/epoll.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h> static inline int change_event(io_loop_t* loop, int fd, int op, int events, void...
ChadChat/ChadChat
backend/src/utils/hashmap.c
<reponame>ChadChat/ChadChat #include "hashmap.h" #include <stdlib.h> #include <string.h> #include <stdbool.h> /* Implementation of a hash table * By: Anex007 */ hmap* hmap_init(size_t capacity, destroy_cb destroy) { hmap* hm = malloc(sizeof(hmap)); hm->capacity = capacity; hm->list = malloc(sizeof...
ChadChat/ChadChat
backend/src/endpoints/index.h
#ifndef INDEX_EP_CHAD #define INDEX_EP_CHAD #include "../endpoint.h" response* get_index(const request* req, const char data_type); #endif
ChadChat/ChadChat
backend/src/ws.h
#ifndef WS_IMP_CHAD #define WS_IMP_CHAD #include <stdint.h> #include <stddef.h> #include <stdbool.h> #include <time.h> #define GUID_LEN 36 #define MAX_REPLY_SIZE 1500 // WS-Opcodes #define PAY_CONTN 0x00 #define INCL_UTF8 0x01 #define INCL_DATA 0x02 #define TERMINATE 0x08 #define PING 0x09 #define PONG 0x0a // Clie...
ChadChat/ChadChat
backend/src/io.h
#ifndef _IO_H #define _IO_H #include <stddef.h> #include <stdbool.h> #define NUM_EPOLL_EVENTS 64 #define READ_BUFFER_SIZE 4096 typedef struct io_loop_t io_loop_t; typedef struct io_client_t io_client_t; typedef void (*io_client_cb) (io_client_t* client); typedef void (*io_client_iter_cb) (io_client_t* client, void* ...
ChadChat/ChadChat
backend/src/main.c
#include "io.h" #include <stdio.h> #include <string.h> #include "server.h" int main(int argc, char* argv[]) { io_loop_t loop; int port = 12345; if (!io_loop_init(&loop, port)) { fprintf(stderr, "Failed to initialize io loop on port %d. Try a different port\n", port); return -1; } s...
ChadChat/ChadChat
backend/src/server.h
<filename>backend/src/server.h #ifndef SERVER_IMP_CHAD #define SERVER_IMP_CHAD #include "io.h" #include <stdbool.h> void server_init(); void on_client_connect(io_client_t* client); void on_client_read(io_client_t* client, const char* data, size_t len); bool client_write(void* client, const char* data, size_t len); vo...
ChadChat/ChadChat
backend/src/endpoint.c
#include <stdio.h> #include <string.h> #include <arpa/inet.h> // For the htons #include <stdbool.h> #include "endpoint.h" #include "ws_parser.h" #include "ws.h" #include "io.h" // Useful Status code description is defined here static const char STATUS_101[] = "Switching Protocols\r\n"; static const char STATUS_301[] ...
ChadChat/ChadChat
backend/src/endpoints/index.c
<reponame>ChadChat/ChadChat<gh_stars>1-10 #include "index.h" #include "../endpoint.h" #include <stdio.h> void print_data(const char* key, const char* val, const char something) { printf("%s=%s\n", key, val); } response* get_index(const request* req, const char data_type) { response* res = malloc(sizeof(respon...
ChadChat/ChadChat
backend/src/ws_parser.h
<gh_stars>1-10 #ifndef WSPAR_IMP_CHAD #define WSPAR_IMP_CHAD #include <stdbool.h> #include "utils/strmap.h" #include "utils/b64.h" #include "ws.h" #define WS_KEY_LEN 16 typedef struct { char* method; char* resource_name; char* http_version; StrMap* headers; StrMap* data; } ws_handshake; bool va...
ChadChat/ChadChat
backend/src/endpoint.h
#ifndef ENDPT_IMP_CHAD #define ENDPT_IMP_CHAD #include "ws_parser.h" #include "ws.h" #include "utils/hashmap.h" #include "utils/strmap.h" #include <stdbool.h> // These are the possible data types the frame can have #define UTF8_TYPE 1 #define BIN_TYPE 2 #define ALL_TYPE 3 // These are the types of request/response...
ChadChat/ChadChat
backend/src/ws_parser.c
<gh_stars>1-10 #include "ws_parser.h" #include "ws.h" #include <stdbool.h> #include <string.h> #include <ctype.h> #ifdef DEBUG_ON #include <stdio.h> #endif #define MAX_FOR_VAL 128 #define WS_FRAME_SIZE_OP1 6 #define WS_FRAME_SIZE_OP2 8 #define WS_FRAME_SIZE_OP3 14 static const char WS_PROTOCOL_HDR[] = "chat"; // n...
ChadChat/ChadChat
backend/src/ws.c
<gh_stars>1-10 #include "ws.h" #include "ws_parser.h" #include "io.h" #include "server.h" #include "utils/strmap.h" #include "endpoint.h" #include <stdlib.h> #include <stdint.h> #include <stddef.h> #include <stdbool.h> #include <string.h> #include "utils/b64.h" #include <openssl/sha.h> #include <sys/random.h> static c...
ChadChat/ChadChat
backend/src/utils/hashmap.h
<filename>backend/src/utils/hashmap.h<gh_stars>1-10 #ifndef HMAP_IMP_CHAD #define HMAP_IMP_CHAD #include <stdbool.h> #include <stdint.h> #include <stddef.h> typedef void (*destroy_cb)(void* data); typedef struct { size_t capacity; destroy_cb destroy; uint32_t size; void** list; }hmap; hmap* hmap_ini...
fogodev/dualpivot-quicksortmp
dual_pivot_tasks.h
<filename>dual_pivot_tasks.h #ifndef QUICKSORTMP_DUALPIVOT_TASKS_H #define QUICKSORTMP_DUALPIVOT_TASKS_H #include <omp.h> #include <stddef.h> #include "partition.h" #include "order.h" void sort_parallel( void* restrict array, ptrdiff_t lower_index, ptrdiff_t higher_index, size_t size, enum Order c...
fogodev/dualpivot-quicksortmp
order.h
#ifndef QUICKSORTMP_ORDER_H #define QUICKSORTMP_ORDER_H enum Order { SMALLER = -1, EQUAL = 0, GREATER = 1, }; #endif //QUICKSORTMP_ORDER_H
fogodev/dualpivot-quicksortmp
main.c
<reponame>fogodev/dualpivot-quicksortmp #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <string.h> #include <omp.h> #include "dual_pivot_sequential.h" #include "dual_pivot_sequential_adaptive.h" #include "dualpivot_tasks_adaptive.h" #include "order.h" #include "shuffle.h" #include "stats.h" #includ...
fogodev/dualpivot-quicksortmp
dualpivot_tasks_adaptive.h
#ifndef QUICKSORTMP_DUALPIVOT_TASKS_ADAPTIVE_H #define QUICKSORTMP_DUALPIVOT_TASKS_ADAPTIVE_H #include <omp.h> #include <stddef.h> #include "partition.h" #include "order.h" #include "insertion_sort.h" static void sort_parallel_adaptive( void* restrict array, ptrdiff_t lower_index, ptrdiff_t higher_index,...
fogodev/dualpivot-quicksortmp
dual_pivot_sequential_adaptive.h
#ifndef QUICKSORTMP_DUAL_PIVOT_SEQUENTIAL_ADAPTIVE_H #define QUICKSORTMP_DUAL_PIVOT_SEQUENTIAL_ADAPTIVE_H #include <stddef.h> #include "partition.h" #include "order.h" #include "insertion_sort.h" static void sort_adaptive( void* restrict array, ptrdiff_t lower_index, ptrdiff_t higher_index, size_t s...
fogodev/dualpivot-quicksortmp
stats.h
<filename>stats.h #ifndef STATS_H #define STATS_H #include <stddef.h> #include <tgmath.h> #include <stdio.h> /** ** @file ** @brief Collect some simple statistics online as we go. ** ** This uses a generalization of Welford's trick to compute running ** mean and variance. See ** ** <NAME>. Formulas for robust,...
fogodev/dualpivot-quicksortmp
dual_pivot_sequential.h
#ifndef QUICKSORTMP_DUAL_PIVOT_SEQUENTIAL_H #define QUICKSORTMP_DUAL_PIVOT_SEQUENTIAL_H #include <stddef.h> #include "partition.h" #include "order.h" static void sort( void* restrict array, ptrdiff_t lower_index, ptrdiff_t higher_index, size_t size, enum Order compare(const void*, const void*) ) ...
fogodev/dualpivot-quicksortmp
partition.h
#ifndef QUICKSORTMP_PARTITION_H #define QUICKSORTMP_PARTITION_H #include <stdlib.h> #include <stddef.h> #include "order.h" #include "swap.h" inline void partition( void* restrict array, ptrdiff_t left_pivot_index, ptrdiff_t right_pivot_index, ptrdiff_t* restrict returned_left_pivot, ptrdiff_t* re...
fogodev/dualpivot-quicksortmp
shuffle.h
#ifndef QUICKSORTMP_SHUFFLE_H #define QUICKSORTMP_SHUFFLE_H #include <stdlib.h> #include <time.h> #include "swap.h" void shuffle(void* restrict array, size_t length, size_t size) { if (length > 1) { srand48(time(NULL)); register unsigned char* arr_ptr = array; for (size_t i = length - 1; i > 0; --i) ...
fogodev/dualpivot-quicksortmp
insertion_sort.h
#ifndef QUICKSORTMP_INSERTION_SORT_H #define QUICKSORTMP_INSERTION_SORT_H #include <stddef.h> #include <string.h> #include "order.h" #include "swap.h" #define INSERTION_SORT_THRESHOLD 100 void insertion_sort( void* restrict array, size_t length, size_t size, enum Order compare(const void*, const voi...
map4d/map4d-map-flutter
ios/Classes/Map4dMapPlugin.h
#import <Flutter/Flutter.h> @interface Map4dMapPlugin : NSObject<FlutterPlugin> @property(class, nonnull, readonly) Map4dMapPlugin* instance; - (id<FlutterPlatformView> _Nullable)getFlutterMapViewById:(int64_t)viewId; @end
map4d/map4d-map-flutter
ios/Classes/FMFDirectionsRenderer.h
// // FMFDirectionsRenderer.h // Map4dMap Flutter // // Created by <NAME> on 12/1/21. // #ifndef FMFDirectionsRenderer_h #define FMFDirectionsRenderer_h #import <Map4dMap/Map4dMap.h> #import <Flutter/Flutter.h> @interface FMFDirectionsRenderer : MFDirectionsRenderer @property(atomic, readonly) NSString* renderer...
map4d/map4d-map-flutter
ios/Classes/Map4dDirectionsRendererManager.h
// // Map4dDirectionsRendererManager.h // Map4dMap Flutter // // Created by <NAME> on 12/1/21. // #ifndef Map4dDirectionsRendererManager_h #define Map4dDirectionsRendererManager_h #import <Map4dMap/Map4dMap.h> #import <Flutter/Flutter.h> @interface Map4dDirectionsRendererManager : NSObject - (instancetype)init:(...
Antique/libxenserver
include/xen/api/xen_dr_task.h
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
src/xen_pgpu.c
<reponame>Antique/libxenserver /* * Copyright (c) <NAME>, Inc. * 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 ...
Antique/libxenserver
include/xen/api/xen_vbd_operations.h
<reponame>Antique/libxenserver /* * Copyright (c) <NAME>, Inc. * 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 ...
Antique/libxenserver
src/xen_sm.c
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
include/xen/api/xen_pbd.h
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
include/xen/api/xen_vif_metrics.h
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
include/xen/api/xen_task.h
<reponame>Antique/libxenserver<gh_stars>0 /* * Copyright (c) <NAME>, Inc. * 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 ...
Antique/libxenserver
src/xen_host_cpu.c
<reponame>Antique/libxenserver /* * Copyright (c) <NAME>, Inc. * 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 ...
Antique/libxenserver
src/xen_host_metrics.c
<gh_stars>0 /* * Copyright (c) <NAME>, Inc. * 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...
Antique/libxenserver
include/xen/api/xen_network.h
<filename>include/xen/api/xen_network.h /* * Copyright (c) <NAME>, Inc. * 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 co...
Antique/libxenserver
include/xen/api/xen_pgpu.h
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
src/xen_bond.c
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
src/xen_api_failure.c
/* * Copyright (c) Citrix Systems, Inc. * 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 lis...
Antique/libxenserver
include/xen/api/xen_vm_power_state.h
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
include/xen/api/xen_vdi.h
<gh_stars>0 /* * Copyright (c) <NAME>, Inc. * 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...
Antique/libxenserver
include/xen/api/xen_subject.h
<filename>include/xen/api/xen_subject.h /* * Copyright (c) Citrix Systems, Inc. * 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 ...
Antique/libxenserver
src/xen_gpu_group.c
/* * Copyright (c) Citrix Systems, Inc. * 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 lis...
Antique/libxenserver
src/xen_vif.c
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
src/xen_pif_metrics.c
<filename>src/xen_pif_metrics.c /* * Copyright (c) <NAME>, Inc. * 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 ...
Antique/libxenserver
test/test_vm_async_migrate.c
/* * Copyright (c) Citrix Systems, Inc. * 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 lis...
Antique/libxenserver
src/xen_secret.c
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
include/xen/api/xen_host.h
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
include/xen/api/xen_message.h
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
include/xen/api/xen_vm_operations.h
<gh_stars>0 /* * Copyright (c) <NAME>, Inc. * 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...
Antique/libxenserver
include/xen/api/xen_user.h
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
include/xen/api/xen_tunnel.h
/* * Copyright (c) <NAME>, Inc. * 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 con...
Antique/libxenserver
src/xen_user.c
<reponame>Antique/libxenserver /* * Copyright (c) <NAME>, Inc. * 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 ...
Antique/libxenserver
include/xen/api/xen_pool.h
<reponame>Antique/libxenserver /* * Copyright (c) <NAME>, Inc. * 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 ...