repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
StefanoLusardi/clip
include/CommandLineInputParser/ArgumentValue.hpp
#pragma once #include "Api.hpp" #include <utility> namespace clip { template<class T> class ArgumentValue; template<class T> ArgumentValue<T> value() { return ArgumentValue<T>(); } template<class T> ArgumentValue<T> value(T&& v) { return ArgumentValue<T>(std::forward<T>(v)); } template <typename T>...
StefanoLusardi/clip
include/CommandLineInputParser/Api.hpp
<reponame>StefanoLusardi/clip #pragma once #if defined(_MSC_VER) && (defined(_WIN32) || defined(_WIN64)) #define CLIP_IMPORT __declspec(dllimport) #define CLIP_EXPORT __declspec(dllexport) #else #if __GNUC__ >= 4 #define CLIP_IMPORT __attribute__ ((visibility ("default"))) #define CLIP_EXPORT __attribute__ ((vi...
StefanoLusardi/clip
examples/ExampleUtils.hpp
<reponame>StefanoLusardi/clip<gh_stars>1-10 #pragma once #include <CommandLineInputParser/clip.hpp> #include <iostream> namespace clip::utils { inline void dumpRawInput(int argc, char** argv, char** env) { std::cout << "Executable path: " << argv[0] << "\n\n"; std::cout << "Command Line Inputs: " << "\n"; fo...
arduino-libraries/RestClient
RestClient.cpp
#include "Client.h" #include "RestClient.h" //#define HTTP_DEBUG true #ifdef HTTP_DEBUG #define HTTP_DEBUG_PRINT(string) (Serial.print(string)) #endif #ifndef HTTP_DEBUG #define HTTP_DEBUG_PRINT(string) #endif RestClient::RestClient(Client& netClient, const char* _host) { host = _host; port = 80; num_headers ...
sushruta/shape-context-matching
main.cpp
<gh_stars>10-100 #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <map> #include <stdlib.h> #include <time.h> #include <sys/time.h> #include <math.h> #include "lap.h" using namespace std; using namespa...
bsella/brdf
src/brdf/ChefDevr/BRDFReconstructionModelWithZ.hpp
<gh_stars>0 #include "BRDFReconstructionModelWithZ.h" #include "ParametrisationWithZ.h" #include "Parametrisation.h" #include "MERLReader.h" namespace ChefDevr { template <typename Scalar> BRDFReconstructionModelWithZ<Scalar>::BRDFReconstructionModelWithZ( std::string paramtrzFilePath, std::str...
bsella/brdf
src/brdf/ChefDevr/BRDFReconstructionModelSmallStorage.cpp
<filename>src/brdf/ChefDevr/BRDFReconstructionModelSmallStorage.cpp #include "BRDFReconstructionModelSmallStorage.h"
bsella/brdf
src/brdf/ChefDevr/BRDFReconstructionModelSmallStorage.hpp
<reponame>bsella/brdf #include "BRDFReconstructionModelSmallStorage.h" #include "ParametrisationSmallStorage.h" #include "MERLReader.h" namespace ChefDevr { template <typename Scalar> BRDFReconstructionModelSmallStorage<Scalar>::BRDFReconstructionModelSmallStorage( std::string paramtrzFilePath, ...
bsella/brdf
src/brdf/ChefDevr/BRDFMapPoint.cpp
<gh_stars>0 #include "BRDFMapPoint.h" #include <QPainter> #include <QGraphicsScene> namespace ChefDevr{ BRDFMapPoint* BRDFMapPoint::hover = nullptr; BRDFMapPoint::BRDFMapPoint(): _name(""), _clr(Qt::white), visible(false){ setFlags(QGraphicsItem::ItemIgnoresTransformations); } BRDFMapPoint::BRDFMapPoint(const s...
bsella/brdf
src/brdf/ChefDevr/BRDFReconstructionModel.cpp
#include "BRDFReconstructionModel.h"
bsella/brdf
src/brdf/ChefDevr/BRDFReconstructed.hpp
<filename>src/brdf/ChefDevr/BRDFReconstructed.hpp<gh_stars>0 namespace ChefDevr { template <typename Scalar> BRDFReconstructed<Scalar>::BRDFReconstructed(int _numBRDFSamples, const Scalar* _brdfData) : BRDFMeasuredMERL() { BRDFMeasuredMERL::initBRDFData(_brdfData, _numBRDFSamples); } temp...
bsella/brdf
src/brdf/ChefDevr/BRDFMapDialog.cpp
#include "BRDFMapDialog.h"
bsella/brdf
src/brdf/ChefDevr/WaitingDisplay.cpp
#include "WaitingDisplay.h" #include "waitingspinnerwidget.h" #include <QLayout> #include <QFormLayout> namespace ChefDevr { WaitingDisplay::WaitingDisplay() : QDialog(0, Qt::FramelessWindowHint) { setAttribute(Qt::WA_TranslucentBackground); setParent(0); WaitingSpinnerWid...
bsella/brdf
src/brdf/ChefDevr/BRDFReconstructed.cpp
#include "BRDFReconstructed.h"
bsella/brdf
src/brdf/ChefDevr/BRDFMapDisplay.hpp
#include <QPainter> #include <QMouseEvent> #include <QWheelEvent> #include <QScrollBar> namespace ChefDevr { static float current_scale; template <typename Scalar> BRDFMapView<Scalar>::BRDFMapView( const std::unique_ptr<BRDFReconstructionModel<Scalar>>& brdfModel, QWidget* parent): ...
bsella/brdf
src/brdf/ChefDevr/BRDFReconstructionModel.hpp
namespace ChefDevr { template <typename Scalar> BRDFReconstructionModel<Scalar>::BRDFReconstructionModel(std::string paramtrzFilePath, std::string _brdfFolderPath) { std::ifstream file_param(paramtrzFilePath); brdfFolderPath = _brdfFolderPath; if (!file_param.is_open()){ ...
bsella/brdf
src/brdf/ChefDevr/BRDFReconstructionModelWithZ.cpp
<gh_stars>0 #include "BRDFReconstructionModelWithZ.h"
bsella/brdf
src/brdf/ChefDevr/BRDFMapDialog.hpp
#include <QVBoxLayout> #include <QDialogButtonBox> namespace ChefDevr{ template <typename Scalar> BRDFMapDialog<Scalar>::BRDFMapDialog( const std::unique_ptr<BRDFReconstructionModel<Scalar>>& brdfModel, QWidget* parent): QDialog(parent) { QVBoxLayout *vbl = new...
bsella/brdf
src/brdf/ChefDevr/BRDFMapDisplay.cpp
#include "BRDFMapDisplay.h" #include "BRDFMapPoint.h" #include <QPainter> #include <QMouseEvent> #include <QScrollBar> #include <iostream> #include <QGraphicsSvgItem> namespace ChefDevr { static QFont _font; BRDFMapScene::BRDFMapScene(float norm):QGraphicsScene(), norm(norm), _background(QPixmap("./ima...
Jim-CodeHub/libJDF
JDFibrary/base.hpp
/**----------------------------------------------------------------------------------------------------------------- * @file base.hpp * @brief XML DOM and SAX base * * Copyright (c) 2019-2019 <NAME> <EMAIL> *--------------------------------------------------------------------------------------------------------...
rahulsalvi/steering_wheel_shield
src/steering_wheel_shield.cpp
<filename>src/steering_wheel_shield.cpp #include "steering_wheel_shield.h" #include "steering_wheel_definitions.h" namespace steering_wheel_shield { inline void set_csx() { GPIOC_PSOR = CSX_MASK; } inline void clr_csx() { GPIOC_PCOR = CSX_MASK; } inline void set_dcx() { GPIOC_PSOR = DCX_MASK; } inlin...
rahulsalvi/steering_wheel_shield
examples/steering_wheel_test.cpp
<reponame>rahulsalvi/steering_wheel_shield #include "steering_wheel_shield.h" void setup() { steering_wheel_shield::begin(); steering_wheel_shield::fill_screen(); } void loop() { delay(1000); } int main() { setup(); while (1) { loop(); } }
IFAEControl/deepdetection_comm_lib
lib/frame_buffer.hpp
#pragma once #include <condition_variable> #include <cstddef> #include <vector> #include <mutex> #include <atomic> constexpr unsigned CACHE_SIZE = 33101; class Frame { public: explicit Frame(unsigned b); char* get(); unsigned getBytes() const; void copyTo(void* dest); void remove(); private: bool _delete{fal...
IFAEControl/deepdetection_comm_lib
lib/commands.cpp
#include <array> #ifdef _WIN32 #pragma once #include <winsock2.h> #else #include <arpa/inet.h> #endif #include "commands.hpp" Command::Command(const std::string& name) { m.body["command"] = "ctrl." + name; // Defaults m.body["answer"] = json({}); m.body["arguments"] = json({}); } Message& Command::...
IFAEControl/deepdetection_comm_lib
lib/frame_buffer.cpp
#include <chrono> #include <cstring> #include <iostream> #include "frame_buffer.hpp" #include "log.hpp" Frame::Frame(unsigned b) : _bytes(b) { _mem = new char[b]; } char* Frame::get() { return _mem; } unsigned Frame::getBytes() const { return _bytes; } void Frame::copyTo(void* dest) { std::memcpy(d...
IFAEControl/deepdetection_comm_lib
lib/linda-lib.hpp
<gh_stars>0 #pragma once #include "header.hpp" #ifdef _WIN32 #define DllExport __declspec( dllexport ) #else #define DllExport /* Cause Windows is so weird and unpredictable */ #endif extern "C" { DllExport int InitCommunication(const char* str, int sync_port, int async_port, bool start_async_thread); DllExport...
IFAEControl/deepdetection_comm_lib
lib/linda-lib_test.cpp
#define CATCH_CONFIG_MAIN #include <thread> #include <catch2/catch.hpp> #include "linda-lib.hpp" unsigned arr[1920]; std::thread _reader = std::thread(PopData, arr); TEST_CASE("Simple test", "[lib]") { /* REQUIRE(std::get<0>(pid.update(0)) == 0); */ SECTION("Executing init two times doesn't crash") { ...
IFAEControl/deepdetection_comm_lib
cli/stress_test.cpp
<gh_stars>0 #include <iostream> #include <unistd.h> #include "linda-lib.hpp" #include "log.hpp" int main(int argc, char* argv[]) { unsigned data[14400]; std::string ip = "172.16.17.103"; if(argc == 2) ip = argv[1]; InitCommunication(ip.c_str(), 32000, 32001, true); std::size_t counter =...
IFAEControl/deepdetection_comm_lib
cli/fail_rate_test.cpp
#include <iostream> #include <unistd.h> #include "linda-lib.hpp" #include "log.hpp" std::size_t counter = 500; unsigned data[14400]; std::size_t dma_timeouts = 0; std::size_t irq_err = 0; std::size_t packets_lost = 0; unsigned irqs; unsigned prev_irqs = 0; AcqInfo info{1000,14,976,false,true,true /* tdi */}; std:...
IFAEControl/deepdetection_comm_lib
lib/header.hpp
#pragma once #include <ostream> #include <cstdint> // Fix compilation error #ifdef _WIN32 #undef ERROR #endif constexpr uint8_t HEADER_BYTE_SIZE = 8; enum class HEADER_PACKTYPE : uint8_t { COMMAND = 1, ASYNC_DATA, ERROR = 10, }; /// @brief Packet meta-data struct BaseHeaderType { // There is a tota...
IFAEControl/deepdetection_comm_lib
lib/log.hpp
#pragma once #include <spdlog/spdlog.h> using spdlogger = std::shared_ptr<spdlog::logger>; const std::vector<spdlog::sink_ptr> CreateLogSinks(); spdlogger NewLogger(const std::string& name); static auto logger = NewLogger("global");
IFAEControl/deepdetection_comm_lib
lib/log.cpp
#include <spdlog/sinks/basic_file_sink.h> #include <spdlog/sinks/stdout_color_sinks.h> #include "log.hpp" const std::vector<spdlog::sink_ptr> CreateLogSinks() { namespace spsinks = spdlog::sinks; std::vector<spdlog::sink_ptr> sinks; auto s = std::make_shared<spsinks::stdout_color_sink_mt>(); sinks.e...
IFAEControl/deepdetection_comm_lib
lib/networking.hpp
<filename>lib/networking.hpp #pragma once #include <condition_variable> #include <thread> #include <nlohmann/json.hpp> #include <Poco/Net/DatagramSocket.h> #include <Poco/Net/SocketAddress.h> #include <Poco/Net/StreamSocket.h> #include "commands.hpp" #include "header.hpp" #include "frame_buffer.hpp" extern FrameBuf...
dankogai/swift-freebsd
stdlib/public/stubs/Stubs.cpp
//===--- Stubs.cpp - Swift Language ABI Runtime Stubs ---------------------===// // // This source file is part of the Swift.org open source project // // Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors // Licensed under Apache License v2.0 with Runtime Library Exception // // See http://swift.org/LI...
lawrencem99/openmesh
src/OpenMesh/Core/Mesh/CirculatorsT.hh
<reponame>lawrencem99/openmesh /* ========================================================================= * * * * OpenMesh * * Copyright (c) 2001-2015, RWTH-Aachen Un...
lawrencem99/openmesh
src/OpenMesh/Core/Mesh/IteratorsT.hh
/* ========================================================================= * * * * OpenMesh * * Copyright (c) 2001-2015, RWTH-Aachen University * * ...
lawrencem99/openmesh
src/OpenMesh/Core/IO/reader/PLYReader.cc
/* ========================================================================= * * * * OpenMesh * * Copyright (c) 2001-2015, RWTH-Aachen University * * ...
aflag/chess
board.cc
#include "board.h" #include <algorithm> #include <cstdlib> #include <iostream> #include <vector> #include <list> #include <unordered_map> #include "bishop.h" #include "color.h" #include "king.h" #include "knight.h" #include "move.h" #include "pawn.h" #include "piece.h" #include "position.h" #include "queen.h" #includ...
aflag/chess
movement.cc
#include "movement.h" #include <vector> #include "board.h" #include "color.h" #include "position.h" bool GetMove(const Board& board, Position from, Color color, int x, int y, std::vector<Position>& moves) { auto to = from.Move(x, y); if (!to.has_value()) { return false; } auto piece = board....
aflag/chess
queen.cc
<reponame>aflag/chess<gh_stars>0 #include "queen.h" #include <string> #include <vector> #include "bishop.h" #include "board.h" #include "piece.h" #include "position.h" #include "rook.h" std::string Queen::String() const { return GetColor() == kWhite ? "♕" : "♛"; } std::vector<Position> Queen::GetMoves(const Board& ...
aflag/chess
king.cc
#include "king.h" #include <string> #include <vector> #include "board.h" #include "move.h" #include "movement.h" #include "piece.h" #include "position.h" #include "rook.h" #include "common.h" namespace { void GetRegularMoves(const Board& board, Position from, Color color, std::vector<Position>&...
aflag/chess
chess.cc
#include <algorithm> #include <cstdlib> #include <ctime> #include <chrono> #include <iostream> #include <fstream> #include <vector> #include <cstring> #include <set> #include "board.h" #include "position.h" #include "color.h" #include "move.h" #include "engine.h" const int kDepth = 4; const auto kUtility = SmartUtili...
aflag/chess
engine_test.cc
#define BOOST_TEST_MODULE engine tests #include <boost/test/included/unit_test.hpp> #include "engine.h" #include "king.h" #include "pawn.h" #include "rook.h" BOOST_AUTO_TEST_CASE(TestCaptureFreePawn) { Cache cache; std::vector<std::tuple<Position, std::unique_ptr<Piece>>> positions; positions.emplace_back(Positi...
aflag/chess
piece.cc
#include "piece.h" #include <string> #include <vector> #include "common.h" #include "board.h" #include "color.h" #include "move.h" #include "position.h" Piece::Piece(Color color) : color_(color) {} Color Piece::GetColor() const { return color_; } void Piece::NewTurn() {} void Piece::DoMove(unused Board& board, un...
aflag/chess
board_test.cc
#define BOOST_TEST_MODULE board tests #include <boost/test/included/unit_test.hpp> #include "king.h" #include "rook.h" #include "board.h" #include "move.h" BOOST_AUTO_TEST_CASE(TestCastleKeepsTurn) { std::vector<std::tuple<Position, std::unique_ptr<Piece>>> positions; positions.emplace_back(Position(4, 0), std::m...
aflag/chess
knight.cc
<reponame>aflag/chess #include "knight.h" #include <string> #include <vector> #include "board.h" #include "movement.h" #include "piece.h" #include "position.h" std::string Knight::String() const { return GetColor() == kWhite ? "♘" : "♞"; } std::vector<Position> Knight::GetMoves(const Board& board, ...
aflag/chess
rook.cc
#include "rook.h" #include <string> #include <vector> #include "common.h" #include "board.h" #include "color.h" #include "movement.h" #include "piece.h" #include "position.h" std::string Rook::String() const { return GetColor() == kWhite ? "♖" : "♜"; } std::vector<Position> Rook::GetMoves(const Board& board, Positi...
aflag/chess
color.cc
#include <string> #include "color.h" Color Other(Color color) { if (color == kWhite) { return kBlack; } return kWhite; } std::string ColorToString(Color color) { return color == kWhite ? "white" : "black"; }
aflag/chess
bishop.cc
#include "bishop.h" #include <string> #include <vector> #include "board.h" #include "color.h" #include "movement.h" #include "piece.h" #include "position.h" std::string Bishop::String() const { return GetColor() == kWhite ? "♗" : "♝"; } std::vector<Position> Bishop::GetMoves(const Board& board, ...
aflag/chess
position.cc
#include "position.h" #include <cstdlib> #include <iostream> #include <optional> #include <string> namespace { bool Valid(int v) { return v >= 0 && v <= 7; } } // namespace std::optional<Position> Position::FromString(std::string s) { if (s.size() != 2) { return {}; } int x = s[0] - 'a'; int y = s[1] - ...
aflag/chess
pawn.cc
#include "pawn.h" #include <cstdlib> #include <iostream> #include <string> #include <vector> #include "bishop.h" #include "board.h" #include "color.h" #include "knight.h" #include "move.h" #include "piece.h" #include "position.h" #include "queen.h" #include "rook.h" namespace { int Forward(Color color) { return col...
aflag/chess
engine.cc
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include "board.h" #include "color.h" #include "engine.h" #include "move.h" #include "cache.h" static int multiplier(Color color) { return color == kWhite ? 1 : -1; } ColorfulCompare::ColorfulCompare(Color color) { multiplier_ = multipli...
aflag/chess
move.cc
#include "move.h" #include <iostream> #include <optional> #include <string> #include <memory> #include "position.h" std::optional<Move> Move::FromString(std::string from, std::string to) { auto from_position = Position::FromString(from); if (!from_position.has_value()) { return {}; } auto to_position = P...
sgillen/raisimLib
examples/src/server/newtonsCradle.cpp
<gh_stars>0 // This file is part of RaiSim. You must obtain a valid license from RaiSim Tech // Inc. prior to usage. #include "raisim/World.hpp" #include "raisim/RaisimServer.hpp" int main(int argc, char **argv) { auto binaryPath = raisim::Path::setFromArgv(argv[0]); raisim::World::setActivationKey(binaryPath.get...
sgillen/raisimLib
raisim/win32/mt_release/include/raisim/configure.hpp
<reponame>sgillen/raisimLib //----------------------------// // This file is part of RaiSim// // Copyright 2020, RaiSim Tech// //----------------------------// #ifndef RAISIM_CONFIGURE_HPP #define RAISIM_CONFIGURE_HPP typedef uint64_t CollisionGroup; #define RAISIM_STATIC_COLLISION_GROUP CollisionGroup(1)<<63 names...
sgillen/raisimLib
raisimPy/src/world.cpp
//----------------------------// // This file is part of RaiSim// // Copyright 2020, RaiSim Tech// //----------------------------// /* The code started from an open-source raisim python wrapper, raisimpy, by * <NAME> <<EMAIL>> */ #include <pybind11/pybind11.h> #include <pybind11/stl.h> // automatic conversion b...
gemini133/mango
source/mango/image/image_webp.cpp
<gh_stars>1-10 /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <cmath> #include <mango/core/pointer.hpp> #include <mango/core/buffer.hpp> #include <mango/core/system.hpp> #include <mango/image/image.hpp> #ifdef MANGO_ENABLE_IMAGE_WEB...
gemini133/mango
include/mango/vulkan/vulkan.hpp
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <vector> #include <mango//core/configure.hpp> #include <mango//core/dynamic_library.hpp> #include <mango//image/compression.hpp> #include <mango//...
gemini133/mango
include/mango/simd/avx512_double128.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/simd/simd.hpp> namespace mango { namespace simd { // ----------------------------------------------------------------- // f64x2 // --------------------...
gemini133/mango
include/mango/simd/composite_int256.hpp
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/simd/simd.hpp> namespace mango { namespace simd { #define SIMD_SET_COMPONENT(vec, value, mask, index) \ if (index <= mask) vec.lo = s...
gemini133/mango
source/mango/core/crc32.cpp
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/core/crc32.hpp> #include <mango/core/exception.hpp> #include <mango/core/bits.hpp> #include <mango/core/endian.hpp> #include <mango/core/thread.hpp> ...
gemini133/mango
example/opengl/gltest.cpp
<reponame>gemini133/mango<filename>example/opengl/gltest.cpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/mango.hpp> #include <mango/opengl/opengl.hpp> using namespace mango; class TestWindow : public OpenGLContext { publi...
gemini133/mango
include/mango/simd/common.hpp
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2019 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/simd/simd.hpp> namespace mango { namespace simd { // ------------------------------------------------------------------ ...
gemini133/mango
source/mango/opengl/glx/glx_context.cpp
<filename>source/mango/opengl/glx/glx_context.cpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/core/exception.hpp> #include <mango/core/string.hpp> #include <mango/opengl/opengl.hpp> #include "../../window/xlib/xlib_handle.h...
gemini133/mango
include/mango/math/vector128_int32x4.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/math/vector.hpp> namespace mango { template <> struct Vector<s32, 4> { using VectorType = simd::s32x4; using ScalarType = s32; ...
gemini133/mango
source/mango/filesystem/path.cpp
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <algorithm> #include <mango/filesystem/path.hpp> namespace mango { namespace filesystem { // -------------------------------------------------------------...
gemini133/mango
include/mango/math/spline.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2019 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/math/vector.hpp> #include <mango/core/bits.hpp> namespace mango { namespace math { constexpr double pi = 3.14159265358979323846264338327; // -------------...
gemini133/mango
example/image/jpeg_benchmark/jpeg_benchmark.cpp
<filename>example/image/jpeg_benchmark/jpeg_benchmark.cpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/mango.hpp> using namespace mango; using namespace mango::filesystem; #define TEST_LIBJPEG #define TEST_STB #define TEST...
gemini133/mango
example/test/particle.cpp
<filename>example/test/particle.cpp<gh_stars>1-10 /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/mango.hpp> #include <algorithm> #include <random> using namespace mango; // ---------------------------------------------------...
gemini133/mango
source/mango/image/block_dxt.cpp
<filename>source/mango/image/block_dxt.cpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2016 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/core/endian.hpp> #include <mango/image/compression.hpp> namespace { using namespace mango; // --------------------------------...
gemini133/mango
include/mango/math/vector512_int8x64.hpp
<filename>include/mango/math/vector512_int8x64.hpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/math/vector.hpp> namespace mango { template <> struct Vector<s8, 64> { using VectorType = si...
gemini133/mango
include/mango/simd/neon_int128.hpp
<filename>include/mango/simd/neon_int128.hpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/simd/simd.hpp> namespace mango { namespace simd { // --------------------------------------------------...
gemini133/mango
include/mango/math/vector128_int8x16.hpp
<reponame>gemini133/mango<gh_stars>1-10 /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/math/vector.hpp> namespace mango { template <> struct Vector<s8, 16> { using VectorType = simd::s8x16; ...
gemini133/mango
include/mango/image/color.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/core/configure.hpp> #include <mango/core/endian.hpp> #include <mango/core/bits.hpp> namespace mango { constexpr u32 makeBGRA(u32 red, u32 green, u32 blue, u32 ...
gemini133/mango
source/mango/image/image_c64.cpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ /* Commodore 64 decoders copyright (C) 2011 <NAME>. All rights reserved. */ #include <cmath> #include <mango/core/pointer.hpp> #include <mango/core/buffer.hpp> #include <mango/core/system.hp...
gemini133/mango
source/mango/filesystem/unix/file_stream.cpp
<gh_stars>1-10 /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #if __ANDROID_API__ < __ANDROID_API_N__ #define _FILE_OFFSET_BITS 64 /* LFS: 64 bit off_t */ #endif #include <cstdio> #include <unistd.h> #include <sys/stat.h> #include <mango/c...
gemini133/mango
source/mango/image/block_fxt1.cpp
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/core/endian.hpp> #include <mango/image/compression.hpp> // https://www.khronos.org/registry/OpenGL/extensions/3DFX/3DFX_texture_compression_FXT1.txt na...
gemini133/mango
source/mango/jpeg/jpeg_encode.cpp
<gh_stars>0 /* MANGO Multimedia Development Platform Copyright (C) 2012-2019 Twilight Finland 3D Oy Ltd. All rights reserved. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * jpeg.c - JPEG compression for SRV-1 robot * Copyright (C) 2005-2009 Surveyor Corporation * * Th...
gemini133/mango
include/mango/simd/avx512_convert.hpp
<gh_stars>1-10 /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/simd/simd.hpp> #include <mango/simd/common.hpp> namespace mango { namespace simd { namespace detail { template <int bits> struct reinterpret_vecto...
gemini133/mango
include/mango/core/hash.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/core/configure.hpp> #include <mango/core/memory.hpp> namespace mango { // ----------------------------------------------------------------------- // Hash -...
gemini133/mango
example/misc/math.cpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <vector> #include <mango/math/math.hpp> using namespace mango; void example1() { float32x4 a(1.0f, 2.0f, 3.0f, 4.0f); float32x4 b = sin(a); float32x4 c = cross(a, b) * 1.5f...
gemini133/mango
include/mango/image/compression.hpp
<filename>include/mango/image/compression.hpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/core/memory.hpp> #include <mango/core/string.hpp> #include <mango/core/exception.hpp> #include <mango/image/format.hpp>...
gemini133/mango
include/mango/core/dynamic_library.hpp
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <string> #include <mango/core/configure.hpp> #include <mango/core/object.hpp> namespace mango { class DynamicLibrary : protected NonCopyable...
gemini133/mango
source/mango/image/image_dds.cpp
<filename>source/mango/image/image_dds.cpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ //#define MANGO_ENABLE_DEBUG_PRINT #include <mango/core/system.hpp> #include <mango/core/pointer.hpp> #include <mango/image/image.hpp> #ifdef MANGO_EN...
gemini133/mango
include/mango/core/pointer.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/core/configure.hpp> #include <mango/core/endian.hpp> #include <mango/core/memory.hpp> namespace mango { namespace detail { // ---------------------------------...
gemini133/mango
include/mango/simd/composite_double512.hpp
<filename>include/mango/simd/composite_double512.hpp<gh_stars>1-10 /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/simd/simd.hpp> namespace mango { namespace simd { #define SIMD_COMPOSITE_FUNC1(R, A, FUNC) \ ...
gemini133/mango
include/mango/image/decoder.hpp
<gh_stars>0 /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <string> #include <mango/core/object.hpp> #include <mango/core/exception.hpp> #include <mango/image/format.hpp> #include <mango/image/compression.hpp> #include ...
gemini133/mango
include/mango/core/bits.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <cmath> #include <algorithm> #include <mango/core/configure.hpp> #include <mango/core/half.hpp> namespace mango { // -------------------------------------------------...
gemini133/mango
include/mango/simd/scalar_float64.hpp
<gh_stars>1-10 /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/simd/simd.hpp> namespace mango { namespace simd { // ----------------------------------------------------------------- // f32x2 // -----...
gemini133/mango
include/mango/simd/simd.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <cmath> #include <algorithm> #include <type_traits> #include <mango/core/configure.hpp> #include <mango/core/half.hpp> #include <mango/core/bits.hpp> // -----...
gemini133/mango
include/mango/core/core.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/core/configure.hpp> #include <mango/core/half.hpp> #include <mango/core/atomic.hpp> #include <mango/core/bits.hpp> #include <mango/core/endian.hpp> #inclu...
gemini133/mango
source/mango/image/surface.cpp
<filename>source/mango/image/surface.cpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <vector> #include <algorithm> #include <mango/core/exception.hpp> #include <mango/core/thread.hpp> #include <mango/core/string.hpp> #include <man...
gemini133/mango
example/misc/checksum.cpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/mango.hpp> using namespace mango; void test_crc() { // ... crc32 ... printf("\n"); printf("CRC32 test vectors: \n"); printf("\n"); { const char na...
gemini133/mango
source/mango/core/hash.cpp
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <mango/core/hash.hpp> #define XXH_STATIC_LINKING_ONLY #define XXH_INLINE_ALL #include "../../external/zstd/common/xxhash.h" namespace mango { u32 xxhash3...
gemini133/mango
include/mango/simd/scalar_int64.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <mango/simd/scalar_detail.hpp> namespace mango { namespace simd { // ----------------------------------------------------------------- // u32x2 // -----------...
gemini133/mango
source/mango/image/image_gif.cpp
<reponame>gemini133/mango<filename>source/mango/image/image_gif.cpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ /* The lzw_decode() function is based on Jean-Marc Lienher / STB decoder. The symbol resolver is iterative instead of recursi...
gemini133/mango
example/misc/bitmap.cpp
<reponame>gemini133/mango /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #include <vector> #include <mango/image/image.hpp> using namespace mango; /* First let's do trivial image loading using traditional "Bitmap" object technique: */ v...
gemini133/mango
include/mango/core/thread.hpp
<filename>include/mango/core/thread.hpp /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <queue> #include <vector> #include <memory> #include <thread> #include <mutex> #include <functional> #include <condition_variable> #...
gemini133/mango
include/mango/core/exception.hpp
<filename>include/mango/core/exception.hpp<gh_stars>0 /* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <cstdarg> #include <string> #include <exception> #include <mango/core/configure.hpp> #include <mango/core/string.hpp> ...
gemini133/mango
include/mango/math/matrix.hpp
/* MANGO Multimedia Development Platform Copyright (C) 2012-2020 Twilight Finland 3D Oy Ltd. All rights reserved. */ #pragma once #include <cassert> #include <mango/math/vector.hpp> namespace mango { // ------------------------------------------------------------------ // MatrixBase // ----------...