sha256 stringlengths 64 64 | language stringclasses 27
values | size int32 1 491k | lines int32 1 21.8k | content stringlengths 1 200k |
|---|---|---|---|---|
cf15b3b54255c28eca971b411a812965ce63bcb5c28de2117e459d2552ae5767 | C++ | 865 | 30 | /**
* Copyright 2023 by XGBoost contributors
*/
#include <gtest/gtest.h>
#include "../../../src/common/quantile_loss_utils.h"
#include "xgboost/base.h" // Args
namespace xgboost {
namespace common {
TEST(QuantileLossParam, Basic) {
QuantileLossParam param;
auto& ref = param.quantile_alpha.Get();
param.Updat... |
07165c31bbaa8baa79278e1d4d4ebf3b5677f57a36cf6d03a60ed6de48e66635 | C++ | 867 | 29 | /**
* Copyright 2023 by XGBoost contributors
*/
#include <gtest/gtest.h>
#include <xgboost/context.h> // for Context
#include <xgboost/task.h> // for ObjInfo
#include <xgboost/tree_updater.h> // for TreeUpdater
#include <memory> // for unique_ptr
#include "../helpers.h"
namespace xgboost {
TEST(Up... |
33464f24603589b2fb8456245b97003c015e5dde2b0f2cfc883b890acdfd3354 | C++ | 875 | 35 | /**
* Copyright 2021-2023 by XGBoost contributors
*/
#include <gtest/gtest.h>
#include "test_prediction_cache.h"
namespace xgboost {
TEST_F(TestPredictionCache, Approx) {
Context ctx;
this->RunTest(&ctx, "grow_histmaker", "one_output_per_tree");
}
TEST_F(TestPredictionCache, Hist) {
Context ctx;
this->RunT... |
d1dfd89daf9456246a9f8def33ae0feac8e7821e005b63aca0479ac2c6e900e1 | C++ | 877 | 34 | #include "Debug.h"
#include <iostream>
int Debug::debugLevel = Debug::INFO;
void Debug::setDebugLevel (int i) {
debugLevel = i;
}
Debug::~Debug(){
if (level <= ERROR && level <= debugLevel){
std::cout << std::flush;
if(interactive){
std::cerr << "\033[" << Color::FG_RED << "m"... |
2fec2cecd2aaf41913e389a9b389902495a5af9e9f60f806be752e1dea38910a | C++ | 887 | 56 | /*++
Module Name:
Seed.cpp
Abstract:
Code to handle seeds in the SNAP sequencer.
Authors:
Bill Bolosky, August, 2011
Environment:
User mode service.
Revision History:
Adapted from Matei Zaharia's Scala implementation.
--*/
#include "stdafx.h"
#include "Seed.h"
bool
Seed::DoesTextRep... |
9720fdaf5e6da5f2aa6a5df6ca1913d58f810e6c1ec726bba151b15cc087f032 | C++ | 903 | 32 | /*
* 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.
*
* multitaper_spectrogram_coder_mexutil.cpp
*
* Code generation for function 'multitaper_spectrogram_coder_mexut... |
bdf5fdb952ace9e6f71984ffb8c5488b12e8502537c6d63c9a8d565eabb9a424 | C++ | 940 | 32 | #include "Timer.h"
#include <sstream>
std::string Timer::lapProgress() {
struct timeval end;
gettimeofday(&end, NULL);
std::ostringstream ss;
double timediff = (end.tv_sec - start.tv_sec) + 1e-6 * (end.tv_usec - start.tv_usec);
time_t sec = (time_t)timediff;
time_t msec = (time_t)((timediff - ... |
70aecefb1dc42cc52c7cb9da7a67d7cb33bb35623686e5c1fcac97d1c7000912 | C++ | 957 | 35 | /**
* Copyright 2023-2024, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <memory> // for make_unique
#include <string> // for string
#include "../../../../src/collective/tracker.h" // for GetHostAddress
#include "federated_tracker.h"
#include "xgboost/json.h" // for Json
namespace xgboost::collecti... |
3caeeac28eb67b54cf16741a5943ad68a46c31a162b14ab139a1d822c4eede86 | C++ | 962 | 30 | /*
* 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 "Skip... |
468df52c07f7a94c0d03bec0cdb788b4c7cf99e4960b37bf7c21e085e0d4af05 | C++ | 971 | 46 | /*
* 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.
*
* issorted.cpp
*
* Code generation for function 'issorted'
*
*/
/* Include files */
#include "issorted.h"
#i... |
26df8d8d9111743ab8c857a617e6c82558462c158d547678764db611ec1e31e0 | C++ | 976 | 28 | /*
* Copyright 2013-2023, Derrick Wood <dwood@cs.jhu.edu>
*
* This file is part of the Kraken 2 taxonomic sequence classification system.
*/
#ifndef _OPENMP
#warning "OpenMP not found, multi-threading will be DISABLED!"
#warning "To fix this, please make sure your GCC installation uses OpenMP."
// This file defi... |
0c568c8a615f87daff25bbb09271ad53cc787fae1ab3e2f1c65b6e01f1e213c3 | C++ | 979 | 33 | /*
* 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... |
6963ea005a0173cbd9eea2c9004fec6f56412bdfb1642d322e06571fcc4bfe79 | C++ | 999 | 27 | #include "Debug.h"
#include "Parameters.h"
#include "FileUtil.h"
#include "MappingReader.h"
int createbintaxmapping(int argc, const char **argv, const Command &command) {
Parameters &par = Parameters::getInstance();
par.parseParameters(argc, argv, command, true, 0, 0);
MappingReader reader(par.db1, false);... |
a10943e4d19838cf133acd2918b0d22112c59986e369818b8fd18d6fe9664e73 | C++ | 1,001 | 45 | /**
* Copyright 2024 by XGBoost Contributors
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-W#pragma-messages"
#include "../objective/test_lambdarank_obj.h"
#pragma GCC diagnostic pop
#include <gtest/gtest.h>
#include "xgboost/context.h"
namespace xgboost::obj {
TEST(SyclObjective, LambdaRankNDCGJ... |
b7be585ee99627eeb77eca1b6a6b4f5c2ecda21b487ca81d09a73f721ad33c4c | C++ | 1,004 | 32 | /*
* Bshouty Lung Model - Pulmonary Circulation Simulation
* Copyright (c) 1989-2014 Zoheir Bshouty, MD, PhD, FRCPC
* Copyright (c) 2011-2014 Adam Majer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* ... |
8bcc6eee446fa8a28cac5fad6ce80fed4131fc1e5782a337e4a93083f4a6f215 | C++ | 1,021 | 45 | #include "regex_yaml.h"
namespace YAML {
// constructors
RegEx::RegEx() : m_op(REGEX_EMPTY) {}
RegEx::RegEx(REGEX_OP op) : m_op(op) {}
RegEx::RegEx(char ch) : m_op(REGEX_MATCH), m_a(ch) {}
RegEx::RegEx(char a, char z) : m_op(REGEX_RANGE), m_a(a), m_z(z) {}
RegEx::RegEx(const std::string& str, REGEX_OP op) : m_op(o... |
0bf13b685a81b82943a93fed279c0287edd075b6f8fc8fa68c7abad19ee6cd31 | C++ | 1,023 | 39 | /*!
* Copyright 2015-2022 by XGBoost Contributors
* \file gbm.cc
* \brief Registry of gradient boosters.
*/
#include "xgboost/gbm.h"
#include <dmlc/registry.h>
#include <memory>
#include <string>
#include <vector>
#include "xgboost/context.h"
#include "xgboost/learner.h"
namespace dmlc {
DMLC_REGISTRY_ENABLE(::... |
b028b60a0ff995848d19aac59a5a966ee6452d8e6f2808487b3e9a5013cc15a3 | C++ | 1,024 | 36 | #include <iostream>
#include "yaml-cpp/emitterstyle.h"
#include "yaml-cpp/eventhandler.h"
#include "yaml-cpp/yaml.h" // IWYU pragma: keep
class NullEventHandler : public YAML::EventHandler {
public:
typedef YAML::Mark Mark;
typedef YAML::anchor_t anchor_t;
NullEventHandler() {}
virtual void OnDocumentStar... |
e427fe3d09f584d8117a3355ffb60a18428970981c1a99999096108e2cd61f09 | C++ | 1,031 | 25 | #include "Debug.h"
#include "DBReader.h"
const char* binary_name = "test_dbreaderindexserialization";
int main (int, const char**) {
DBReader<DBKeyType> reader("", "/Users/mirdita/tmp/db.index", 1, DBReader<DBKeyType>::USE_INDEX);
reader.open(DBReader<DBKeyType>::NOSORT);
Debug(Debug::INFO) << reader.get... |
2dc8a4a959895236740e3ce66e2355f6556d7c8f2e5bf83108c44b981c59d45e | C++ | 1,033 | 29 | /**
* Copyright 2016-2023, XGBoost Contributors
*/
#include "test_rank_metric.h"
#include <gtest/gtest.h> // for Test, EXPECT_NEAR, ASSERT_STREQ
#include <xgboost/context.h> // for Context
#include <xgboost/metric.h> // for Metric
#include <memory> // for unique_ptr
#include "../helpers.h" // for GetMe... |
d060c06835c5d18cf2ba279a47d192f344abb9a10c5ece40207ce46fec4c8b38 | C++ | 1,052 | 32 | /*
* 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.
*
* eml_int_forloop_overflow_check.cpp
*
* Code generation for function 'eml_int_forloop_overflow_check'
*
*/
... |
414d1d06bf8d04d73ef43ab388f72f993a35475b04fc731d2c135fa2c28c4f18 | C++ | 1,054 | 32 | #include "Util.h"
#include <iostream>
#include <chrono>
const char* binary_name = "test_counting";
//u_int64_t revcomp64_v2 (const u_int64_t& x, size_t sizeKmer)
//{
// u_int64_t res = x;
//
// res = ((res>> 2 & 0x3333333333333333) | (res & 0x3333333333333333) << 2);
// res = ((res>> 4 & 0x0F0F0F0F0F0F0F0F... |
b46d8dffc89d90e867c9865d51668a11cc35368df57215b943efe999cb630dec | C++ | 1,054 | 31 | #include "yaml-cpp/exceptions.h"
// This is here for compatibility with older versions of Visual Studio
// which don't support noexcept
#ifdef _MSC_VER
#define YAML_CPP_NOEXCEPT _NOEXCEPT
#else
#define YAML_CPP_NOEXCEPT noexcept
#endif
namespace YAML {
// These destructors are defined out-of-line so the vtab... |
e4a2a35042b4fae0647f10d9e310ecd135220008ed31b8f078dbf8fed1436d58 | C++ | 1,075 | 37 | // dear imgui: "null" example application
// (compile and link imgui, create context, run headless with NO INPUTS, NO GRAPHICS OUTPUT)
// This is useful to test building, but you cannot interact with anything here!
#include "imgui.h"
#include <stdio.h>
int main(int, char**)
{
IMGUI_CHECKVERSION();
ImGui::Creat... |
f7f5384922023dbe4e40264534fd3acf27004aff66b9d3969de65561e01e9e5e | C++ | 1,076 | 37 | #include "Rcpp.h"
#include <vector>
// Function that performs the matrix normalization.
// [[Rcpp::export]]
Rcpp::NumericMatrix normalize_input_cpp(Rcpp::NumericMatrix input) {
// Rows are observations, columns are variables.
Rcpp::NumericMatrix output=Rcpp::clone(input);
const int N=output.nrow(), D=outpu... |
07a6ea4f57dd6c1060f6e054c377b774e37896e78d31dee698962d79cdfcc4e8 | C++ | 1,083 | 53 | /*++
Module Name:
Read.cpp
Abstract:
Read class for the SNAP sequencer
Authors:
Bill Bolosky, May, 2012
Environment:
User mode service.
Revision History:
--*/
#include "stdafx.h"
#include "Read.h"
#include "SAM.h"
#include "Error.h"
bool
isAValidAlignmentResult(
AlignmentResult result)
{
... |
4f98129547cf6ff12010bb2b5b8ca34d41d605c1a8dea546de5943c942209a27 | C++ | 1,087 | 40 | #include <string>
#include <iostream>
#include <cassert>
#include "Debug.h"
#include "Util.h"
const char* binary_name = "test_util";
int main (int, const char**) {
assert(SSTR((unsigned int)1) == "1");
assert(SSTR((int)1) == "1");
assert(SSTR((unsigned long long int)1) == "1");
assert(SSTR((long long... |
e252afb5354367c51d69ebe17080775da11573ab2d457072d9afa94931167da8 | C++ | 1,094 | 38 | #include "caffe/caffe.hpp"
#include "caffe/test/test_caffe_main.hpp"
namespace caffe {
#ifndef CPU_ONLY
cudaDeviceProp CAFFE_TEST_CUDA_PROP;
#endif
}
#ifndef CPU_ONLY
using caffe::CAFFE_TEST_CUDA_PROP;
#endif
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
caffe::GlobalInit(&argc, &ar... |
88f41fd94b63706fbb5caadf38b8bb2b80d85963d64826e8b951162553e2a894 | C++ | 1,098 | 44 | #include "Indexer.h"
#include "Debug.h"
Indexer::Indexer(const size_t alphabetSize, const int maxKmerSize){
this->maxKmerSize = maxKmerSize;
this->powers = new size_t[maxKmerSize];
this->alphabetSize = alphabetSize;
size_t pow = 1;
for( int i=0; i<maxKmerSize; ++i ){
this->powers[i] = pow;
... |
44a024d7d7655ecb761ae601d146c6e5477f9b753f20fd01415a620c2482776b | C++ | 1,101 | 38 | //
// Created by mad on 10/26/15.
//
#include <iostream>
#include "SubstitutionMatrix.h"
#include "Sequence.h"
#include "Parameters.h"
const char* binary_name = "test_kmerscore";
DEFAULT_PARAMETER_SINGLETON_INIT
int main (int, const char**) {
const size_t kmer_size = 6;
Parameters& par = Parameters::getInst... |
fb94c98d1f97f0f3b75fbd736a7a5fc3f2e043faa796c3beb99693e294491b0c | C++ | 1,114 | 34 | /**
* Copyright 2024, XGBoost Contributors
*/
#include "validation.h"
#include "../common/error_msg.h" // for InconsistentFeatureTypes
#if !defined(XGBOOST_USE_CUDA)
#include "../common/common.h" // for AssertGPUSupport
#endif // !defined(XGBOOST_USE_CUDA)
namespace xgboost::data {
void CheckFeatureTypes(Host... |
1ce3e649bf7e8f793a374a335d6e98603d76a08e34c5db698ebf378fd760d0a9 | C++ | 1,122 | 38 | /**
* Copyright 2015-2023 by XGBoost Contributors
* \file tree_updater.cc
* \brief Registry of tree updaters.
*/
#include "xgboost/tree_updater.h"
#include <dmlc/registry.h>
#include <string> // for string
namespace dmlc {
DMLC_REGISTRY_ENABLE(::xgboost::TreeUpdaterReg);
} // namespace dmlc
namespace xgboost ... |
bc99349401fb3cc86bbbede465670257fdca0b71d64898b396762b4f237d36a7 | C++ | 1,124 | 49 | /*
* 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.
*
* trisolve.cpp
*
* Code generation for function 'trisolve'
*
*/
/* Include files */
#include "trisolve.h"
#i... |
bf35f2384a108c3f582375ad5b062651c912a6cd4d1ecb8f4ee3f6548cffb7bd | C++ | 1,127 | 28 | #include "ExtendedSubstitutionMatrix.h"
#include "SubstitutionMatrix.h"
#include "ScoreMatrix.h"
#include "Parameters.h"
#include "Debug.h"
const char* binary_name = "test_scorematrixserialization";
DEFAULT_PARAMETER_SINGLETON_INIT
int main (int, const char**) {
Parameters& par = Parameters::getInstance();
pa... |
d80baaa80ab13846663d17e8b93eb025d967dd9cc028b8280b0c852be8a47377 | C++ | 1,143 | 49 | #include <cassert>
#include <stdexcept>
#include "directives.h" // IWYU pragma: keep
#include "tag.h"
#include "token.h"
namespace YAML {
Tag::Tag(const Token& token) : type(static_cast<TYPE>(token.data)) {
switch (type) {
case VERBATIM:
value = token.value;
break;
case PRIMARY_HANDLE:
va... |
16132e7a93ad9ccdc5ee787e56ed1ceb67c3f086296a9e680656abddbf03729a | C++ | 1,160 | 42 | /**
* Copyright 2022-2024, XGBoost contributors
*/
#include "test_iterative_dmatrix.h"
#include <gtest/gtest.h>
#include <limits> // for numeric_limits
#include <memory>
#include "../../../src/data/gradient_index.h"
#include "../../../src/data/iterative_dmatrix.h"
#include "../helpers.h"
#include "xgboost/data.h"... |
14bec52c40b0f161e74d56d86508c5afa7ea356da813cb50c61f8e8f8125c6df | C++ | 1,167 | 37 | /**
* Copyright 2023-2024, XGBoost contributors
*/
#include "objective_helpers.h"
#include "../../src/common/linalg_op.h" // for begin, end
#include "helpers.h" // for RandomDataGenerator
namespace xgboost {
void MakeLabelForObjTest(std::shared_ptr<DMatrix> p_fmat, std::string const& obj) {
... |
23b0eff8a550cfc13fe6576527c1ed57609541730f1c3d1912cdcb109666c25f | C++ | 1,170 | 36 | /*
* 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.
*
* multitaper_spectrogram_coder_initialize.cpp
*
* Code generation for function 'multitaper_spectrogram_coder_in... |
3ad56bbede077db9f665037272cf116fd5d0ba9f3401b4f8f6cf64eb65691d97 | C++ | 1,178 | 37 | #include "Parameters.h"
#include "FileUtil.h"
#include "CommandCaller.h"
#include "Debug.h"
#include <cassert>
#include "tsv2exprofiledb.sh.h"
void setTsv2ExProfileDbDefaults(Parameters *p) {
p->compressed = true;
}
int tsv2exprofiledb(int argc, const char **argv, const Command &command) {
Parameters &par =... |
c4f3f436c124b77693dedd3ca4bfbb15feb9aee387e969dd72958d3737197421 | C++ | 1,195 | 28 | #include "ScoreMatrix.h"
#include <cmath>
#include <cstring>
#include "simd.h"
ScoreMatrix ScoreMatrix::unserialize(const char *data, size_t alphabetSize, size_t kmerSize) {
size_t size = pow(alphabetSize, kmerSize);
size_t row_size = size / MAX_ALIGN_INT;
row_size = (row_size + 1) * MAX_ALIGN_INT; // fo... |
aba5e89a9fd761f84c5bc63f20b4819bd11f93459f97d1b454cce44c9ffd2e59 | C++ | 1,196 | 54 | /*
* Copyright 2013-2023, Derrick Wood <dwood@cs.jhu.edu>
*
* This file is part of the Kraken 2 taxonomic sequence classification system.
*/
#include "utilities.h"
#include "kraken2_data.h"
using std::vector;
using std::string;
namespace kraken2 {
void ExpandSpacedSeedMask
(uint64_t &spaced_seed_mask, const i... |
9dfd8297bc6929df844a06ec9a6d698fa13e96f1f9bca208c389c3548c6c3ae4 | C++ | 1,199 | 51 | /*
* Copyright 2013-2023, Derrick Wood <dwood@cs.jhu.edu>
*
* This file is part of the Kraken 2 taxonomic sequence classification system.
*/
#include "seqreader.h"
using std::string;
namespace kraken2 {
void StripString(string &str) {
if (str.size() == 0)
return;
while (isspace(str.back()))
str.pop_... |
263acc6391cc8f1aa1e4105696465bd97b5847de1986b25696db9aecb6babce3 | C++ | 1,216 | 39 | /*
* Copyright (C) 2019-2026 Matthias Klumpp <matthias@tenstral.net>
*
* Licensed under the GNU Lesser General Public License Version 3
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Founda... |
ff1c45453ef17702e57da6401866663702766d41b208d6b0597b79d7a384ec76 | C++ | 1,222 | 40 | /**
* Copyright 2021-2024, XGBoost Contributors
*/
#include "sparse_page_source.h"
#include <cstdio> // for remove
#include <filesystem> // for exists
#include <numeric> // for partial_sum
#include <string> // for string
#include "../collective/communicator-inl.h" // for IsDistributed, GetRank
nam... |
8a9d0588162366b8fd71536b37a1c9c91252f9fd0b1f50da9899e7610a4efa2a | C++ | 1,224 | 28 | #include "Command.h"
#include "DownloadDatabase.h"
#include "Prefiltering.h"
#include "Parameters.h"
const char* binary_name = "mmseqs";
const char* tool_name = "MMseqs2";
const char* tool_introduction = "MMseqs2 (Many against Many sequence searching) is an open-source software suite for very fast, \nparallelized prot... |
e8e4b4fe85a520bde8cfeef604e53325a19f292d48552f44274896e8830231dc | C++ | 1,227 | 47 | #include <cmath>
#include <vector>
#include "caffe/layers/sigmoid_layer.hpp"
namespace caffe {
template <typename Dtype>
inline Dtype sigmoid(Dtype x) {
return 0.5 * tanh(0.5 * x) + 0.5;
}
template <typename Dtype>
void SigmoidLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dty... |
c4e76dd3b5115814e66222ee63d6daf85894a48be6b096602e91e8da575aa4a2 | C++ | 1,239 | 45 | /**
* Copyright 2021-2023 XGBoost contributors
*/
#include <gtest/gtest.h>
#include <any> // for any_cast
#include <memory>
#include "../../../src/data/adapter.h"
#include "../../../src/data/file_iterator.h"
#include "../../../src/data/proxy_dmatrix.h"
#include "../filesystem.h" // dmlc::TemporaryDirectory
#inclu... |
afeba2c24db4178ddb8d9c74188c78b09c17c012f9c02b08cfd613687bf148e5 | C++ | 1,242 | 27 | #include "DistanceCalculator.h"
#include "simd.h"
template<typename T>
unsigned int DistanceCalculator::computeInverseHammingDistance(const T *seq1, const T *seq2, unsigned int length){
unsigned int diff = 0;
unsigned int simdBlock = length/(VECSIZE_INT*4);
simd_int * simdSeq1 = (simd_int *) seq1;
sim... |
032438f2ba815788202a83624573b493c2d01d53b2439dc11685bcfda55c3a81 | C++ | 1,257 | 57 | /*++
Module Name:
ReadReader.cpp
Abstract:
Concrete file reading classes
Environment:
User mode service.
--*/
#include "stdafx.h"
#include "BigAlloc.h"
#include "Compat.h"
#include "Read.h"
#include "AlignmentResult.h"
#include "FileFormat.h"
class SimpleReadReader : public ReadReader
{
public:
... |
b1797f3c82020b09bc76c5cef5eb7be3ca96c4a377d60662809abc2178e00558 | C++ | 1,260 | 43 | #include <flutter/dart_project.h>
#include <flutter/flutter_view_controller.h>
#include <windows.h>
#include "flutter_window.h"
#include "utils.h"
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
_In_ wchar_t *command_line, _In_ int show_command) {
// Attach to console w... |
bc369320fa6035d9913909af17e23d7b547847b930ea2ffe720876c5d3113928 | C++ | 1,264 | 60 | /******************************************************************
* *
* Copyright by Joachim Saul <saul@gfz-potsdam.de> *
* *
***********************************************... |
e4459f013309f4895c8d9a4502f11c94094e7fe3da4fba11cc05c1cbf2bdf5d0 | C++ | 1,274 | 57 | #include "yaml-cpp/ostream_wrapper.h"
#include <algorithm>
#include <cstring>
#include <iostream>
namespace YAML {
ostream_wrapper::ostream_wrapper()
: m_buffer(1, '\0'),
m_pStream(0),
m_pos(0),
m_row(0),
m_col(0),
m_comment(false) {}
ostream_wrapper::ostream_wrapper(std::ostream& s... |
03e75632e6b89130963d5d44a1eaa6a2bb562307d44935fb5a733fd570c4b173 | C++ | 1,277 | 43 | /*!
* Copyright 2022, XGBoost contributors.
*/
#include <gtest/gtest.h>
#include <numeric>
#include "../../../src/common/numeric.h"
namespace xgboost {
namespace common {
TEST(Numeric, PartialSum) {
{
std::vector<size_t> values{1, 2, 3, 4};
std::vector<size_t> result(values.size() + 1);
Context ctx;
... |
2a31d7babee9d32607f53fac736c648d96d0386f779f2d18bf22b7757919981f | C++ | 1,280 | 44 | /*
* Bshouty Lung Model - Pulmonary Circulation Simulation
* Copyright (c) 1989-2014 Zoheir Bshouty, MD, PhD, FRCPC
* Copyright (c) 2011-2014 Adam Majer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* ... |
d16cd1955661cd277635287e8fc947ef9e4094014037f677ecd0d2c33aac5cbe | C++ | 1,298 | 43 | #include <iostream>
#include <cstring>
#include "TestLib.h"
using namespace std;
using namespace test;
int test::runAllTests(char *filter) {
const std::vector<TestCase*> &testCases = TestCase::getCases();
int tested = 0;
int passed = 0;
const char *prevFixture = "";
for (int i = 0; i < testCases... |
a1e94e04adb04d2e0b9bc13427561dd281cdb2cd19d32a25a0fee0049a6646d2 | C++ | 1,346 | 34 | /*
This file is part of the Firmware project to interface with small Async or Neuromorphic chips
Copyright (C) 2022-2023 Ole Richter - University of Groningen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
th... |
3454ed34815fd623aa9d88ad29f969f612e246e7f39035299a70b20310f3699a | C++ | 1,355 | 49 | /**
* Copyright 2023-2024, XGBoost contributors
*/
#include <gtest/gtest.h>
#include <xgboost/data.h>
#include "../../../../src/collective/communicator-inl.h"
#include "../../filesystem.h"
#include "../../helpers.h"
#include "test_worker.h"
namespace xgboost {
void VerifyLoadUri() {
auto const rank = collective:... |
11619c2aa3f41791ae6e65efb75654d72841cd4bc690d13690c8d433083b3830 | C++ | 1,356 | 94 | /*++
Module Name:
GenericFile_stdio.cpp
Abstract:
Generic IO class for SNAP that can read from stdio.
Authors:
Jeremy Elson, February 2014
Environment:
User mode service.
Revision History:
--*/
#include "stdafx.h"
#include "Compat.h"
#include "GenericFile_stdio.h"
#include "Error.h"
Generic... |
5643a927e2f57195ca4c1bbbdd072f2752854238f1d152024bf5430b9fcb6d44 | C++ | 1,374 | 52 | /**
* Copyright 2019-2024, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <xgboost/feature_map.h> // for FeatureMap
#include <memory>
#include "../helpers.h"
#include "xgboost/context.h"
#include "xgboost/gbm.h"
#include "xgboost/json.h"
#include "xgboost/learner.h"
namespace xgboost::gbm {
TEST(GBLine... |
659324184e343875082459860c1bcb23e61e86c75592de3ee9d44bc9344630b0 | C++ | 1,386 | 51 | #include <algorithm>
#include <vector>
#include "caffe/layers/clip_layer.hpp"
namespace caffe {
template <typename Dtype>
void ClipLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
const Dtype* bottom_data = bottom[0]->cpu_data();
Dtype* top_data = top[0]->mutab... |
07e73d1f1a77acfa51d4c55938bbccd7286b27dc90b886fdd4373db59e9f2ba4 | C++ | 1,405 | 72 | #include "yaml-cpp/node/parse.h"
#include <fstream>
#include <sstream>
#include "yaml-cpp/node/node.h"
#include "yaml-cpp/node/impl.h"
#include "yaml-cpp/parser.h"
#include "nodebuilder.h"
namespace YAML {
Node Load(const std::string& input) {
std::stringstream stream(input);
return Load(stream);
}
Node Load(co... |
b684d2e8a53580103d5529290aa46a9af1195cbf4bace7fc868e6898cf69b8cf | C++ | 1,408 | 47 | /*
* 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.
*
* multitaper_spectrogram_coder_terminate.cpp
*
* Code generation for function 'multitaper_spectrogram_coder_ter... |
cc5f78ba5511559499a084644d015e6e6d023e7918be045bda8db1f36c2a1fc4 | C++ | 1,420 | 60 | /*!
* Copyright 2019 XGBoost contributors
*/
#include <dmlc/io.h>
#include <gtest/gtest.h>
#include <xgboost/base.h>
#include <xgboost/json.h>
#include <xgboost/version_config.h>
#include <string>
#include "../../../src/common/version.h"
#include "../filesystem.h" // dmlc::TemporaryDirectory
namespace xgboost {
T... |
03e0eab3ce5610554248beef9892a306ac447197fbeb98962ca893e03d3e3feb | C++ | 1,422 | 46 | #ifdef USE_CUDNN
#include <vector>
#include "caffe/layers/cudnn_relu_layer.hpp"
namespace caffe {
template <typename Dtype>
void CuDNNReLULayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
ReLULayer<Dtype>::LayerSetUp(bottom, top);
// initialize cuDNN
CUDNN_CH... |
4d9ee9bf399cce81d9c102dd264e9a3d4b132b66c70db52b88cb50ada62f23db | C++ | 1,426 | 62 | /*
* 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.
*
* all.cpp
*
* Code generation for function 'all'
*
*/
/* Include files */
#include "all.h"
#include "eml_int... |
f41c2b4b4ffeae0f2aa6bb5c77774660fe44cb9575f7c74cb9b5d71ec03f085d | C++ | 1,430 | 62 | /*
* 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.
*
* any1.cpp
*
* Code generation for function 'any1'
*
*/
/* Include files */
#include "any1.h"
#include "eml_... |
208c7498133c5b7c08c8988148e0d9e1e72dbc060fcb600d903fa992014f0f60 | C++ | 1,434 | 39 | #include "FileUtil.h"
#include "Parameters.h"
#include "DBReader.h"
int rmdb(int argc, const char **argv, const Command &command) {
Parameters &par = Parameters::getInstance();
par.parseParameters(argc, argv, command, true, 0, 0);
DBReader<DBKeyType>::removeDb(par.db1);
return EXIT_SUCCESS;
}
int mvdb... |
8a018578300f51b40eee3422ccabc88c7c9f22b9a9c38c06f7c623506cda7fa8 | C++ | 1,434 | 49 | /*!
* Copyright 2019-2022 by Contributors
*/
#include <algorithm>
#include <utility>
#include <limits>
#include "xgboost/json.h"
#include "gblinear_model.h"
namespace xgboost {
namespace gbm {
void GBLinearModel::SaveModel(Json* p_out) const {
auto& out = *p_out;
size_t const n_weights = weight.size();
F32Ar... |
403f48d1176857606a2f9ff4a9bc4bbb76e3dbfdf10bb03b41180b8b15403c41 | C++ | 1,451 | 57 | #include <sys/time.h>
#include <time.h>
/*
* This file is a copy of the public domain code that can be found in
* multiple locations and whose prevenance is unclear
*
* This is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNE... |
31546c2bf36415b78617ea5edd0538fa11d8f5d9cf60b3ed24d82b33fdad0f06 | C++ | 1,460 | 61 | #include <fstream>
#include <iostream>
#include <vector>
#include "yaml-cpp/eventhandler.h"
#include "yaml-cpp/yaml.h" // IWYU pragma: keep
struct Params {
bool hasFile;
std::string fileName;
};
Params ParseArgs(int argc, char** argv) {
Params p;
std::vector<std::string> args(argv + 1, argv + argc);
ret... |
5247d6758f8e313963fb56c62daa8bf0be691de83fa5a151869172ee9ac1247b | C++ | 1,483 | 46 | /**
* Copyright 2021-2025, XGBoost Contributors
*/
#include "hist_param.h"
#include <ios> // for binary
#include <string> // for string
#include "../../collective/broadcast.h" // for Broadcast
#include "../../collective/communicator-inl.h" // for GetRank
#include "xgboost/json.h" ... |
e5ac4bfe6f6c842bf0d2a1b232e98c11b620885921bba40e849849c45166d301 | C++ | 1,500 | 78 | /*++
Module Name:
GenericFile_map.cpp
Abstract:
Generic IO class for SNAP that can map an input file.
Authors:
Bill Bolosky, September, 2014
Environment:
User mode service.
Revision History:
--*/
#include "stdafx.h"
#include "GenericFile_map.h"
#include "Error.h"
#include "exit.h"
GenericFile_m... |
d934cd9c648117fd84eba7010fe768e5bbad1f858b1694b96e808f07ddd306ad | C++ | 1,531 | 81 | #include "exp.h"
#include "regex_yaml.h"
#include "regeximpl.h"
#include "stream.h"
#include "yaml-cpp/exceptions.h" // IWYU pragma: keep
#include "yaml-cpp/mark.h"
namespace YAML {
const std::string ScanVerbatimTag(Stream& INPUT) {
std::string tag;
// eat the start character
INPUT.get();
while (INPUT) {
... |
379896421dcf22469d90c2dc8722e8756a4943398002f77c00f56fa5411a3330 | C++ | 1,571 | 54 | #include "Alignment.h"
#include "Parameters.h"
#include "Debug.h"
#include "Util.h"
#include "MMseqsMPI.h"
#ifdef OPENMP
#include <omp.h>
#endif
int align(int argc, const char **argv, const Command& command) {
MMseqsMPI::init(argc, argv);
Parameters& par = Parameters::getInstance();
par.overrideParamete... |
961d525f4533d66d754c4b93f0fb029970750528832aaa44b33388a5810240f0 | C++ | 1,620 | 45 | /**
* Copyright 2020-2025, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <xgboost/c_api.h>
#include <xgboost/global_config.h>
#include <xgboost/json.h>
#include <xgboost/logging.h>
namespace xgboost {
TEST(GlobalConfiguration, Verbosity) {
// Configure verbosity via global configuration
Json config{J... |
eb8a3e280f979a4edd40bdbef9ad37c6a1a69c00d3be5e34bc41f01b73d5e47a | C++ | 1,625 | 58 | //
// Created by annika on 09.11.22.
//
#include "SequenceWeights.h"
#include "Util.h"
#include "Debug.h"
#include <algorithm>
#include <fstream>
SequenceWeights::SequenceWeights(const char* dataFileName) {
//parse file and fill weightIndex
std::ifstream tsv(dataFileName);
if (tsv.fail()) {
Debug... |
4850b2fa3b86531521a77b461d0d6ffd321cdf5882a7d39b40e4eacb401f0358 | C++ | 1,628 | 29 | // This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation... |
527282ff9d91c9a76ea6d95613f56ad4b91bb9254ef2a7cf178e8d3990fead08 | C++ | 1,658 | 62 | /*
* 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.
*
* mtimes.cpp
*
* Code generation for function 'mtimes'
*
*/
/* Include files */
#include "mtimes.h"
#include... |
4c2947d451d837369b8f37d3224796abce3e92722f17b2abc24c903ccc4ee749 | C++ | 1,664 | 65 |
#include "elidedlabel.h"
#include <QTextLayout>
#include <QPainter>
ElidedLabel::ElidedLabel(QWidget *parent)
: ElidedLabel(nullptr, parent)
{
}
ElidedLabel::ElidedLabel(const QString &text, QWidget *parent)
: QFrame(parent),
elided(false),
content(text)
{
setSizePolicy(QSizePolicy::Expandin... |
ec3fb63dd47ae1dfb95e7af6ed3529108cc9088ed36063bb7b7c4da303062274 | C++ | 1,664 | 72 | /*
* 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... |
261bd996c48c82d7da4654a3cab38c5b9ef4eaf20ab56b6c15f2c970b9e51d48 | C++ | 1,666 | 57 | /**
* Copyright 2022-2024, XGBoost Contributors
*/
#include <gtest/gtest.h>
#include <xgboost/linalg.h>
#include "../../src/common/linalg_op.h"
#include "../../src/tree/fit_stump.h"
#include "../collective/test_worker.h" // for TestDistributedGlobal
#include "../helpers.h"
namespace xgboost::tree {
namespace {
voi... |
953e0972f4ef15cb82e83d72a96066edd60422f5ee035e2b92ffce3ad23996d4 | C++ | 1,694 | 63 | #include "Debug.h"
#include "Util.h"
#include "FileUtil.h"
#include "SubstitutionMatrix.h"
#include <cstdio>
#include <cstdlib>
#include <string>
#include <unistd.h>
int calculatelambda(int argc, const char **argv, const Command &command) {
Parameters &par = Parameters::getInstance();
par.parseParameters(argc... |
3c7290c976cca5e24e16446cee9262eb2565043bdc2371a3171e4c5e50c2ace9 | C++ | 1,697 | 58 | /*
* Bshouty Lung Model - Pulmonary Circulation Simulation
* Copyright (c) 1989-2014 Zoheir Bshouty, MD, PhD, FRCPC
* Copyright (c) 2011-2014 Adam Majer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* ... |
b3e740a12502db6826c2150d6fb99a471701c282074c2d5ff336ee4869217bf9 | C++ | 1,697 | 66 | #include <stddef.h>
#include <sstream>
#include "gtest/gtest.h"
#include "yaml-cpp/ostream_wrapper.h"
namespace {
TEST(OstreamWrapperTest, BufferNoWrite) {
YAML::ostream_wrapper wrapper;
EXPECT_STREQ("", wrapper.str());
}
TEST(OstreamWrapperTest, BufferWriteStr) {
YAML::ostream_wrapper wrapper;
wrapper.write... |
906bd361d590e965b077729ee2e47fa9c96d6eaafc9c96c87ccd59387736421e | C++ | 1,699 | 58 | /**
* Copyright 2019-2024, XGBoost contributors
*/
#ifndef XGBOOST_USE_CUDA
#include "ellpack_page.h"
#include <xgboost/data.h>
#include <memory> // for shared_ptr
// dummy implementation of EllpackPage in case CUDA is not used
namespace xgboost {
class EllpackPageImpl {
std::shared_ptr<common::HistogramCuts>... |
931689949450b49b39ba31470656c551ad43a12a562c22b52ef047b6ca6c8447 | C++ | 1,705 | 71 | /*
* 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... |
733e78b9c5232f871ae9e9887ff4f6cdde3f65104b3d127f4f3e51dda53296d9 | C++ | 1,733 | 68 | #include <boost/thread.hpp>
#include <exception>
#include "caffe/internal_thread.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
InternalThread::~InternalThread() {
StopInternalThread();
}
bool InternalThread::is_started() const {
return thread_ && thread_->joinable();
}
bool InternalThread::mu... |
d7c9cb7a65a0b960f4345c1e2ae54671216ddbc6f229e7e8330d3b4b61d7c123 | C++ | 1,745 | 65 | /*
* 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.
*
* combineVectorElements.cpp
*
* Code generation for function 'combineVectorElements'
*
*/
/* Include files *... |
9f92090757d1de48eb77d1e5315bd8437852a9ea6dada50e10fe7601262f2df8 | C++ | 1,756 | 41 | #include "Parameters.h"
#include "FileUtil.h"
#include "CommandCaller.h"
#include <cassert>
#include <string>
// Include the embedded shell script.
#include "pickconsensusrepfast.sh.h"
// Fast profile-guided representative selection: reuses the clustering alignments
// (${clusterDB}_aln, produced with --include-align-... |
5f993178d80ec9d4ca602746958288fc33868097d0e581cdb0851aa0a7521f76 | C++ | 1,763 | 60 | /*
* Bshouty Lung Model - Pulmonary Circulation Simulation
* Copyright (c) 1989-2014 Zoheir Bshouty, MD, PhD, FRCPC
* Copyright (c) 2011-2014 Adam Majer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* ... |
7c281c79496b6943183ddacba64e567ccba37d846535f175a214d0a09cfc1023 | C++ | 1,772 | 91 | #include <boost/thread.hpp>
#include <string>
#include "caffe/layers/base_data_layer.hpp"
#include "caffe/parallel.hpp"
#include "caffe/util/blocking_queue.hpp"
namespace caffe {
template<typename T>
class BlockingQueue<T>::sync {
public:
mutable boost::mutex mutex_;
boost::condition_variable condition_;
};
te... |
5f622550a71bc00e88af9a8801404d4232701ade45363e3e2a87688704464a4c | C++ | 1,774 | 58 | /**
* Copyright 2014-2024, XBGoost Contributors
* \file updater_sync.cc
* \brief synchronize the tree in all distributed nodes
*/
#include <xgboost/tree_updater.h>
#include <string>
#include <vector>
#include "../collective/broadcast.h"
#include "../collective/communicator-inl.h"
#include "../common/io.h"
#includ... |
a01fbd3c95d9144b4db03193fc7287afb1a17ae7d4200c4065b49eb767e9ee3f | C++ | 1,789 | 58 | #include "environment.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#include <algorithm> // std::generate, std::any_of
#include <utility> // std::move
namespace miic {
namespace structure {
using std::vector;
using namespace miic::utility;
using namespace miic::computation;
Environment::Environment(int n_samples, ... |
dc2ee94d43116f959a4abd42557f71d07acc631abbffe03b11489dbeed35bedb | C++ | 1,797 | 65 | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... |
fd79f72b9ad648e2f5399612feb48aab49196e85f7eeb1efc85b6809eb76f37e | C++ | 1,799 | 45 | #include "Parameters.h"
#include "FileUtil.h"
#include "CommandCaller.h"
#include <cassert>
#include <string>
// Include the embedded shell script.
#include "pickconsensusrep.sh.h"
// Minimal workflow function that runs the pickcenterrep workflow.
int pickconsensusrep(int argc, const char **argv, const Command &comman... |
c84074a5ac456c2403754b7662f056d08350c5e5678d1361cf1081a2febf083c | C++ | 1,813 | 61 | /*!
* Copyright 2015-2022 by Contributors
* \file objective.cc
* \brief Registry of all objective functions.
*/
#include <dmlc/registry.h>
#include <xgboost/context.h>
#include <xgboost/objective.h>
#include <sstream>
#include "xgboost/host_device_vector.h"
namespace dmlc {
DMLC_REGISTRY_ENABLE(::xgboost::ObjFun... |
663efda76f9cee29a2a65adec948ae08b7336816441735a6678b4792490b1cda | C++ | 1,814 | 55 | /**
* Copyright 2020-2024 by 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/json.h>
#include <xgboost/task.h>
#include "../../../plugin/sycl/tree/update... |
e9075e30671795e8bf87aad0bf04d98d3bd849f5f64c88d2b7da44463af03d63 | C++ | 1,815 | 109 | /*++
Module Name:
GenericFile.cpp
Abstract:
Generic IO class for SNAP that can read from either the filesystem or HDFS.
Authors:
Jeremy Elson, February 2014
Environment:
User mode service.
Revision History:
--*/
#include "stdafx.h"
#include <string.h>
#include "Compat.h"
#include "GenericFi... |
8910fc72ef6320b385e222d72fe58ac94c48fe4be73eeb55bdef77e9ea06d4c3 | C++ | 1,817 | 78 | /*
* 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.
*
* scalexpCompatible.cpp
*
* Code generation for function 'scalexpCompatible'
*
*/
/* Include files */
#inclu... |
e09532d58f56a32b866f91401892707dc5832fbeeb7b332ebb8d0c9f625ddc1a | C++ | 1,821 | 73 | /**
* Copyright 2023, XGBoost contributors
*/
#include "quantile_loss_utils.h"
#include <cctype> // for isspace
#include <istream> // for istream
#include <ostream> // for ostream
#include <string> // for string
#include <vector> // for vector
#include "../common/json_utils.h" // for TypeCheck
#include "xg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.