source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_binop__rminus_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
directive.h
#pragma omp for schedule (static, chunk)
ffindex_apply.c
/* * FFindex * written by Andreas Hauser <andy@splashground.de>. * Please add your name here if you distribute modified versions. * * FFindex is provided under the Create Commons license "Attribution-ShareAlike * 3.0", which basically captures the spirit of the Gnu Public License (GPL). * * See: * http://cre...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> // // Eigen 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...
omptarget.h
//===---- omptarget.h - OpenMP GPU initialization ---------------- CUDA -*-===// // // 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 // //===---------------------------...
NLmean_propag1dir_sspacing6_tspacing4_sim12_acc12_neighbor5_tau0100.c
/* * compile: gcc -O3 -std=c99 -o [filename_out] -fopenmp [filename].c -lm -I/usr/include/netcdf-3/ -L/usr/lib64/ -lnetcdf -lnetcdf_c++ * in the terminal: export OMP_NUM_THREADS=3 */ #include<stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <netcdf.h> #include <omp.h> /* This is the name ...
multiway_merge.h
/*************************************************************************** * include/stxxl/bits/parallel/multiway_merge.h * * Implementation of sequential and parallel multiway merge. * Extracted from MCSTL - http://algo2.iti.uni-karlsruhe.de/singler/mcstl/ * * Part of the STXXL. See http://stxxl.sourceforg...
convolutiondepthwise_3x3.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 ...
csr_matvec.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) **************************************...
TimeDiscretization.h
/** * @file TimeDiscretization.h * @author N. Fottner * @date 13/05/19 */ #pragma once #include "autopas/AutoPas.h" #include "autopas/utils/ArrayMath.h" /** * Functions for updating velocities and positions as simulation time progresses. */ namespace TimeDiscretization { /** * Calculate and update the position...
ast-dump-openmp-target-teams-distribute-parallel-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 target teams distribute parallel for for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target teams dis...
matrix_bits.h
#ifndef MATRIX_BITS_H_ #define MATRIX_BITS_H_ namespace acspo { template <typename T> matrix<T> & operator&=(matrix<T> &mat1, const matrix<T> &mat2) { if (mat1.size() != mat2.size()) { throw std::runtime_error("dimension mismatch"); } unsigned int elem = mat1.elem(); T *m1ptr = mat1.ptr(); ...
sequence2batch.h
#ifndef ANAKIN_SABER_FUNC_IMPL_X86_MATH_SEQUENCE_BATCH_H #define ANAKIN_SABER_FUNC_IMPL_X86_MATH_SEQUENCE_BATCH_H #include <algorithm> #include <vector> #include "saber/core/tensor.h" #ifdef USE_OPENMP #include "omp.h" #endif namespace anakin { namespace saber { namespace math { template <DataType Dtype,...
GB_binop__le_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...
morn_image_geometry.c
/* Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com> Licensed under the Apache License, Version 2.0; 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...
kmp_sch_simd_guided.c
// RUN: %libomp-compile-and-run /* Test for the 'schedule(simd:guided)' clause. Compiler needs to generate a dynamic dispatching and pass the schedule value 46 to the OpenMP RTL. Test uses numerous loop parameter combinations. */ #include <stdio.h> #include <omp.h> #if defined(WIN32) || defined(_WIN32) #include ...
omp.h
/* * include/omp.h.var */ //===----------------------------------------------------------------------===// // // 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_binop__lor_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_critical_section.c
//------------------------------------------------------------------------------ // Source/Template/GB_critical_section: execute code in a critical section //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2018, All Rights Reserved. //...
omp-low.c
/* Lowering pass for OMP directives. Converts OMP directives into explicit calls to the runtime library (libgomp), data marshalling to implement data sharing and copying clauses, offloading to accelerators, and more. Contributed by Diego Novillo <dnovillo@redhat.com> Copyright (C) 2005-2020 Free Software...
hsrp_fmt_plug.c
/* * Cracker for MD5 authentication in HSRP, HSRPv2, VRRP, and GLBP. * http://www.rfc-editor.org/rfc/rfc1828.txt * * This is dedicated to Darya. You inspire me. * * This software is Copyright (c) 2014, Dhiru Kholia <dhiru [at] openwall.com>, * and it is hereby released to the general public under the following t...
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...
GB_binop__lor_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
SparseOperations_impl.h
// Copyright (c) 2004-2022 Tomáš Oberhuber et al. // // This file is part of TNL - Template Numerical Library (https://tnl-project.org/) // // SPDX-License-Identifier: MIT // Implemented by: Jakub Klinkovský #pragma once #include <type_traits> #include <stdexcept> #include <algorithm> #include <memory> // std::uniq...
declare_reduction_ast_print.c
// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp-simd -emit-pch...
BFSFriends.h
#ifndef _BFS_FRIENDS_H_ #define _BFS_FRIENDS_H_ #include "mpi.h" #include <iostream> #include "SpParMat.h" #include "SpParHelper.h" #include "MPIType.h" #include "Friends.h" #include "OptBuf.h" #include "ParFriends.h" #include "SpImplNoSR.h" #include "BitMap.h" #include "BitMapCarousel.h" #include "BitMapFringe.h" us...
SparseTranspose.h
/** * This file contains (modified) code from the Eigen library. * Eigen License: * * Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr> * Copyright (C) 2007-2011 Benoit Jacob <jacob.benoit.1@gmail.com> * * This Source Code Form is subject to the terms of the Mozilla * Public License v. 2.0. If a co...
GB_binop__rminus_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...
GB_unaryop__lnot_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...
integrate_padding_omp.c
#include <stdio.h> #include <omp.h> static long num_steps = 1000000000; double step; #define NUM_THREADS 2 #define PAD 8 int main() { int i, nThreads; double pi, sum[NUM_THREADS][PAD]; step = 1.0/(double) num_steps; omp_set_num_threads(NUM_THREADS); #pragma omp parallel ...
SlicedLockBasedTraversal.h
/** * @file SlicedLockBasedTraversal.h * * @date 09 Jan 2019 * @author seckler */ #pragma once #include <numeric> #include "autopas/containers/cellPairTraversals/SlicedBasedTraversal.h" #include "autopas/utils/ThreeDimensionalMapping.h" #include "autopas/utils/Timer.h" #include "autopas/utils/WrapOpenMP.h" nam...
nditer_api.c
/* * This file implements most of the main API functions of NumPy's nditer. * This excludes functions specialized using the templating system. * * Copyright (c) 2010-2011 by Mark Wiebe (mwwiebe@gmail.com) * The University of British Columbia * * Copyright (c) 2011 Enthought, Inc * * See LICENSE.txt for the lic...
main.c
#include <time.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #define N 1000 #define Eps 1e-7 #pragma omp declare target void func_1v(float*, float*, unsigned); void func_2v(float*, float*, unsigned); void func_3v(float*, float*, unsigned); #pragma omp end declare target void hfunc0(float*, float*, unsi...
GB_binop__ge_fp64.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__first_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-...
task_untied4.c
// Contributed by Allan Porterfield // 1/26/2010 void lu0(float *); void fwd(float *, float*); void sparselu_par_call(float **BENCH) { int jj, kk; #pragma omp parallel { #pragma omp single nowait #pragma omp task untied { for (kk=0; kk<100; kk++) { lu0(BENCH[kk]); for (jj=kk+1...
statistic.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
utils.c
#include <cdnn/utils.h> float cache; int return_cache; int nn_threads; /**! * Creates a matrix filled with zeros. * @param dims An array of matrix dimensions (int)[rows,columns] * @result A pointer to the created matrix. * @return A pointer to the created matrix. */ dARRAY * zeros(int * dims){ dARRAY * matr...
NAL.c
/* * The MIT License * * Copyright 2020 The OpenNARS authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use,...
computeGraph.c
#include "defs.h" double computeGraph(graph* G, graphSDG* SDGdata) { //mcsim_skip_instrs_begin(); VERT_T* endV; LONG_T *degree, *numEdges, *pos, *pSums; WEIGHT_T* w; double elapsed_time; #ifdef _OPENMP omp_lock_t *vLock; LONG_T chunkSize; #endif elapsed_time = get_seconds(); #ifdef _O...
gcc-min-max.c
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <stdbool.h> #include <omp.h> #define ITERATIONS 10000 #define ELEMENTS 10240 #define OMP_MIN(x,y) (x<y)?x:y #define OMP_MAX(x,y) (x>y)?x:y static inline void atomic_min_i32(int32_t * target, int32_t value) { int32_t desired; int32_t old = __at...
parallelJacobi_mp.c
/************************************************************ * Program to solve a finite difference * discretization of the screened Poisson equation: * (d2/dx2)u + (d2/dy2)u - alpha u = f * with zero Dirichlet boundary condition using the iterative * Jacobi method with overrelaxation. * * RHS (source) function...
bml_multiply_csr_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_add.h" #include "../bml_allocate.h" #include "../bml_logger.h" #include "../bml_multiply.h" #include "../bml_parallel.h" #include "../bml_types.h" #include "bml_add_csr.h" #include "bml_allocate_csr.h" #include "bml_multiply_csr.h" #include "bml_types_...
test6.c
int g1; void foo () { g1=0; #pragma omp barrier 1+g1; } int main() { #pragma omp parallel { int p; g1=2; if (3) { p=4; g1 = 10; foo (); 5+g1; } else { p=6+g1; //#pragma omp atomic read // p = g1; #pragma omp barrier g1=7; } if (8) { 9=g1; foo(); g1=10+g1; } else { 11+g1;...
GB_binop__isle_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-...
GB_unaryop__lnot_uint8_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...
AveragePooling.h
// -------------------------------------------------------------------------- // Binary Brain -- binary neural net framework // // Copyright (C) 2018 by Ryuji Fuchikami // https://github.com/ryuz // ryuji.fuch...
mxnet_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 ...
Example_reduction.3.c
/* * @@name: reduction.3c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: rt-error */ #include <stdio.h> int main (void) { int a, i; #pragma omp parallel shared(a) private(i) { #pragma omp master a = 0; // To avoid race conditions, add a barrier here. #pragma omp for reduction(+:...
functions.h
#ifndef __FUNCTIONS_H__ #define __FUNCTIONS_H__ #include "../scaling/scaling.h" #include "../summation/summation.h" #include "../contraction/contraction.h" namespace CTF { /** * @defgroup CTF_func CTF functions * \brief user-defined function interface * @addtogroup CTF_func * @{ */ class Idx_Tensor; /** ...
lock-unrelated.c
/* * lock-unrelated.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception /...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable 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) > (b) ? a : b) #...
pluto_codegen_if.c
/* * Pluto: An automatic parallelizer and locality optimizer * * Copyright (C) 2007-2012 Uday Bondhugula * * This software is available under the MIT license. Please see LICENSE in the * top-level directory for details. * * This file is part of libpluto. * */ #include <assert.h> #include <math.h> #include <st...
mergesam.c
#define _MODULE_GMAPPER #include <stdio.h> #include <time.h> #include <stdlib.h> #include <string.h> #include <getopt.h> #include <assert.h> #include <ctype.h> #include <omp.h> #include "mergesam.h" #include "sam2pretty_lib.h" #include "file_buffer.h" #include "fastx_readnames.h" #include "sam_reader.h" #include "../co...
GB_binop__gt_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
graph.h
#pragma once #include "util/timer.h" #include <sys/time.h> #include <sys/mman.h> #include <fcntl.h> #include <unordered_map> #include <vector> #include <chrono> #include <fstream> #include "util/util.h" #include "util/log/log.h" using namespace std; typedef int vid_t; //typedef unsigned int eid_t; typedef size_t...
GB_reduce_to_scalar_template.c
//------------------------------------------------------------------------------ // GB_reduce_to_scalar_template: s=reduce(A), reduce a matrix to a scalar //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // ...
omp_simd_aligned1.c
//Variable examples of using simd directives void foo (int n, double *a, double* b) { for (int i=0; i<n; i++) a[i]=b[i]; } void foo2 (int n, double *a, double* b) { for (int i=0; i<n; i++) a[i]=b[i]; } void foo3 (int n, double *a, double* b) { int j=0; for (int i=0; i<n; i++,j++) { a[i]=b[i]+j; ...
inference_helper.h
/* Copyright 2021 iwatake2222 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 writing, soft...
target_data_messages.c
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s void foo() { } int main(int argc, char **argv) { L1: foo(); #pragma omp target data { foo(); goto L1; // expected-error {{use of undeclared label 'L1'}} } goto L2; // expected-error {{use of undeclared...
GB_binop__pair_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unaryop__identity_uint8_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...
trsm_x_coo_n_lo_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { ALPHA_INT m = A-...
fig4.85-nested-parallel.c
/* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2009 Sun Microsystems, Inc. All rights reserved. The contents of this file are subject to the terms of the BSD License("BSD")(the "License"). You can obtain a copy of the License at: http://www.opensparc.net/pubs/t1/licenses/BSD+_Lice...
fc_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...
taskwait.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 #include "callback.h" #include <omp.h> int main() { int x = 0; #pragma omp parallel num_threads(2) { #pragma omp master { #pragma omp task { x++; } ...
IcgMask.c
// Copyright (C) 2016 Gernot Riegler // Institute for Computer Graphics and Vision (ICG) // Graz University of Technology (TU GRAZ) // 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 m...
cps_dp.c
/* Generated by Cython 0.29.24 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [ "/home/lothar/.local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h", "/home/lothar/.local/lib/python3.8/site-packages/numpy/core/include/numpy/arrayscalars.h", ...
GB_binop__rminus_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_split_sparse.c
//------------------------------------------------------------------------------ // GB_split_sparse: split a sparse/hypersparse matrix into tiles //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Lic...
mxm.c
#include "pmlib_api_C.h" #include <string.h> #include <math.h> #include <stdio.h> void init2d(); void mxm2d(); #define MATSIZE 1000 int nsize; struct matrix { int nsize; float a2[MATSIZE][MATSIZE]; float b2[MATSIZE][MATSIZE]; float c2[MATSIZE][MATSIZE]; } matrix; int main (int argc, char *argv[]) { // int ninit=...
kernel_prob_reshaping.c
/* Generated by Cython 0.29.22 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [ "/home/aduran/Atinary/gryffin/venv/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h", "/home/aduran/Atinary/gryffin/venv/lib/python3.8/site-packages/numpy/core/include/numpy/u...
_Atomic-2.c
/* PR c/65467 */ /* { dg-do compile } */ /* { dg-additional-options "-std=c11" } */ void f1 (void) { _Atomic int i; #pragma omp for /* { dg-error "'_Atomic' iteration variable 'i'" } */ for (i = 0; i < 64; i++) ; #pragma omp parallel for /* { dg-error "'_Atomic' iteration variable 'i'" } */ for (i = 0; ...
omp-taskloop-nogroup-single.c
#include <omp.h> #include <unistd.h> #include <stdio.h> #define THREADS 6 #define LEN 4 int main(void) { int j=0; #pragma omp parallel num_threads(THREADS) { #pragma omp single { #pragma omp taskloop nogroup for (j=0; j<LEN; j++) { usleep(30); } ...
rose_cancellation_point.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif #include "libxomp.h" struct OUT__1__10852___data { void *iend_p; void *ist_p; } ; static void OUT__1__10852__(void *__out_argv); void foo(int iend,int ist) { int i; struct OUT__1__10852___data __out_argv1__10852__; __out_argv1__10852__ . ist_p = (...
filter.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> #include <stdint.h> #include <string.h> #ifndef IMG_SIZE #define IMG_SIZE 1024*32-2 #endif #ifndef NUM_THREADS #define NUM_THREADS 8 #endif typedef struct { unsigned int width; unsigned int height; unsigned int internalWidth; unsigned int in...
cpu_bound.c
/* * Copyright (c) 2009, 2010, 2011, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group. */ #include <stdbool.h...
imd_colrad_nolb.c
#include "imd.h" #include <sys/time.h> #include <gsl/gsl_integration.h> #include <gsl/gsl_errno.h> // *************************************************** // * TODO: // * mpi2 und mpi3 anpassen weil energies delE und kbTe in eV // * SPEEDUP pragma omp auch in ydot // * floats wo möglich // ***************************...
convolution_sgemm_int8.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 copy ...
GB_binop__rminus_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-...
task_wait.c
/* Based on A.13.4c, p182 of OMP 3.0 spec. * Liao, 9/15/2008 */ #include <stdio.h> #include <assert.h> unsigned long int input = 40; unsigned long int fib(unsigned long int n) { unsigned long int i, j; if (n<2) return n; else { #pragma omp task shared(i) i=fib(n-1); #pragma omp task shared(j) j=...
expected_output.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include <polybench.h> #include "trmm.h" /** * 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 */ /*trm...
lastprivatemissing-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...
pprefix.c
#include "omp.h" #include <math.h> #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include "pprefix.h" typedef struct index_t_container { index_t data; } data_t; typedef void* generic_p; #define SIZE 10000000 index_t *prefix_sum(index_t *x, index_t n) { //prefix sum happens _in place_. make sure no...
remarks_parallel_in_multiple_target_state_machines.c
// RUN: %clang_cc1 -verify=host -Rpass=openmp-opt -Rpass-analysis=openmp-opt -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -verify=all,safe -Rpass=openmp...
prepress.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
jacobi_omp.c
/* * Copyright (c) 2008, BSC (Barcelon Supercomputing Center) * 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,...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
likelihoods.h
/*! * This file is part of GPBoost a C++ library for combining * boosting with Gaussian process and mixed effects models * * Copyright (c) 2020 Fabio Sigrist. All rights reserved. * * Licensed under the Apache License Version 2.0. See LICENSE file in the project root for license information. */ #ifndef GPB_LIKELIHOODS_...
DRB110-ordered-orig-no-omp.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...
layerramdistancetransform.h
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2017-2019 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
hermv_c_bsr_u_lo_trans.c
#include<string.h> #ifdef _OPENMP #include<omp.h> #endif #include"alphasparse/opt.h" #include "alphasparse/kernel.h" #include "alphasparse/util.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *A, const ALPHA_Number *x, const ALPHA_Numb...
saturnin-differential-trail-weight-three-rounds.c
#include "saturnin-common.h" #include "../global-common.h" #include "../convolution.h" #include <math.h> #include <stdbool.h> #include <omp.h> #define NUMBER_OF_ELEMENTS (1 << BOX_WIDTH) #define DT_SIZE (NUMBER_OF_ELEMENTS*NUMBER_OF_ELEMENTS) #define NUM_THREADS 36 #define BOUND 36 static int difference_table_even[DT...
pi-omp1.c
/* * BSD 2-Clause License * * Copyright (c) 2020, Alessandro Capotondi * 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 copyri...
GB_binop__le_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-...
depend-1.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ extern int a[][10], a2[][10]; int b[10], c[10][2], d[10], e[10], f[10]; int b2[10], c2[10][2], d2[10], e2[10], f2[10]; int k[10], l[10], m[10], n[10], o; int *p; void bar (void); int t[10]; #pragma omp threadprivate (t) void foo (int g[3][10], int h[4][8], int i...
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) >...
simd-8.c
/* { dg-do run } */ /* { dg-additional-options "-msse2" { target sse2_runtime } } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #include <stdlib.h> #include <math.h> #define EPS 0.005 int P[1000]; float A[1000]; float do_work(float *arr) { float pri; #pragma omp simd lastprivate(pri) for ...
bindthreads.c
#define _GNU_SOURCE #include <mpi.h> #include <pthread.h> #ifdef _OPENMP #include <omp.h> #endif #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/syscall.h> #include <errno.h> #include <string.h> #include <numa.h> #define MAX_CPUS_PER_NODE 176 #define POWER9 0x4e // witherspoon /* Processor ...
point_outlier.h
/**************************************************************************** * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * * Copyri...