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 |
|---|---|---|---|---|---|---|
null | LNDRL-main/amcl/src/amcl/pf/pf_kdtree.c | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 12,621 | 24.917864 | 99 | c |
null | LNDRL-main/amcl/src/amcl/pf/pf_draw.c | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 4,131 | 24.195122 | 92 | c |
null | LNDRL-main/amcl/src/amcl/pf/pf.c | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 19,033 | 23.913613 | 90 | c |
null | LNDRL-main/amcl/src/amcl/pf/pf_pdf.c | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 3,831 | 24.891892 | 77 | c |
null | LNDRL-main/amcl/src/amcl/map/map_store.c | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 4,946 | 21.902778 | 82 | c |
null | LNDRL-main/amcl/src/amcl/map/map.c | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 2,080 | 23.482353 | 77 | c |
null | LNDRL-main/amcl/src/amcl/map/map_range.c | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 3,067 | 24.355372 | 84 | c |
null | LNDRL-main/amcl/src/amcl/map/map_draw.c | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 4,076 | 24.641509 | 77 | c |
null | LNDRL-main/amcl/include/amcl/pf/pf.h | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 5,864 | 26.796209 | 110 | h |
null | LNDRL-main/amcl/include/amcl/pf/pf_pdf.h | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 2,531 | 28.44186 | 77 | h |
null | LNDRL-main/amcl/include/amcl/pf/pf_vector.h | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 2,716 | 27.6 | 77 | h |
null | LNDRL-main/amcl/include/amcl/pf/pf_kdtree.h | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 2,778 | 24.263636 | 80 | h |
null | LNDRL-main/amcl/include/amcl/map/map.h | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey & Kasper Stoy
* gerkey@usc.edu kaspers@robotics.usc.edu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published... | 4,439 | 28.403974 | 93 | h |
null | LNDRL-main/amcl/include/amcl/sensors/amcl_odom.h | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey et al.
*
* This library 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 Foundation; either
* version 2.1 of the License, or (... | 2,703 | 26.313131 | 77 | h |
null | LNDRL-main/amcl/include/amcl/sensors/amcl_laser.h | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey et al.
*
* This library 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 Foundation; either
* version 2.1 of the License, or (... | 4,956 | 30.573248 | 107 | h |
null | LNDRL-main/amcl/include/amcl/sensors/amcl_sensor.h | /*
* Player - One Hell of a Robot Server
* Copyright (C) 2000 Brian Gerkey et al.
*
* This library 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 Foundation; either
* version 2.1 of the License, or (... | 2,768 | 27.255102 | 99 | h |
TSP | TSP-master/MCTS/tsp-20-50-100/include/TSP_Init.h | #ifndef TSP_Init_H
#define TSP_Init_H
#include "TSP_Basic_Functions.h"
// The following funcitons are used to randomly generate an initial solution
// Starting from an arbitrarily chosen city, it iteratively selects a random city until forming a TSP tour
int Select_Random_City(int Cur_City)
{
int Random_Index = Get... | 1,227 | 21.740741 | 106 | h |
TSP | TSP-master/MCTS/tsp-20-50-100/include/TSP_IO.h | #ifndef TSP_IO_H
#define TSP_IO_H
#include "kernel.h"
//using namespace std;
#define Threshold 10
#define Max_Inst_Num 10000
#define Max_City_Num 500
//Hyper parameters
double Param_T = 0.01; //used to control the termination condition 0.01
//#define Default_Random_Seed (unsigned)time(NU... | 11,076 | 21.514228 | 119 | h |
TSP | TSP-master/MCTS/tsp-20-50-100/include/TSP_Markov_Decision.h |
// Jump to a new state by randomly generating a solution
void Jump_To_Random_State()
{
Generate_Initial_Solution();
}
Distance_Type Markov_Decision_Process()
{
MCTS_Init(); // Initialize MCTS parameters
Generate_Initial_Solution(); // State initialization of MDP
Local_Search_by_2Opt_Move... | 940 | 26.676471 | 113 | h |
TSP | TSP-master/MCTS/tsp-20-50-100/include/TSP_2Opt.h |
// Evaluate the delta after applying a 2-opt move (delta >0 indicates an improving solution)
Distance_Type Get_2Opt_Delta(int First_City, int Second_City)
{
if(Check_If_Two_City_Same_Or_Adjacent(First_City, Second_City)==true)
return -Inf_Cost;
int First_Next_City=All_Node[First_City].Next_City;
int Second_Next... | 2,712 | 32.493827 | 104 | h |
TSP | TSP-master/MCTS/tsp-10000/include/TSP_Init.h | #ifndef TSP_Init_H
#define TSP_Init_H
#include "TSP_Basic_Functions.h"
// The following funcitons are used to randomly generate an initial solution
// Starting from an arbitrarily chosen city, it iteratively selects a random city until forming a TSP tour
int Select_Random_City(int Cur_City)
{
int Random_Index = Get... | 1,154 | 21.211538 | 106 | h |
TSP | TSP-master/MCTS/tsp-10000/include/TSP_IO.h | #ifndef TSP_IO_H
#define TSP_IO_H
#include "kernel.h"
//using namespace std;
#define Max_Inst_Num 16
#define Max_City_Num 10000
//Hyper parameters
double Param_T = 0.006; //used to control the termination condition 0.006
//#define Default_Random_Seed (unsigned)time(NULL);
#define Default... | 5,644 | 22.135246 | 119 | h |
TSP | TSP-master/MCTS/tsp-10000/include/TSP_Markov_Decision.h |
// Jump to a new state by randomly generating a solution
void Jump_To_Random_State()
{
Generate_Initial_Solution();
}
Distance_Type Markov_Decision_Process()
{
MCTS_Init(); // Initialize MCTS parameters
Generate_Initial_Solution(); // State initialization of MDP
Local_Search_by_2Opt_Move... | 940 | 26.676471 | 113 | h |
TSP | TSP-master/MCTS/tsp-10000/include/TSP_2Opt.h |
// Evaluate the delta after applying a 2-opt move (delta >0 indicates an improving solution)
Distance_Type Get_2Opt_Delta(int First_City, int Second_City)
{
if(Check_If_Two_City_Same_Or_Adjacent(First_City, Second_City)==true)
return -Inf_Cost;
int First_Next_City=All_Node[First_City].Next_City;
int Second_Next... | 2,712 | 32.493827 | 104 | h |
TSP | TSP-master/MCTS/tsp-200-500-1000/include/TSP_Init.h | #ifndef TSP_Init_H
#define TSP_Init_H
#include "TSP_Basic_Functions.h"
// The following funcitons are used to randomly generate an initial solution
// Starting from an arbitrarily chosen city, it iteratively selects a random city until forming a TSP tour
int Select_Random_City(int Cur_City)
{
int Random_Index = Get... | 1,227 | 21.740741 | 106 | h |
TSP | TSP-master/MCTS/tsp-200-500-1000/include/TSP_IO.h | #ifndef TSP_IO_H
#define TSP_IO_H
#include "kernel.h"
//using namespace std;
#define Threshold 10
#define Max_Inst_Num 10000
#define Max_City_Num 500
//Hyper parameters
double Param_T = 0.006; //used to control the termination condition 0.01
//#define Default_Random_Seed (unsigned)time(N... | 11,074 | 21.510163 | 119 | h |
TSP | TSP-master/MCTS/tsp-200-500-1000/include/TSP_Markov_Decision.h |
// Jump to a new state by randomly generating a solution
void Jump_To_Random_State()
{
Generate_Initial_Solution();
}
Distance_Type Markov_Decision_Process()
{
MCTS_Init(); // Initialize MCTS parameters
Generate_Initial_Solution(); // State initialization of MDP
Local_Search_by_2Opt_Move... | 940 | 26.676471 | 113 | h |
TSP | TSP-master/MCTS/tsp-200-500-1000/include/TSP_2Opt.h |
// Evaluate the delta after applying a 2-opt move (delta >0 indicates an improving solution)
Distance_Type Get_2Opt_Delta(int First_City, int Second_City)
{
if(Check_If_Two_City_Same_Or_Adjacent(First_City, Second_City)==true)
return -Inf_Cost;
int First_Next_City=All_Node[First_City].Next_City;
int Second_Next... | 2,712 | 32.493827 | 104 | h |
TSP | TSP-master/MCTS-CPUver/tsp-20-50-100/code/TSP_IO.h | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string.h>
#include <time.h>
#include <ctime>
#include <vector>
#include <string.h>
#include <math.h>
using namespace std;
#define Null -1
#define Inf_Cost 1000000000
#define Magnify_Rate ... | 13,212 | 22.059337 | 119 | h |
TSP | TSP-master/MCTS-CPUver/tsp-20-50-100/code/TSP_Markov_Decision.h |
// Jump to a new state by randomly generating a solution
void Jump_To_Random_State()
{
Generate_Initial_Solution();
}
Distance_Type Markov_Decision_Process()
{
MCTS_Init(); // Initialize MCTS parameters
Generate_Initial_Solution(); // State initialization of MDP
Local_Search_by_2Opt_... | 952 | 27.029412 | 113 | h |
TSP | TSP-master/MCTS-CPUver/tsp-20-50-100/code/TSP_2Opt.h |
// Evaluate the delta after applying a 2-opt move (delta >0 indicates an improving solution)
Distance_Type Get_2Opt_Delta(int First_City, int Second_City)
{
if(Check_If_Two_City_Same_Or_Adjacent(First_City, Second_City)==true)
return -Inf_Cost;
int First_Next_City=All_Node[First_City].Next_City;
int Second_Next... | 2,712 | 32.493827 | 104 | h |
TSP | TSP-master/MCTS-CPUver/tsp-10000/code/TSP_IO.h | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string.h>
#include <time.h>
#include <ctime>
#include <vector>
#include <string.h>
#include <math.h>
using namespace std;
#define Null -1
#define Inf_Cost 1000000000
#define Magnify_Rate ... | 13,207 | 22.050611 | 119 | h |
TSP | TSP-master/MCTS-CPUver/tsp-10000/code/TSP_Markov_Decision.h |
// Jump to a new state by randomly generating a solution
void Jump_To_Random_State()
{
Generate_Initial_Solution();
}
Distance_Type Markov_Decision_Process()
{
MCTS_Init(); // Initialize MCTS parameters
Generate_Initial_Solution(); // State initialization of MDP
Local_Search_by_2Opt_... | 952 | 27.029412 | 113 | h |
TSP | TSP-master/MCTS-CPUver/tsp-10000/code/TSP_2Opt.h |
// Evaluate the delta after applying a 2-opt move (delta >0 indicates an improving solution)
Distance_Type Get_2Opt_Delta(int First_City, int Second_City)
{
if(Check_If_Two_City_Same_Or_Adjacent(First_City, Second_City)==true)
return -Inf_Cost;
int First_Next_City=All_Node[First_City].Next_City;
int Second_Next... | 2,712 | 32.493827 | 104 | h |
TSP | TSP-master/MCTS-CPUver/tsp-200-500-1000/code/TSP_IO.h | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string.h>
#include <time.h>
#include <ctime>
#include <vector>
#include <string.h>
#include <math.h>
using namespace std;
#define Null -1
#define Inf_Cost 1000000000
#define Magnify_Rate ... | 13,209 | 22.054101 | 119 | h |
TSP | TSP-master/MCTS-CPUver/tsp-200-500-1000/code/TSP_Markov_Decision.h |
// Jump to a new state by randomly generating a solution
void Jump_To_Random_State()
{
Generate_Initial_Solution();
}
Distance_Type Markov_Decision_Process()
{
MCTS_Init(); // Initialize MCTS parameters
Generate_Initial_Solution(); // State initialization of MDP
Local_Search_by_2Opt_... | 952 | 27.029412 | 113 | h |
TSP | TSP-master/MCTS-CPUver/tsp-200-500-1000/code/TSP_2Opt.h |
// Evaluate the delta after applying a 2-opt move (delta >0 indicates an improving solution)
Distance_Type Get_2Opt_Delta(int First_City, int Second_City)
{
if(Check_If_Two_City_Same_Or_Adjacent(First_City, Second_City)==true)
return -Inf_Cost;
int First_Next_City=All_Node[First_City].Next_City;
int Second_Next... | 2,712 | 32.493827 | 104 | h |
clava | clava-master/ClangAstParser/resources/clang/c/ast-dump-expr.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -Wno-unused-value -std=gnu11 -ast-dump %s | FileCheck -strict-whitespace %s
void Comma(void) {
1, 2, 3;
// CHECK: BinaryOperator 0x{{[^ ]*}} <line:[[@LINE-1]]:3, col:9> 'int' ','
// CHECK-NEXT: BinaryOperator 0x{{[^ ]*}} <col:3, col:6> 'int' ','
// CHECK-NEXT: ... | 14,537 | 41.758824 | 126 | c |
clava | clava-master/ClangAstParser/resources/clang/c/multistep-explicit-cast.c | // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsyntax-only -ast-dump %s | FileCheck %s
// We are checking that implicit casts don't get marked with 'part_of_explicit_cast',
// while in explicit casts, the implicitly-inserted implicit casts are marked with 'part_of_explicit_cast'
unsigned char implicitcast_0(unsigned i... | 4,026 | 55.71831 | 116 | c |
clava | clava-master/ClangAstParser/resources/clang/c/ast-print-enum-decl.c | // First check compiling and printing of this file.
//
// RUN: %clang_cc1 -verify -ast-print %s > %t.c
// RUN: FileCheck --check-prefixes=CHECK,PRINT %s --input-file %t.c
//
// Now check compiling and printing of the printed file.
//
// RUN: echo "// expected""-warning@* 6 {{'T' is deprecated}}" >> %t.c
// RUN: echo "/... | 3,178 | 28.990566 | 96 | c |
clava | clava-master/ClangAstParser/resources/clang/c/c-casts.c | // RUN: %clang_cc1 -w -ast-dump %s | FileCheck %s
// The cast construction code both for implicit and c-style casts is very
// different in C vs C++. This file is intended to test the C behavior.
// TODO: add tests covering the rest of the code in
// Sema::CheckAssignmentConstraints and Sema::PrepareScalarCast
// CH... | 815 | 30.384615 | 73 | c |
clava | clava-master/ClangAstParser/resources/clang/c/fixed_point_to_string.c | // RUN: %clang_cc1 -ast-dump -ffixed-point %s | FileCheck %s
// RUN: %clang_cc1 -ast-dump -ffixed-point -fpadding-on-unsigned-fixed-point %s | FileCheck %s
/**
* Check the same values are printed in the AST regardless of if unsigned types
* have the same number of fractional bits as signed types.
*/
unsigned short... | 911 | 40.454545 | 94 | c |
clava | clava-master/ClangAstParser/resources/clang/c/ast-print-bool.c | // RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_CBOOL \
// RUN: | FileCheck %s --check-prefixes=BOOL-AS-CBOOL,CBOOL
//
// RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_CBOOL -DDIAG \
// RUN: | FileCheck %s --check-prefixes=BOOL-AS-CBOOL,CBOOL
//
// RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_INT... | 1,438 | 30.977778 | 79 | c |
clava | clava-master/ClangAstParser/resources/clang/c/ast-dump-stmt.c | // RUN: %clang_cc1 -std=gnu11 -ast-dump %s | FileCheck -strict-whitespace %s
int TestLocation = 0;
// CHECK: VarDecl{{.*}}TestLocation
// CHECK-NEXT: IntegerLiteral 0x{{[^ ]*}} <col:20> 'int' 0
int TestIndent = 1 + (1);
// CHECK: VarDecl{{.*}}TestIndent
// CHECK-NEXT: {{^}}| `-BinaryOperator{{[^()]*$}}
//... | 15,043 | 39.010638 | 96 | c |
clava | clava-master/ClangAstParser/resources/clang/c/ast-print-record-decl.c | // Check struct:
//
// First check compiling and printing of this file.
//
// RUN: %clang -target x86_64-linux -Xclang -verify -S -emit-llvm \
// RUN: -DKW=struct -DBASES= -o - %s \
// RUN: | FileCheck --check-prefixes=CHECK,LLVM %s
//
// RUN: %clang_cc1 -verify -ast-print -DKW=struct -DBASES= %s > %t.... | 9,467 | 31.424658 | 103 | c |
clava | clava-master/ClangAstParser/resources/clang/c/fixed_point.c | // RUN: %clang_cc1 -x c -ffixed-point -ast-dump %s | FileCheck %s --strict-whitespace
/* Various contexts where type _Accum can appear. */
// Primary fixed point types
signed short _Accum s_short_accum;
signed _Accum s_accum;
signed long _Accum s_long_accum;
unsigned short _Accum u_short_accum;
unsigned _Accum u_acc... | 18,004 | 44.0125 | 100 | c |
clava | clava-master/ClangAstParser/resources/clang/cxx/ast-print-bool.c | // RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_CBOOL \
// RUN: | FileCheck %s --check-prefixes=BOOL-AS-CBOOL,CBOOL
//
// RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_CBOOL -DDIAG \
// RUN: | FileCheck %s --check-prefixes=BOOL-AS-CBOOL,CBOOL
//
// RUN: %clang_cc1 -verify -ast-print %s -xc -DDEF_BOOL_INT... | 1,438 | 30.977778 | 79 | c |
clava | clava-master/ClangAstParser/resources/clang/cxx/ast-print-record-decl.c | // Check struct:
//
// First check compiling and printing of this file.
//
// RUN: %clang -target x86_64-linux -Xclang -verify -S -emit-llvm \
// RUN: -DKW=struct -DBASES= -o - %s \
// RUN: | FileCheck --check-prefixes=CHECK,LLVM %s
//
// RUN: %clang_cc1 -verify -ast-print -DKW=struct -DBASES= %s > %t.... | 9,467 | 31.424658 | 103 | c |
clava | clava-master/ClangAstParser/resources/c/decl.c | typedef char base;
int foo() {
return 2;
}
float* fooPointer(float* aPointer) {
return aPointer;
}
typedef double aType;
aType fooTypedef() {
return 2.0;
}
void * polybench_alloc_data(unsigned long long n, int elt_size);
void vlatypes(int ni, int a[3][ni]) {}
typedef void(*function_prt_with_vla) (int ni,int ... | 1,326 | 22.280702 | 84 | c |
clava | clava-master/ClangAstParser/resources/c/goto.c | // Taken from here: https://msdn.microsoft.com/en-us/library/2c002fdz.aspx
#include <stdio.h>
int main()
{
int i, j;
for ( i = 0; i < 10; i++ )
{
printf_s( "Outer loop executing. i = %d\n", i );
for ( j = 0; j < 3; j++ )
{
printf_s( " Inner loop ex... | 575 | 24.043478 | 74 | c |
clava | clava-master/ClangAstParser/resources/c/bench/2mm.c | /**
* This version is stamped on May 10, 2016
*
* Contact:
* Louis-Noel Pouchet <pouchet.ohio-state.edu>
* Tomofumi Yuki <tomofumi.yuki.fr>
*
* Web address: http://polybench.sourceforge.net
*/
/* 2mm.c: this file is part of PolyBench/C */
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include ... | 3,743 | 24.82069 | 64 | c |
clava | clava-master/ClangAstParser/resources/cxx/templates.h | #include <map>
#include <vector>
#include <cstdint>
#include <string>
/*
class ClassA
{
public:
struct InnerStruct;
int a;
};
*/
template<typename T, typename A1>
inline T make_a(const A1& a1) {
return T(a1);
}
template<typename T = void, typename SFINAE = void>
struct adl_serializer;
template<template<type... | 925 | 25.457143 | 78 | h |
clava | clava-master/ClangAstParser/resources/cxx/problematic/ms_asm.c | // Taken from https://docs.microsoft.com/en-us/cpp/assembler/inline/writing-functions-with-inline-assembly?view=msvc-160
// Power2_inline_asm.c
// compile with: /EHsc
// processor: x86
#include <stdio.h>
int power2( int num, int power );
int main( void )
{
printf_s( "3 times 2 to the power of 5 is %d\n", \
... | 584 | 22.4 | 120 | c |
clava | clava-master/ClangAstParser/resources/cxx/bench/sorted_id.h |
#ifndef ROUTING_SORTEDID_H
#define ROUTING_SORTEDID_H
#include <utility>
#include <vector>
#include <algorithm>
#include <iostream>
#include <memory>
namespace Routing {
namespace StoreMap{
template<typename K, typename T>
class SortedId {
//typedef std::pair<K, T> std::pair<K, T>;
... | 2,851 | 28.402062 | 99 | h |
clava | clava-master/ClangAstDumper/ClavaConstants.h | //
// Created by JoaoBispo on 19/03/2018.
//
#ifndef CLANGASTDUMPER_INFODUMPERCONSTANTS_H
#define CLANGASTDUMPER_INFODUMPERCONSTANTS_H
#include <string>
#include <map>
/*
static const std::string DECL_DATA = "<Decl Data>";
static const std::string NAMED_DECL_DATA = "<NamedDecl Data>";
static const std::string FUNCTI... | 3,977 | 22.538462 | 71 | h |
clava | clava-master/ClangAstDumper/ClangEnums.h | //
// Created by JoaoBispo on 06/04/2018.
//
// Arrays that map Clang enums positions with Clava enums names.
//
#ifndef CLANGASTDUMPER_CLANGENUMS_H
#define CLANGASTDUMPER_CLANGENUMS_H
#include <string>
#include <vector>
namespace clava {
/* Clava Enums */
//extern const std::string CXX_CTOR_INIT_KIND[];
... | 2,044 | 34.877193 | 64 | h |
clava | clava-master/ClangAstDumper/ClangAstDumperConstants.h | //
// Created by JoaoBispo on 21/03/2017.
//
#ifndef CLANGASTDUMPER_CLANGASTDUMPERCONSTANTS_H
#define CLANGASTDUMPER_CLANGASTDUMPERCONSTANTS_H
#include <string>
static const std::string CXX_CTOR_INITIALIZER_BEGIN = "<CXXCtorInitializer>";
static const std::string CXX_CTOR_INITIALIZER_END = "<CXXCtorInitializer End>"... | 3,066 | 33.852273 | 114 | h |
clava | clava-master/ClangAstDumper/ClavaDataDumper.h |
//
// Created by JoaoBispo on 18/03/2018.
//
#ifndef CLANGASTDUMPER_CLAVADATADUMPER_H
#define CLANGASTDUMPER_CLAVADATADUMPER_H
#include "ClavaConstants.h"
#include "ClavaDecl.h"
#include "clang/AST/AST.h"
#include "clang/AST/Decl.h"
#include "clang/AST/Stmt.h"
#include "clang/AST/Type.h"
#include "clang/AST/Attr.h"... | 10,900 | 41.74902 | 109 | h |
clava | clava-master/ClangAstDumper/ClavaDecl.h | //
// Created by JoaoBispo on 16/08/2018.
//
#ifndef CLANGASTDUMPER_CLAVADECL_H
#define CLANGASTDUMPER_CLAVADECL_H
#include <string>
namespace clava {
/**
* Represents decl node classes
*/
enum class DeclNode {
DECL,
NAMED_DECL,
VALUE_DECL,
DECLARATOR_DECL,
... | 1,437 | 21.46875 | 51 | h |
clava | clava-master/ClavaWeaver/resources/clava/test/api/c/src/3d_array.c | #include <stdio.h>
#include <malloc.h>
void printArray(int*** array, int height, int rows, int cols) {
printf("Printing 3D Array:\n");
for (int h = 0; h < height; h++) {
printf("Height %d\n", h);
for (int r = 0; r < rows; r++) {
for (int c = 0; c < cols; c++) {
printf("%d ", array[h][r][c]);
... | 1,119 | 20.960784 | 63 | c |
clava | clava-master/ClavaWeaver/resources/clava/test/weaver/c/src/cfg.c | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
// Knobs
int BS2 = 32;
int BS1 = 64;
/*
Simple matrix multiplication example.
*/
/*
matrix multiplication
*/
void matrix_mult(double const * A, double const * B, double * C, int const N, int const M, int const K) {
for(int ii = 0; ii < N; ii++) {
fo... | 2,012 | 23.54878 | 105 | c |
clava | clava-master/ClavaWeaver/resources/clava/test/weaver/c/src/dijkstra.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
#define NUM_NODES 100
#define NONE 9999
#define pi 3.14159265
struct _NODE
{
int iDist;
int iPrev;
};
typedef struct _NODE NODE;
struct _QITEM
{
int iNode;
... | 15,235 | 25.823944 | 75 | c |
clava | clava-master/TranslationUnitErrorDumper/DiagnosticConsumer.h | //
// Created by JoaoBispo on 07/08/2020.
//
#ifndef TRANSLATIONUNITERRORDUMPER_DIAGNOSTICCONSUMER_H
#define TRANSLATIONUNITERRORDUMPER_DIAGNOSTICCONSUMER_H
#include "clang/AST/DeclBase.h"
#include "clang/AST/DeclContextInternals.h"
#include <llvm/Support/raw_ostream.h>
#include "llvm/ADT/APFloat.h"
#include <iostrea... | 1,002 | 23.463415 | 101 | h |
clava | clava-master/ClavaLaraApi/src-lara-clava/clava/clava/opencl/templates/cl_init.c | cl_int <VAR_ERROR_CODE>;
cl_uint <VAR_NUM_PLATFORMS>;
cl_platform_id <VAR_PLATFORM_ID>;
// Check the number of platforms
<VAR_ERROR_CODE> = clGetPlatformIDs(0, NULL, &<VAR_NUM_PLATFORMS>);
if(<VAR_ERROR_CODE> != CL_SUCCESS) {
fprintf(stderr, "[OpenCL] Error getting number of platforms\n");
exit(1);
} else if(<VAR_NU... | 691 | 30.454545 | 81 | c |
clava | clava-master/CMakeFiles/3.10.2/CompilerIdC/CMakeCCompilerId.c | #ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#if defined(__CLASSIC_C__)
/* cv-qualifiers did not exist in K&R C */
# define const
# define volatile
#endif
/* Version number components: V=Version, R=Revision, P=Patch
Version date comp... | 18,076 | 29.178631 | 113 | c |
icra2021 | icra2021-master/control_tree_car/applications/common/common/common/control_tree.h | #pragma once
#include <cassert>
#include <unordered_set>
#include <vector>
#include <memory>
using IntA = std::vector<int>;
using Arr = std::vector<double>;
struct TreePb
{
std::vector<IntA> varss;
std::vector<Arr> scaless;
int n_steps;
static TreePb refined(const TreePb & tree, int n_steps_per_pha... | 7,075 | 24.919414 | 103 | h |
icra2021 | icra2021-master/control_tree_car/applications/common/common/common/behavior_manager.h | #pragma once
#include <nav_msgs/Odometry.h>
#include <nav_msgs/Path.h>
#include <chrono>
#include <common/utility.h>
class BehaviorBase;
class BehaviorManager
{
public:
BehaviorManager();
void odometry_callback(const nav_msgs::Odometry::ConstPtr& msg);
void plan();
std::vector<nav_msgs::Path> get_... | 1,369 | 23.464286 | 101 | h |
icra2021 | icra2021-master/control_tree_car/applications/obstacles/komo/komo/trajectory_plot.h | #pragma once
#include <common/utility.h>
#include <common/control_tree.h>
#include <visualization_msgs/MarkerArray.h>
#include <nav_msgs/Path.h>
#include "gnuplot-iostream.h"
struct PlotAxis
{
std::string name;
std::string range;
};
void plot(const std::vector<nav_msgs::Path> & trajectories,
con... | 845 | 20.15 | 122 | h |
icra2021 | icra2021-master/control_tree_car/applications/obstacles/komo/komo/obstacle_avoidance_linear.h | #pragma once
#include <control_tree/core/behavior_base.h>
#include <math.h>
#include <boost/bind.hpp>
#include <chrono>
#include <memory>
#include <Eigen/Dense>
#include <ros/ros.h>
#include <ros/package.h>
#include <std_msgs/Float32.h>
#include <nav_msgs/Odometry.h>
#include <nav_msgs/Path.h>
#include <visualizati... | 1,517 | 21.323529 | 103 | h |
icra2021 | icra2021-master/control_tree_car/applications/obstacles/komo/komo/obstacle_avoidance_dec.h | #pragma once
#include <common/behavior_base.h>
#include <math.h>
#include <boost/bind.hpp>
#include <chrono>
#include <memory>
#include <functional>
#include <Eigen/Dense>
#include <ros/ros.h>
#include <ros/package.h>
#include <std_msgs/Float32.h>
#include <nav_msgs/Odometry.h>
#include <nav_msgs/Path.h>
#include <... | 2,605 | 27.326087 | 129 | h |
icra2021 | icra2021-master/control_tree_car/applications/obstacles/komo/komo/obstacle_avoidance_tree.h | #pragma once
#include <common/behavior_base.h>
#include <math.h>
#include <boost/bind.hpp>
#include <chrono>
#include <memory>
#include <Eigen/Dense>
#include <ros/ros.h>
#include <ros/package.h>
#include <std_msgs/Float32.h>
#include <nav_msgs/Odometry.h>
#include <nav_msgs/Path.h>
#include <KOMO/komo.h>
#includ... | 1,794 | 20.369048 | 81 | h |
icra2021 | icra2021-master/control_tree_car/applications/obstacles/komo/komo/utility_komo.h | #pragma once
#include <tf/transform_datatypes.h>
#include <tf2/LinearMath/Quaternion.h>
#include <nav_msgs/Odometry.h>
#include <Kin/kin.h>
#include <common/utility.h>
#include <unordered_map>
class Objective;
class KOMO;
struct Costs
{
double total;
std::unordered_map<std::string, double> costs;
};
geom... | 1,813 | 44.35 | 112 | h |
icra2021 | icra2021-master/control_tree_car/applications/obstacles/komo/komo/komo_factory.h | #pragma once
#include <common/behavior_base.h>
#include <math.h>
#include <boost/bind.hpp>
#include <chrono>
#include <memory>
#include <functional>
#include <Eigen/Dense>
#include <KOMO/komo.h>
#include <komo/utility_komo.h>
#include <circular_obstacle.h>
constexpr double vehicle_width = 1.8;
struct Objectives
... | 932 | 20.697674 | 83 | h |
icra2021 | icra2021-master/control_tree_car/applications/pedestrians/test/common/qp_problems.h | #pragma once
#include <common/control_tree.h>
#include <qp/MPC_model.h>
#include <qp/QP_constraints.h>
#include <qp/QP_tree_solver_base.h>
#include <qp/control_tree_plot.h>
#include <gtest/gtest.h>
struct QP_problem
{
MPC_model model;
TreePb tree;
Constraints k;
Vector2d x0;
Vector2d xd;
};
QP_p... | 1,758 | 31.574074 | 113 | h |
icra2021 | icra2021-master/control_tree_car/applications/pedestrians/qp/qp/MPC_model.h | #pragma once
#include <eigen3/Eigen/Dense>
#include <Eigen/Core>
#include <unsupported/Eigen/MatrixFunctions>
using namespace Eigen;
using IntA = std::vector<int>;
using Arr = std::vector<double>;
struct MPC_model
{
MPC_model(double dt, double Q_v_weight, double R_u_weight);
VectorXd predict_trajectory(cons... | 1,575 | 34.022222 | 117 | h |
icra2021 | icra2021-master/control_tree_car/applications/pedestrians/qp/qp/stopline_qp_tree.h | #pragma once
#include <common/behavior_base.h>
#include <math.h>
#include <chrono>
#include <memory>
#include <Eigen/Dense>
#include "ros/ros.h"
#include <ros/package.h>
#include <std_msgs/Float32.h>
#include <nav_msgs/Odometry.h>
#include <nav_msgs/Path.h>
#include <visualization_msgs/MarkerArray.h>
#include <co... | 2,173 | 22.89011 | 98 | h |
icra2021 | icra2021-master/control_tree_car/applications/pedestrians/qp/qp/control_tree_plot.h | #pragma once
#include <common/control_tree.h>
#include "gnuplot-iostream.h"
struct PlotAxis
{
std::string name;
std::string range;
};
void plot(const std::function<double(int i)> & value_provider,
const std::vector<IntA> & varss,
const std::vector<Arr> & scales,
const PlotAxis ... | 1,140 | 22.285714 | 82 | h |
icra2021 | icra2021-master/control_tree_car/applications/pedestrians/qp/qp/QP_tree_solver_base.h | #pragma once
#include <qp/MPC_model.h>
#include <qp/QP_constraints.h>
class QP_tree_solver_base
{
public:
QP_tree_solver_base(const MPC_model & mpc,
double u_min, double u_max);
virtual VectorXd solve(const Vector2d & x0, const Vector2d & xd, const Constraints & k,
int ... | 1,510 | 22.246154 | 91 | h |
Tengine | Tengine-master/tools/plugin/serializer/src_tm/model_patch.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 1,275 | 24.019608 | 63 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/code_generators.h | /*
* Copyright 2014 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 6,858 | 32.622549 | 80 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/stl_emulation.h | /*
* Copyright 2017 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 9,336 | 32.82971 | 81 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/registry.h | /*
* Copyright 2017 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 4,489 | 34.078125 | 80 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/grpc.h | /*
* Copyright 2014 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 11,755 | 34.732523 | 111 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/util.h | /*
* Copyright 2014 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 23,753 | 35.265649 | 83 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/base.h | #ifndef FLATBUFFERS_BASE_H_
#define FLATBUFFERS_BASE_H_
// clang-format off
// If activate should be declared and included first.
#if defined(FLATBUFFERS_MEMORY_LEAK_TRACKING) && \
defined(_MSC_VER) && defined(_DEBUG)
// The _CRTDBG_MAP_ALLOC inside <crtdbg.h> will replace
// calloc/free (etc) to its debug ve... | 12,601 | 32.163158 | 100 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/flatc.h | /*
* Copyright 2017 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 2,992 | 29.85567 | 76 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/minireflect.h | /*
* Copyright 2017 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 13,177 | 31.29902 | 94 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/reflection.h | /*
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 20,577 | 42.050209 | 80 | h |
Tengine | Tengine-master/tools/plugin/serializer/tf_lite/include/flatbuffers/hash.h | /*
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | 3,631 | 27.375 | 76 | h |
Tengine | Tengine-master/core/lib/olreport/thread.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,324 | 23.473684 | 68 | c |
Tengine | Tengine-master/core/lib/olreport/reportbasedata.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,009 | 26.534247 | 63 | c |
Tengine | Tengine-master/core/lib/olreport/clientsocket.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 5,723 | 23.672414 | 128 | c |
Tengine | Tengine-master/core/lib/olreport/md5.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 12,403 | 30.244332 | 122 | c |
Tengine | Tengine-master/core/lib/olreport/onlinereportmgr.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 7,813 | 23.964856 | 131 | c |
Tengine | Tengine-master/core/lib/olreport/onlinereportutil.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 6,927 | 20.85489 | 101 | c |
Tengine | Tengine-master/core/lib/olreport/reportdata.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 6,325 | 29.708738 | 124 | c |
Tengine | Tengine-master/core/lib/olreport/onlinereportfmtdat.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 6,863 | 22.426621 | 120 | c |
Tengine | Tengine-master/core/include/tengine_cpp_api.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 5,988 | 28.214634 | 120 | h |
Tengine | Tengine-master/core/include/cpu_device.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... | 2,147 | 23.689655 | 89 | h |
Tengine | Tengine-master/core/include/tengine_operations.h | #ifndef __TENGINE_OPERATIONS_H__
#define __TENGINE_OPERATIONS_H__
#include <vector>
#include <sstream>
#include <fstream>
#include <string>
#include <string.h>
#include <cmath>
#include <algorithm>
struct image;
typedef struct image image;
typedef enum
{
GRAY2BGR,
RGB2GRAY,
RGB2BGR
} IMFORMAT;
typedef ... | 6,532 | 26.8 | 101 | h |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.