repo_name
stringclasses
10 values
file_path
stringlengths
29
222
content
stringlengths
24
926k
extention
stringclasses
5 values
asio
data/projects/asio/include/boost/asio/detail/impl/io_uring_service.hpp
// // detail/impl/io_uring_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #if...
hpp
asio
data/projects/asio/include/boost/asio/detail/impl/strand_service.hpp
// // detail/impl/strand_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef...
hpp
asio
data/projects/asio/include/boost/asio/detail/impl/dev_poll_reactor.hpp
// // detail/impl/dev_poll_reactor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #if...
hpp
asio
data/projects/asio/include/boost/asio/ip/v6_only.hpp
// // ip/v6_only.hpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_V6_ONLY_HPP #defi...
hpp
asio
data/projects/asio/include/boost/asio/ip/network_v4.hpp
// // ip/network_v4.hpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at ...
hpp
asio
data/projects/asio/include/boost/asio/ip/resolver_base.hpp
// // ip/resolver_base.hpp // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_RESOL...
hpp
asio
data/projects/asio/include/boost/asio/ip/host_name.hpp
// // ip/host_name.hpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_HOST_NAME_HPP...
hpp
asio
data/projects/asio/include/boost/asio/ip/icmp.hpp
// // ip/icmp.hpp // ~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_ICMP_HPP #define BOOST_...
hpp
asio
data/projects/asio/include/boost/asio/ip/address_v4_iterator.hpp
// // ip/address_v4_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_A...
hpp
asio
data/projects/asio/include/boost/asio/ip/address.hpp
// // ip/address.hpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_ADDRESS_HPP #defi...
hpp
asio
data/projects/asio/include/boost/asio/ip/basic_resolver_entry.hpp
// // ip/basic_resolver_entry.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST...
hpp
asio
data/projects/asio/include/boost/asio/ip/multicast.hpp
// // ip/multicast.hpp // ~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_MULTICAST_HPP...
hpp
asio
data/projects/asio/include/boost/asio/ip/address_v4.hpp
// // ip/address_v4.hpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_ADDRESS_V4_...
hpp
asio
data/projects/asio/include/boost/asio/ip/basic_endpoint.hpp
// // ip/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_BAS...
hpp
asio
data/projects/asio/include/boost/asio/ip/basic_resolver_iterator.hpp
// // ip/basic_resolver_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef...
hpp
asio
data/projects/asio/include/boost/asio/ip/address_v4_range.hpp
// // ip/address_v4_range.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP...
hpp
asio
data/projects/asio/include/boost/asio/ip/udp.hpp
// // ip/udp.hpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_UDP_HPP #define BOOST_ASI...
hpp
asio
data/projects/asio/include/boost/asio/ip/tcp.hpp
// // ip/tcp.hpp // ~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_TCP_HPP #define BOOST_ASI...
hpp
asio
data/projects/asio/include/boost/asio/ip/address_v6_iterator.hpp
// // ip/address_v6_iterator.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICE...
hpp
asio
data/projects/asio/include/boost/asio/ip/basic_resolver_results.hpp
// // ip/basic_resolver_results.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef B...
hpp
asio
data/projects/asio/include/boost/asio/ip/basic_resolver_query.hpp
// // ip/basic_resolver_query.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST...
hpp
asio
data/projects/asio/include/boost/asio/ip/address_v6.hpp
// // ip/address_v6.hpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_ADDRESS_V6_...
hpp
asio
data/projects/asio/include/boost/asio/ip/network_v6.hpp
// // ip/network_v6.hpp // ~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at ...
hpp
asio
data/projects/asio/include/boost/asio/ip/unicast.hpp
// // ip/unicast.hpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_UNICAST_HPP #defi...
hpp
asio
data/projects/asio/include/boost/asio/ip/bad_address_cast.hpp
// // ip/bad_address_cast.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP...
hpp
asio
data/projects/asio/include/boost/asio/ip/address_v6_range.hpp
// // ip/address_v6_range.hpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_...
hpp
asio
data/projects/asio/include/boost/asio/ip/resolver_query_base.hpp
// // ip/resolver_query_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_A...
hpp
asio
data/projects/asio/include/boost/asio/ip/basic_resolver.hpp
// // ip/basic_resolver.hpp // ~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_BAS...
hpp
asio
data/projects/asio/include/boost/asio/ip/impl/network_v4.hpp
// // ip/impl/network_v4.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2014 Oliver Kowalke (oliver dot kowalke at gmail dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt o...
hpp
asio
data/projects/asio/include/boost/asio/ip/impl/address.hpp
// // ip/impl/address.hpp // ~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_IMPL_AD...
hpp
asio
data/projects/asio/include/boost/asio/ip/impl/address_v4.hpp
// // ip/impl/address_v4.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_I...
hpp
asio
data/projects/asio/include/boost/asio/ip/impl/basic_endpoint.hpp
// // ip/impl/basic_endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_A...
hpp
asio
data/projects/asio/include/boost/asio/ip/impl/address_v6.hpp
// // ip/impl/address_v6.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_I...
hpp
asio
data/projects/asio/include/boost/asio/ip/impl/network_v6.hpp
// // ip/impl/network_v6.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_I...
hpp
asio
data/projects/asio/include/boost/asio/ip/detail/endpoint.hpp
// // ip/detail/endpoint.hpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_IP_D...
hpp
asio
data/projects/asio/include/boost/asio/ip/detail/socket_option.hpp
// // detail/socket_option.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_...
hpp
asio
data/projects/asio/include/boost/asio/posix/basic_stream_descriptor.hpp
// // posix/basic_stream_descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #...
hpp
asio
data/projects/asio/include/boost/asio/posix/stream_descriptor.hpp
// // posix/stream_descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST...
hpp
asio
data/projects/asio/include/boost/asio/posix/basic_descriptor.hpp
// // posix/basic_descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_A...
hpp
asio
data/projects/asio/include/boost/asio/posix/descriptor.hpp
// // posix/descriptor.hpp // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASIO_POSIX_DE...
hpp
asio
data/projects/asio/include/boost/asio/posix/descriptor_base.hpp
// // posix/descriptor_base.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_ASI...
hpp
tinyxml2
data/projects/tinyxml2/tinyxml2.cpp
/* Original code by Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including comme...
cpp
tinyxml2
data/projects/tinyxml2/tinyxml2.h
/* Original code by Lee Thomason (www.grinninglizard.com) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including comme...
h
tinyxml2
data/projects/tinyxml2/xmltest.cpp
#if defined( _MSC_VER ) #if !defined( _CRT_SECURE_NO_WARNINGS ) #define _CRT_SECURE_NO_WARNINGS // This test file is not intended to be secure. #endif #endif #include "tinyxml2.h" #include <cerrno> #include <cstdlib> #include <cstring> #include <ctime> #if defined( _MSC_VER ) || defined (WIN32) #include <crtdbg...
cpp
tinyxml2
data/projects/tinyxml2/contrib/html5-printer.cpp
// g++ -Wall -O2 contrib/html5-printer.cpp -o html5-printer -ltinyxml2 // This program demonstrates how to use "tinyxml2" to generate conformant HTML5 // by deriving from the "tinyxml2::XMLPrinter" class. // http://dev.w3.org/html5/markup/syntax.html // In HTML5, there are 16 so-called "void" elements. "void e...
cpp
inifile-cpp
data/projects/inifile-cpp/examples/save_ini_file.cpp
/* save_ini_file.cpp * * Author: Fabian Meyer * Created On: 14 Nov 2020 */ #include <inicpp.h> #include <iostream> int main(int argc, char **argv) { if(argc != 2) { std::cerr << "usage: save_ini_file [FILE_PATh]" << std::endl; return 1; } std::string path = argv[1]; ini::IniF...
cpp
inifile-cpp
data/projects/inifile-cpp/examples/load_ini_file.cpp
/* load_ini_file.cpp * * Author: Fabian Meyer * Created On: 14 Nov 2020 */ #include <inicpp.h> #include <iostream> int main(int argc, char **argv) { if(argc != 2) { std::cerr << "usage: load_ini_file [FILE_PATh]" << std::endl; return 1; } std::string path = argv[1]; // load t...
cpp
inifile-cpp
data/projects/inifile-cpp/examples/decode_ini_file.cpp
/* decode_ini_file.cpp * * Author: Fabian Meyer * Created On: 14 Nov 2020 */ #include <inicpp.h> #include <iostream> int main() { // create some ini content std::string content = "[Foo]\nhello=world\nnum=123\n[Test]\nstatus=pass\n[Nothing]"; ini::IniFile inif; inif.decode(content); // show th...
cpp
inifile-cpp
data/projects/inifile-cpp/examples/encode_ini_file.cpp
/* encode_ini_file.cpp * * Author: Fabian Meyer * Created On: 14 Nov 2020 */ #include <inicpp.h> #include <iostream> int main() { ini::IniFile inif; inif["Foo"]["hello"] = "world"; inif["Foo"]["float"] = 1.02f; inif["Foo"]["int"] = 123; inif["Another"]["char"] = 'q'; inif["Another"]["bool...
cpp
inifile-cpp
data/projects/inifile-cpp/examples/custom_type_conversion.cpp
/* decode_ini_file.cpp * * Author: Fabian Meyer * Created On: 14 Nov 2020 */ #include <inicpp.h> #include <iostream> // the conversion functor must live in the "ini" namespace namespace ini { /** Conversion functor to parse std::vectors from an ini field- * The generic template can be passed down to th...
cpp
inifile-cpp
data/projects/inifile-cpp/test/main.cpp
/* * main.cpp * * Created on: 26 Dec 2015 * Author: Fabian Meyer * License: MIT */ #define CATCH_CONFIG_MAIN #include <catch2/catch.hpp>
cpp
inifile-cpp
data/projects/inifile-cpp/test/test_inifile.cpp
/* * test_inifile.cpp * * Created on: 26 Dec 2015 * Author: Fabian Meyer * License: MIT */ #include "inicpp.h" #include <catch2/catch.hpp> #include <cstring> #include <sstream> TEST_CASE("parse ini file", "IniFile") { std::istringstream ss(("[Foo]\nbar=hello world\n[Test]")); ini::IniFile inif(ss...
cpp
inifile-cpp
data/projects/inifile-cpp/include/inicpp.h
/* * inicpp.h * * Created on: 26 Dec 2015 * Author: Fabian Meyer * License: MIT */ #ifndef INICPP_H_ #define INICPP_H_ #include <algorithm> #include <fstream> #include <istream> #include <map> #include <assert.h> #include <sstream> #include <stdexcept> #include <vector> namespace ini { /************...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/03_openvkl_gsg/gpu/src/vklTutorialGPU.cpp
// Copyright 2022 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include <openvkl/openvkl.h> #include <openvkl/device/openvkl.h> #include <iomanip> #include <iostream> // setup specialization constant for feature flags static_assert(std::is_trivially_copyable<VKLFeatureFlags>::value); constexpr static s...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/03_openvkl_gsg/cpu/src/vklTutorialCPU.c
// Copyright 2019 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include <openvkl/openvkl.h> #include <openvkl/device/openvkl.h> #include <stdio.h> #if defined(_MSC_VER) #include <malloc.h> // _malloca #include <windows.h> // Sleep #endif void demoScalarAPI(VKLDevice device, VKLVolume volume) { print...
c
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/05_ispc_gsg/src/simple.cpp
/* Copyright (c) 2010-2022, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of co...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/common/platform.cpp
// Copyright 2009 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "platform.h" OIDN_NAMESPACE_BEGIN // ----------------------------------------------------------------------------------------------- // Common functions // -----------------------------------------------------------------------...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/common/common.cpp
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "common.h" OIDN_NAMESPACE_BEGIN size_t getDataTypeSize(DataType dataType) { switch (dataType) { case DataType::Float32: return sizeof(float); case DataType::Float16: return sizeof(int16_t); case DataType::UInt...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/common/half.cpp
// Copyright 2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "half.h" OIDN_NAMESPACE_BEGIN // https://gist.github.com/rygorous/2156668 namespace { typedef unsigned int uint; union FP32 { uint u; float f; struct { uint Mantissa : 23; ui...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/common/common.h
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "oidn_utils.h" // must be included before platform.h #include "platform.h" OIDN_NAMESPACE_BEGIN // Synchronization mode for operations enum class SyncMode { Sync, // synchronous Async // asynchronous }; ...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/common/timer.h
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "common/platform.h" #include <chrono> OIDN_NAMESPACE_BEGIN class Timer { public: Timer() { reset(); } void reset() { start = clock::now(); } double query() const { ...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/common/half.h
// Copyright 2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "include/OpenImageDenoise/config.h" #include <cstdint> OIDN_NAMESPACE_BEGIN float half_to_float(int16_t x); int16_t float_to_half(float x); // Minimal half data type class half { public: half() = defaul...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/common/oidn_utils.h
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "include/OpenImageDenoise/oidn.hpp" #include <iostream> #include <iomanip> OIDN_NAMESPACE_BEGIN // Returns the size of a format in bytes size_t getFormatSize(Format format); std::ostream& operator <<(std::ostream...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/common/platform.h
// Copyright 2009 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "include/OpenImageDenoise/config.h" // ------------------------------------------------------------------------------------------------- // Macros // ----------------------------------------------------------------------...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/common/oidn_utils.cpp
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "oidn_utils.h" #include "platform.h" OIDN_NAMESPACE_BEGIN size_t getFormatSize(Format format) { switch (format) { case Format::Undefined: return 0; case Format::Float: return sizeof(float); case Format::Fl...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/apps/oidnDenoise.cpp
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "common/common.h" #include "common/timer.h" #include "utils/arg_parser.h" #include "utils/image_io.h" #include "utils/device_info.h" #include <iostream> #include <fstream> #include <iomanip> #include <cassert> #include <limits> #includ...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/apps/utils/image_buffer.h
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "common/common.h" #include <memory> #include <string> #include <vector> #include <array> #include <tuple> OIDN_NAMESPACE_BEGIN class ImageBuffer { public: ImageBuffer(); ImageBuffer(const DeviceRef& device...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/apps/utils/image_io.cpp
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "image_io.h" #include <fstream> #if defined(OIDN_USE_OPENIMAGEIO) #include <OpenImageIO/imageio.h> #endif OIDN_NAMESPACE_BEGIN namespace { inline float srgbForward(float y) { return (y <= 0.0031308f) ? (12.92f * ...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/apps/utils/image_io.h
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "image_buffer.h" OIDN_NAMESPACE_BEGIN // Loads an image with optionally specified number of channels and data type std::shared_ptr<ImageBuffer> loadImage(const DeviceRef& device, ...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/apps/utils/random.h
// Copyright 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "common/platform.h" OIDN_NAMESPACE_BEGIN // Simple and very fast LCG random number generator class Random { private: uint32_t state; public: OIDN_INLINE Random(uint32_t seed = 1) : state(seed) {} ...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/apps/utils/image_buffer.cpp
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "image_io.h" OIDN_NAMESPACE_BEGIN ImageBuffer::ImageBuffer() : devPtr(nullptr), hostPtr(nullptr), byteSize(0), numValues(0), width(0), height(0), numChannels(0), dataType(Format::Undefi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/apps/utils/arg_parser.h
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "common/platform.h" OIDN_NAMESPACE_BEGIN // Command-line argument parser class ArgParser { public: ArgParser(int argc, char* argv[]); bool hasNext() const; std::string getNext(); std::string get...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/apps/utils/arg_parser.cpp
// Copyright 2018 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include <stdexcept> #include "arg_parser.h" OIDN_NAMESPACE_BEGIN ArgParser::ArgParser(int argc, char* argv[]) : argc(argc), argv(argv), pos(1) {} bool ArgParser::hasNext() const { return pos < argc; } std::string Ar...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/04_oidn_gsg/src/apps/utils/device_info.h
// Copyright 2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "common/common.h" OIDN_NAMESPACE_BEGIN inline int printPhysicalDevices() { const int numDevices = getNumPhysicalDevices(); if (numDevices == 0) { std::cout << "No supported devices found" << std::e...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/02_embree_gsg/gpu/src/minimal_sycl.cpp
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 /* * To use the Embree DPC++ API you have to include sycl.hpp before the * embree API headers. */ #include <sycl/sycl.hpp> #include <embree4/rtcore.h> #include <cstdio> #include <limits> /* * A minimal tutorial. * * It demonstrate...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/02_embree_gsg/cpu/src/minimal.cpp
// Copyright 2009-2023 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include <embree4/rtcore.h> #include <math.h> #include <stdio.h> #if defined(_WIN32) #include <conio.h> #include <windows.h> #endif /* * A minimal tutorial. * * It demonstrates how to intersect a ray with a single triangle. It is * m...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/GettingStarted/01_ospray_gsg/src/ospTutorial.cpp
// Copyright 2009-2021 Intel Corporation // SPDX-License-Identifier: Apache-2.0 /* This is a small example tutorial how to use OSPRay in an application. * * On Linux build it in the build_directory with * g++ ../apps/ospTutorial/ospTutorial.cpp -I ../ospray/include \ * -I ../../rkcommon -L . -lospray -Wl,-...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/IntroToRayTracingWithEmbree/gpu/src/rkRayTracerGPU.cpp
#ifdef _MSC_VER #ifndef NOMINMAX /* use intended min and max instead of the MSVS macros */ #define NOMINMAX #endif #endif /* Added for GPU */ #include <sycl/sycl.hpp> #include <embree4/rtcore.h> #include "MathBindings.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include <stb/stb_image_write.h> using Vec3fa = MathBindi...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/IntroToRayTracingWithEmbree/gpu/src/MathBindings.h
#pragma once #ifndef FILEMATHBINDINGSSEEN #define FILEMATHBINDINGSSEEN #include "sycl/sycl.hpp" /* These MathBindings are a quick wrapper for abstraction of geometric algebra operations and vector types. This wrapper functions on both host and target SYCL device. * In previous introduction programs, rkcommon library...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/IntroToRayTracingWithEmbree/cpu/src/rkRayTracer.cpp
#ifdef _MSC_VER #ifndef NOMINMAX /* use the c++ library min and max instead of the MSVS macros */ /* rkcommon will define this macro upon CMake import */ #define NOMINMAX #endif #endif #include <embree4/rtcore.h> #include <rkcommon/math/vec.h> #include <rkcommon/memory/malloc.h> #include <tbb/parallel_for.h> #define S...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/RandomSampler.h
#pragma once #ifndef FILE_RANDOMSAMPLERH_SEEN #define FILE_RANDOMSAMPLERH_SEEN class RandomSampler { public: RandomSampler(); RandomSampler(unsigned int id); RandomSampler(unsigned int pixelId, unsigned int sampleId); RandomSampler(unsigned int x, unsigned int y, int sampleId); /* Seperate constructor from set...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/Renderer.h
#pragma once #ifndef FILE_RENDERER_SEEN #define FILE_RENDERER_SEEN #include <embree4/rtcore.h> #include <tbb/parallel_for.h> #include "PathTracer.h" #include "SceneGraph.h" #include "definitions.h" struct Renderer { public: Renderer(unsigned int width, unsigned int height, unsigned int channels, unsig...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/Pool.h
#pragma once #ifndef FILE_POOL_SEEN #define FILE_POOL_SEEN #include <embree4/rtcore.h> #include <vector> #include "Geometry.h" #include "Lights.h" #include "Materials.h" #include "definitions.h" class Pool : public Geometry { public: Pool(const RTCScene& scene, const RTCDevice& device, std::map<unsigned i...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/Geometry.h
#pragma once #ifndef FILE_GEOMETRYH_SEEN #define FILE_GEOMETRYH_SEEN #include <embree4/rtcore.h> #include <map> #include <vector> #include "Lights.h" #include "Materials.h" #include "definitions.h" /* We'll use this 'geometries' container to automatically clean up the data * arrays created that are used to create...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/definitions.h
#pragma once #ifndef FILE_DEFINITIONS_SEEN #define FILE_DEFINITIONS_SEEN /* The definitions.h file is home to 3D math utility types and 3D math utilty * functions. Embree repository tutorial sources often place these into an * optics.h or sampling.g */ #include <embree4/rtcore.h> #include <rkcommon/math/vec.h> #in...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/DefaultCubeAndPlane.h
#pragma once #ifndef FILE_DEFAULTCUBEANDPLANE_SEEN #define FILE_DEFAULTCUBEANDPLANE_SEEN #include <embree4/rtcore.h> #include <vector> #include "Lights.h" #include "Materials.h" #include "definitions.h" class CubeAndPlane : public Geometry { public: CubeAndPlane(const RTCScene& scene, const RTCDevice& device, ...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/Lights.h
#pragma once #ifndef FILE_LIGHTSSEEN #define FILE_LIGHTSSEEN /* Added for pathtracer */ #include "Materials.h" #include "definitions.h" // for very small cones treat as singular light, because float precision is not // good enough #define COS_ANGLE_MAX 0.99999988f enum class LightType { INFINITE_DIRECTIONAL_LIGHT, P...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/rkPathTracer.cpp
#ifdef _MSC_VER #ifndef NOMINMAX /* use the c++ library min and max instead of the MSVS macros */ /* rkcommon will define this macro upon CMake import */ #define NOMINMAX #endif #endif #define STB_IMAGE_WRITE_IMPLEMENTATION #include <stb/stb_image_write.h> /* Additions for pathtracer */ #include <chrono> #include <ma...
cpp
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/Sphere.h
#pragma once #ifndef FILE_SPHERE_SEEN #define FILE_SPHERE_SEEN #include <embree4/rtcore.h> #include <vector> #include "Geometry.h" #include "Materials.h" #include "definitions.h" class Sphere : public Geometry { public: Sphere(RTCScene scene, RTCDevice device, std::map<unsigned int, MatAndPrimColorTable...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/CornellBox.h
#pragma once #ifndef FILE_CORNELLBOX_SEEN #define FILE_CORNELLBOX_SEEN #include <embree4/rtcore.h> #include <vector> #include "Geometry.h" #include "Lights.h" #include "Materials.h" #include "definitions.h" class CornellBoxGeometry : public Geometry { public: CornellBoxGeometry( const RTCScene& scene, cons...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/SceneGraph.h
#pragma once #include <embree4/rtcore.h> #include "CornellBox.h" #include "DefaultCubeAndPlane.h" #include "Geometry.h" #include "Lights.h" #include "Pool.h" #include "RandomSampler.h" #include "Sphere.h" /* Added for geometry selection in pathtracer */ enum class SceneSelector { SHOW_CUBE_AND_PLANE, SHOW_CORNELL_BOX...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/PathTracer.h
#pragma once #ifndef FILE_PATHTRACERSEEN #define FILE_PATHTRACERSEEN #include <random> #include "Lights.h" #include "RandomSampler.h" #include "SceneGraph.h" #include "definitions.h" struct PathTracer { public: PathTracer(unsigned int max_path_length); PathTracer(unsigned int max_path_length, unsigned int widt...
h
oneAPI-samples
data/projects/oneAPI-samples/RenderingToolkit/Tutorial/PathTracingWithEmbree/cpu/src/Materials.h
#pragma once #ifndef FILE_MATERIALSSEEN #define FILE_MATERIALSSEEN #include "definitions.h" /* Added for pathtracer */ enum class MaterialType { MATERIAL_MATTE, MATERIAL_MIRROR, MATERIAL_GLASS, MATERIAL_WATER, MATERIAL_EMITTER }; /* Added for pathtracer */ struct Medium { /* Just using medium eta value ...
h
oneAPI-samples
data/projects/oneAPI-samples/common/dpc_common.hpp
// Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: MIT #ifndef _DP_HPP #define _DP_HPP #include <stdlib.h> #include <exception> #include <sycl/sycl.hpp> namespace dpc_common { // This exception handler will catch async exceptions static auto exception_handler = [](sycl::exception_list eList) { fo...
hpp
oneAPI-samples
data/projects/oneAPI-samples/common/stb/stb_image.h
/* stb_image - v2.25 - public domain image loader - http://nothings.org/stb no warranty implied; use at your own risk Do this: #define STB_IMAGE_IMPLEMENTATION before you include this file in *one* C or C++ file to create the implementation. // i.e. it should look like...
h
oneAPI-samples
data/projects/oneAPI-samples/common/stb/stb_image_write.h
/* stb_image_write - v1.14 - public domain - http://nothings.org/stb writes out PNG/BMP/TGA/JPEG/HDR images to C stdio - Sean Barrett 2010-2015 no warranty implied; use at your own risk Before #including, #define STB_IMAGE_WRITE_IMPLEMENTATION in the file that you...
h
oneAPI-samples
data/projects/oneAPI-samples/common/stb/stb.h
/* stb.h - v2.35 - Sean's Tool Box -- public domain -- http://nothings.org/stb.h no warranty is offered or implied; use this code at your own risk This is a single header file with a bunch of useful utilities for getting stuff done in C/C++. Documentation: http://nothings.org/stb/stb_h.html Unit...
h
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/compute_units/src/compute_units.cpp
#include <sycl/sycl.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include <iostream> #include "exception_handler.hpp" #include "compute_units.hpp" #include "pipe_utils.hpp" // Included from DirectProgramming/C++SYCL_FPGA/include/ using namespace sycl; constexpr float kTestData = 555; constexpr size_t kEngines...
cpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/compute_units/src/compute_units.hpp
#include <sycl/sycl.hpp> #include <utility> namespace { template <typename Func, template <std::size_t> typename Name, std::size_t Index> class SubmitOneComputeUnit { public: SubmitOneComputeUnit(Func &&f, sycl::queue &q) { q.single_task<Name<Index>>([=] { static_assert( std::is_invocab...
hpp
oneAPI-samples
data/projects/oneAPI-samples/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/simple_host_streaming/src/simple_host_streaming.cpp
#include <algorithm> #include <array> #include <chrono> #include <iomanip> #include <functional> #include <numeric> #include <queue> #include <random> #include <string> #include <type_traits> #include <utility> #include <sycl/sycl.hpp> #include <sycl/ext/intel/fpga_extensions.hpp> #include "exception_handler.hpp" #i...
cpp