repo
stringlengths
1
152
file
stringlengths
14
221
code
stringlengths
501
25k
file_length
int64
501
25k
avg_line_length
float64
20
99.5
max_line_length
int64
21
134
extension_type
stringclasses
2 values
B-CSF
B-CSF-master/src/mttkrp_cpu.h
/** * * OHIO STATE UNIVERSITY SOFTWARE DISTRIBUTION LICENSE * * Load-balanced sparse MTTKRP on GPUs (the “Software”) Copyright (c) 2019, The Ohio State * University. All rights reserved. * * The Software is available for download and use subject to the terms and * conditions of this License. Access or use of th...
4,581
41.036697
134
h
B-CSF
B-CSF-master/src/mttkrp_gpu.h
/** * * OHIO STATE UNIVERSITY SOFTWARE DISTRIBUTION LICENSE * * Load-balanced sparse MTTKRP on GPUs (the “Software”) Copyright (c) 2019, The Ohio State * University. All rights reserved. * * The Software is available for download and use subject to the terms and * conditions of this License. Access or use of th...
3,184
42.630137
90
h
sr_core-noetic-devel/sr_hand/include/sr_hand/sr_publisher.h
sr_core-noetic-devel/sr_hand/include/sr_hand/sr_publisher.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
3,518
33.5
119
h
sr_core-noetic-devel/sr_hand/include/sr_hand/sr_subscriber.h
sr_core-noetic-devel/sr_hand/include/sr_hand/sr_subscriber.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
3,961
29.015152
118
h
sr_core-noetic-devel/sr_hand/include/sr_hand/sr_diagnosticer.h
sr_core-noetic-devel/sr_hand/include/sr_hand/sr_diagnosticer.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
3,503
32.056604
120
h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/sr_articulated_robot.h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/sr_articulated_robot.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
10,550
27.749319
118
h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/virtual_shadowhand_library.h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/virtual_shadowhand_library.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
1,768
26.215385
86
h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/real_arm.h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/real_arm.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
2,559
25.947368
93
h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/valves.h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/valves.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
1,808
22.192308
78
h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/real_shadowhand.h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/real_shadowhand.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
4,882
30.503226
112
h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/virtual_shadowhand.h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/virtual_shadowhand.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
4,579
30.805556
117
h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/virtual_arm.h
sr_core-noetic-devel/sr_hand/include/sr_hand/hand/virtual_arm.h
/* * Copyright 2010 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
3,783
29.031746
116
h
sr_core-noetic-devel/sr_gazebo_sim/include/sr_gazebo_sim/gazebo_hardware_sim.h
sr_core-noetic-devel/sr_gazebo_sim/include/sr_gazebo_sim/gazebo_hardware_sim.h
/* * Copyright 2015 Shadow Robot Company Ltd. * * 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 the Free * Software Foundation version 2 of the License. * * This program is distributed in the hope that it will be useful, but W...
2,866
32.337209
117
h
pi-peps
pi-peps-master/bundled/rsvd/matrix_vector_functions_intel_mkl.h
#ifndef _RSVD_VORONIN_MATVEC_H_ #define _RSVD_VORONIN_MATVEC_H_ #include <stdio.h> #include "mkl.h" #include "mkl_lapacke.h" #include "mkl_vsl.h" #include <time.h> //#include <sys/time.h> // for clock_gettime() #include <cmath> #include <algorithm> #define SEED 777 #define BRNG VSL_BRNG_MCG31 #define METHOD V...
8,512
22.070461
100
h
pi-peps
pi-peps-master/bundled/LBFGSpp/include/LBFGS.h
// Copyright (C) 2016 Yixuan Qiu <yixuan.qiu@cos.name> // Under MIT license #ifndef _ITENSOR_PORT_LBFGS_H #define _ITENSOR_PORT_LBFGS_H #include "pi-peps/config.h" DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS #include "LBFGS/Param.h" #include "LBFGS/LineSearch.h" namespace LBFGSpp { /// /// LBFGS sol...
6,027
29.755102
98
h
pi-peps
pi-peps-master/bundled/LBFGSpp/include/LBFGS/Param.h
// Copyright (C) 2016 Yixuan Qiu <yixuan.qiu@cos.name> // Under MIT license #ifndef _ITENSOR_PORT_PARAM_H #define _ITENSOR_PORT_PARAM_H #include <stdexcept> // std::invalid_argument namespace LBFGSpp { /// /// \defgroup Enumerations /// /// Enumeration types for line search. /// /// /// \ingroup Enumerations //...
7,744
35.361502
90
h
pi-peps
pi-peps-master/bundled/LBFGSpp/include/LBFGS/LineSearchBracketing.h
// Copyright (C) 2016 Yixuan Qiu <yixuan.qiu@cos.name> & Dirk Toewe <DirkToewe@GoogleMail.com> // Under MIT license #ifndef _ITENSOR_PORT_LINE_SEARCH_BRACKETING_H #define _ITENSOR_PORT_LINE_SEARCH_BRACKETING_H #include "pi-peps/config.h" DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS #include <stdexcept> ...
4,373
33.714286
111
h
pi-peps
pi-peps-master/bundled/LBFGSpp/include/LBFGS/LineSearch.h
// Copyright (C) 2016 Yixuan Qiu <yixuan.qiu@cos.name> // Under MIT license #ifndef _ITENSOR_PORT_LINE_SEARCH_H #define _ITENSOR_PORT_LINE_SEARCH_H #include "pi-peps/config.h" DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS #include <stdexcept> // std::runtime_error namespace LBFGSpp { /// /// Line sea...
3,964
31.5
111
h
pi-peps
pi-peps-master/include/pi-peps/fu-3site-corboz.h
#ifndef __FULL_UPDT_3S_H_CORBOZ_ #define __FULL_UPDT_3S_H_CORBOZ_ #include "pi-peps/config.h" #include "pi-peps/ctm-cluster-global.h" #include "pi-peps/ctm-cluster.h" #include "pi-peps/ctm-env.h" #include "pi-peps/linalg/itensor-linsys-solvers.h" #include "pi-peps/models.h" #include "pi-peps/su2.h" #include <chrono> #...
4,839
36.230769
80
h
pi-peps
pi-peps-master/include/pi-peps/ctm-cluster.h
// The following ifndef/define/endif pattern is called a // scope guard, and prevents the C++ compiler (actually, preprocessor) // from including a header file more than once. #ifndef __CTM_CLS_H_ #define __CTM_CLS_H_ #include "pi-peps/config.h" #include "json.hpp" #include "pi-peps/lattice.h" #include <iostream> #inc...
5,130
28.488506
79
h
pi-peps
pi-peps-master/include/pi-peps/lattice.h
#ifndef __LATTICE_H_ #define __LATTICE_H_ #include "pi-peps/config.h" #include <array> #include <iostream> // namespace itensor { /* * Generic displacement vector on a square lattice. * Support +,-,-=,+=,==,!= */ struct Shift { std::array<int, 2> d; Shift() : d({0, 0}) {} Shift(int dx, int dy) : d({dx, dy...
2,526
21.362832
80
h
pi-peps
pi-peps-master/include/pi-peps/transfer-op.h
#ifndef __CLS_TRANSFER_OP_ #define __CLS_TRANSFER_OP_ #include "pi-peps/config.h" #include "pi-peps/cluster-ev-builder.h" #ifdef PEPS_WITH_ARPACK # include "pi-peps/linalg/arpack-rcdn.h" namespace itensor { struct TransferOpVecProd { CtmEnv::DIRECTION dir; Vertex v_ref; EVBuilder const& ev; Tra...
1,403
24.071429
78
h
pi-peps
pi-peps-master/include/pi-peps/ctm-cluster-global.h
#ifndef __CTM_CLS_GLOBAL_ #define __CTM_CLS_GLOBAL_ #include "pi-peps/config.h" #include <string> DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS /* * ENVironment of nxm cluster * [type==t, name==n, prime==p] * * (t: Ulink, n: I_U, p: 0) (t: Ulink, n: I_U, p: m) * V ...
2,802
34.0375
76
h
pi-peps
pi-peps-master/include/pi-peps/simple-update.h
// The following ifndef/define/endif pattern is called a // scope guard, and prevents the C++ compiler (actually, preprocessor) // from including a header file more than once. #ifndef __SMPL_UPDT_H_ #define __SMPL_UPDT_H_ #include "pi-peps/config.h" #include "pi-peps/ctm-cluster-global.h" #include "pi-peps/ctm-cluster...
3,570
34.009804
80
h
pi-peps
pi-peps-master/include/pi-peps/svdsolver-factory.h
#ifndef __SVDSOLVER_FACTORY_ #define __SVDSOLVER_FACTORY_ #include "pi-peps/config.h" #include "json.hpp" #include "pi-peps/linalg/itensor-svd-solvers.h" class SvdSolverFactory { public: using TCreateMethod = std::function<std::unique_ptr<itensor::SvdSolver>()>; SvdSolverFactory(); virtual ~SvdSolverFactory()...
551
22
77
h
pi-peps
pi-peps-master/include/pi-peps/su2.h
#ifndef __SU2_ #define __SU2_ #include "pi-peps/config.h" #include <algorithm> #include <cmath> #include <complex> DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS // Supported types of 1-site operators enum SU2O { SU2_Id, // Identity SU2_S_Z, // Projection on S_z SU2_S_Z2, // S_z^2 SU2_S_P, ...
833
20.384615
63
h
pi-peps
pi-peps-master/include/pi-peps/engine.h
#ifndef __ENGINE_ #define __ENGINE_ #include "pi-peps/config.h" #include "json.hpp" #include <string> DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS #include "pi-peps/cluster-ev-builder.h" #include "pi-peps/ctm-cluster-global.h" #include "pi-peps/ctm-cluster.h" #include "pi-peps/full-update.h" #include "pi-...
3,210
26.921739
79
h
pi-peps
pi-peps-master/include/pi-peps/cluster-ev-builder.h
#ifndef __CLS_EV_BUILDER_ #define __CLS_EV_BUILDER_ #include "pi-peps/config.h" #include <iostream> #include <string> DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS #include "pi-peps/ctm-cluster-global.h" #include "pi-peps/ctm-cluster-io.h" #include "pi-peps/ctm-cluster.h" #include "pi-peps/ctm-env.h" #incl...
10,702
31.237952
80
h
pi-peps
pi-peps-master/include/pi-peps/cluster-factory.h
#ifndef __CLUSTER_FACTORY_ #define __CLUSTER_FACTORY_ #include "pi-peps/config.h" #include "json.hpp" #include "pi-peps/ctm-cluster.h" class ClusterFactory { public: using TCreateMethod = std::function<std::unique_ptr<Cluster>(nlohmann::json const& json_cluster)>; ClusterFactory(); virtual ~ClusterFactory...
554
21.2
80
h
pi-peps
pi-peps-master/include/pi-peps/engine-factory.h
#ifndef __ENGINE_FACTORY_ #define __ENGINE_FACTORY_ #include "pi-peps/config.h" #include "json.hpp" #include "pi-peps/engine.h" class EngineFactory { public: using TCreateMethod = std::function<std::unique_ptr<Engine>(nlohmann::json& json_model)>; EngineFactory(); virtual ~EngineFactory() = default; bo...
598
22.038462
74
h
pi-peps
pi-peps-master/include/pi-peps/full-update.h
// The following ifndef/define/endif pattern is called a // scope guard, and prevents the C++ compiler (actually, preprocessor) // from including a header file more than once. #ifndef __FULL_UPDT_H_ #define __FULL_UPDT_H_ #include "pi-peps/config.h" #include "pi-peps/ctm-cluster-global.h" #include "pi-peps/ctm-cluster...
3,825
28.890625
78
h
pi-peps
pi-peps-master/include/pi-peps/ctm-cluster-io.h
#ifndef __CTM_CLS_IO_ #define __CTM_CLS_IO_ #include "pi-peps/config.h" #include "json.hpp" #include "pi-peps/cluster-factory.h" #include "pi-peps/ctm-cluster-basic.h" #include "pi-peps/ctm-cluster-global.h" #include "pi-peps/ctm-cluster.h" #include <algorithm> #include <complex> #include <fstream> #include <iostream>...
5,858
26.636792
79
h
pi-peps
pi-peps-master/include/pi-peps/model-factory.h
#ifndef __MODEL_FACTORY_ #define __MODEL_FACTORY_ #include "pi-peps/config.h" #include "json.hpp" #include "pi-peps/models.h" class ModelFactory { public: using TCreateMethod = std::function<std::unique_ptr<Model>(nlohmann::json& json_model)>; ModelFactory(); virtual ~ModelFactory() = default; bool reg...
636
21.75
72
h
pi-peps
pi-peps-master/include/pi-peps/ctm-cluster-env.h
// The following ifndef/define/endif pattern is called a // scope guard, and prevents the C++ compiler (actually, preprocessor) // from including a header file more than once. #ifndef __CTM_CLS_ENV_H_ #define __CTM_CLS_ENV_H_ #include "pi-peps/config.h" #include "pi-peps/ctm-cluster-global.h" #include "pi-peps/ctm-clu...
8,789
28.59596
79
h
pi-peps
pi-peps-master/include/pi-peps/mpo.h
#ifndef __MPO_ #define __MPO_ #include "pi-peps/config.h" #include "pi-peps/ctm-cluster.h" DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS // ----- Main MPO Structures ------------------------------------------ // Index names of 3-site MPO indices const std::string TAG_MPO3S_PHYS1 = "I_MPO3S_S1"; const std:...
3,504
24.583942
71
h
pi-peps
pi-peps-master/include/pi-peps/models.h
#ifndef __MODELS_ #define __MODELS_ #include "pi-peps/config.h" #include "json.hpp" #include "pi-peps/cluster-ev-builder.h" #include "pi-peps/ctm-cluster-global.h" #include "pi-peps/ctm-cluster.h" #include "pi-peps/mpo.h" #include "pi-peps/su2.h" #include <chrono> #include <iostream> #include <string> DISABLE_WARNINGS...
2,304
29.733333
75
h
pi-peps
pi-peps-master/include/pi-peps/ctm-env.h
// The following ifndef/define/endif pattern is called a // scope guard, and prevents the C++ compiler (actually, preprocessor) // from including a header file more than once. #ifndef __CTM_CLS_ENV_H_ #define __CTM_CLS_ENV_H_ #include "pi-peps/config.h" #include "pi-peps/ctm-cluster-global.h" #include "pi-peps/ctm-clu...
12,192
32.133152
79
h
pi-peps
pi-peps-master/include/pi-peps/models/j1j2-2x2-ABCD.h
#ifndef __J1J2_2X2_ABCD_ #define __J1J2_2X2_ABCD_ #include "pi-peps/config.h" #include "pi-peps/engine.h" #include "pi-peps/models.h" namespace itensor { // ----- Trotter gates (2site, ...) MPOs ------------------------------ MPO_3site getMPO3s_J1J2(double tau, double J1, double J2, double del); OpNS getOP4s_...
1,861
31.666667
75
h
pi-peps
pi-peps-master/include/pi-peps/models/id-2x2-ABCD.h
#ifndef __ID_2X2_ABCD_ #define __ID_2X2_ABCD_ #include "pi-peps/config.h" #include "pi-peps/engine.h" #include "pi-peps/models.h" namespace itensor { // ----- Trotter gates (2site, ...) MPOs ------------------------------ MPO_2site getMPO2s_ID(int pd); MPO_3site getMPO3s_ID(int pd); OpNS getOP4s_ID(int pd)...
1,703
29.981818
75
h
pi-peps
pi-peps-master/include/pi-peps/models/aklt-2x2-ABCD.h
#ifndef __AKLT_2X2_ABCD_ #define __AKLT_2X2_ABCD_ #include "pi-peps/config.h" #include "pi-peps/engine.h" #include "pi-peps/models.h" namespace itensor { // ----- Trotter gates (2site, ...) MPOs ------------------------------ ITensor Projector_S2tpS2_S1(Index& s1, Index& s2); ITensor Projector_S2tpS2_S1_v2(In...
1,789
30.403509
75
h
pi-peps
pi-peps-master/include/pi-peps/models/ladders-2x2-ABCD.h
#ifndef __LADDERS_2X2_ABCD_ #define __LADDERS_2X2_ABCD_ #include "pi-peps/config.h" #include "pi-peps/engine.h" #include "pi-peps/models.h" namespace itensor { // ----- Trotter gates (2site, ...) MPOs ------------------------------ MPO_2site getMPO2s_Ladders(double tau, double J); MPO_3site getMPO3s_Ladders(d...
1,890
31.050847
75
h
pi-peps
pi-peps-master/include/pi-peps/models/ising-2x2-ABCD.h
#ifndef __ISING_2X2_ABCD_ #define __ISING_2X2_ABCD_ #include "pi-peps/config.h" #include "pi-peps/engine.h" #include "pi-peps/models.h" namespace itensor { // ----- Trotter gates (2site, ...) MPOs ------------------------------ MPO_2site getMPO2s_Ising_2site(double tau, double J, double h); MPO_3site getMPO3s...
1,685
29.654545
75
h
pi-peps
pi-peps-master/include/pi-peps/models/hb-2x2-ABCD.h
#ifndef __HB_2X2_ABCD_ #define __HB_2X2_ABCD_ #include "pi-peps/config.h" #include "pi-peps/engine.h" #include "pi-peps/models.h" namespace itensor { // ----- Trotter gates (2site, ...) MPOs ------------------------------ MPO_2site getMPO2s_HB(double tau, double J, double h, double del); MPO_3site getMPO3s_HB...
2,632
33.194805
75
h
pi-peps
pi-peps-master/include/pi-peps/linalg/rsvd-solver.h
#ifndef _ITENSOR_CUSTOM_SOLVERS_RSVD_H #define _ITENSOR_CUSTOM_SOLVERS_RSVD_H #include "pi-peps/config.h" #ifdef PEPS_WITH_RSVD # include "pi-peps/linalg/itensor-svd-solvers.h" # include "rank_revealing_algorithms_intel_mkl.h" namespace itensor { struct RsvdSolver : SvdSolver { void solve(MatRefc<Real> con...
772
21.735294
50
h
pi-peps
pi-peps-master/include/pi-peps/linalg/lapacksvd-solver.h
#ifndef _PEPS_LAPACK_SVD_SOLVERS_H #define _PEPS_LAPACK_SVD_SOLVERS_H #include "pi-peps/config.h" #include "pi-peps/linalg/itensor-svd-solvers.h" namespace itensor { // // // Forward declarations of fortran lapack routines // // #ifdef LAPACK_REQUIRE_EXTERN extern "C" { # ifdef PLATFORM_acml void F77NAME(dgesd...
8,889
33.726563
80
h
pi-peps
pi-peps-master/include/pi-peps/linalg/linsyssolvers-lapack.h
#ifndef _ITENSOR_LAPACK_LINSYS_SOLVERS_H #define _ITENSOR_LAPACK_LINSYS_SOLVERS_H #include "pi-peps/config.h" #include "pi-peps/linalg/itensor-linsys-solvers.h" namespace itensor { // // // Forward declarations of fortran lapack routines // // #ifdef LAPACK_REQUIRE_EXTERN extern "C" { // SOLVE LINEAR SYSTEM Ax ...
6,811
28.617391
80
h
pi-peps
pi-peps-master/include/pi-peps/linalg/itensor-linsys-solvers.h
#ifndef _ITENSOR_LINSYS_SOLVERS_H #define _ITENSOR_LINSYS_SOLVERS_H #include "pi-peps/config.h" DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS namespace itensor { // Direct Solver // // Linear system of equations // // The routine solves for X the system of linear equations A*X = B, // where A...
5,492
29.348066
79
h
pi-peps
pi-peps-master/include/pi-peps/linalg/itensor-svd-solvers.h
#ifndef _ITENSOR_SVD_SOLVERS_H #define _ITENSOR_SVD_SOLVERS_H #include "pi-peps/config.h" DISABLE_WARNINGS #include "itensor/all.h" ENABLE_WARNINGS namespace itensor { struct SvdSolver { virtual void solve(MatRefc<Real> const& M, MatRef<Real> const& U, VectorRef co...
4,969
26.765363
79
h
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/crf1d_tag.c
/* * CRF1d tagger (implementation of crfsuite_model_t and crfsuite_tagger_t). * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redis...
16,838
28.698413
130
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/params.c
/* * Parameter exchange. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyr...
9,772
28.08631
103
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/train_l2sgd.c
/* * Online training with L2-regularized Stochastic Gradient Descent (SGD). * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistr...
15,572
29.655512
118
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/vecmath.h
/* * Mathematical operations for vectors. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retai...
9,701
27.368421
95
h
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/quark.c
/* * Quark object. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright ...
4,794
26.716763
95
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/train_arow.c
/* * Online training with Adaptive Regularization of Weights (AROW). * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistribution...
11,447
26.99022
121
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/train_lbfgs.c
/* * Batch training with L-BFGS. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the abo...
17,170
29.772401
107
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/quark.h
/* * Quark object. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright ...
1,988
41.319149
78
h
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/train_passive_aggressive.c
/* * Online training with Passive Aggressive. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must r...
12,250
27.098624
121
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/dictionary.c
/* * Implementation of dictionary. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the a...
3,820
31.109244
102
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/params.h
/* * Parameter exchange. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyr...
3,236
38.962963
104
h
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/logging.h
/* * Logging utility. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyrigh...
2,068
41.22449
78
h
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/dataset.c
/* * Implementation for data sets (dataset_t). * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must ...
3,196
28.878505
78
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/rumavl.h
/* * RumAVL - Threaded AVL Tree Implementation * * Copyright (c) 2005-2007 Jesse Long <jpl@unknown.za.net> * All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software wi...
5,499
33.161491
78
h
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/hash.c
#include <stdio.h> #ifndef HASH_C #define HASH_C typedef double floatval_t; struct nlist { /* table entry: */ struct nlist *next; /* next entry in chain */ char *name; /* defined name */ floatval_t* defn; /* replacement trigram id */ }; #define HASHSIZE 10000 static struct nlist *hashtab[HASHSIZE]; /* p...
1,844
22.961039
61
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/crf1d.h
/* * The 1st-order linear-chain CRF with dyad features (CRF1d). * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of ...
10,985
29.432133
109
h
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/holdout.c
/* * Holdout evaluation. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyr...
2,817
33.790123
85
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/logging.c
/* * Logging utility. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyrigh...
2,762
29.032609
78
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/train_averaged_perceptron.c
/* * Online training with averaged perceptron. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must ...
11,100
28.136483
121
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite/crfsuite_train.c
/* * Implementation of the training interface (crfsuite_trainer_t). * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions...
11,106
28.697861
120
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite-Frontend/dump.c
/* * Dump command for CRFsuite frontend. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must reta...
3,756
31.111111
89
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite-Frontend/readdata.h
/* * Data reader. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright ...
1,786
44.820513
78
h
g-ssl-crf
g-ssl-crf-master/src/CRFSuite-Frontend/reader.c
/* * Data reader. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright ...
8,059
29.074627
103
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite-Frontend/option.c
/* * A parser for command-line options. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retai...
3,504
36.287234
93
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite-Frontend/iwa.c
/* * A parser for Item With Attributes (IWA) format. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source co...
6,970
24.441606
86
c
g-ssl-crf
g-ssl-crf-master/src/CRFSuite-Frontend/iwa.h
/* * A parser for Item With Attributes (IWA) format. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source co...
2,176
31.984848
78
h
g-ssl-crf
g-ssl-crf-master/src/CRFSuite-Frontend/option.h
/* * A parser for command-line options. * * Copyright (c) 2007-2010, Naoaki Okazaki * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retai...
3,186
35.632184
95
h
loc
loc-master/tests/data/ipl_funcs.c
/*- * Copyright (c) 1997 Bruce Evans. * All rights reserved. * * 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 list of condit...
3,265
42.546667
99
c
loc
loc-master/tests/data/ebcdic.c
/* crypto/ebcdic.c */ #ifndef CHARSET_EBCDIC # include <openssl/e_os2.h> # if defined(PEDANTIC) || defined(__DECC) || defined(OPENSSL_SYS_MACOSX) static void *dummy = &dummy; # endif #else /* CHARSET_EBCDIC */ # include "ebcdic.h" /*- * Initial Port for Apache-1.3 by <Martin.Kra...
11,647
39.870175
77
c
loc
loc-master/tests/data/fe25519.c
/* $OpenBSD: fe25519.c,v 1.3 2013/12/09 11:03:45 markus Exp $ */ /* * Public Domain, Authors: Daniel J. Bernstein, Niels Duif, Tanja Lange, * Peter Schwabe, Bo-Yin Yang. * Copied from supercop-20130419/crypto_sign/ed25519/ref/fe25519.c */ #include "includes.h" #define WINDOWSIZE 1 /* Should be 1,2, or 4 */ #defi...
8,330
23.647929
101
c
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/dyndisp/DispatchStub.h
#pragma once #include <c10/core/Backend.h> #include <c10/core/ScalarType.h> #include <c10/util/Exception.h> #include <atomic> #include <type_traits> using namespace c10; // Implements instruction set specific function dispatch. // // Kernels that may make use of specialized instruction sets (e.g. AVX2) are // compi...
9,435
27
79
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/isa/embedded_function.h
#pragma once #include <stdint.h> #if defined(__GNUC__) #include <cpuid.h> #define __forceinline __attribute__((always_inline)) inline #elif defined(_MSC_VER) #include <intrin.h> #endif /* get value from bits [n:m] */ #define BIT_M_TO_N(x, m, n) ((uint32_t)(x << (31 - (n))) >> ((31 - (n)) + (m))) #define BIT_M_TO_N_64...
2,573
24.485149
80
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/autocast/autocast_kernels.h
#pragma once #include <math.h> #include <ATen/DeviceGuard.h> #include <ATen/Dispatch.h> #include <ATen/OpMathType.h> #include <ATen/core/Tensor.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cpu/Loops.h> namespace torch_ipex { namespace autocast { TORCH_API void _amp_foreach_non_finite_check_and_un...
711
24.428571
62
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/autocast/autocast_mode.h
#pragma once #include <ATen/ATen.h> #include <ATen/autocast_mode.h> #include <c10/core/UndefinedTensorImpl.h> #include <c10/core/impl/LocalDispatchKeySet.h> #include <c10/util/intrusive_ptr.h> #include <torch/csrc/jit/frontend/tracer.h> #include <torch/library.h> namespace torch_ipex { namespace autocast { using at:...
5,610
29.494565
80
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/runtime/CPUPool.h
#pragma once #include <dlfcn.h> #include <omp.h> #include <unistd.h> #include <algorithm> #include <atomic> #include <mutex> #include <vector> #include <torch/csrc/jit/api/module.h> namespace torch_ipex { namespace runtime { typedef void* kmp_affinity_mask_t; typedef void (*kmp_create_affinity_mask_p)(kmp_affinity_m...
3,225
33.688172
78
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/runtime/Task.h
#pragma once #include <cassert> #include <functional> #include <future> #include <iostream> #include <memory> #include <stdexcept> #include <vector> #include <ATen/core/ivalue.h> #include <torch/csrc/jit/api/module.h> #include "TaskExecutor.h" namespace torch_ipex { namespace runtime { // refer to http://www.open-s...
2,235
28.421053
78
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/runtime/TaskExecutor.h
#pragma once #include <dlfcn.h> #include <omp.h> #include <cassert> #include <condition_variable> #include <functional> #include <future> #include <iostream> #include <memory> #include <mutex> #include <queue> #include <stdexcept> #include <thread> #include <vector> #include <ATen/core/ivalue.h> #include <torch/csrc/...
1,474
24.877193
70
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec512/vec512_bfloat16.h
#pragma once #include <ATen/ATen.h> #include <ATen/cpu/vec/vec512/vec512.h> using namespace at::vec; #include <immintrin.h> // Conversion from BF16 to FP32 inline __m512 cvt_bf16_to_fp32(const __m256i src) { auto y = _mm512_cvtepu16_epi32(src); return _mm512_castsi512_ps(_mm512_bslli_epi128(y, 2)); } inline void ...
16,419
30.821705
80
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec512/perf_kernel/add_softmax.h
#pragma once #include <immintrin.h> #include <ATen/ATen.h> #include <ATen/ExpandUtils.h> #include <ATen/Parallel.h> #include <c10/util/SmallVector.h> #include <limits> #include "utils.h" namespace torch_ipex { namespace cpu { namespace kernel { inline __m512 _dil_exp_kernel(__m512 vec_src) { static __m512 vec_fac...
12,063
31.343164
79
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec512/perf_kernel/update_batch.h
#pragma once #include <immintrin.h> #include <ATen/ATen.h> namespace torch_ipex { namespace cpu { namespace kernel { #if defined(CPU_CAPABILITY_AVX512) inline void update_batch_kernel_impl( const __m512i& max_symbols_epi32, const __m512i& flag_1_epi32, const __m512i& flag_0_epi32, const __m512i& bl...
10,309
34.923345
80
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec512/perf_kernel/utils.h
#pragma once // below is for aligned data load inline __m512 _load_f32_data(const float* data_base) { return _mm512_loadu_ps(data_base); } inline __m512 _load_f32_data(const at::BFloat16* data_base) { return cvt_bf16_to_fp32(_mm256_loadu_si256((__m256i*)data_base)); } inline __m512 _maskz_load_f32_data(const flo...
2,309
28.240506
79
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec512/perf_kernel/add_layernorm.h
#pragma once #include <immintrin.h> #include <ATen/ATen.h> #include <ATen/ExpandUtils.h> #include <ATen/Parallel.h> #include <c10/util/SmallVector.h> #include <limits> #include "utils.h" namespace torch_ipex { namespace cpu { namespace kernel { template <typename T> std::pair<float, float> _add_and_compute_mean_var...
3,024
28.368932
68
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec512/perf_kernel/concat_bn_relu.h
#pragma once #include <immintrin.h> #include <ATen/ATen.h> #include <ATen/ExpandUtils.h> #include <ATen/Parallel.h> #include <c10/util/SmallVector.h> #include <limits> #include "utils.h" // use float as accumulation type for BFloat16 template <typename scalar_t> struct AccType { using type = scalar_t; }; template ...
3,062
29.029412
80
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec512/perf_kernel/add_swish.h
#pragma once #include <immintrin.h> #include <ATen/ATen.h> #include <ATen/ExpandUtils.h> #include <ATen/Parallel.h> #include <c10/util/SmallVector.h> #include <limits> #include "add_softmax.h" #include "utils.h" namespace torch_ipex { namespace cpu { namespace kernel { template <typename scalar_t> inline void _dil_...
1,899
23.675325
78
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec512/perf_kernel/rmsnorm.h
#pragma once #include <ATen/ATen.h> #include <ATen/ExpandUtils.h> #include <ATen/Parallel.h> #include <c10/util/SmallVector.h> #include <immintrin.h> #include <limits> #include "utils.h" namespace torch_ipex { namespace cpu { namespace kernel { template <typename T> void _compute_rmsnorm( const T* a_ptr, cons...
1,607
25.360656
79
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec256/vec256_prefix_sum_ker.h
#pragma once namespace torch_ipex { namespace cpu { namespace kernel { template <> inline void prefix_sum<int64_t>( const int64_t* src, int64_t* dst, int64_t init, int64_t n) { int64_t i; __m256i offset = _mm256_set1_epi64x(init); __m256i zero = _mm256_setzero_si256(); for (i = 0; i <= (n - Ve...
1,232
25.804348
78
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec256/vec256_int8.h
#pragma once #include <cstdlib> namespace torch_ipex { namespace cpu { namespace kernel { static inline __attribute__((always_inline)) void scale_and_store_int8( int8_t* out, const int8_t* in, float& scale, int64_t len) { for (int64_t i = 0; i < len; i++) { int32_t i32_val = *(in + i); float...
2,064
23.294118
80
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/vec/vec256/vec256_bfloat16.h
#pragma once #include <ATen/ATen.h> #include <ATen/cpu/vec/vec256/vec256.h> using namespace at::vec; inline void cvt_bf16_to_fp32(float* dst, const at::BFloat16* src, int len) { for (int j = 0; j < len; j++) { *(dst + j) = *(src + j); } } inline void cvt_fp32_to_bf16(at::BFloat16* dst, const float* src, int ...
4,404
29.804196
80
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/tpp/tensor_helper.h
#ifndef _TENSOR_HELPER_H_ #define _TENSOR_HELPER_H_ #include "utils.h" namespace torch_ipex { namespace tpp { inline at::Tensor wt_tensor_n2v( long Nk, long Hk, long Nc, long Hc, at::Tensor& input) { #if 0 PCL_ASSERT(Hc % 2 == 0, "Uneven number for Hc\n"); return input.view({Nk, Nc, Hc/2, 2, ...
12,837
26.199153
117
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/tpp/rtm.h
#include <immintrin.h> #include <stdio.h> #include <iostream> #ifdef RTM_DEBUG extern int rtm_stats[1000][16]; #endif #define ATTEMPTS 0 #define ABORTS 1 #define LOCKS 2 #define COUNTS 3 #define ABORTS_RETRY 4 #define ABORTS_NORETRY 5 #define ABORTS_TIMEOUT 6 #define ABORTS_EXPLICIT 7 #define ABORTS_ZERO 8 inline voi...
4,166
26.058442
105
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/tpp/timing.h
#ifndef _BERT_TIMING_H_ #define _BERT_TIMING_H_ #include "utils.h" namespace torch_ipex { namespace tpp { enum DebugTimer { BRGEMM, XPOSE, DROPOUT, LAYER_NORM, SOFTMAX, ACT, BIAS, VNNI, EW_COPY, EW_ADD, EW_SCL, EW_RECP, EW_RECP_SQRT, EW_MUL, EW_ZERO, EW_RED, OPTIM, LAST_TIMER }; in...
4,514
22.273196
80
h
intel-extension-for-pytorch
intel-extension-for-pytorch-master/csrc/cpu/tpp/utils.h
#ifndef _PCL_UTILS_H_ #define _PCL_UTILS_H_ #include <ATen/record_function.h> #include <torch/csrc/autograd/VariableTypeUtils.h> //#include <torch/extension.h> #include <iostream> #include <vector> #ifdef _OPENMP #include <omp.h> #else #define omp_get_max_threads() 1 #define omp_get_num_threads() 1 #define omp_get_t...
3,135
23.123077
80
h