source
stringlengths
3
92
c
stringlengths
26
2.25M
flowinfo_ipv4_src.c
/* * Copyright 2014-2016 Nippon Telegraph and Telephone 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.apache.org/licenses/LICENSE-2.0 * * Unless requi...
nvector_openmpdev.c
/* ----------------------------------------------------------------- * Programmer(s): David J. Gardner and Shelby Lockhart @ LLNL * ----------------------------------------------------------------- * Acknowledgements: This NVECTOR module is based on the NVECTOR * Serial module by Scott D. Cohen, A...
GB_critical_section.c
// Source/Template/GB_critical_section: TODO in 4.0: delete // DEPRECATED: This critical section is only used to protect the global queue // of matrices with pending operations, for GrB_wait ( ). It will be removed // in v4.0. { #if defined (USER_POSIX_THREADS) { ok = (pthread_mutex_lock (&GB_sync) ==...
config.h
/* config.h. Generated from config.in by configure. */ /* config.in. Generated from configure.ac by autoheader. */ /* Check that config.h is #included before system headers (this works only for glibc, but that should be enough). */ #if defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__CONFIG_H__...
3d7pt.c
/* * Order-1, 3D 7 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) ...
bitshuffle_core.c
/* * Bitshuffle - Filter for improving compression of typed binary data. * * Author: Kiyoshi Masui <kiyo@physics.ubc.ca> * Website: http://www.github.com/kiyo-masui/bitshuffle * Created: 2014 * * See LICENSE file for details about copyright and rights to use. * */ #include "bitshuffle_core.h" #include "bitshu...
knn.h
/* Copyright (c) 2020, Intel Corporation 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 notice, this list of conditions and the following disclaimer. * ...
GB_subassign_06s_and_14.c
//------------------------------------------------------------------------------ // GB_subassign_06s_and_14: C(I,J)<M or !M> = A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Ide...
LayerNormOps.h
#pragma once #include <string.h> #include <cmath> #include <algorithm> #include "General.h" #include "TensorRef.h" #include "Vector-inl.h" OPS_API int TS_AddLayerNorm( TensorRef* out_, TensorRef* in1_, TensorRef* in2_, TensorRef* gamma_, TensorRef* beta_, float eps, int rows, int cols); OPS_API int TS_Add...
heat_1d-a.pluto.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)) /* * Discretized 1D heat equation stencil with non periodic boundary conditions * Adapt...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
explicit_solver_strategy.h
// // Authors: // Miguel Angel Celigueta maceli@cimne.upc.edu // Miquel Santasusana msantasusana@cimne.upc.edu // #if !defined(KRATOS_EXPLICIT_SOLVER_STRATEGY) #define KRATOS_EXPLICIT_SOLVER_STRATEGY // Project includes #include "utilities/timer.h" #include "custom_elements/Particle_Contact_Element.h" #include "inc...
test_trans.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> #include <blis/blis.h> #include "test_base.h" #include "../src/gemm_blis.h" #include "../src/im2row_nhwc.h" #include "../src/im2col_nchw.h" int main(int argc, char *argv[]) { TEST_INIT float *image = random_alloc(b * h * w * c); float *out = random...
vecAdd_fix.c
/****************************************************************************** * FILE: omp_bug5fix.c * DESCRIPTION: * The problem in omp_bug5.c is that the first thread acquires locka and then * tries to get lockb before releasing locka. Meanwhile, the second thread * has acquired lockb and then tries to get loc...
GB_unop__identity_int8_int8.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...
bicg.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 */ /* bicg.c: this file is part of PolyBench/C */ #include <stdio.h> #include <unistd.h> #include <string.h> #include...
pr68128-2.c
/* PR tree-optimization/68128 */ /* { dg-do compile } */ /* { dg-additional-options "-O2 -fdump-tree-omplower" } */ extern int omp_get_thread_num (void); extern int omp_get_ancestor_thread_num (int); void b1 (int, int); int f1 (void) { int a1 = 1; unsigned char a2 = 2; unsigned long a3 = 3; long long a4 = 4;...
parallel_row.c
#include<stdio.h> #include<stdlib.h> #include<time.h> #include<omp.h> #include<math.h> #include<string.h> #define constant 6.28318530718 #define CLK CLOCK_MONOTONIC struct timespec diff(struct timespec start, struct timespec end){ struct timespec temp; if((end.tv_nsec-start.tv_nsec)<0){ temp.tv_sec = end.tv_sec-st...
KKSdiluteBinaryConcSolver.h
#ifndef included_KKSdiluteBinaryConcSolver #define included_KKSdiluteBinaryConcSolver #include "NewtonSolver.h" #include "datatypes.h" namespace Thermo4PFM { class KKSdiluteBinaryConcSolver : public NewtonSolver<2, KKSdiluteBinaryConcSolver, JacobianDataType> { public: #ifdef HAVE_OPENMP_OFFLOAD #pragma omp decl...
hierarchical_source.c
FLT * X(chebyshev_points)(char KIND, int n) { int nd2 = n>>1; FLT * x = malloc(n*sizeof(FLT)); if (KIND == '1') { for (int k = 0; k <=nd2; k++) x[k] = Y(__sinpi)((n-2*k-ONE(FLT))/(2*n)); for (int k = 0; k < nd2; k++) x[n-1-k] = -x[k]; } else if (KIND == '2') {...
taskwait-depend.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // taskwait with depend clause was introduced with gcc-9 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 // icc does not yet support taskwait with depend clause // XFAIL: icc // support for taskwait with depend clause introduced in cl...
papi_hl.c
/****************************/ /* THIS IS OPEN SOURCE CODE */ /****************************/ /** * @file papi_hl.c * @author Frank Winkler * frank.winkler@icl.utk.edu * @author Philip Mucci * mucci@cs.utk.edu * @brief This file contains the 'high level' interface to PAPI. * BASIC is a high...
aux_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) **************************************...
relu_kernel_arm.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...
gbdt.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include...
energy.h
#pragma once #include "bonds.h" #include "externalpotential.h" // Energybase implemented here #include "sasa.h" #include "space.h" #include "aux/iteratorsupport.h" #include "aux/pairmatrix.h" #include "smart_montecarlo.h" #include <range/v3/range/conversion.hpp> #include <range/v3/view/iota.hpp> #include <range/v3/vie...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
dp_parallelized_hard_knapsack_.c
#include<stdio.h> #include<stdlib.h> #include<omp.h> #include<stdbool.h> #include<string.h> #include <windows.h> #include<math.h> #include <dos.h> #include <dir.h> #define SIZE 100000 //#define binsize 50 char mssg[SIZE]; //**Only condition for knapsack encryption is message must be a multiple of numb...
GB_binop__bxor_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
SpatialClassNLLCriterion.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialClassNLLCriterion.c" #else #define INITIAL_CHECK \ THArgCheck(THIndexTensor_(nDimension)(target) == 3, 3, \ "only batches of spatial targets supported (3D tensors)" ...
rankmatrix.c
/* This file is part of ParTI!. ParTI! 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 3 of the License, or (at your option) any later version. ParTI! is distributed...
GB_bitmap_add_template.c
//------------------------------------------------------------------------------ // GB_bitmap_add_template: C = A+B, C<M>=A+B, and C<!M>=A+B, C bitmap //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
2214.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
GB_assign_zombie4.c
//------------------------------------------------------------------------------ // GB_assign_zombie4: delete entries in C(i,:) for C_replace_phase //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
ICP.h
/////////////////////////////////////////////////////////////////////////////// /// "Sparse Iterative Closest Point" /// by Sofien Bouaziz, Andrea Tagliasacchi, Mark Pauly /// Copyright (C) 2013 LGG, EPFL /////////////////////////////////////////////////////////////////////////////// /// 1) This file contains ...
Mesh.h
#ifndef MESH_H #define MESH_H #include "Material.h" #include "util/Array.h" #include "util/vector.h" #include "Vertex.h" #include "VertexArray.h" #include "DataUsagePattern.h" #include "gl/gl_core_3_3.h" #include <glm/matrix.hpp> #include <vector> namespace engine { namespace renderer { using util::Array;...
GB_unaryop__identity_int64_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
zrocks.c
/* libztl: User-space Zone Translation Layer Library * * Copyright 2019 Samsung Electronics * * Written by Ivan L. Picoli <i.picoli@samsung.com> * * 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 L...
cpu.c
/* * Copyright 2012 INRIA Paris-Rocquencourt * Copyright 2012 Ecole Normale Superieure * * Use of this software is governed by the MIT license * * Written by Tobias Grosser, INRIA Paris-Rocquencourt, * Domaine de Voluceau, Rocquenqourt, B.P. 105, * 78153 Le Chesnay Cedex France * and Sven Verdoolaege, * Ecole...
matrix.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <omp.h> void init_matrix(double* m, int rows, int columns) { #pragma omp parallel for schedule(static) for (int i = 0; i < rows; ++i) for (int j = 0; j < columns; ++j) m[i*columns+j] = i + j; } void mult_matrix(double* out, double* left, doubl...
9103.c
// this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose void kernel_heat_3d(int tsteps, int n, double A[200 + 0][200 + 0][200 + 0], double B[200 + 0][200 + 0][200 + 0])...
unfold.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "THNN/generic/unfold.c" #else /* note: due to write issues, this one cannot be parallelized as well as unfolded_copy */ void THNN_(unfolded_acc)( THTensor *finput, THTensor *input, int kW, int kH, int dW, int dH...
Par-03-OmpParallelOmpForLoop.c
int main(int argc, char **argv) { int a[4] = {1,2,3,4}; #pragma omp parallel { #pragma omp for for (int i = 0; i < 4; ++i) { a[i] = 3*a[i]; } } return 0; }
FireEffect.c
/* Generated by Cython 0.29.21 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython...
prepress.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__abs_fp32_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...
sum.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include <sys/time.h> enum { N = 1000000 }; double wtime() { struct timeval t; gettimeofday(&t, NULL); return (double)t.tv_sec + (double)t.tv_usec * 1E-6; } double sum(double *v, int low, int high) { if (low == high) ...
SoaDistanceTableABOMPTarget.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 ...
GB_unaryop__one_uint64_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
mixed_tentusscher_myo_epi_2004_S2_1.c
// Scenario 2 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S2_1.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_...
MAS_c.c
#include <stdio.h> #include "MAS_c.h" #include <omp.h> #include <math.h> // ###################### CIC #################### // // This function carries out the standard CIC with weights in 3D void CIC(FLOAT *pos, FLOAT *number, FLOAT *W, long particles, int dims, int axes, FLOAT BoxSize, int threads) { long i; ...
integral_omp_pad.c
// Author: Fabio Rodrigues Pereira // E-mail: fabior@uio.no // compiling & running // clang -Xpreprocessor -fopenmp integral_omp_pad.c -lomp // ./a.out // problem: false sharing, same cache line for sum *video7 #include <stdlib.h> // rand, malloc, calloc and free. #include <stdio.h> // printf #include <math.h> #inc...
GB_unaryop__lnot_int32_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
matvec.c
//matvec.c //Multiplies a matrix by a vector #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 1000 #define N 1200 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 100...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
convolution_1x1.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 ...
main2.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <complex.h> #include "ppm.h" #include "fractal.h" #define UNKNOWN_MODE 0 #define JULIA_MODE 1 #define MANDELBROT_MODE 2 int main(int argc, char **argv) { if (argc < 2) { fprintf(stderr, "Usage: %s [J/M] [options]\n", argv[0]); re...
StomOmpc_02.c
/* poe -rmpool 1 -procs 1 mpcc_r -qsmp=noauto:omp:explicit -O3 -qarch=pwr3 -qtune=pwr3 ompc_02.c bind.o -lm -o ompc_02 */ #define FLT double #define INT int #include "mpi.h" #include <stdlib.h> #include <stdio.h> #include <time.h> #include <math.h> #if macintosh #include <console.h> #endif FLT **matrix(INT nrl,INT nr...
GPUCommonMath.h
//**************************************************************************\ //* This file is property of and copyright by the ALICE Project *\ //* ALICE Experiment at CERN, All rights reserved. *\ //* *\ //* Prim...
ofmo-inter-frag.c
/** * @file ofmo-inter-frag.c * フラグメント電子状態計算のクーロン相互作用の近似レベルなどを * 決めるモノマー間距離の計算などに関する関数群を定義している。 * * TODO: * モノマー間距離はdouble型ではなく、float型で十分では? * * */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "ofmo-def.h" #include "ofmo-data.h" #include "ofmo-mserv-cont.h" /* Wan der ...
GB_binop.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
dropout-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 ...
core_zgessq.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include <math.h> #include <plasma_core_blas.h> #include "plasma_types.h" #include "core_lapack.h" /*****************************************...
GB_unop__acosh_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
test.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <string.h> int main() { omp_set_dynamic(0); #pragma omp parallel num_threads(4) { int currentThread = omp_get_thread_num(); if(currentThread == 0) { printf("Master!\n"); ...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
sudoku_estatico.c
#include <stdio.h> #include <stdlib.h> #include "ctimer.h" #include "sudoku.h" #include <omp.h> int main( int argc, char *argv[] ) { int sol[81]; if( argc < 2 ) { printf("Usage: %s profundidad\n",argv[0]); exit(1); } int profundidad; sscanf(argv[1],"%d",&profundidad); printf("sudoku inicial: \n");...
searchutils.c
/* Generated by Cython 0.29.21 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [ "/tmp/pip-build-env-iwhfc4j5/overlay/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h", "/tmp/pip-build-env-iwhfc4j5/overlay/lib/python3.8/site-packages/numpy/core/include/num...
GB_unaryop__minv_int32_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...
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...
point_point_search.h
// // Project Name: Kratos // Last Modified by: $Author: clabra $ // Date: $Date: 2007-03-29 19:37:47 $ // Revision: $Revision: 1.2 $ // // #if !defined(KRATOS_POINT_POINT_SEARCH_H_INCLUDED) #define KRATOS_POINT_POINT_SEARCH_H_INCLUDED // System includes #include <string> ...
ac_down.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> void fillMatrix(int n, double * matrix); double * createMatrix(int n); int main(int argc, char * argv[]) { unsigned int mSize = 0, i, k; double * a, * b, * c; double wtime; //mSize = 270; mSize = 600; a = (double*)createMatrix(mSize); b = (double*)creat...
cpu_ctc.h
#pragma once #include <tuple> #include <cmath> #include <limits> #include <algorithm> #include <numeric> #if !defined(CTC_DISABLE_OMP) && !defined(APPLE) #include <omp.h> #endif #include "ctc_helper.h" template<typename ProbT> class CpuCTC { public: // Noncopyable CpuCTC(int alphabet_size, int minibatch, v...
threading_utils.h
/*! * Copyright 2015-2019 by Contributors * \file common.h * \brief Threading utilities */ #ifndef XGBOOST_COMMON_THREADING_UTILS_H_ #define XGBOOST_COMMON_THREADING_UTILS_H_ #include <dmlc/common.h> #include <vector> #include <algorithm> #include <type_traits> // std::is_signed #include "xgboost/logging.h" name...
c_fft.c
/* *********************************************************************** This program is part of the OpenMP Source Code Repository http://www.pcg.ull.es/ompscr/ e-mail: ompscr@etsii.ull.es This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lice...
pkzip_fmt_plug.c
/* PKZIP patch for john to handle 'old' pkzip passwords (old 'native' format) * * Written by Jim Fougeron <jfoug at cox.net> in 2011. 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 dee...
func_2v.c
void func_2v(float* in, float* out, unsigned n){ unsigned i; #pragma omp target teams distribute parallel for map(to: in[0:n]) map(from: out[0:n]) for(i=0; i<n; ++i){ out[i]=in[i]/2; } }
_jacobi-cuda.c
/* * Copyright 2012 NVIDIA 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.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in wri...
OpenMPClause.h
//===- OpenMPClause.h - Classes for OpenMP clauses --------------*- 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 // //===---------------------------...
DRB001-antidep1-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...
radix_sort.h
#ifndef _PCL_RADIX_SORT_ #define _PCL_RADIX_SORT_ #include <utility> #include <limits> #include "utils.h" #ifndef BKT_BITS #define BKT_BITS 12 #endif template<typename T> using Key_Value_Pair = std::pair<T, T>; template<typename T> Key_Value_Pair<T>* radix_sort_parallel(Key_Value_Pair<T>* inp_buf, Key_Value_Pair<T...
GB_binop__band_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...
offloading_success.c
// RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu #include <stdio.h> #include <omp.h> int main(v...
GB_binop__isne_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...
kdtree_index.h
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. * * THE BSD LICENSE * * Redistrib...
bwtdt_fmt_plug.c
/* bwtdt s.md5(sha1(md5(s.sha1(p)))) cracker patch for JtR. Hacked together * during August, 2013 by Dhiru Kholia <dhiru at openwall.com> * * This software is Copyright (c) 2013, Dhiru Kholia <dhiru at openwall.com>, * and it is hereby released to the general public under the following terms: * * Redistribution a...
csr_matvec.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
blake2sp-ref.c
/* BLAKE2 reference source code package - reference C implementations Written in 2012 by Samuel Neves <sneves@dei.uc.pt> To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is dist...
simpleomp.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 ...
reduction_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // Denis Demidov...
perm.c
#include "ghost/context.h" #include "ghost/locality.h" #include "ghost/util.h" typedef struct { ghost_gidx idx, pidx; } ghost_permutation_ent_t; static int perm_ent_cmp(const void *a, const void *b) { return ((ghost_permutation_ent_t *)a)->pidx - ((ghost_permutation_ent_t *)b)->pidx; } gh...
mxEvaluateFlux2d.c
#include "mex.h" #include "mxSWE2d.h" #ifdef _OPENMP #include <omp.h> #endif /** */ void evaluateNodalFlux(double hcrit, double gra, double h, double qx, double qy, double* Eh, dou...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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 // //===---------------------------...
MatVecMult.h
// Version: $Id$ // // // Commentary: // // // Change Log: // // // Code: #pragma once #include <cstddef> // ///////////////////////////////////////////////////////////////// // C-like functions // ///////////////////////////////////////////////////////////////// inline void matVecMult(double *y, const double *A...
2.race1.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 20 int main() { int A[N][N]; #pragma omp simd for (int i = 1; i < N; i++) for (int j = 1; j < N; j++) A[i][j] = A[i - 1][j]; } // CHECK: Data Race detected // END
sample_task_single_producer.c
#include <omp.h> #include <stdio.h> #include <sys/time.h> int main(int argc, char * argv[]) { int i,num=(argc>1)?atoi(argv[1]):100; int nthreads; struct timeval t_start, t_end; double time; double *a = (double *)malloc(sizeof(double)*num); #pragma omp parallel { nthreads=omp_get_n...
kmpp.h
/** * Copyright (c) 2015, Jozef Stefan Institute, Quintelligence d.o.o. and contributors * All rights reserved. * * This source code is licensed under the FreeBSD license found in the * LICENSE file in the root directory of this source tree. */ /* * kmpp.h * * Created on: Jan 26, 2011 * Author: tadej ...
DRB112-linear-orig-no.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor 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 L...
pipeline_example.c
/* The main host program controlling and representing the whole application */ int main(int argc, char* argv[]) { int image[HEIGHT][WIDTH]; unsigned char output[HEIGHT][WIDTH]; // Initialize with some values init(WIDTH, HEIGHT, image); for(in) { function_A(in_A, out_A); function_B(out_A, out_B...
ccv_bbf.c
#include "ccv.h" #include "ccv_internal.h" #include <sys/time.h> #ifdef HAVE_GSL #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #endif #ifdef USE_OPENMP #include <omp.h> #endif const ccv_bbf_param_t ccv_bbf_default_params = { .interval = 5, .min_neighbors = 2, .accurate = 1, .flags = 0, .size = { 24, 2...