source
stringlengths
3
92
c
stringlengths
26
2.25M
version3_1.c
// Compile with: // // // To specify the number of bodies in the world, the program optionally accepts // an integer as its first command line argument. #include <time.h> #include <sys/times.h> #include <math.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <X11/Xlib.h> #include...
ParticleBConds3DSoa.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Jeongnim ...
cachedDBM.h
/* @copyright Russell Standish 2000-2013 @author Russell Standish This file is part of EcoLab Open source licensed under the MIT license. See LICENSE for details. */ /**\file \brief persistent hashmap */ #ifndef CACHEDBM_H #define CACHEDBM_H #include "pack_base.h" #include "classdesc_access.h" //#include "p...
and.c
#include "kt.h" #include <stdbool.h> #include <inttypes.h> #ifndef MAX_NTHREADS #define MAX_NTHREADS 272 #endif #ifndef DYNAMIC_CHUNK #define DYNAMIC_CHUNK 256 #endif typedef struct { int64_t edge_a; int64_t edge_b; } tri_edges; /****************************************************************************...
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <dmlc/serializer.h> #include <xgboost/base.h> #include <xgboost/span.h> #include <xg...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
GB_unaryop__identity_fp64_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
conv_dw_hcl_x86.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...
driver.c
#include "driver.h" #include "calculate.h" #include "collections.h" #include "config.h" #include "jump.h" #include "malloc.h" #include "print.h" #include "random.h" #include "read.h" #include "util.h" // -------- Input -------- void process_input(input_t * restrict pinput, const plan_t * restrict pplan) { read_ra...
monte_carlo.h
#ifndef monte_carlo_h #define monte_carlo_h #include <omp.h> #include <algorithm> #include <armadillo> #include <cassert> #include <chrono> #include <cmath> #include <experimental/filesystem> #include <fstream> #include <iomanip> #include <iostream> #include <list> #include <map> #include <sstream> #in...
GB_binop__eq_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
utils.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 ...
GB_unop__lnot_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
pr36802-1.c
/* PR middle-end/36802 */ extern void abort (void); int foo (int k) { int i = 0; #pragma omp parallel #pragma omp single { if (!k) { int j; for (j = 0; j < 10; j++) #pragma omp task if (j == 4) i++; } else i++; } return i; } int main (void) { if (foo (0) != 1) ...
collapse-1.c
/* { dg-do run } */ #include <string.h> #include <stdlib.h> int main (void) { int i, j, k, l = 0; int a[3][3][3]; memset (a, '\0', sizeof (a)); #pragma omp parallel for collapse(4 - 1) schedule(static, 4) for (i = 0; i < 2; i++) for (j = 0; j < 2; j++) for (k = 0; k < 2; k++) a[i][j][k] = i + j...
gi_isolated_region_remover.h
/* * * Copyright (C) 2018 Attila Gyulassy <jediati@sci.utah.edu> * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ #ifndef ISOLATED_REGION_REMOVER_H #define ISOLATED_REGION_REMOVER_H #include "gi_basic_types.h" #includ...
Example_target.3.c
/* * @@name: target.3c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ extern void init(float*, float*, int); extern void output(float*, int); void vec_mult(int N) { int i; float p[N], v1[N], v2[N]; init(v1, v2, N); #pragma omp target map(to: v1, v2) map(from: p)...
omp_bugreduction.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> float dotprod(float *a, float *b, size_t N) { int i, tid; float sum; #pragma omp parallel shared(a, b, sum) private(i, tid) { tid = omp_get_thread_num(); #pragma omp for reduction(+:sum) for (i = 0; i < N; ++i) { sum += a...
GB_binop__bset_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
pre_utilities.h
#ifndef PRE_UTILITES_H #define PRE_UTILITES_H /* System includes */ #include <limits> #include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <stdlib.h> #include <time.h> #include <string> /* External includes */ #ifdef _OPENMP #include <omp.h> #endif /* Project includes */ #include "inc...
pooling_3x3_pack4.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain ...
GB_unaryop__abs_fp32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
wow_srp_fmt_plug.c
/* * This software was written by Jim Fougeron jfoug AT cox dot net * in 2012. No copyright is claimed, and the software is hereby * placed in the public domain. In case this attempt to disclaim * copyright and place the software in the public domain is deemed * null and void, then the software is Copyright (c) 20...
k_clique_count_set_based.h
#pragma once #include <gms/representations/graphs/set_graph.h> template <class SGraph, class Set> size_t RecursiveStepCliqueCount(SGraph& graph, const size_t k, const Set &isect) { if (k == 1) return isect.cardinality(); assert(k > 1); size_t current = 0; for (auto vi : isect) { auto c...
hpdbscan.h
/* * Copyright (c) 2018 * Markus Goetz * * This software may be modified and distributed under the terms of MIT-style license. * * Description: Highly parallel DBSCAN algorithm implementation * * Maintainer: m.goetz * * Email: markus.goetz@kit.edu */ #ifndef HPDBSCAN_H #define HPDBSCAN_H #include <cmath> #include <cs...
mtSpGEMM.h
#ifndef _mtSpGEMM_h #define _mtSpGEMM_h #include "CombBLAS.h" namespace combblas { /* Multithreaded prefix sum Inputs: in: an input array size: the length of the input array "in" nthreads: number of threads used to compute the prefix sum Output: return an array of size "size+1" the memory of ...
mmult_openmp.c
/** * @author Zachary M. Mattis * ECE 1166 * OpenMP Matrix Multiplication * February 19, 2019 * * This program is a matrix multiply program, * capable of multiplying an (M X N) * (N x P) matrix sizes. * The matrices of this program are stored in memory * in row-major order. * * This program was successfully ...
y_solve-brisbane.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB BT code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
gemver.pluto_ancc.par.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <math.h> #define alpha 1 #define beta 1 double A[N][N +20]; double B[N][N +20]; double x[N]; double u1[N]; double u2[N]; double v1[N]; double v2[N]; double w[N]; double y[N]; double z[N]; void init_arrays() { int i, j; for (i=0; i<N; i++)...
eltwise.h
// Copyright 2018 Xiaomi, 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 applicab...
problem.fv.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
FirstDerivativeSecondOrder.c
/*! @file FirstDerivativeSecondOrder.c @author Debojyoti Ghosh @brief Second order finite-difference approximation to first derivative */ #include <stdio.h> #include <stdlib.h> #include <basic.h> #include <arrayfunctions.h> #include <firstderivative.h> #include <mpivars.h> #include <hypar.h> typedef MPIVariab...
preprocessingInfo.c
#include <stdio.h> int main (void) { int mits=5000; #ifdef _OPENMP #pragma omp parallel { #pragma omp single printf("Running using %d threads...\n",omp_get_num_threads()); } #endif mits ++; return 0; }
core_zttqrt.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include <plasma_core_blas.h> #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" #include <omp.h> // This will b...
ompfor2.c
/* loop scheduling */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int a[20]; void foo(int lower, int upper, int stride) { int i; #pragma omp single printf("---------default schedule--------------\n"); #pragma omp for nowait for (i=lower;i<upper;i+=stride) { a[i]=i*2; printf("Iteration ...
GB_binop__isge_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
local_estimator.h
/* * estimator.h * * Created on: Mar 22, 2012 * Author: aitor */ #ifndef REC_FRAMEWORK_LOCAL_ESTIMATOR_H_ #define REC_FRAMEWORK_LOCAL_ESTIMATOR_H_ #include <pcl/apps/3d_rec_framework/feature_wrapper/normal_estimator.h> #include <pcl/keypoints/uniform_sampling.h> #include <pcl/surface/mls.h> #i...
FirstDerivativeSecondOrder.c
/*! @file FirstDerivativeSecondOrder.c @author Debojyoti Ghosh @brief Second order finite-difference approximation to first derivative */ #include <stdio.h> #include <stdlib.h> #include <basic.h> #include <arrayfunctions.h> #include <firstderivative.h> #include <mpivars.h> #include <hypar.h> typedef MPIVariab...
bitfield-1.c
#include <assert.h> #define ASSIGN_SX(N) \ s##N.a1 = 1; \ s##N.a2 = 2; \ s##N.a3 = 3; ...
opi.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> int main(int argc, char **argv) { //seed random number generator // Q2b: get the number of threads to run with from agrv and // add OpenMP API code to set number of threads here int Nthreads = atoi(argv[1]); omp_set_num_threads(Nthrea...
kernels.h
void mr32_sf( const uint32_t *__restrict__ bases, const uint32_t *__restrict__ n32, int *__restrict__ val, int iter) { #pragma omp target teams distribute parallel for thread_limit(256) for (int j = 0; j < iter; j++) { int n = n32[j]; for (int cnt = 1; cnt <= BASES_CNT32; cnt++) { #pragma omp ...
real.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include <string.h> #include "globals.h" #include "randdp.h" #include "timers.h" #include "print_results.h" static void setup(int *n1, int *n2, int *n3); static void mg3P(double u[], double v[], double r[], double a[4], double ...
Statistics.h
#ifndef DEF_STATISTICS #define DEF_STATISTICS /* ========================================================================= Copyright (c) 2008-2015, Institute for Microelectronics, TU Wien. ----------------- ViennaTS - The Vienna Topography Simulator ...
cryptsha256_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * based on rawSHA256_fmt.c code and Drepper's spec at * http://www.akkadia.org/drepper/SHA-crypt.txt * * This software is Copyright (c) 2012 magnum, and it is hereby released to the * general public under the following terms: Redistribution and use in ...
taskloop_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp taskloop simd'}} #pragma omp taskloop simd // ex...
Example_target_unstructured_data.1.c
#include <stdlib.h> typedef struct { double *A; int N; } Matrix; void init_matrix(Matrix *mat, int n) { mat->A = (double *)malloc(n*sizeof(double)); mat->N = n; #pragma omp target enter data map(alloc:mat->A[:n]) } void free_matrix(Matrix *mat) { #pragma omp target exit data map(delete:mat->A[:mat->N]) ...
kmeans_clustering.c
/*****************************************************************************/ /*IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. */ /*By downloading, copying, installing or using the software you agree */ /*to this license. If you do not agree to this license, do not download, */ ...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
fastmarching_tree.h
//last change: by PHC, 2013-02-13. adjust memory allocation to make it more robust /***************************************************************** * file : fastmarching_tree.h, Hang Xiao, Jan 18, 2012 * * fastmarching_tree * fastmarching_tracing * * ***********************************************************...
omp_nest_lock.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" omp_nest_lock_t lck; int test_omp_nest_lock() { int nr_threads_in_single = 0; int result = 0; int nr_iterations = 0; int i; omp_init_nest_lock(&lck); #pragma omp parallel shared(lck) { #pragma omp for for(i = 0; i < L...
ops.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
print.c
// RUN: %libomp-tool -DFIRST_TOOL -o %t.first.tool.so %s && \ // RUN: %libomp-tool -DSECOND_TOOL -o %t.second.tool.so %s && \ // RUN: %libomp-compile && \ // RUN: env OMP_TOOL_LIBRARIES=%t.first.tool.so \ // RUN: PRINT_TOOL_LIBRARIES=%t.second.tool.so \ // RUN: %libomp-run | %sort-threads | FileCheck %s // For GCC we ...
GB_unaryop__lnot_int8_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
dyn_sswp.h
#ifndef DYN_SSWP_H_ #define DYN_SSWP_H_ #include <vector> #include <algorithm> #include "traversal.h" #include "sliding_queue_dynamic.h" #include "../common/pvector.h" #include <fstream> extern std::ofstream algF; /* Algorithm: Incremental SSWP and SSWP from scratch. This is the bottleneck shortest path problem. ...
3d7pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
GB_unaryop__identity_uint8_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__div_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
pr54017.c
/* PR middle-end/54017 */ /* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void f1 (void) { #pragma omp parallel sections { #pragma omp section { for (;;) ; } } } int f2 (void) { int i = 0; #pragma omp parallel #pragma omp sections reduction(+:i) { #pragma omp section { for (;;...
math_cpu.c
/******************************************************************************* * Copyright 2017-2018 Intel Corporation * * 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.apa...
GB_unop__identity_int64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
pr26943-3.c
/* PR c++/26943 */ /* { dg-do run } */ extern int omp_set_dynamic (int); extern int omp_get_thread_num (void); extern void abort (void); int a = 8, b = 12, c = 16, d = 20, j = 0, l = 0; char e[10] = "a", f[10] = "b", g[10] = "c", h[10] = "d"; volatile int k; int main (void) { int i; omp_set_dynamic (0); omp_se...
vla_crash.c
// RUN: %clang_cc1 -verify -triple powerpc64le-unknown-linux-gnu -fopenmp -x c -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics int a; // CHECK-LABEL: foo void foo() { int(*b)[a]; int *(**c)[a]; // CHECK: [[B:%.+]] = alloca i32*, // CHECK: [[C:%.+]] = alloca i32***, // CHECK: @__kmpc_global_thre...
tile_nb.c
#include <stdlib.h> #include "tile_nb.h" void tile_nb(float* l,int m,int n,float*output){ #pragma omp parallel { float* tmp2 = (float*) calloc(1,(66) * (64) * sizeof (float)); #pragma omp for for (int H34 = 0; H34 < (((n - (1 + 0)) - (1)) / (64)); H34++) { for (int H46 = 0; H46 < ((((m - (1 + 0)) - (1 + 0))) ...
yael_fisher_elem.c
/* Copyright © INRIA 2009-2014. Authors: Matthijs Douze & Herve Jegou Contact: matthijs.douze@inria.fr herve.jegou@inria.fr This file is part of Yael. Yael 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 Founda...
dfwavelet.c
/* * Copyright 2013-2015 The Regents of the University of California. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2013 Frank Ong <frankong@berkeley.edu> * 2013 Martin Uecker, Pat Virtue, and Mark Murphy * * * Ong F...
convolution_4x4.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GB_unop__abs_int8_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
gptl.c
/* ** gptl.c ** Author: Jim Rosinski ** ** Main file contains most user-accessible GPTL functions */ #ifdef HAVE_MPI #include <mpi.h> #endif #include <stdlib.h> /* malloc */ #include <sys/time.h> /* gettimeofday */ #include <sys/times.h> /* times */ #include <unistd.h> /* gettimeofday, syscall ...
XSHA512_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2008,2011 by Solar Designer */ #if FMT_EXTERNS_H extern struct fmt_main fmt_XSHA512; #elif FMT_REGISTERS_H john_register_one(&fmt_XSHA512); #else #include "sha2.h" #include "arch.h" #include "params.h" #include "common.h" #include "format...
GB_unaryop__identity_int32_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
ast-dump-openmp-target-exit-data.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test(int x) { #pragma omp target exit data map(from \ : x) } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> ...
par_interp.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
singleModificado.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> main(){ int n=9, i,a,b[n]; for(i=0;i<n;i++) b[i]=-1; #pragma omp parallel { #pragma omp single { printf("Introduce valor de inicializacion a:"); scanf("%d",&a); printf("Single ejecutada por el thread%d\n",omp_get_thread_num(...
GB_binop__isne_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
gbdt.h
#ifndef LIGHTGBM_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include <LightGBM/prediction_early_stop.h> #include <LightGBM/json11.hpp> #include "score_updater.hpp" #include <cstdio> #include <vector> #include <string> #include <fstream> ...
GB_binop__bxnor_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
packet-inl.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 ...
updater_basemaker-inl.h
/*! * Copyright 2014 by Contributors * \file updater_basemaker-inl.h * \brief implement a common tree constructor * \author Tianqi Chen */ #ifndef XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_ #define XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_ #include <rabit/rabit.h> #include <vector> #include <algorithm> #include <string>...
SplineHybridAdoptorReaderP.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Jeremy Mc...
oyranos_cmm_lcms.c
/** @file oyranos_cmm_lcms.c * * Oyranos is an open source Color Management System * * @par Copyright: * 2007-2016 (C) Kai-Uwe Behrmann * * @brief littleCMS CMM module for Oyranos * @author Kai-Uwe Behrmann <ku.b@gmx.de> * @par License: * new BSD <http://www.opensource.org/lic...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
GB_unaryop__identity_uint16_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
ks_cpp.c
#include <stdio.h> #include <malloc.h> #include <assert.h> #include <memory.h> #include <math.h> // C bool typedef enum { true=1, false=0 } bool; inline void update_min(double* p1, double v2) { if (v2 < *p1) *p1 = v2; } // https://stackoverflow.com/questions/28258590/using-openmp-to-get-the-...
big_transfers.c
#include <stdio.h> #define N 10 #define M 2000 void init(int* array, int size, int scale) { for (int i = 0; i < size; i++) array[i] = i*scale; } void plus1(int input[N][M], int output[N][M]) { for (int i = 0; i < N; i++) for (int j = 0; j < M; j++) output[i][j] = input[i][j] + 1; } void display(in...
dnnl_quantize_asym-inl.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 ...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) >...
convolutiondepthwise_3x3_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
DRB109-orderedmissing-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
learner.c
/* ============================================================================= * * learn.c * -- Learns structure of Bayesian net from data * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh...
GB_binop__eq_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_unop__asinh_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_binop__ge_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
omp.c
#include "shared.h" void update_velocity(struct Body *bodies) { //F = GmM/r^2 //a = Gm/r^2 m is mass of the other, our mass cancels //r^2 = distance^2 //distance = sqrt(x^2 + y^2 + z^2) //r^2 = x^2 + y^2 + z^2 fptype r2, new_mass; int i,j; #pragma omp parallel for private(new_mass, r2, j) f...
flexProxDualInnerProduct.h
#ifndef flexProxDualInnerProduct_H #define flexProxDualInnerProduct_H #include "flexProx.h" //! represents prox for an inner product data term /*! \f$ \alpha \langle \cdot,f\rangle \f$ */ template<typename T> class flexProxDualInnerProduct : public flexProx<T> { #ifdef __CUDACC__ typedef thrust::device_vector<T> T...
x86_utils.h
/* Copyright (c) 2016 Anakin Authors All Rights Reserve. 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 applicable law...
DRB012-minusminus-var-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
myFunc.h
// Rob Farber #include <stdlib.h> #include <string.h> #include <stdint.h> #include <malloc.h> #include <math.h> #include <omp.h> #define MIC_DEV 0 #define ALLOC alloc_if(1) free_if(0) #define FREE alloc_if(0) free_if(1) #define REUSE alloc_if(0) free_if(0) // Use a struct to pass and get data from the objective func...
libdvden.c
#include "libdvden.h" //encrypts the string by adding, from the beginning to the end void da(char* str, char* key, int strl,int keyl){ //encrypts starting from the beginning #pragma omp parallel for //parallelization, to optimize CPU usage for( int counter = 0; counter < strl-1; counter++){ /...
pi-v8.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #include "extrae_user_events.h" #define PROG...