sha256
stringlengths
64
64
language
stringclasses
27 values
size
int32
1
491k
lines
int32
1
21.8k
content
stringlengths
1
200k
22efa078cf776587b89a7d04c4da6ecba07b9483ccb82eb009a2dd94cc932c87
C++
649
31
/** * Copyright 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the license found in the * LICENSE file in the root directory of this source tree. */ #include "alignment_train_cuda.h" #include "utils.h" namespace { void alignmentTrainCUDA( const torch::Tensor& p_c...
51ebd14803c0c22e50e141a529778a834b701cd97d01e74c10200ef6972a161f
C++
649
25
// // basic_resolver_query.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolink...
7786b009a682146cabfce0918cbb750fc812b498302ddcff5da9142e6cc9c455
C++
649
25
// // basic_resolver_entry.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolink...
d9cf0cddf34a83c5e203173a9ddc7742ad4773acacb8e92e60d9a72ebd99e625
C++
649
25
// // invocable_archetype.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinkin...
cba8248d99f34f2de107e3f075c29695e3ed2d2551b1d5c5091ed81e23c6f63a
C++
650
18
// boost process_cpu_clocks.cpp -----------------------------------------------------------// // Copyright 2009-2010 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // See http://www.boost.org/libs/chrono for documentation. //-...
193f8b417683cf086f8dfb1d6964c86366ec308121df3e126961d3255c09065b
C++
651
25
// // generic/basic_endpoint.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable auto...
cea2091b7807c7fa68a711d762bb37225f3e01a5e1fedf33fe6012e7ff6b7432
C++
651
25
// // rfc2818_verification.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolink...
439103e4984f3401e936c2a22bfda8e7f96c83b2454ae2a685ebeb12bd000ebf
C++
652
25
// // basic_seq_packet_socket.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable au...
63cd146ce80a426b76fe16f6d3292ac1f32481271e1edd63fc612025d986e5e6
C++
654
23
// // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail 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) // // Official repository: https://github.com/boostorg/beast // // Test that header ...
593770dd3ed76dde8ca8b2c28b50af7ff4151a1fe3c3ab05e712fe28dfaa060a
C++
656
25
// // basic_random_access_file.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable ...
5b01d8229a86dacd7b1b9c5c81aefc588cb886da99f0d69a9ebc897f6e7965e8
C++
659
24
/* Copyright (c) Marshall Clow 2010-2012. 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) For more information, see http://www.boost.org */ #include <vector> #include <boost/algorithm/searching/boyer_moor...
8577fc6a4ce9b5fdfeec7f6d11dc3962d04717a25e2589d9c8601ba7a73aebf2
C++
659
25
// // host_name_verification.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable auto...
abf47cfc7fce06da26513a6c49d32cf30644c4584b04172f41510c224d5b6d3a
C++
661
24
// run_timer_example.cpp ---------------------------------------------------// // Copyright Beman Dawes 2006, 2008 // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // See http://www.boost.org/libs/chrono for documentation. #include <boost/chrono/process...
ea5b10178103198c060e8cf06cfd9fb3dd6531ec08e06cca100d83417ecb6925
C++
661
25
// // basic_resolver_iterator.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable au...
460850c04a8d70ad33f41b1efd205b5e877ef1db15f6a40c84aa1fddabc765e7
C++
663
25
// // basic_overlapped_handle.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable au...
e10cdd743b5fcda8aa6cd6edcab6aa0dac04de8c01f52eef3dfc73ae707c2efd
C++
665
30
/*<- Copyright (c) 2016 Barrett Adair Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) ->*/ #include <boost/callable_traits/detail/config.hpp> #ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE int main(){} #else //[ add_transacti...
e24ff119b11557304e286f36d1743a6f1c63725c72fa36e53fcb5c4f1895911a
C++
665
28
// // cpp14/can_query_member.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // #include <boost...
915f5cdb584e9fe031d8ac6d894e0b3992dea0099f21ffd01f9f670657cdf8d8
C++
666
28
// // cpp03/can_require_concept_not_applicable_unsupported.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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 ...
3b67261d42b0ada7193ae03252aaea39cb1a773635ecdc5a31ef0773faf28831
C++
667
25
// // experimental/basic_channel.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disa...
9c7a53a677ca5b93db768e5bfee7fd0367e3556e13cd3a6ec64fadacd2b55de5
C++
667
25
// // basic_stream_descriptor.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable au...
9eb0b8a2110d0d54291310135b619de0daa0adfe608f53a73d18d07695b2699c
C++
667
16
#include "../src/common.h" #include "../src/inireader.h" #include <catch2/catch.hpp> using vec = std::vector<std::string>; TEST_CASE("strings are split correctly", "[string][basic]") { CHECK(lsl::splitandtrim(" ", ',', true) == vec{""}); CHECK(lsl::splitandtrim(" ", ',', false) == vec{}); CHECK(lsl::splitandtrim("...
7ad079e0ebe7aaaa55141145915cd8ec1c4ed9b820a438b96715465aaf3384ea
C++
671
25
// // experimental/channel_traits.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Di...
68d89d0d28bd24bad03f8fc23b5250c3da482e808bbde6e9903800091952eb16
C++
672
28
// // cpp14/can_require_concept_not_applicable_unsupported.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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 ...
956270eec81934e41d674004a99ef46c5db3af19c320a3d96107ede95a40f66c
C++
672
26
#include <Eigen/Core> USING_PART_OF_NAMESPACE_EIGEN using namespace std; template<typename Derived> Eigen::Block<Derived, 2, 2> topLeft2x2Corner(MatrixBase<Derived>& m) { return Eigen::Block<Derived, 2, 2>(m.derived(), 0, 0); } template<typename Derived> const Eigen::Block<Derived, 2, 2> topLeft2x2Corner(const Matr...
f148cf18dd467c829f065b3a8061c18e045cc9550a2326dee97a81bea5303f03
C++
672
25
// // associated_cancellation_slot.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // ...
a44d62b431093c1baaad2b8488182bf50715ef73faa401540db08b6483417cf6
C++
673
26
// // overlapped_handle.cpp // ~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinking fo...
cd2b4b4c1dd57e80ff14e2b1a45a60d020b8667b657c33bea8802c581476b97c
C++
673
27
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::VectorBlock<Derived, 2> firstTwo(MatrixBase<Derived>& v) { return Eigen::VectorBlock<Derived, 2>(v.derived(), 0); } template<typename Derived> const Eigen::VectorBlock<const Derived, 2> firstTwo(c...
19abd78d749136cd09af044a831ec13db7688af86ce603be1549785781adca27
C++
675
25
// // basic_random_access_handle.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disa...
543fd3fe7d3a0a83582dcfd5e99e121f4e438b7ee4894511fe7a30ce5ebd8b65
C++
675
27
// Check whether the version in CMakeLists.txt is up to date // // Copyright 2018 Peter Dimov // // 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 #include <boost/core/lightweight_test.hpp> #include <boost/versio...
9dd75f7f77e7f9ad03ff7bfcea68283a097eb4b1386217256cab7aeae7728af5
C++
675
28
#include <Eigen/Dense> #include <iostream> using namespace std; using namespace Eigen; int main() { VectorXf v(2); MatrixXf m(2,2), n(2,2); v << -1, 2; m << 1,-2, -3,4; cout << "v.squaredNorm() = " << v.squaredNorm() << endl; cout << "v.norm() = " << v.norm() << endl; cout << "v.lpN...
09ad46c2e9223dbb72d4ac34e34350b2e0ad5cb5b56c655df3490feaa371e62e
C++
676
22
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
8b2b2ac538c56b461cba231a66b582590f7f0383ee42d8261939fd5dd4c98e4c
C++
676
22
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
1b32a9269b9499c683153480a77667a4b23304263029b90082f7c1e7871ccd0e
C++
677
22
#include <Eigen/Dense> #include <iostream> using namespace Eigen; template <typename Derived1, typename Derived2> void copyUpperTriangularPart(MatrixBase<Derived1>& dst, const MatrixBase<Derived2>& src) { /* Note the 'template' keywords in the following line! */ dst.template triangularView<Upper>() = src.template...
7bd3dc835300bb0fd90c86fb18b784c0cfd0b58da848105ee1307bfa0503ca3b
C++
677
28
#include <string> #include <cstring> //#define _XOPEN_SOURCE 500 #include <ftw.h> #include <unistd.h> int removeFileOrDir(const char *fpath,const struct stat *sb, int typeflag, struct FTW *ftwbuf) { {//to avoid unused variable warning (void) sb; (void) ftwbuf; }; if (typeflag==FTW_F) {//f...
e10862a69fe69e203d6951776da2cfb50f63d14b0a4dbeac153e22899a532039
C++
677
28
// // cpp14/can_query_free.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // #include <boost/asi...
50ddb97934e117aefaac07f8027b2b0a7f49d3f08588f7f422992b5f099e9847
C++
678
38
// Unit test for boost::any. // // See http://www.boost.org for most recent version, including documentation. // // Copyright Antony Polukhin, 2013-2022. // // 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). ...
42ada778843308a140a1399b1717fed10f1865a01adddfe70aae8f1b35746a71
C++
680
22
#include <Eigen/Core> #include <iostream> using namespace Eigen; int main() { for (int size=1; size<=4; ++size) { MatrixXi m(size,size+1); // a (size)x(size+1)-matrix of int's for (int j=0; j<m.cols(); ++j) // loop over columns for (int i=0; i<m.rows(); ++i) // loop over rows m(i,j...
a138336062710a1c5aa8e65969ed2c57c558c1f407489316f5e455bb097e8dc7
C++
680
28
// // cpp14/can_query_static.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // #include <boost...
21c5743c9b6d76e485cfd07e736f95194964626db262c0f28c3cd4b16ce2d03c
C++
682
28
// // cpp11/can_require_concept_not_applicable_unsupported.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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 ...
87bd1b9a2f5d17ef912fd9c8f55580fae0f0849efd0a8449ad66457c6b912d66
C++
685
22
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
cf18491af11419ed8e74582c7a920474b1473a0c16940f9d7a23e3a3214897c3
C++
685
22
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
904aa21171dd35d1df8bc881702de9514ebf89ceb74510e9714b94027fc382d6
C++
687
23
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
d6c3a6cde6bd22908740c587c10fa72f7d0488127ffec296df923190f7246799
C++
692
31
/* Copyright Barrett Adair 2016-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #include <type_traits> #include <functional> #include <tuple> #include <boost/callable_traits.hpp> struct foo { void operator()() cons...
ef309f0434caf51f1c36b43e103f05d1dfc47512926b9b748d32c94ce9076202
C++
696
21
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
125c6eca3966c08ddccd8ba03003bed81ed0c7ed85eefc94df1be77051452f47
C++
697
27
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::Block<Derived, 2, 2> topLeft2x2Corner(MatrixBase<Derived>& m) { return Eigen::Block<Derived, 2, 2>(m.derived(), 0, 0); } template<typename Derived> const Eigen::Block<const Derived, 2, 2> topLeft2...
44e69a60e7643db548f2c7c1fdae2807d2b8409f206cd1fe80620ae6b42d5371
C++
697
32
/* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to 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) * */ /* * LOCATION: see http://www.boost.org for most recent versio...
b8dae333eaeda2aa0763dadefafbc43a6e62d44d503f66783fd29a7bee912643
C++
698
21
//---------------------------------------------------------------------------// // Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.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 // // See http://boostorg.gi...
0d6b53a4123d138010339cc8dd1945ed5cc9c2bc0b75f02d4fa32bafba585a91
C++
701
13
typedef Matrix3i MyMatrixType; MyMatrixType m = MyMatrixType::random(3, 3); cout << "Here's the matrix m:" << endl << m << endl; typedef Eigen::Eval<Eigen::Block<MyMatrixType,1,MyMatrixType::ColsAtCompileTime> >::MatrixType MyRowType; // now MyRowType is just the same typedef as RowVector3i MyRowType r = m.row(0); cout...
545e264401167663fc0d7b8cd5e583e68b67605bc7b797fc3561bbabbbdbfde8
C++
702
26
// // basic_serial_port.cpp // ~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com) // Copyright (c) 2008 Rep Invariant Systems, Inc. (info@repinvariant.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or c...
655b28709183996ea0322392003a2bf13f71f03026c4a2964756e54a6a40a1a8
C++
704
29
/*<- Copyright (c) 2016 Barrett Adair Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) ->*/ #include <boost/callable_traits/detail/config.hpp> #ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE int main(){} #else //[ remove_transa...
7caacde778172070b1b1c4d509b8ae2da21ad05cbe58f48727199dfd5a11a728
C++
706
42
#include "distance_marcher.h" #include "math.h" int main(void) { int size = 1500; int dim = 2; double dx[] = { 0.1, 0.1, 0.1 }; int shape[3]; shape[0]=size; shape[1]=size; shape[2]=size; int lsize =pow(size,dim); double *phi = new double[lsize]; double *distance = new double[lsize]; ...
72fdf4447362e2f9653e25c05ade0972eefb87b67e2c7f49a32cf2806350639c
C++
711
25
// // experimental/basic_concurrent_channel.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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/LICENS...
f789df183cc58b78751985466380c656308490a9036eb48a7ef79704c3d3f229
C++
711
25
#include "zstream.h" #include <math.h> #include <stdlib.h> #include <iomanip.h> void main() { char h[256] = "Hello"; char* g = "Goodbye"; ozstream out("temp.gz"); out < "This works well" < h < g; out.close(); izstream in("temp.gz"); // read it back char *x = read_string(in), *y = new char[...
672f4934deff5fd7628843b22ba4ed6a3b48d5127acedb5b9ad0b4628075821d
C++
712
23
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
b596c8c262ed4183ca1645fde084260d25ffde149f6b2aa5d4231eb5446d51f7
C++
712
26
#include <Eigen/Core> USING_PART_OF_NAMESPACE_EIGEN using namespace std; template<typename Derived> Eigen::Block<Derived> topLeftCorner(MatrixBase<Derived>& m, int rows, int cols) { return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols); } template<typename Derived> const Eigen::Block<Derived> topLeftCorner(co...
4fcd9c4b1f9ba96fcbd0bffdf4bbaddf3c7f18af01a4253e914933c1cb9d4722
C++
715
27
// // address_v6_range.cpp // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinking for ...
53691a4e3cd111c3428530aeee420071010e07b1fe4187b1276bd3700effce69
C++
715
22
#include <Eigen/Core> // import most common Eigen types USING_PART_OF_NAMESPACE_EIGEN int main(int, char *[]) { for (int size=1; size<=4; ++size) { MatrixXi m(size,size+1); // a (size)x(size+1)-matrix of int's for (int j=0; j<m.cols(); ++j) // loop over columns for (int i=0; i<m.rows(); +...
559b26bfaddf1478bde71c815fea7807fa0871c68db6901e71318021f4a2d322
C++
715
40
// // bind_ref_test.cpp - reference_wrapper // // Copyright (c) 2009 Peter Dimov // // 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 // #include <boost/bind/bind.hpp> #include <boost/ref.hpp> #include <boost/c...
7e68610296815a87d17b8f47f646cea5b3377d96ba7e02ab34dea63a1949d959
C++
715
27
// // address_v4_range.cpp // ~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinking for ...
92a02180ca33a47c0a73df4a6139a245893e826c118443011f6bb48d9705d762
C++
716
39
// Unit test for boost::any. // // See http://www.boost.org for most recent version, including documentation. // // Copyright Antony Polukhin, 2013-2022. // // 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). ...
cd0c805b9f167be98af87af3f38cbf82f6a501c92b1ccd49938f9770f20c2f72
C++
716
38
// // cpp03/can_query_unsupported.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // #incl...
ed8533a7f4e22c3d5cc93eb481c91646750ff7268533a4ffc21b8a66c4497ac7
C++
719
16
// These implementation files aren't needed with slimarchive shim #ifndef SLIMARCHIVE #include "libs/serialization/src/archive_exception.cpp" #include "libs/serialization/src/basic_archive.cpp" #include "libs/serialization/src/basic_iarchive.cpp" #include "libs/serialization/src/basic_iserializer.cpp" #include "libs/se...
85e5747bfeafa6fb110a7cd9f1c1c317260bcfdb00835afc3f6a942dc2af3ea7
C++
725
25
/* Copyright (c) Marshall Clow 2010-2012. 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) For more information, see http://www.boost.org */ #include <vector> #include <boost/cstdint.hpp> #include <boost/a...
cca89f969a2804f1c972e06f6af6008a666a72595e623f6a815c142bf2145c08
C++
725
21
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
9b47ac0e3a57e0cd1c97e0f0d31ae1551b59a69b0ad046c1867e7b7ed7f59004
C++
726
35
/* * * Copyright (c) 1998-2002 * John Maddock * * Use, modification and distribution are subject to 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) * */ /* * LOCATION: see http://www.boost.org for most recent versio...
195c316b5d7b7d496e5e628f9cfbae2a3b33bdb7ce3c65482508fa2e31495642
C++
727
27
/* Intel Copyright (C) .... */ #include "sparse_solver.h" #include <Eigen/PARDISOSupport> template<typename T> void test_pardiso_T() { PardisoLLT < SparseMatrix<T, RowMajor> > pardiso_llt; PardisoLDLT< SparseMatrix<T, RowMajor> > pardiso_ldlt; PardisoLU < SparseMatrix<T, RowMajor> > pardiso_lu; check_sp...
1e01a3075e7d630ea7c49e50e88902d68bb4a7f7b77de287f72a6eb9e28601b0
C++
727
27
// // address_v6_iterator.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinkin...
e4d72ebc4ad015a608ab5599217c0f064993ecc43f8181d658eb89f38729072b
C++
727
27
// // address_v4_iterator.cpp // ~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinkin...
406410d8114e4f3d7d5c75756a9c94fe05aba8f306f333b66a08a212eb461c16
C++
729
35
// // deferred_1.cpp // ~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // #include <boost/asio.hpp> #include <ios...
59a210df9c96bad487a26f002a0e12d4798a6768f000788b03f8686d9f5b17c5
C++
730
22
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
e5e9e10fed8ccf7ff12cafeaa64dd14b9a443821ba93ad0696802b56db32caea
C++
732
16
typedef Matrix<double, 5, 3> Matrix5x3; typedef Matrix<double, 5, 5> Matrix5x5; Matrix5x3 m = Matrix5x3::Random(); cout << "Here is the matrix m:" << endl << m << endl; Eigen::FullPivLU<Matrix5x3> lu(m); cout << "Here is, up to permutations, its LU decomposition matrix:" << endl << lu.matrixLU() << endl; cout << "...
cdb279c82ca5eb9d782892f58731e1c948c88f986ce3a0ad6a6fd687a098a1c3
C++
734
22
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
8e304e76b1b7559c2b8c0bb4566540893f6962a636df0a1e76bcde0c8e503082
C++
737
38
// // cpp11/can_query_unsupported.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // #incl...
ecd19b69c61e0a8a508ddc7a9278245e4d0696f0fd21776208e7980369a5a1f7
C++
737
27
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::Block<Derived> topLeftCorner(MatrixBase<Derived>& m, int rows, int cols) { return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols); } template<typename Derived> const Eigen::Block<const Derive...
282f84118b5ef81777417e30047d7e608574687c49a8e23be01a0350325cc343
C++
740
23
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
55488425a7f78fd92ea5b366be8f9c0b4c5c533bc68b97163fca8ce7036a7e5e
C++
742
32
#include "ClipMate.h" #include "Parameters.h" #include "SequenceFuns.h" void ClipMate::initialize(uint32 Nin, const string &adSeqIn, uint32 NafterAdin, double adMMpIn) { N=Nin; adSeq=adSeqIn; if (adSeq=="-") { adSeq=""; } else { if ( adSeq=="polyA") { adSeqNum.clear(); //it...
1788f5cfe10127c8383d8349378dc93075bcbc32f7a0c31fabcd4213dd19fef0
C++
743
23
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
da224abb4366554d2663405ac2631da7a2d9dae7abca4357f57c93d066a4dc78
C++
750
22
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
7b88ecf60a89548a88ba34d586c1ba380b0e13b2f0f8a045018286cd1d578ec4
C++
751
40
// // connection_manager.cpp // ~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // #include "connection_ma...
306138f04fab1cb29641b1c4099363f6ff8281adc260b8a31313083ea1a6ba39
C++
755
22
// Copyright Vladimir Prus 2004. // 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) #include <boost/config.hpp> #ifdef BOOST_NO_STD_WSTREAMBUF #error "wide char i/o not supported on this platform" #endif // inclu...
d9e134a247987cf9bf424781f99abf280f9a492bc23cb22f76d1e4b80bf3ae08
C++
756
21
#include <lsl_cpp.h> #include <vector> /** * This is a minimal example that demonstrates how a multi-channel stream (here 128ch) of a particular name (here: SimpleStream) can be * resolved into an inlet, and how the raw sample data & time stamps are pulled from the inlet. This example does not display the obtained ...
4ae2ba5c0a16daab7b93a45716cb8deaac5314d50f24e92711771eed402ae0fe
C++
758
39
// Unit test for boost::any. // // See http://www.boost.org for most recent version, including documentation. // // Copyright Antony Polukhin, 2013-2019. // Copyright Ruslan Arutyunyan, 2019-2021. // // Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or cop...
f4a367e9aeb8c6b2598d4f9253b2b9e8d138b0435bec2655ccf31fdcf94e5387
C++
758
37
// // placeholder_const_ref_test.cpp - forming a const& to _1 // // Copyright 2015 Peter Dimov // // 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 // #include <boost/bind/placeholders.hpp> #include <boost/is_p...
07ec003b7a5c14d4e927bcc8cdddb6e36ed42fe02d2c691df2a7c72aa66c8eb4
C++
761
27
// Copyright 2015 Vicente J. Botet Escriba // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // See http://www.boost.org/libs/chrono for documentation. //#define BOOST_CHRONO_VERSION 1 #define BOOST_CHRONO_VERSION 2 #include <iostream> #include <boost/rationa...
4821f8aefe28f024cd2fdd886be153e2f26146adb483368b3746741a934bc52d
C++
761
30
// // net.cpp // ~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinking for unit tests. #if !defined(B...
be0fa075a11213a33adecc5347dd041d72db4bb234b9e1c36f9619cbe714b69b
C++
762
38
// // Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail 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) // // Official repository: https://github.com/boostorg/beast // // Test that header ...
c9fef557b907ec094490e2f4e2cb6179367c7f72f886a06559cccc3746b3e134
C++
762
28
#include <Eigen/Core> USING_PART_OF_NAMESPACE_EIGEN using namespace std; template<typename Derived> const Eigen::Eval<Eigen::Transpose<Derived> > evaluatedTranspose(const MatrixBase<Derived>& m) { return m.transpose().eval(); } int main(int, char**) { Matrix2f M = Matrix2f::random(); Matrix2f m; m = M; cout...
fda3b149adc0611508d633ad9c17f8bc56d1c70d84266767f148b072fa98a0f7
C++
769
30
// // timer.cpp // ~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinking for unit tests. #if !defin...
7c5054b8c9bcbdef690797c2078a0660dd04453aa69b7a821e6c4d00eb10ad3d
C++
773
30
// // socket.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinking for unit tests. #if !def...
f627072d189f80e34dd3770e3be92f9377b53efab5854a8c3dffddd4bb05de21
C++
773
30
// // buffer.cpp // ~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinking for unit tests. #if !def...
d179e3471b48dbfb4e93c476be02c8591d66d791261563bb13f5f6302bcaa12e
C++
775
27
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::VectorBlock<Derived> segmentFromRange(MatrixBase<Derived>& v, int start, int end) { return Eigen::VectorBlock<Derived>(v.derived(), start, end-start); } template<typename Derived> const Eigen::Vec...
f1069e901b16036869026c151bf7efeaa65a8557988734526575fabfbd591bef
C++
775
39
// // cpp11/can_query_member.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // #include <boost...
02b2f73830668d5b97a49bada3f841695a58b3086fbc0f5589517afd3c7a1a8a
C++
776
36
// g++ -O3 -DNDEBUG -DMATSIZE=<x> benchmark.cpp -o benchmark && time ./benchmark #include <Eigen/Array> #ifndef MATSIZE #define MATSIZE 3 #endif using namespace std; USING_PART_OF_NAMESPACE_EIGEN #ifndef REPEAT #define REPEAT 40000000 #endif #ifndef SCALAR #define SCALAR double #endif int main(int argc, char *argv...
163c1f19f30192577f87d2441687d292f29226fbe8b28296093eb02b5884eb03
C++
777
54
#include "scalar.h" #include "scanner.h" #include "token.h" #include "exceptions.h" #include "node.h" #include "emitter.h" namespace YAML { Scalar::Scalar() { } Scalar::Scalar(const std::string& data): m_data(data) { } Scalar::~Scalar() { } Content *Scalar::Clone() const { return new Scalar(m_data); }...
3eb43e71e7741682609a2b175596ec267f7d1326391261bcee9a8860bb40b469
C++
781
30
// // executor.cpp // ~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinking for unit tests. #if ...
7ec7d20436e5e4c08841d6e2be009c6d9383696b76ccb624c37ca5f5d85f8e7b
C++
781
30
// // internet.cpp // ~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // // Disable autolinking for unit tests. #if ...
44f3755dd0d101620fe75adc55004fb625d48bab0700755f412afd999f21d346
C++
782
23
//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------...
66d735e161a4edde398333c16a4bd26189792c16e653163e895f4b2c7b3d3324
C++
784
40
// Unit test for boost::any. // // See http://www.boost.org for most recent version, including documentation. // // Copyright Antony Polukhin, 2013-2019. // Copyright Ruslan Arutyunyan, 2019-2021. // // Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or cop...
7be36eb37571fca4b2918ec5d2189b7849a376e073eca6f98ca1507d0c958d19
C++
786
31
// error_code stub implementation, for compatibility only // Copyright Beman Dawes 2002, 2006 // Copyright Peter Dimov 2018 // 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) // See library home page at http:/...
a60069b0063e678c2fdfde8281b8a6ceb98ca716d3c4bb3228250458d6a33b3e
C++
787
39
// // cpp11/can_query_free.cpp // ~~~~~~~~~~~~~~~~~~~~~~~~ // // Copyright (c) 2003-2022 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) // #include <boost/asi...