sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
5adc38d1151183ef59b26ab96327e016ee0bf57883b05999c6efa804fcd7f773 | C | 127,316 | 3,489 | /*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* Yo... |
3a481c8e5dc35f739ff662480f0379865cc83eac9c9903833c7741afbf36d301 | C | 129,882 | 3,482 | /**
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of https://github.com/facebook/zstd.
*
* This program is free software; you can redistribute it and/or modify it unde... |
6630902a1531178aa42d7a843211706e5009cf0b8ad0ac49a160ee9ca170dc93 | C | 129,907 | 2,244 | /*
OpenGL loader generated by glad 0.1.34 on Mon Sep 28 11:17:18 2020.
Language/Generator: C/C++
Specification: gl
APIs: gl=4.3
Profile: compatibility
Extensions:
Loader: True
Local files: False
Omit khrplatform: False
Reproducible: False
Commandline:
--pr... |
9591d9811b4e59d1caca5aede3b9edb534fef2b41dfd9983415b1748a0e183b4 | C | 134,874 | 3,624 | /*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* Yo... |
cbbe1958a462a7705218132d83f8c3f1ead9982f3f67b16d6b0405e9156a870b | C | 136,714 | 4,826 | /*
Copyright (c) 2012-2019 Genome Research Ltd.
Author: James Bonfield <jkb@sanger.ac.uk>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this lis... |
daa1628b025e948cae22f2e0edf9d297d8c2e9bd5cbf09173b8a94d9881c6135 | C | 152,474 | 4,737 | /* sam.c -- SAM and BAM file I/O and manipulation.
Copyright (C) 2008-2010, 2012-2019 Genome Research Ltd.
Copyright (C) 2010, 2012, 2013 Broad Institute.
Author: Heng Li <lh3@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated docum... |
2c264ea6c803df659eed248249ca36a492010374509e1066654bca4e8d6704ac | C | 153,400 | 4,524 | /* vcf.c -- VCF/BCF API functions.
Copyright (C) 2012, 2013 Broad Institute.
Copyright (C) 2012-2019 Genome Research Ltd.
Portions copyright (C) 2014 Intel Corporation.
Author: Heng Li <lh3@sanger.ac.uk>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software an... |
04dd016baa823472830f52eab71732a8ca68c48947b5d7767c7074e335d014d3 | C | 155,461 | 4,014 | /*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* Yo... |
d15c1dbbb97a021f6e9105aacc149dfd69fb22698589c652964c27c643a6a61a | C | 165,214 | 4,124 | /*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* Yo... |
3997656e7e2c6326efd428e525a54edee6b57aa5d9a773d4deb2ab0e3d9dc328 | C | 165,282 | 2,981 | #ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "pcre_internal.h"
/* Unicode character database. */
/* This file was autogenerated by the MultiStage2.py script. */
/* Total size: 60384 bytes, block size: 128. */
/* The tables herein are needed only when UCP support is built */
/* into PCRE. This module shou... |
308c8f49b293485c64724d074c4140d62125df1b3dfeb34243bf31df7c90d1b6 | C | 178,842 | 4,074 | /*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* Yo... |
2e0132f0e58b1c267d3079bfb2ab880fb06b3ad26400e13b453828f41fe75d67 | C | 184,114 | 4,504 | /*
* Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
* Yo... |
6d26d0ec7fdba1bce0bd44a919ca48a921ddb85af3b41b444bff9ec991aade15 | C | 200,000 | 6,493 | /*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
... |
d1554bde636e9bd7d094f34af4de97fac14ce3f8dfd746813c67a38f9cc8d9a9 | C | 200,000 | 6,077 | /*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
... |
deb8f84cc574ca5a945ceb6cee215a07139b333dcad2ee16e74d14f50cf5a86d | C | 200,000 | 6,565 | /*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
... |
dfe3e9db2a5f901941529d80266cac0bb4f2cbfdf777656995b96d078765eb79 | C++ | 59 | 5 | #include <iostream>
int main() {
std::cout << "Ok";
}
|
81100f80980fa433ccb99ba0c093f57e85bc5ec45b0241c73e4b9becc1bc83f8 | C++ | 62 | 4 | #include <iostream>
int main() {
std::cout << "Ok";
}
|
38c5aa2435b140d4a5ef024a45630ba6acdf807fb6808e5b4781516497e5c409 | C++ | 96 | 7 | #include "caffe/layer.hpp"
namespace caffe {
INSTANTIATE_CLASS(Layer);
} // namespace caffe
|
3630c9bc1b7da5c7364efcb2f0cd5fca6ef3e843a9e68768f4e570e5e5933c89 | C++ | 117 | 6 | extern "C" void rust_function(char const *name);
int main(int argc, char **argv) {
rust_function("Cxx");
}
|
9af938b5c803d4a0d6330ea52af6533020d0021e4a910683b918d6ccaa9a147d | C++ | 117 | 6 | extern "C" void rust_function(char const *name);
int main(int argc, char **argv) {
rust_function("Cpp");
}
|
868907f37a29fff3a023dbeef87d5a0033986c5587816a3e7647eb49badea471 | C++ | 119 | 6 | extern "C" void rust_function();
extern "C" void cpp_function() {
// Fail on linking issues
rust_function();
} |
ba75ce9df97c0f62fb2df7f02228debda6db5197d4cae8176d1b3f055e554aa2 | C++ | 126 | 5 | #include <iostream>
extern "C" void cpp_function(char const *name) {
std::cout << "Hello, " << name << "! I'm Cpp!\n";
}
|
e976a9d0b854d0450013b105f64b2fd3faa407323cadc7b687735b80ad9a424a | C++ | 126 | 7 | //
// Created by Martin Steinegger on 6/21/20.
//
#include "MemoryTracker.h"
size_t MemoryTracker::totalMemorySizeInst = 0;
|
af7ebe0d8ebd21b1af2ae89cac32c51121ea475b4b5ae64285e7b15d0ac1b372 | C++ | 127 | 5 | #include <iostream>
extern "C" void cpp_function(char const *name) {
std::cout << "Hello, " << name << "! I am Cpp!\n";
}
|
8169e2faf3ea73106cbf2a108456a7ae73582be6941c06ddd9d2bee9fb455eaa | C++ | 130 | 6 | #include "gtest/gtest.h"
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
|
75964f11294618b8c83071c7029f20ddaf7291e743fe2dd872854e8b3861715c | C++ | 137 | 11 | #include <iostream>
#include <vector>
struct Foo {
int bar_;
};
int main() {
std::vector<Foo> values;
values.push_back(Foo());
}
|
60e78e5808037c2cb0635785fff8f614552ca270da2d7759fb02fd2b81ead158 | C++ | 142 | 7 | /*!
* Copyright 2022, by XGBoost Contributors
*/
#include "pseudo_huber.h"
namespace xgboost {
DMLC_REGISTER_PARAMETER(PesudoHuberParam);
}
|
dd9e5fe26d38f1b8686d7f570d60a9994ae9328b702b0f5175975c29e3ff3579 | C++ | 142 | 8 | extern "C" void rust_function1();
extern "C" void rust_function2();
int main() {
rust_function1();
rust_function2();
return 0;
}
|
afe24a2e55f4f91f2243d78ef6a4c1a1664207b23237f1fd939e9157fdf27799 | C++ | 175 | 6 | // pch.cpp : source file for generating the default precompiled header.
#include "stdafx.h"
// reference any additional headers you need in STDAFX.H
// and not in this file
|
ea23f7cdf74091d63bba29ef60486370b766157b848f0cfe62bd8b1c1695a0c1 | C++ | 180 | 6 | #include "my_application.h"
int main(int argc, char** argv) {
g_autoptr(MyApplication) app = my_application_new();
return g_application_run(G_APPLICATION(app), argc, argv);
}
|
4b33f324d578369860f0016a0f4773eaa7275d7ffd0ba9d55f500bb24808fb0f | C++ | 187 | 9 | extern "C" void rust_function(char const *name);
int main(int argc, char **argv) {
if (argc < 2) {
rust_function("Cpp");
} else {
rust_function(argv[1]);
}
}
|
1f31d5944ce76f8490ef45b91f259df3c90a0b1260f5c41795d8f6a69ca0a554 | C++ | 196 | 7 |
#include "stdafx.h"
#include "ahkversion.h"
LPSTR AHK_VERSION = RAW_AHK_VERSION;
LPTSTR T_AHK_VERSION = _T(RAW_AHK_VERSION);
LPTSTR T_AHK_NAME_VERSION = T_AHK_NAME _T(" v") _T(RAW_AHK_VERSION);
|
2eedee7dcd85efecc857f2112c8c2f43bab210eaedcbdf9dcf791990cafac877 | C++ | 202 | 10 | #include "yaml-cpp/null.h"
namespace YAML {
_Null Null;
bool IsNullString(const std::string& str) {
return str.empty() || str == "~" || str == "null" || str == "Null" ||
str == "NULL";
}
}
|
cdcae41d4992c474a0f69118ce4e45c308fd37098e22450c0bafefec6064d7ca | C++ | 207 | 8 | /*!
* Copyright 2019 XGBoost contributors
*/
// Dummy file to keep the CUDA conditional compile trick.
#if !defined(XGBOOST_USE_CUDA)
#include "multiclass_metric.cu"
#endif // !defined(XGBOOST_USE_CUDA)
|
2b5b12d5882242fefe8efae00d66f68ff0cce9c88451c1fde149a4c6f98e0a52 | C++ | 208 | 8 | /*!
* Copyright 2018 XGBoost contributors
*/
// Dummy file to keep the CUDA conditional compile trick.
#if !defined(XGBOOST_USE_CUDA)
#include "elementwise_metric.cu"
#endif // !defined(XGBOOST_USE_CUDA)
|
84c32a8e1b42913dc35e89d711d9693d062a02b6c4aac628ebc67333efd671f5 | C++ | 209 | 7 | #include "TestLib.h"
int main(int argc, char **argv) {
// Allow passing in a substring to search for in test names
char *filter = (argc == 2 ? argv[1] : NULL);
return test::runAllTests(filter);
}
|
8dcdd3adf5e9a185e625e2f6481b2fd1c6d3fd2eab67a3a3d9049d5061b7d158 | C++ | 212 | 10 | #include "Command.h"
#include "Debug.h"
#include "Util.h"
extern const char* version;
int versionstring(int, const char**, const Command&) {
Debug(Debug::INFO) << version << "\n";
EXIT(EXIT_SUCCESS);
}
|
18eaa6ef8a80e1a82905e6e7bbe137968d7ed347c57f9232371068708acedd66 | C++ | 228 | 8 | // Check that libraries located at a path containing a space can also be linked.
#include <iostream>
extern "C" void cpp_function3(char const *name) {
std::cout << "Hello, " << name << "! I am Cpp library Number 3!\n";
}
|
e1a027dbff294904bc7da4bfbd8f1bbc10ad814afe2d42983e9d80de9a7d86b4 | C++ | 228 | 16 | #include <iostream>
#include <cstdlib>
extern "C" unsigned int ret_12();
int main(int argc, char *argv[])
{
std::cout << "HI\n";
unsigned int a = ret_12();
if (a != 12) {
return -1;
}
return 0;
}
|
0bb56050fbf730c2e43f6e672fad1ff25eabca87d1536e15aef39fa96117c09d | C++ | 233 | 12 | #include "yaml-cpp/node/node.h"
#include "nodebuilder.h"
#include "nodeevents.h"
namespace YAML {
Node Clone(const Node& node) {
NodeEvents events(node);
NodeBuilder builder;
events.Emit(builder);
return builder.Root();
}
}
|
1f3ed367218d283ed5f4b409452168b19641522a618d300e1a286544d88c24c3 | C++ | 234 | 11 | #include <iostream>
#include <stdint.h>
extern "C" void cpp_function2(char const *name) {
std::cout << "Hello, " << name << "! I am Cpp library Number 2!\n";
}
extern "C" uint32_t get_42() {
uint32_t v = 42;
return v;
}
|
a29f091fd05892e09074d1ab21f6b334c863470bcc41c2cda4e9b1887c10c04f | C++ | 248 | 7 | // pch.cpp : source file for generating the MinSize.pch precompiled header.
// See the ApplyMinSizePCH target in AutoHotkey.vcxproj for details.
#include "stdafx.h"
// reference any additional headers you need in STDAFX.H
// and not in this file
|
a2aca65e4ff3a4d828b642a1fbdb3e06b754d8b41ef361b89dff85a22d779e69 | C++ | 281 | 8 | // stdafx.cpp : source file that includes just the standard includes
// wc.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
1864208fa8d3cd5748fc0187081b716f16ab1d951969415f229f9b5178613a6e | C++ | 282 | 16 | /*
* Copyright 2013-2023, Derrick Wood <dwood@cs.jhu.edu>
*
* This file is part of the Kraken 2 taxonomic sequence classification system.
*/
#include "compact_hash.h"
using std::string;
using std::ofstream;
using std::unordered_map;
namespace kraken2 {
} // end namespace
|
353d69dabf9683afeeb3b2dbd27f4c22546bc9955a40f5d21758b6e2c4a3b6e2 | C++ | 283 | 8 | // stdafx.cpp : source file that includes just the standard includes
// snap.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
131b64a91946140d8162870eb12f2a39bebd61a43f8b00c42e39eb9a94d302ca | C++ | 286 | 8 | // stdafx.cpp : source file that includes just the standard includes
// ToFASTQ.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
a36398e36b3146d05cca0c7fb3c9aa36d9a668d02e1ecc2bf305388a11db6756 | C++ | 286 | 8 | // stdafx.cpp : source file that includes just the standard includes
// SNAPLib.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
94b5361ea50539513d98fcf7741b35ef9410e3b391dd068d8b67f4d55502cb5f | C++ | 287 | 11 | #include <cxxbridge-cpp/foo/mod.h>
#include <cxxbridge-cpp/lib.h>
#include <vector>
int main(int argc, char **argv)
{
std::vector<uint64_t> input = { 4, 5, 6};
rust::Slice<const ::std::uint64_t> slice{input.data(), input.size()};
lib::print(slice);
foo::print(slice);
}
|
625c8ab38bf3318e9145be825321e7fc75fd81c33a04768727a5493c917caab1 | C++ | 290 | 8 | // stdafx.cpp : source file that includes just the standard includes
// SNAPCommand.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
2658bc3cea9ffed3fef5b7e4e5a27dd845831eb8d709dff9310f31a3e2cc5c0c | C++ | 294 | 8 | // stdafx.cpp : source file that includes just the standard includes
// libhdfs.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
|
0627a0c0fae5f79c16c50b43c352c8bb24f72185d955a79c5c539198fe40ff35 | C++ | 313 | 13 | #include "GLFWApp.h"
#include <pybind11/embed.h>
#include "Environment.h"
int main(int argc, char **argv)
{
pybind11::scoped_interpreter guard{};
MASS::Environment *env = new MASS::Environment(true);
MASS::GLFWApp app(argc, argv);
app.setEnv(env, argc, argv);
app.startLoop();
return 0;
} |
bd3af89642489565da37c3049e489dfb6fa3782f27e5eae2e6ae468e35450d55 | C++ | 314 | 11 | #include "SimpleMotion.h"
MASS::SimpleMotion::SimpleMotion() {}
std::vector<std::pair<int, double>> MASS::SimpleMotion::getPose(double ratio)
{
std::vector<std::pair<int, double>> tmp;
for (int i = 0; i < start.size(); i++)
tmp.emplace_back(idx[i], start[i] * (1.0 - ratio) + end[i] * ratio);
return tmp;
}
|
28a21aaf28ea2a695c439658869f82a6bf54034a3ac5cc74fd3f313026514263 | C++ | 325 | 18 | /*!
* Copyright 2018 XGBoost contributors
*/
// Dummy file to keep the CUDA conditional compile trick.
#include <dmlc/registry.h>
namespace xgboost {
namespace obj {
DMLC_REGISTRY_FILE_TAG(hinge_obj);
} // namespace obj
} // namespace xgboost
#ifndef XGBOOST_USE_CUDA
#include "hinge.cu"
#endif // XGBOOST_USE_... |
98a0cd11845272737743d266512a2796ebd72b5a540a09bb377c682299defb09 | C++ | 325 | 15 | #include "kraken2_headers.h"
#include "mmscanner.h"
using namespace std;
using namespace kraken2;
int main() {
string seq = "ACGATCGACGACG";
MinimizerScanner scanner(10, 5, 0);
scanner.LoadSequence(seq);
uint64_t *mmp;
while ((mmp = scanner.NextMinimizer()) != nullptr)
printf("%016x\n", *mmp);
return ... |
ed1440005df088855d121daf68d8f40764797f63a4f0604d4d6d0740549466de | C++ | 328 | 14 | //
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
#include <file_selector_windows/file_selector_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindow... |
bbcf0722bb32ca9ff0102f35d4b9aa256a392d7e3801bbc97597e71ba6a60b5e | C++ | 329 | 11 | /*!
* Copyright 2019-2020 by Contributors
* \file survival_metric.cc
* \brief Metrics for survival analysis
* \author Avinash Barnwal, Hyunsu Cho and Toby Hocking
*/
// Dummy file to keep the CUDA conditional compile trick.
#if !defined(XGBOOST_USE_CUDA)
#include "survival_metric.cu"
#endif // !defined(XGBOOST_U... |
bf7296121ea2ce018a0d932cece9ef2aa7c7b9fcdc926505e493005e533b5258 | C++ | 339 | 18 | /*!
* Copyright 2018 XGBoost contributors
*/
// Dummy file to keep the CUDA conditional compile trick.
#include <dmlc/registry.h>
namespace xgboost {
namespace obj {
DMLC_REGISTRY_FILE_TAG(multiclass_obj);
} // namespace obj
} // namespace xgboost
#ifndef XGBOOST_USE_CUDA
#include "multiclass_obj.cu"
#endif /... |
baae98d75ae15da6422941ab2e034aa77df5c7df6d88664d9af70fbc420a04f7 | C++ | 350 | 18 | /**
* Copyright 2023 by XGBoost Contributors
*/
// Dummy file to enable the CUDA conditional compile trick.
#include <dmlc/registry.h>
namespace xgboost {
namespace obj {
DMLC_REGISTRY_FILE_TAG(quantile_obj);
} // namespace obj
} // namespace xgboost
#ifndef XGBOOST_USE_CUDA
#include "quantile_obj.cu"
#endif ... |
ad9ef854404cb3788e5e6bee0e1fa4011dbc1b86088d276cb9d693cbd90ba4d4 | C++ | 363 | 15 | #include <iostream>
#include "cpplib.h"
#include "cxxbridge-cpp/lib.h"
#include "rust/cxx.h"
RsImage read_image(rust::Str path) {
std::cout << "read_image called" << std::endl;
std::cout << path << std::endl;
Rgba c = { 1.0, 2.0, 3.0, 4.0};
RsImage v = { 1, 1, c};
return v;
}
void write_image(::rus... |
e2f16c9d4c3a368fb947391b3c5fedbb1bf862dac2c788e0d827b6b1637f69b3 | C++ | 376 | 12 | #include "Command.h"
#include "Debug.h"
#include "Util.h"
#include "FileUtil.h"
#include "Parameters.h"
int diskspaceavail(int, const char**, const Command&) {
Parameters &par = Parameters::getInstance();
size_t diskLimit = FileUtil::getFreeSpace(FileUtil::dirName(par.db1).c_str());
Debug(Debug::INFO) << d... |
b65b107fab309be2546908cb2634a25363ae1c068321ab54dc125aa46c98cbf3 | C++ | 378 | 18 | /**
* Copyright 2018-2023, XGBoost Contributors
*/
#include <xgboost/objective.h>
#include <xgboost/context.h>
#include <limits>
#include "../helpers.h"
#include "test_hinge.h"
#include "../../../src/common/linalg_op.h"
namespace xgboost {
TEST(Objective, DeclareUnifiedTest(HingeObj)) {
Context ctx = MakeCUDACtx... |
3867e2ecb78be9dcbee863eeef433e34e776ce486c562ddb3d0e137482e53259 | C++ | 383 | 13 | extern "C" void rust_function(char const *name);
extern "C" void rust_second_function(char const *name);
extern "C" void rust_third_function(char const *name);
int main(int argc, char **argv) {
if (argc < 2) {
rust_function("Cpp");
rust_second_function("Cpp again");
rust_third_function("Cpp... |
df8f63e82eb9587f1d68624e2d6365f6194b1e0239968d42ecca789d514d7c7d | C++ | 399 | 12 | #include "Debug.h"
#include "DBReader.h"
#include "Parameters.h"
#include "Util.h"
#include "FileUtil.h"
int dbtype(int argc, const char **argv, const Command &command) {
Parameters &par = Parameters::getInstance();
par.parseParameters(argc, argv, command, false, 0, 0);
Debug(Debug::INFO) << Parameters::ge... |
f0c2840c13eb8e7601bdbcfaffa93a851d37a89837815a8c30f8bcb5814a1494 | C++ | 405 | 19 | #include "rust-lib.h"
#include <cassert>
int main(int argc, char **argv) {
assert(is_magic_number(MAGIC_NUMBER));
struct Point p1, p2;
p1.x = 54;
p2.x = 46;
p1.y = 34;
p2.y = 66;
add_point(&p1, &p2);
assert(p1.x == 100);
assert(p2.x == 46);
assert(p1.y == 100);
assert(p2.y =... |
3c76aad7be7ad66b4748de6f33f5a8e26993ff63cc82e8d2c5b9317de99fd35f | C++ | 406 | 13 | /**
* Copyright 2019-2024, XGBoost Contributors
*/
#include "array_interface.h"
#include "../common/common.h" // for AssertGPUSupport
namespace xgboost {
#if !defined(XGBOOST_USE_CUDA)
void ArrayInterfaceHandler::SyncCudaStream(int64_t) { common::AssertGPUSupport(); }
bool ArrayInterfaceHandler::IsCudaPtr(void con... |
8bff497af003df5c24f0d986cd081ff9f187662410e5f109bf0455a68180402b | C++ | 421 | 17 | #include "graphbuilderadapter.h"
#include "yaml-cpp/parser.h" // IWYU pragma: keep
namespace YAML {
class GraphBuilderInterface;
void* BuildGraphOfNextDocument(Parser& parser,
GraphBuilderInterface& graphBuilder) {
GraphBuilderAdapter eventHandler(graphBuilder);
if (parser.HandleN... |
ad1ffa12682ebb4b7e072c9d11989c1b16c019b37af55580090c092378db74b7 | C++ | 436 | 19 | #include "Concat.h"
#include <vector>
const char* binary_name = "test_merge";
int main(int argc, char **argv) {
std::vector<FILE*> files;
for(size_t i = 1; i <= argc; i++){
files.emplace_back(fopen(argv[i], "rb"));
}
FILE* outfile = fopen("/tmp/test_out","wb");
Concat::concatFiles(fil... |
cf105e8ce1d7b7a3103b1f0cfa9b4d4a4abf69c6c4aad0a549f2774e32f7dcb9 | C++ | 440 | 15 | //
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
#include <file_selector_linux/file_selector_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_p... |
439a36331fa43653d63ea3f0e6a22ab81f9bb4819a54e0ec1c37365a3e98e7e9 | C++ | 442 | 20 | /**
* Copyright 2024 by XGBoost contributors
*/
#include <gtest/gtest.h>
#include <xgboost/context.h>
#include "../helpers.h"
#include "test_quantile_obj.h"
namespace xgboost {
TEST(Objective, DeclareUnifiedTest(Quantile)) {
Context ctx = MakeCUDACtx(GPUIDX);
TestQuantile(&ctx);
}
TEST(Objective, DeclareUnifie... |
734d32eca87c966802c050690cf369a9f3a50f56546b69dec8215b036b0d5272 | C++ | 455 | 22 | #include "directives.h"
namespace YAML {
Directives::Directives() {
// version
version.isDefault = true;
version.major = 1;
version.minor = 2;
}
const std::string Directives::TranslateTagHandle(
const std::string& handle) const {
std::map<std::string, std::string>::const_iterator it = tags.find(handle);... |
e1e068d119696947a8ae63a4e09c45f40e33b5623295fd56903411181fe49376 | C++ | 457 | 21 | /*!
* Copyright 2019-2020 by Contributors
* \file aft_obj.cc
* \brief Definition of AFT loss for survival analysis.
* \author Avinash Barnwal, Hyunsu Cho and Toby Hocking
*/
// Dummy file to keep the CUDA conditional compile trick.
#include <dmlc/registry.h>
namespace xgboost {
namespace obj {
DMLC_REGISTRY_FIL... |
7e6d2e8511f11016ad61fe072464bcebf599879412173091a68f7c5285a91182 | C++ | 494 | 33 | /*++
Module Name:
Main.cpp
Abstract:
Just call into the command processor from SNAPLib
Authors:
Matei Zaharia & Bill Bolosky, February, 2012
Environment:
User mode service.
Revision History:
Adapted from cSNAP, which was in turn adapted from the scala prototype
--*/
#include "stdafx.h"
#i... |
e2d0a38cf50fb380956bfc4fea12a864900e9f0b217d32a558067d20fe5a4bc3 | C++ | 509 | 24 | #ifdef HAVE_MPI
#define VERSION_MPI_SUFFIX "-MPI"
#else
#define VERSION_MPI_SUFFIX ""
#endif
#ifdef MMSEQS_INT64_IDS
#define VERSION_INT64_SUFFIX "-64bit"
#else
#define VERSION_INT64_SUFFIX ""
#endif
#ifdef GIT_SHA1
#define str2(s) #s
#define str(s) str2(s)
const char *version = str(GIT_SHA1) VERSION_MPI_SUFFIX V... |
f0c2b4b1c1b3ea267714fb150dd30f37cd9f164a5d7a7020889ac619e730eaa6 | C++ | 521 | 14 | #include "Clustering.h"
#include "Parameters.h"
int clust(int argc, const char **argv, const Command& command) {
Parameters& par = Parameters::getInstance();
par.parseParameters(argc, argv, command, true, 0, 0);
Clustering clu(par.db1, par.db1Index, par.db2, par.db2Index,
par.db3, par.d... |
a536949fa18f1c39a82988165e01fec11ec60522eb2523433bfc3214dd7cd8d4 | C++ | 544 | 26 | #include "yaml-cpp/node/detail/memory.h"
#include "yaml-cpp/node/detail/node.h" // IWYU pragma: keep
#include "yaml-cpp/node/ptr.h"
namespace YAML {
namespace detail {
void memory_holder::merge(memory_holder& rhs) {
if (m_pMemory == rhs.m_pMemory)
return;
m_pMemory->merge(*rhs.m_pMemory);
rhs.m_pMemory = ... |
a527618b4aa3875e5db1243290a9b2730b1c5c78f9c64395fea97a5e15992be8 | C++ | 548 | 16 | #include "NcbiTaxonomy.h"
#include "Debug.h"
const char* binary_name = "test_taxonomy";
int main (int, const char**) {
NcbiTaxonomy t("/Users/mirdita/tmp/taxonomy/names.dmp",
"/Users/mirdita/tmp/taxonomy/nodes.dmp",
"/Users/mirdita/tmp/taxonomy/merged.dmp");
... |
b33a5fbbbade53be4922fdc827747010c75151a148f44e5db33dcfedcbe1d980 | C++ | 555 | 27 | /**
* Copyright 2025, XGBoost contributors
*/
#include "test_cat_container.h"
#include <gtest/gtest.h>
#include "../encoder/df_mock.h"
namespace xgboost {
using DfTest = enc::cpu_impl::DfTest;
auto eq_check = [](common::Span<bst_cat_t const> sorted_idx, std::vector<bst_cat_t> const& sol) {
ASSERT_EQ(sorted_idx... |
55c2594deca042bf4b00ece15d7580c5ef30e8097d9fbc6baa89819ec5761ea1 | C++ | 556 | 25 | #include "yaml-cpp/node/emit.h"
#include "yaml-cpp/emitfromevents.h"
#include "yaml-cpp/emitter.h"
#include "nodeevents.h"
namespace YAML {
Emitter& operator<<(Emitter& out, const Node& node) {
EmitFromEvents emitFromEvents(out);
NodeEvents events(node);
events.Emit(emitFromEvents);
return out;
}
std::ostream... |
cff28ccfc018067e76a729039fad798173d7e9870b7d4fff144e1c5e567ddc1b | C++ | 557 | 14 | /*!
* Copyright 2015 by Contributors.
* \brief Mininum DMLC library Amalgamation, used for easy plugin of dmlc lib.
* Normally this is not needed.
*/
#include "../dmlc-core/src/io/line_split.cc"
#include "../dmlc-core/src/io/recordio_split.cc"
#include "../dmlc-core/src/io/input_split_base.cc"
#include "../dmlc-co... |
5d5c118953982d6be8939168b946bd99960966c561fd62a3608a819f876e6c4a | C++ | 577 | 17 | // Copyright by Contributors
#include <xgboost/metric.h>
#include "../helpers.h"
namespace xgboost {
TEST(Metric, UnknownMetric) {
auto ctx = MakeCUDACtx(GPUIDX);
xgboost::Metric* metric = nullptr;
EXPECT_ANY_THROW(metric = xgboost::Metric::Create("unknown_name", &ctx));
EXPECT_NO_THROW(metric = xgboost::Metri... |
d2e31bfe06c69b04d049424c512151dc6dfb2dce819df7b306b561f209d7a8b9 | C++ | 595 | 20 | #include <string>
#include <iostream>
#include "TranslateNucl.h"
const char* binary_name = "test_translate";
int main (int, const char**) {
TranslateNucl * translateNucl = new TranslateNucl(TranslateNucl::CANONICAL);
// translateNucl->initConversionTable();
std::string nuclStr = "ATGGATGGTACGGTTATCACCATCA... |
3e8be4895dbba34d8da5f888e311a05383a34b8cf61728156e37d27bafd6009b | C++ | 628 | 26 | #include "linear_allocator.h"
namespace miic {
namespace utility {
namespace detail {
void* align(size_t alignment, size_t size, void*& ptr, size_t& space) {
void* r = nullptr;
if (size <= space) {
char* p1 = static_cast<char*>(ptr);
char* p2 = reinterpret_cast<char*>(
reinterpret_cast<size_t>(p1 ... |
8183967aa1a07945244b3ef3c7d7f048174cab47c725f5f71891425874e6074c | C++ | 646 | 27 | /*
* Copyright (c) 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
*/
#include "Erro... |
642ab0a4f0c18f3f668ebe8434cdd8b82664fae6f0b332b8760de1c8c63b2c69 | C++ | 654 | 24 | #include <iostream>
#include <cassert>
#include "ExpressionParser.h"
const char* binary_name = "test_tinyexpr";
int main (int, const char**) {
ExpressionParser expression("sqrt($11^2+$2^2)");
if (expression.isOk()) {
std::vector<int> indices = expression.findBindableIndices();
assert(indices[... |
ccd4d4a79e74a5808e49467e71e9fd338f55e75971d4c24d8fd436b72a287c88 | C++ | 657 | 28 | /*
* Copyright (c) 2016-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
*/
#include "util... |
07b962f4a5d5189497327a34c77f063f76191189c87697fc3fc990d21b226982 | C++ | 671 | 24 | /**
* Copyright 2023 by XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <xgboost/context.h> // Context
#include <xgboost/host_device_vector.h> // HostDeviceVector
#include "../../../src/common/optional_weight.h"
namespace xgboost {
namespace common {
TEST(OptionalWeight, Basic) {
HostDeviceV... |
ec7affcbb6350254cf95bcdc456d61b861a1e563e0c7be84d21531b809bc0b9d | C++ | 684 | 33 | /**
* Copyright 2024-2025, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include "../../../src/common/common.h"
namespace xgboost::common {
TEST(Common, HumanMemUnit) {
auto name = HumanMemUnit(1024 * 1024 * 1024ul);
ASSERT_EQ(name, "1GB");
name = HumanMemUnit(1024 * 1024ul);
ASSERT_EQ(name, "1MB");
n... |
b31a44a1d1f73f37b21c5105d29d6ef04d405a50f4a7374b8a1151654fb29200 | C++ | 687 | 21 | #include "Parameters.h"
#include "Util.h"
#include "Debug.h"
#include "DBReader.h"
#include "DBWriter.h"
#include "HeaderSummarizer.h"
#ifdef OPENMP
#include <omp.h>
#endif
int setextendeddbtype(int argc, const char **argv, const Command& command) {
Parameters& par = Parameters::getInstance();
par.parseParame... |
10c18f8ac53a12a7f317ae7abec2db8945754385c9e35b69176562d838d3cb82 | C++ | 717 | 22 | /**
* Copyright 2023-2024, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <xgboost/json.h> // for Json
#include "../../../../src/collective/comm_group.h"
#include "../../../../src/common/cuda_rt_utils.h" // for AllVisibleGPUs
#include "test_worker.h"
namespace xgboost::collective {
TEST(CommGroup, Fede... |
af829e4764f9f4365c9b029f2c2a99ede077650a1e7a293a8f0ecaef15347895 | C++ | 728 | 31 | /*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* rt_nonfinite.cpp
*
* Code generation for function 'multitaper_spectrogram_coder'
*
*/
#include "rt_nonfini... |
85aa1b6f730d6fb183912d9f5e732280b8474fab2c6ec7cf85b7f7eeaab5e9dd | C++ | 735 | 30 | #include "MMseqsMPI.h"
#include "Debug.h"
#include "Parameters.h"
bool MMseqsMPI::active = false;
int MMseqsMPI::rank = -1;
int MMseqsMPI::numProc = -1;
#ifdef HAVE_MPI
void MMseqsMPI::init(int argc, const char **argv) {
MPI_Init(&argc, const_cast<char ***>(&argv));
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
M... |
8187f638956d590b5b3f7647c7ef5f50cd9585c913a999837af76f0aee76a1d0 | C++ | 736 | 20 | /*
* Copyright 2011, Ben Langmead <langmea@cs.jhu.edu>
*
* This file is part of Bowtie 2.
*
* Bowtie 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your opt... |
f265daf678447b4dae28768d4372ab6fd4b4d2faa23a098c82d9d60ea2cbfedc | C++ | 750 | 45 | /*++
Module Name:
mapq.cpp
Abstract:
Support functions for mapping quality
Authors:
Bill Bolosky, December, 2012
Environment:
User mode service.
Revision History:
--*/
#include "stdafx.h"
#include "Compat.h"
#include "mapq.h"
const int maxMAPQ = 70;
static double mapqToProbabilityTable[ma... |
4e9c6ee09111bde1a11a7e89b96504fe62ae62c6d9e79e0ec6df6aa843601514 | C++ | 763 | 20 | /*
* Copyright 2011, Ben Langmead <langmea@cs.jhu.edu>
*
* This file is part of Bowtie 2.
*
* Bowtie 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your opt... |
c74f5913a56a725077daff5fcfb083eff90e27071c58b39e1306959a694f0284 | C++ | 772 | 20 | /*
* Copyright 2018, Chanhee Park <parkchanhee@gmail.com> and Daehwan Kim <infphilo@gmail.com>
*
* This file is part of HISAT 2.
*
* HISAT 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either versio... |
e0d69756e71858844cfcc579ceea9928c23c979f301c25e86d785a539db94bf6 | C++ | 788 | 37 | /*
* Academic License - for use in teaching, academic research, and meeting
* course requirements at degree granting institutions only. Not for
* government, commercial, or other organizational use.
*
* nextpow2.cpp
*
* Code generation for function 'nextpow2'
*
*/
/* Include files */
#include "nextpow2.h"
#i... |
a78bb84c810fcae20a735531cb57149439645d09548a581b87946f16fadd7b51 | C++ | 792 | 42 | /*++
Module Name:
exit.cpp
Abstract:
SNAP soft exit function
Authors:
Bill Bolosky, February, 2013
Environment:
User mode service.
Revision History:
--*/
#include "stdafx.h"
#include "exit.h"
#include "Error.h"
//
// This exists solely as a place to set a breakpoint when debugging SNAP. It... |
f7f3d132613250bf9106b311e6cc2d98b3dba4c543444fd5c18364025c760975 | C++ | 827 | 40 | #include "stdafx.h"
#include <math.h>
#include "ApproximateCounter.h"
using namespace std;
ApproximateCounter::ApproximateCounter()
{
buckets.resize(BUCKETS);
}
void ApproximateCounter::add(_uint64 value)
{
_uint64 h = hash(value);
unsigned bucket = (unsigned) h % BUCKETS;
unsigned rest = (unsigned)... |
f376eaa11dcb997aaf1be597197bdf570a55b0d0f772d70edc1c635a789f8635 | C++ | 837 | 32 | /*!
* Copyright 2018-2023 XGBoost contributors
*/
#include <gtest/gtest.h>
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wtautological-constant-compare"
#pragma GCC diagnostic ignored "-W#pragma-messages"
#include <xgboost/context.h>
#pragma GCC diagnostic pop
#include "../objective/test_multiclass_ob... |
a3bcf1e4da3b84aaea009ba7f86a522f0084f2033639b56a867a6e8917631fd4 | C++ | 842 | 27 | /**
* Copyright 2021-2023, XGBoost contributors
*/
#include <gtest/gtest.h>
#include "../../../src/data/adapter.h"
#include "../../../src/data/proxy_dmatrix.h"
#include "../helpers.h"
namespace xgboost::data {
TEST(ProxyDMatrix, HostData) {
DMatrixProxy proxy;
size_t constexpr kRows = 100, kCols = 10;
std::ve... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.