source
stringlengths
3
92
c
stringlengths
26
2.25M
omp_task_firstprivate.c
<ompts:test> <ompts:testdescription>Test which checks the firstprivate clause of the task directive. We create a set of tasks in a single region. We defines a variable named sum unequal zero which gets declared firstprivate for each task. Now each task calcualtes a sum using this private variable. Before each calcualat...
alignment.c
/**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite */ /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ /* Copyright (C) 2009 Univer...
ll_data_source.c
#include"llama/ll_data_source.h" virtual bool ll_simple_data_source::pull(ll_writable_graph* graph, size_t max_edges) { size_t num_stripes = omp_get_max_threads(); ll_la_request_queue* request_queues[num_stripes]; for (size_t i = 0; i < num_stripes; i++) { request_queues[i] = new ll_la_request_qu...
nr_direct.c
/* Copyright 2014-2018 The PySCF Developers. 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 requi...
omp_ztrmm_batch.c
/** * @file omp_ztrmm_batch.c * * @brief BBLAS omp_ztrmm_batch double _Complex routine. * BBLAS is a software package provided by Univ. of Manchester, * Univ. of Tennessee. * * @version 1.0.0 * @author Samuel D. Relton * @author Pedro V. Lara * @author Mawussi Zounon * @date 2016-02-20 * **/ #i...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
memory.c
void convert_memory(unsigned char *img, int width, int height, int channels, int threads, unsigned char *result) { int pixel_per_thread = (width * height) / threads; #pragma omp parallel for for (int thread = 0; thread < threads; thread++) { int end; if (thread + 1 == threads) { ...
GB_unop__identity_int64_fc64.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...
flush-2.c
int a, b; void foo (void) { #pragma omp flush #pragma omp flush (a, b) #pragma omp flush acquire #pragma omp flush release #pragma omp flush acq_rel #pragma omp flush relaxed /* { dg-error "expected 'acq_rel', 'release' or 'acquire'" } */ #pragma omp flush seq_cst /* { dg-error "expected 'acq_rel', 're...
ntcopy.c
#include <tinyMatrixMul.h> #include <arm_neon.h> #include <string.h> #include "asmNeonApi.h" //#define USE_ASM_NTCOPY #ifdef STAND_ALONE_COMPILER static inline void vst1q_u32_x4(uint32_t *pDst, uint32x4x4_t src32x4x4) { vst1q_u32(pDst, src32x4x4.val[0]); vst1q_u32(pDst+4, src32x4x4.val[1]); vst1q_u32(pDst+8, src32...
trmv_x_sky_u_hi.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_N...
ocp_nlp_sqp_rti.c
/* * Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren, * Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor, * Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan, * Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl * * This file is part o...
omp_taskwait.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" #include "omp_my_sleep.h" int test_omp_taskwait() { int result1 = 0; /* Stores number of not finished tasks after the taskwait */ int result2 = 0; /* Stores number of wrong array elements at the end */ int array[N...
graph.h
// copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef GRAPH_H_ #define GRAPH_H_ #include <stdio.h> #include <cinttypes> #include <iostream> #include <type_traits> #include <map> #include "pvector.h" #include "util.h" #include "segmentgraph.h" #in...
DRB054-inneronly2-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...
visual-effects.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ljForce.c
/// \file /// Computes forces for the 12-6 Lennard Jones (LJ) potential. /// /// The Lennard-Jones model is not a good representation for the /// bonding in copper, its use has been limited to constant volume /// simulations where the embedding energy contribution to the cohesive /// energy is not included in the two-b...
GB_binop__min_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...
phylokernelsafe.h
/* * phylokernelsafe.h * Safe likelihood kernel that scales likelihood per category * * Created on: Sept 23, 2016 * Author: minh */ #ifndef PHYLOKERNELSAFE_H_ #define PHYLOKERNELSAFE_H_ #include "phylotree.h" //#include "vectorclass/vectorclass.h" //#include "vectorclass/vectormath_exp.h" #include "supera...
hermv_c_dia_u_hi_trans.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif #include <memory.h> #include <stdlib.h> alphasparse_status_t ONAME(const ALPHA_Complex alpha, const ALPHA_SPMAT_DIA *A, const ALPHA_Complex *x, ...
eavlDestinationTopologyPackedMapOp.h
// Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_DESTINATION_TOPOLOGY_PACKED_MAP_OP_H #define EAVL_DESTINATION_TOPOLOGY_PACKED_MAP_OP_H #include "eavlCUDA.h" #include "eavlCellSet.h" #include "eavlCellSetExplicit.h" #include "eavlCellSetAllStructured.h" #include "eavlDataSet...
nr_direct.c
/* Copyright 2014-2018 The PySCF Developers. 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 requi...
convolution_sgemm_int8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 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 ...
omp_ex_03.c
#include <stdio.h> #include <omp.h> /* MIT License Copyright (c) 2019 NOUREDDINE DAGHBOUDJ 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 ri...
mmap_recv.c
#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <unistd.h> #include <string.h> int main() { int threads = 4; size_t size = threads * 2048*2048; int fd = open("/tmp/testmmap", O_RDWR); volatile char *buf = (char*)mmap(NULL, 4096 +...
main.c
int bar() { return 10; }; void foo(int N, double *A) { int X, Y; #pragma omp parallel default(shared) { #pragma omp for private(X, Y) for (int I = 0; I < N; ++I) { X = I; if (I > N) { Y = bar(); X = X + Y + 1; } A[I] = X; } } }
libvoodoo.c
#include <stdlib.h> #include <stdio.h> #include <inttypes.h> #include <omp.h> #include <math.h> __attribute__((target(mic))) void voodoo(double* a, double* b, double* c, int nelem, int device, int offload) { int mthreads; #pragma offload target(mic:device) if(offload) { mthreads = omp_get_max_thre...
bert_layer_mb1_dynamic_tokens.h
#ifndef BERT_LAYER_H_ #define BERT_LAYER_H_ #include <new> #include <string> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> #include <math.h> #include <mkl.h> #include <omp.h> #include <iostream> #include <immintrin.h> #include "my_types.h" //#include "timer.h" class BertLayer { public...
nested-2.c
#include <omp.h> #include <stdlib.h> int main (void) { int i = -1, j = -1; omp_set_nested (0); omp_set_dynamic (0); #pragma omp parallel num_threads (4) { #pragma omp single { i = omp_get_thread_num () + omp_get_num_threads () * 256; #pragma omp parallel num_threads (2) { #pragma omp single ...
polysa_t2s.c
#include <limits.h> #include <stdio.h> #include <string.h> #include <isl/aff.h> #include <isl/ctx.h> #include <isl/flow.h> #include <isl/map.h> #include <isl/vec.h> #include <isl/ast_build.h> #include <isl/schedule.h> #include <isl/schedule_node.h> #include <isl/constraint.h> #include <isl/id_to_id.h> #include <pet.h>...
bug3.c
/****************************************************************************** * FILE: omp_bug3.c * DESCRIPTION: * Run time error * AUTHOR: Blaise Barney 01/09/04 * LAST REVISED: 06/28/05 ******************************************************************************/ #include <omp.h> #include <stdio.h> #include <st...
GB_binop__div_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
8078.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...
omptests.c
#include <stdlib.h> #include <stdio.h> #pragma omp requires unified_shared_memory /// Two methods store in different compilation units, results in a compile-time // error. Duplicate .omp_offloading.entry void test_comp_unit_1(const int niters, double* a); void test_comp_unit_2(const int niters, double* a); int main...
gpufont_ttf_file.c
#include <stdlib.h> #include <stdio.h> #include <netinet/in.h> /* ntohl */ #include <string.h> /* memset */ #include <stdio.h> #include "gpufont_data.h" #include "gpufont_ttf_file.h" #include "ttf_defs.h" #include "triangulate.h" #pragma pack(1) typedef int8_t int8; typedef int16_t int16; typedef int32_t int32; typed...
GB_binop__land_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-...
truecrypt_fmt_plug.c
/* * TrueCrypt volume support for John The Ripper * * Written by Alain Espinosa <alainesp at gmail.com> in 2012. No copyright * is claimed, and the software is hereby placed in the public domain. * In case this attempt to disclaim copyright and place the software in the * public domain is deemed null and void, t...
sl3_fmt_plug.c
/* * SL3 unlocking. Password is always 15 digits. Run with "-mask=?d" * * Input format (IMEI is put in "login field"): * IMEI:hash * * IMEI is 14 or 15 digits 0-9 (only 14 are used) * hash is hex lowercase (0-9, a-f) * * Copyright (c) 2017 magnum. * Redistribution and use in source and binary forms, with or...
erath1.c
#include "erath/erath1.h" #include <stdlib.h> /* malloc, free */ #include <string.h> /* memset */ #include <math.h> /* ceil, sqrt */ #define CHUNK_WIDTH 19 #include "common/defs.h" #include "common/enum.h" #include "common/presieve.h" #include "common/bitset.h" static inline int erath1_chunk(char* chunk, llong lo...
csr_matvec_oomp.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...
3d7pt.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 * Adapted from PLUTO and Pochoir test bench * * Tare...
prettyfunc.c
// Test the handling of pretty function // There should be a hidden variable declaration inserted under the closest enclosing scope // Liao 2013-1-10 int main() { // int i=100,sum=0; #pragma omp parallel { __PRETTY_FUNCTION__; } return 0; }
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 // //===---------------------------...
pbkdf2-hmac-md4_fmt_plug.c
/* * This software is Copyright (c) 2015 magnum and it is hereby released to * the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, are permitted. */ #if FMT_EXTERNS_H extern struct fmt_main fmt_pbkdf2_hmac_md4; #elif FMT_REGISTERS_H jo...
lchol_csc_executor.h
// // Created by kazem on 11/14/18. // #ifndef PROJECT_HLEVEL_SIMPLICIAL_CHOLESKY_H #define PROJECT_HLEVEL_SIMPLICIAL_CHOLESKY_H #include <stdlib.h> #include <cmath> #include "omp.h" bool lchol_csc_executor(int n, int* c, int* r, double* values, size_t* lC, MKL_INT* lR, double* &lValues, ...
parallel.c
#include "parallel.h" #include <stdlib.h> #include <math.h> #include <assert.h> #if TCI_USE_OPENMP_THREADS int tci_parallelize(tci_thread_func func, void* payload, unsigned nthread, unsigned arity) { if (nthread <= 1) { func(tci_single, payload); return 0; } tci_c...
cg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - CG This benchmark is an OpenMP C version of the NPB CG code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
pr63249.c
/* PR c++/63249 */ /* { dg-do compile } */ /* { dg-options "-Wall -W -fopenmp" } */ int foo (int *v, int A, int B) /* { dg-bogus "set but not used" } */ { int r = 0; int a = 2; /* { dg-bogus "set but not used" } */ int b = 4; /* { dg-bogus "set but not used" } */ #pragma omp target map(to: v[a:b]) r |= v[3...
dahua_fmt_plug.c
/* * Format for cracking Dahua hashes. * * http://www.securityfocus.com/archive/1/529799 * https://github.com/depthsecurity/dahua_dvr_auth_bypass * * This software is Copyright (c) 2014 Dhiru Kholia <dhiru at openwall.com>, * and it is hereby released to the general public under the following terms: * * Redist...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_kroner.c
//------------------------------------------------------------------------------ // GB_kroner: Kronecker product, C = kron (A,B) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: A...
mafillpcompmain.c
/* CalculiX - A 3-dimensional finite element program */ /* Copyright (C) 1998-2015 Guido Dhondt */ /* This program is free software; you can redistribute it and/or */ /* modify it under the terms of the GNU General Public License as */ /* pub...
GB_unaryop__minv_int32_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
Network.h
/* * Network.h * * Created by Guido Novati on 30.10.18. * Copyright 2018 ETH Zurich. All rights reserved. * */ #pragma once #include "Layers.h" struct Network { std::mt19937 gen; // Vector of layers, each defines a forward and bckward operation: std::vector<Layer*> layers; // Vector of parameters of...
GB_unop__identity_int32_uint16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
SSSP.c
// ----------------------------------------------------------------------------- // // "00_AccelGraph" // // ----------------------------------------------------------------------------- // Copyright (c) 2014-2019 All rights reserved // ----------------------------------------------------------------------------- ...
GB_unaryop__minv_fp64_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...
minusminus-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...
omp_taskwait.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" #include "omp_my_sleep.h" int test_omp_taskwait() { int result1 = 0; /* Stores number of not finished tasks after the taskwait */ int result2 = 0; /* Stores number of wrong array elements at the end */ int array[N...
scatmat.c
#include <stdlib.h> #include <complex.h> #include <float.h> #include <math.h> #include <string.h> #ifdef _MACOSX #include <Accelerate/Accelerate.h> #else #include <cblas.h> #endif #include "fastsphere.h" #include "spreflect.h" #include "translator.h" #include "scatmat.h" #include "fsht.h" #include "farfield.h" #inclu...
segment.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ZQ_FaceDatabaseCompact.h
#ifndef _ZQ_FACE_DATABASE_COMPACT_H_ #define _ZQ_FACE_DATABASE_COMPACT_H_ #pragma once #include <malloc.h> #include <stdio.h> #include <vector> #include <omp.h> #include "ZQ_FaceRecognizerSphereFace.h" #include "ZQ_MathBase.h" #include "ZQ_MergeSort.h" namespace ZQ { class ZQ_FaceDatabaseCompact { enum CONST_VAL ...
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...
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 // //===---------------------------...
nstream-memcpy-target.c
/// /// Copyright (c) 2019, 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 ...
GB_binop__bget_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-...
helpme.h
// BEGINLICENSE // // This file is part of helPME, which is distributed under the BSD 3-clause license, // as described in the LICENSE file in the top level directory of this project. // // Author: Andrew C. Simmonett // // ENDLICENSE #ifndef _HELPME_HELPME_H_ #define _HELPME_HELPME_H_ #if __cplusplus || DOXYGEN // C...
core_zsyrk.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include "core_blas.h" #include "plasma_types.h" #include "core_lapack.h" /*******************************************************************...
ZQ_CNN_BBoxUtils.h
#ifndef _ZQ_CNN_BBOX_UTILS_H_ #define _ZQ_CNN_BBOX_UTILS_H_ #pragma once #include "ZQ_CNN_BBox.h" #include <string> #include <math.h> #include <algorithm> namespace ZQ { class ZQ_CNN_BBoxUtils { public: enum PriorBoxCodeType { PriorBoxCodeType_CORNER = 0, PriorBoxCodeType_CORNER_SIZE, PriorBoxCodeType...
GB_unop__identity_fc32_bool.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...
MD5_fmt.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-2001,2008,2010-2012 by Solar Designer * * ...with changes in the jumbo patch, by bartavelle and magnum. * * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * There's ABSOLUTELY N...
FillInLinearSystemImpl.h
// ---------------------------------------------------------------------------- // - Open3D: www.open3d.org - // ---------------------------------------------------------------------------- // The MIT License (MIT) // // Copyright (c) 2018-2021 www.open3d.org // // Perm...
arb_fermidirac.c
/* Based on: https://github.com/fredrik-johansson/arb/blob/master/examples/integrals.c A. Odrzywołek, 2022-02-16, andrzej.odrzywolek@uj.edu.pl Install Arb https://arblib.org/ sudo apt install libflint-arb-dev sudo apt install libflint-arb2 sudo apt install libflint-dev Compile with: gcc arb_fermidirac....
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
atomic.c
#include <omp.h> int main (void) { int a; #pragma omp parallel { #pragma omp atomic a+=1; } }
Misc.h
//######################################################################## //## Copyright 2019 Da Yan http://www.cs.uab.edu/yanda //## //## 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 /...
isotope.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* 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 abo...
SxSpectrum.h
// --------------------------------------------------------------------------- // // The ab-initio based multiscale library // // S / P H I / n X // // Copyright: Max-Planck-Institute for Iron Research // 40237 Duesseldorf, Germany // // Contact: https://sxlib.mpie.d...
3d25pt_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 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
csr_matmultivec.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) **************************************...
matrixop.c
/* * Code for matrix functions in Dymola * * Copyright (C) 1997-2001 Dynasim AB. * All rights reserved. * * Author: Hans Olsson Dynasim AB, 1999 * Version: 1.2, 1999-07-16*/ /* */ #ifndef MATRIX_OP_C #define MATRIX_OP_C #if defined(_MSC_VER) #if (!DymolaGlobalOptimizations_) || (DymolaGlobalOptimizations_ == 2...
GB_binop__eq_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-...
tinyexr.h
/* Copyright (c) 2014 - 2019, Syoyo Fujita and many contributors. 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 l...
assertok_error.c
/* case from t-cricial */ #include <stdio.h> #include <stdlib.h> #include <omp.h> #pragma omp declare target const int bs = 1024; const int nb = 128; #pragma omp end declare target const int X_VAL = 99; const int Y_VAL = 11; int main() { int failures = 0; long cpuExec = 0; #pragma omp target map(tofrom: cpuExec)...
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) >...
local_parametrization.h
#ifndef LOCAL_PARAMETRIZATION #define LOCAL_PARAMETRIZATION #include "defines.h" ///fitting //#include <vcg/space/fitting3.h> #include <vcg/math/matrix33.h> #include <vcg/space/triangle2.h> #include "texcoord_optimization.h" #include "mesh_operators.h" //#include <vcg/complex/algorithms/point_sampling.h> //#define...
omp_parallel_firstprivate.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdlib.h> #include "omp_testsuite.h" //static int sum1 = 789; int test_omp_parallel_firstprivate() { int sum, num_threads,sum1; int known_sum; sum = 0; sum1=7; num_threads = 0; #pragma omp parallel firstprivate(sum1) { /*printf("sum1=%d\...
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 ...
GB_subassign_06s.c
//------------------------------------------------------------------------------ // GB_subassign_06s: C(I,J)<M> = A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com See ...
faith.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <omp.h> #include "common.h" #define SATTHRESH (0.1f) #define VALTHRESH (0.05f) #define VALSUPTHRESH (0.87f) typedef struct { short hue; float saturation, value; } hsv_t; typedef struct { size_t w, h; hsv_t* pixels; ...
spmm.h
/*! * Copyright (c) 2020 by Contributors * \file array/cpu/spmm.h * \brief SPMM CPU kernel function header. */ #ifndef DGL_ARRAY_CPU_SPMM_H_ #define DGL_ARRAY_CPU_SPMM_H_ #include <dgl/array.h> #include <dgl/bcast.h> #include <algorithm> #include <limits> #include <memory> #include "spmm_binary_ops.h" #if !define...
piCalc.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #define MARGIN 1e-12 void Usage(char* prog_name); int workshare(long long points); int sequential(long long points); int glob_sum_seq; int glob_sum_par; int main(){ printf("\n\n1000000 points\n"); printf("\nSEQUENTIAL\n"); sequential(1000000...
DataVectorAlt.h
/***************************************************************************** * * Copyright (c) 2003-2018 by The University of Queensland * http://www.uq.edu.au * * Primary Business: Queensland, Australia * Licensed under the Apache License, version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 * * Development unt...
GB_unop__identity_uint64_int64.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...
Par-08-ParallelForParallelFor.c
int main(int argc, char **argv) { int a[4] = {1,2,3,4}; int b[4] = {0, 0, 0, 0}; #pragma omp parallel { #pragma omp for for (int i = 0; i < 4; ++i) { a[i] = 3*a[i]; } } #pragma omp parallel for for (int j = 0; j < 4; ++j) { b[j] = b[j] + a[j]; } return 0; }
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...
matc.c
/***************************************************************************** * * Elmer, A Finite Element Software for Multiphysical Problems * * Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland * * This library is free software; you can redistribute it and/or * modify it under the term...
matProduct2.c
/* OpenMP implementation of matrix multiplication. Each thread takes care a chunk of rows. Compile with gcc -O3 -fopenmp omp_matrixmult.c -o omp_matrixmult */ // Online source: http://users.abo.fi/mats/PP2012/examples/OpenMP/omp_critical.c // permission obtained #include <omp.h> #include <stdio.h> #include <st...
bopm_openmp.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include <time.h> /**********************CONSTANT-DEFINITIONS*******************/ #define ONE 1 #define UNITY 1.0 #define TWO 2.0 #define ITWO 2 #define HALF 0.5 #define ERROR 1 #define BILLION 1E9 /*********************************************...
factorial.c
#include<stdio.h> #include<omp.h> #include<stdlib.h> double fact(double n) { double f=1; for (int i=1;i<n;i++) { f *= i; } return (f); } int main(int argc, char* argv[]) { double y1,y2,y; #pragma omp sections { #pragma omp section y1 = fact(1); #pr...