source
stringlengths
3
92
c
stringlengths
26
2.25M
stream.c
/*-----------------------------------------------------------------------*/ /* Program: STREAM */ /* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */ /* Original code developed by John D. McCalpin */ /* Programm...
threadpool.h
/* Copyright 2015 The TensorFlow Authors. 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 applicable law or a...
ast-dump-openmp-for.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_one(int x) { #pragma omp for for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp for for (int i = 0; i < x; i++) for (int i ...
carro.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include <omp.h> #include "carro.h" #include "client.h" static int messages = 0, empty = 0, brake = 0, throttle = 0, ambulance = 0; int security_manager(char * msg, Car * car) { // 0 - nenhum comando / manter // 1 - freie // 2 -...
distort.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
BenchUtils.h
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <chrono> #include <functional> #include <vector> #include <immintrin.h> #ifdef US...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determineFileType ( std::vector<...
SpatialReplicationPadding.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialReplicationPadding.c" #else static void THNN_(SpatialReplicationPadding_updateOutput_frame)( real *input_p, real *output_p, int64_t nslices, int64_t iwidth, int64_t iheight, int64_t owidth, int64_t oheight, int pad_l, int pad_r, int pad_t, int...
feature.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
softmax.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...
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...
ordering_op-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 ...
GB_unaryop__abs_uint16_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
effect.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__lnot_fp64_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...
omp_for_ordered.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" static int last_i = 0; /* Utility function to check that i is increasing monotonically with each call */ static int check_i_islarger (int i) { int islarger; islarger = (i > last_i); last_i = i; return (islarger...
1.norace12.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define M 20 #define N 20 int main() { double A[M][N], C[M][N], alpha = 0.5, beta = 0.3; #pragma omp parallel for for (int i = 0; i < M; i++) { for (int j = 0; j <= i; j++) C[i][j] *= beta; for (int k = 0; k < N; k++) { ...
missing.c
#include <stdio.h> #include <stdlib.h> #include "grb2.h" #include "wgrib2.h" /* * Public domain: w. ebisuzaki * number of missing data points as determined by bitmap * * v1.1: just faster my dear * v1.2: just faster my dear * v1.3: just faster my dear * */ static unsigned int bitsum[256] = { 8, 7,...
Visu.c
/* * visualization.c * * Created on: Feb 19, 2016 * Author: abauville */ #include "stokes.h" #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stddef.h> #if (VISU) bool shiftMod; void Visu_Memory_allocate( Visu* Visu, Grid* Grid ) { Visu->U = (GLfloat*) malloc(2*Gri...
gamma_index_ivfpq.h
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This faiss source code is licensed under the MIT license. * https://github.com/facebookresearch/faiss/blob/master/LICENSE * * * The works below are modified based on faiss: * 1. Replace the static batch indexing with real time indexing * 2. Add the fin...
displacement_lagrangemultiplier_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
tinyexr.h
/* Copyright (c) 2014 - 2017, Syoyo Fujita All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and t...
randomkfold.h
// // Created by Xinyu Zhang on 4/6/21. // #ifndef COSAN_RANDOMKFOLD_H #define COSAN_RANDOMKFOLD_H #include <cosan/selection/selection.h> namespace Cosan{ class RandomKFold: public Splitter { public: RandomKFold() : Splitter() {} RandomKFold(gsl::index kfoldnumber) : Splitter(kfoldnumber) {} ...
task-construct-alg-openmp3x.c
/*************************************************************************** OpenMP-3.0 Example Codes Beta-v1.0 File : task-construct-alg-openmp3x.c Date : Aug 2011 Description : Simple example program to demonstrates the use of openmp new feature "tas...
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 // //===---------------------------...
build_list.h
#ifndef build_list_h #define build_list_h #include <unordered_map> #include <unordered_set> #include <set> #include <queue> #include "exafmm_t.h" #include "geometry.h" #include "hilbert.h" #include "fmm_base.h" namespace exafmm_t { using std::abs; using std::max; using std::unordered_map; using std::unordered_...
md2_fmt_plug.c
/* MD2 cracker patch for JtR. Hacked together during May of 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 and use in source and binary form...
BoWBuilder.h
// // BoWBuilder.h // BoVW // // Created by willard on 15/7/21. // Copyright (c) 2015年 wilard. All rights reserved. // #ifndef __BOW_BUILDER__ #define __BOW_BUILDER__ #include <iostream> #include <vector> #include <string> #include <set> #include <utility> #include "opencv2/core/core.hpp" #include "opencv2/highgu...
wave_comparison.c
/*********************************************************************************/ /* */ /* Animation of wave equation in a planar domain */ /* ...
GB_binop__second_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
elemwise_binary_op.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 ...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
samplesort.c
/*! \file \brief A parallel samplesort program \date Started 4/20/2013 \author George */ #include <GKlib.h> #include <omp.h> #include <sys/types.h> #include <sys/time.h> #include <sys/resource.h> #include <unistd.h> /**************************************************************************/ /*! Sorts the combined...
ch_common.h
#ifndef _BENCH_CHOLESKY_COMMON_ #define _BENCH_CHOLESKY_COMMON_ #include <mkl.h> #include <mpi.h> #include <omp.h> //#define DEBUG #ifdef _USE_HBW #include <hbwmalloc.h> #endif void dgemm_ (const char *transa, const char *transb, int *l, int *n, int *m, double *alpha, const void *a, int *lda, void *b, ...
softmax-inl.h
/*! * Copyright (c) 2017 by Contributors * \file softmax-inl.h * \brief */ #ifndef MXNET_OPERATOR_NN_SOFTMAX_INL_H_ #define MXNET_OPERATOR_NN_SOFTMAX_INL_H_ #include <vector> #include "../mxnet_op.h" #include "../operator_common.h" #include "../tensor/broadcast_reduce_op.h" namespace mxnet { namespace op { namesp...
omp_threadprivate_for.c
// RUN: %libomp-compile-and-run #include "omp_testsuite.h" #include <stdlib.h> #include <stdio.h> static int i; #pragma omp threadprivate(i) int test_omp_threadprivate_for() { int known_sum; int sum; known_sum = (LOOPCOUNT * (LOOPCOUNT + 1)) / 2; sum = 0; #pragma omp parallel { int sum0 = 0, i0; ...
network.h
/* Copyright (c) 2014, Kai Klindworth All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the followi...
relic_cp_phpe.c
/* * RELIC is an Efficient LIbrary for Cryptography * Copyright (C) 2007-2020 RELIC Authors * * This file is part of RELIC. RELIC is legal property of its developers, * whose names are not listed here. Please refer to the COPYRIGHT file * for contact information. * * RELIC is free software; you can redistribute...
DemBones.h
/////////////////////////////////////////////////////////////////////////////// // Dem Bones - Skinning Decomposition Library // // Copyright (c) 2019, Electronic Arts. All rights reserved. // /////////////////////////////////////////////////////////////////////////////// ...
snoop.c
/* * compute the duplex structure of two RNA strands, * allowing only inter-strand base pairs. * see cofold() for computing hybrid structures without * restriction. * * Ivo Hofacker * Vienna RNA package */ #if...
GB_unop__identity_int16_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
GB_binop__plus_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-...
pi_omp_overhead.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 <sys/time.h> #include <omp.h> /* OpenMP */ #if _EXTRAE_ #include "extrae_user_events.h" // Extrae Constants #define PROGRAM 100...
solving_strategy.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !defined(KRATOS_SOLVING...
mainFunctions.h
#ifndef MAIN_FUNCTION_H #define MAIN_FUNCTION_H #include "graph.h" #include "parsegraph.h" #include "graphutil.h" #include<sys/time.h> int runalgo(int argc,char** argv); void kernel(graph *G); /*** * The main Function. **/ int main(int argc, char** args) { struct timeval start, end; gettimeofday(&start, NULL...
syr2k.limlam2.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 */ /* syr2k.c: this file is part of PolyBench/C */ #include <stdio.h> #include <unistd.h> #include <string.h> #includ...
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...
GB_unaryop__abs_int64_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
sxc_fmt_plug.c
/* SXC cracker patch for JtR. Hacked together during Summer of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and b...
GB_binop__ge_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...
DRB058-jacobikernel-orig-no.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...
dnn.c
//------------------------------------------------------------------------------ // LAGraph/Test/DNN/dnn: run all neural networks from http://graphchallenge.org //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2019 LAGr...
ompfor-static.c
/* * Static schedule */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int foo(int lower, int upper, int stride) { int i; #pragma omp for schedule(static,3) for (i=lower;i<upper;i+=stride) { printf("Iteration %2d is carried out by thread %2d\n",\ i, omp_get_thread_num()); } } int main...
GB_unaryop__identity_fp32_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
blackscholes.c
// Copyright (c) 2007 Intel Corp. // Black-Scholes // Analytical method for calculating European Options // // // Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice // Hall, John C. Hull, #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #ifdef ENABLE_PARSEC...
GB_binop__rdiv_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_binop__isle_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-...
seq_kmeans.c
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* File: seq_kmeans.c (sequential version) */ /* Description: Implementation of simple k-means clustering algorithm */ /* This program takes an array of N data objects, each with */ ...
wino_conv_kernel_mips.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...
privatej.c
/* What will happen if the loop indices inside an omp for is not private? by C. Liao */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int main() { int a[1000][1000]; int i,j; #pragma omp parallel for for (i=0;i<1000;i++) for (j=0;j<1000;j++) a[i][j]=999; for (i=0;i<1000;i++) for ...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
hello-2.c
/* By C. Liao */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif void foo(int * i) { *i =2; } int main(void) { int i=0; #pragma omp parallel default(shared) private(i) { #ifdef _OPENMP i=omp_get_thread_num(); #endif foo (&i); printf("Hello,world! I am thread %d\n",i); i++; } retur...
visual-effects.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
yeefdtd.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "yeefdtd.kernel_inc.h" int openmp_kgm_eqn_core_init (openmp_pscmc_env * pe ,openmp_kgm_eqn_core_struct * kerstr ){ return 0 ;} void openmp_kgm_eqn_core_get_struct_len (size_t * len ){ ((len)[0...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
bfs_replicated.c
/* Copyright (C) 2010 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
GB_binop__ge_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
grib_bits_fast_big_endian_omp.c
/* * Copyright 2005-2016 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * * In applying this licence, ECMWF does not waive the privileges and immunities granted to it by * virtue of its status as an int...
vect-simd-clone-5.c
/* { dg-require-effective-target vect_simd_clones } */ /* { dg-additional-options "-fopenmp-simd" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #include "tree-vect.h" #ifndef N #define N 1024 #endif int d[N], e[N]; #pragma omp declare simd simdlen(4) notinbranch uniform(b) linear(c:3) __attrib...
7593.c
/* * Compile using the command: * `cc 27Stencil.c -o oa -fopenmp -lm` */ #include <math.h> #include <omp.h> #include <stdint.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #ifdef _OPENACC #include <openacc.h> #endif #define DEFAULT_DATASIZE 1048576 /* Default datasize. */ #define DEFAULT_REPS 10 ...
core_histogram.h
#pragma once #include <vector> #include <sstream> #include "log.h" #include "pretty_print.h" #include "util.h" using namespace std; template<typename T, typename F> void core_val_histogram(int n, T &core, F f, bool is_print = false) { // core-value histogram int max_core_val = 0; vector<int32_t> histogr...
GB_binop__bclr_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-...
cut_finder.c
/* Generated by Cython 0.28.5 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "extra_compile_args": [ "-fopenmp" ], "extra_link_args": [ "-fopenmp" ], "language": "c", "name": "cut_finder", "sources": [ ...
NA.c
// Elements taken from the coop package (src/R_naomit.c) // Copyright (c) 2016-2017 Drew Schmidt #include "safeomp.h" #include <stdint.h> #include <string.h> #include "endianness.h" #include "NA.h" #include "Rfloat.h" #include "unroll.h" // R uses 0x7ff00000000007a2 for NA_REAL, and 0x7f8007a2 is a reasonable flo...
spectra.c
/** @file spectra.c Documented spectra module * * Julien Lesgourgues, 1.11.2019 * * This module computes the harmonic power spectra \f$ C_l^{X} \f$'s * given the transfer functions and the primordial spectra. * * The following functions can be called from other modules: * * -# spectra_init() at the beginning (...
bugged1.c
/****************************************************************************** * ЗАДАНИЕ: bugged1.c * ОПИСАНИЕ: * Данная программа демонстрирует использование конструкции 'parallel for'. * Однако, данный код вызывает ошибки компиляции. ******************************************************************************/...
GB_unaryop__identity_int8_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
main.c
#include <fcntl.h> #include <math.h> #include <omp.h> #include <sys/param.h> typedef struct Stack Stack; typedef struct Queue Queue; typedef struct Node Node; struct Node { Node *next; unsigned int i; double d; }; struct Queue { Node *first; Node *last; }; struct Stack { Stack *head; uns...
move_particle_utility_pfem2.h
/* ============================================================================== KratosIncompressibleFluidApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc...
lu.orio.par.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.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)) double L[N][N]; double U[N][N]; double A[N][...
kcenter.h
#ifndef FGC_OPTIM_KCENTER_H__ #define FGC_OPTIM_KCENTER_H__ #include "minicore/coreset/matrix_coreset.h" #include "minicore/util/div.h" #include "minicore/util/blaze_adaptor.h" #include "minicore/util/fpq.h" #include "libsimdsampling/argminmax.h" namespace minicore { namespace coresets { using std::partial_sum; using ...
FiniteDifferenceLibrary.c
#define dll_EXPORTS = 1 #include "FiniteDifferenceLibrary.h" DLL_EXPORT int openMPtest(int nThreads) { omp_set_num_threads(nThreads); int nThreads_running; #pragma omp parallel { if (omp_get_thread_num() == 0) { nThreads_running = omp_get_num_threads(); } } return nThreads_running; } int fdiff_direct_...
GB_binop__first_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
convolution_sgemm.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 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 ...
schedule-clause.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(int argc, char **argv) { int i, n = 16,chunk, a[n],suma=0; if(argc < 2) { fprintf(stderr,"\nFalta chunk \n"); exit(-1); } chunk = atoi(argv[1]); for (i=0; i<n; i++) a[i] ...
detector.c
#include "darknet.h" static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90}; void train_detector(char *datacfg, cha...
ast-dump-openmp-begin-declare-variant_8.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++| FileCheck %s // expected-no-diagnostics #pragma omp begin declare variant match(device={kind(cpu)}) int also_before(void) { retu...
ofmo-rys-xxxx.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #ifdef _OPENMP #include <omp.h> #else #include "omp-dummy.h" #endif #include "ofmo-index.h" #include "ofmo-twoint.h" #ifndef false #define false 0 #endif #ifndef true #define true 1 #endif #define HALF 0.5e0 #define ONE 1.e0 #define ZERO 0.e0 #define EPS_PS4...
GB_unop__trunc_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...
YAKL_fence.h
#pragma once // Included by YAKL.h namespace yakl { // Block the CPU code until the device code and data transfers are all completed inline void fence() { #if defined(YAKL_ARCH_CUDA) cudaDeviceSynchronize(); #elif defined(YAKL_ARCH_HIP) hipDeviceSynchronize(); #elif defined(YAKL_ARCH_SY...
lastprivate0.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int main(void) { int i,is=0; #pragma omp parallel for private(is) for (i=0;i<100;i++) is = is+i; printf("%d=%d\n ",i,is); is=0; #pragma omp parallel for firstprivate(is) for (i=0;i<100;i++) is = is+i; printf("%d=%d\n ",i,is); is=0; #pr...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
openmp_reorder.h
#pragma once ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// template <typename _T, typename _TIndex> void openmp_reorder_gather_inplace(_T *_result, _T *_buffer, _TIndex *_indexes, size_t _size) { if(omp_in_parallel()) { #pragma _N...
omp_dynamic_shared_memory.c
// RUN: %libomptarget-compile-nvptx64-nvidia-cuda -fopenmp-target-new-runtime // RUN: env LIBOMPTARGET_SHARED_MEMORY_SIZE=4 \ // RUN: %libomptarget-run-nvptx64-nvidia-cuda | %fcheck-nvptx64-nvidia-cuda // REQUIRES: nvptx64-nvidia-cuda #include <omp.h> #include <stdio.h> void *get_dynamic_shared() { return NULL; } #...
ordering_op-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) >...
search.h
// -*- C++ -*- // Copyright (C) 2007-2016 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3...
dgemm.c
/* * dgemm.c: DGEMM - Double-precision General Matrix Multiply. * */ #include <stdio.h> #include <stdlib.h> #include <omp.h> #include <math.h> #include "hpctimer.h" enum { N = 1024, NREPS = 5 }; double A[N * N], B[N * N], C[N * N]; void dgemm_def(double *a, double *b, double *c, int n) { int i, j,...
DRB030-truedep1-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...
GB_binop__lt_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...