source
stringlengths
3
92
c
stringlengths
26
2.25M
lis_matrix_rco.c
/* Copyright (C) 2002-2012 The SSI Project. 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 condition...
GB_emult_phase0.c
//------------------------------------------------------------------------------ // GB_emult_phase0: find vectors of C to compute for C=A.*B or C<M>=A.*B //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // S...
reduction-clauseModificado2.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=20, a[n],suma=10; if(argc < 2) { fprintf(stderr,"Falta iteraciones\n"); exit(-1); } n = atoi(argv[1]); if (n>20) {n=20; printf("n=%d",n);} ...
main.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #define NDEBUG #ifndef NDEBUG #define DEBUG(cmd) cmd; #else #define DEBUG(cmd) ; #endif #define N 100000 // size of array #define n_per_line 5 // how many numbers to print per line void init_array(double array[N]) { for (int i = 0; i < N; ...
GiRaFFE_boundary_conditions.h
// Currently, we're using basic Cartesian boundary conditions, pending fixes by Zach. // Part P8a: Declare boundary condition FACE_UPDATE macro, // which updates a single face of the 3D grid cube // using quadratic polynomial extrapolation. // Basic extrapolation boundary conditions #define FACE_UPD...
segment.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
test5.c
typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef short __int16_t; typedef unsigned short __uint16_t; typedef int __int32_t; typedef unsigned int __uint32_t; typedef long long __int64_t; typedef unsigned long long __uint64_t; typedef long __darwin_intptr_t; typedef unsigned int __darwin_natural_t; ...
GB_unaryop__abs_fp64_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...
DRB114-if-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...
pr38704.c
// RUN: %libomptarget-compile-run-and-check-generic // Clang 6.0 doesn't use the new map interface, undefined behavior when // the compiler emits "old" interface code for structures. // UNSUPPORTED: clang-6 #include <stdio.h> #include <stdlib.h> typedef struct { int *ptr1; int *ptr2; } StructWithPtrs; int main(...
pr27573.c
/* PR middle-end/27573 */ /* { dg-do compile } */ /* { dg-require-profiling "-fprofile-generate" } */ /* { dg-options "-O2 -fopenmp -fprofile-generate" } */ extern int puts (const char *); int main (void) { int i, j = 8; #pragma omp parallel { puts ("foo"); for (i = 1; i < j - 1; i++) ; } return...
target-5.c
#include <omp.h> #include <stdlib.h> int main () { int d_o = omp_get_dynamic (); int n_o = omp_get_nested (); omp_sched_t s_o; int c_o; omp_get_schedule (&s_o, &c_o); int m_o = omp_get_max_threads (); omp_set_dynamic (1); omp_set_nested (1); omp_set_schedule (omp_sched_static, 2); omp_set_num_threa...
GB_unaryop__minv_fp64_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
mpncpdq.c
/* $Header$ */ /* mpncpdq -- netCDF pack, re-dimension, query */ /* Purpose: Pack, re-dimension, query single netCDF file and output to a single file */ /* Copyright (C) 1995--present Charlie Zender This file is part of NCO, the netCDF Operators. NCO is free software. You may redistribute and/or modify NCO und...
zgeinv.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
XT_OffsetError.c
/* ============================================================================ * Copyright (c) 2015 K. Aditya Mohan (Purdue University) * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * ...
ex3_openmp.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/types.h> #include <unistd.h> #include <math.h> #include <omp.h> #define N 100 long f[26]; char* file; void read_file(char* file) { char* line = NULL; size_t len = 0; ssize_t read; int i; FILE* in = fopen(file, "r"); while ((read = ...
opt_wave3d_4oa.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)) #include <stdlib.h> #include <string.h> #include <stdio.h> #include <math.h> #include <sy...
10.race1.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> int main() { int x = 0; #pragma omp parallel num_threads(8) { #pragma omp sections // firstprivate(x) { { x = 1; } #pragma omp section { x = 2; } } } return x; } // CHECK: Data Race detected // END
nvptx_target_printf_codegen.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _ // Test target codegen - host bc file has to be cr...
ll_data_source.h
/* * ll_data_source.h * LLAMA Graph Analytics * * Copyright 2015 * The President and Fellows of Harvard College. * * Copyright 2014 * Oracle Labs. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: ...
sequences.c
#include "sequences.h" #define CHECK_FSCANF(x) if(!x) { fprintf(stderr, "fscanf failed on %s:%d\n", __FILE__,__LINE__); } /* preprocess_db function preprocess the database sequences named input_filename. The preprocessed database filenames start with out_filename. */ void preprocess_db (char * input_filename, ch...
parallel_for.h
/* * Copyright (c) 2021, Horance Liu and the respective contributors * All rights reserved. * * Use of this source code is governed by a Apache 2.0 license that can be found * in the LICENSE file. */ #pragma once #include <cassert> #include <cstdio> #include <limits> #include <string> #include <type_tra...
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...
GB_resize.c
//------------------------------------------------------------------------------ // GB_resize: change the size of a matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apache-...
mufunc_object.c
/* * Python Universal Functions Object -- Math for all types, plus fast * arrays math * * Full description * * This supports mathematical (and Boolean) functions on arrays and other python * objects. Math on large arrays of basic C types is rather efficient. * * Travis E. Oliphant 2005, 2006 oliphant@ee.byu....
omp_init_lock.c
// RUN: %libomp-compile-and-run // REQUIRES: dummy #include "omp_testsuite.h" #include <stdio.h> // This should be slightly less than KMP_I_LOCK_CHUNK, which is 1024 #define LOCKS_PER_ITER 1000 #define ITERATIONS (REPETITIONS + 1) // This tests concurrently using locks on one thread while initializing new // ones on ...
mixed_tentusscher_myo_epi_2004_S2_20.c
// Scenario 2 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S2_20.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode...
test.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 <assert.h>...
ast-dump-openmp-atomic.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test(int i) { #pragma omp atomic ++i; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-open...
functions.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include "functions.h" //compute a*b mod p safely unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) { unsigned int za = a; unsigned int ab = 0; while (b > 0) { if (b%2 == 1) ab = (ab + za) % p; za = (2 * za...
aspl.c
#include "common.h" static uint64_t *_A, *_B; static int _nodes, _degree, _symmetries, _kind, _height = -1; static int* _num_degrees = NULL, *_itable = NULL; static int* _frontier = NULL, *_distance = NULL, *_next = NULL; static char* _bitmap = NULL; static unsigned int _elements, _times; static double _mem_usage, _ela...
kernels.h
void compute_probs( const double* __restrict alphas, const double* __restrict rands, double* __restrict probs, int n, int K, int M, int threads, int blocks) { #pragma omp target teams distribute parallel for \ num_teams(blocks) thread_limit(threads) for (int i = 0; i < n; i++) { double maxval;...
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...
Parallel.h
#pragma once #include <ATen/ATen.h> #include <cstddef> #ifdef _OPENMP #include <omp.h> #endif namespace at { namespace internal { // This parameter is heuristically chosen to determine the minimum number of // work that warrants paralellism. For example, when summing an array, it is // deemed inefficient to paralleli...
integral_solution_parallel.c
// integral_solution_parallel.c // compile with: /openmp /* ############################################################################# ## DESCRIPTION: Integral Solutin in Parallel using OpenMP - PI Value. ## NAME: integral_solution_parallel.c ## AUTHOR: Lucca Pessoa da Silva Matos ## DATE: 10.04.2020 ## VERSION: 1....
GB_binop__islt_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-...
displacement_lagrangemultiplier_contact_criteria.h
// KRATOS ______ __ __ _____ __ __ __ // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ / // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ / // / /___/ /_...
rawSHA384_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2010 by Solar Designer * based on rawMD4_fmt.c code, with trivial changes by groszek. * * Rewritten Spring 2013, JimF. SSE code added and released with the following terms: * No copyright is claimed, and the software is hereby placed in t...
zgbmm.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
SpatialAveragePooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "THNN/generic/SpatialAveragePooling.c" #else #include <THNN/generic/pooling_shape.h> #include <algorithm> static inline void THNN_(SpatialAveragePooling_shapeCheck)( THTensor *input, THTensor *gradOutput, int kH, int kW, int dH, int dW, int padH, int padW, bool ceil_...
GnatNearestNeighbors.h
// // Copyright (c) 2009, Markus Rickert // 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 condit...
clean.h
/**************************************************************************** * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * * Copyri...
DilationFilter.h
/* * ErosionFilter.h * * Created on: 13.06.2016 * Author: Darius Malysiak */ #ifndef IMAGEPROCESSING_DILATIONFILTER_H_ #define IMAGEPROCESSING_DILATIONFILTER_H_ #include "../BaseObject.h" #include "../DataStructures/Matrix.h" #include "../DataStructures/Image.h" namespace Lazarus { template<typename T> c...
rose_firstprivate2.c
#include <omp.h> void goo(double *o1,double *c,int **idx,int len) { int i; for (i = 0; i <= len - 1; i += 1) { int ii; const int *lidx = idx[i]; double volnew_o8 = 0.5 * c[i]; #pragma omp parallel for private (ii) firstprivate (volnew_o8) for (ii = 0; ii <= 5; ii += 1) { int llidx = lid...
mmgraph-exp.h
#ifndef MGRAPH_H #define MGRAPH_H #include "network.h" #include "networkmp.h" template<class TNode> class TMNet; class TSVNode { private: TInt TypeId; TInt Id; TVec<TIntV > InEIdVV, OutEIdVV; TInt InDeg, OutDeg; public: TSVNode() : TypeId(-1), Id(-1), InEIdVV(), OutEIdVV(), InDeg(0), OutDeg(0) { } TSVNo...
ASTMatchers.h
//===- ASTMatchers.h - Structural query framework ---------------*- 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 // //===---------------------------...
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...
ark_brusselator1D_omp.c
/*--------------------------------------------------------------- * Programmer(s): Daniel R. Reynolds @ SMU *--------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2019, Lawrence Livermore National Security * and Southern Methodist University. * All rights ...
GB_unaryop__identity_uint8_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...
openmpsimulator.h
#ifndef LIBGEODECOMP_PARALLELIZATION_OPENMPSIMULATOR_H #define LIBGEODECOMP_PARALLELIZATION_OPENMPSIMULATOR_H // include this file first to avoid clashes of Intel MPI with stdio.h. #include <libgeodecomp/misc/apitraits.h> #include <libgeodecomp/communication/hpxserializationwrapper.h> #include <libgeodecomp/io/writer...
cpu_ctc.h
#pragma once #include <tuple> #include <cmath> #include <limits> #include <algorithm> #include <numeric> #if !defined(CTC_DISABLE_OMP) && !defined(APPLE) #include <omp.h> #endif #include "ctc_helper.h" template<typename ProbT> class CpuCTC { public: // Noncopyable CpuCTC(int alphabet_size, int minibatch, v...
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...
buggy_version.c
#include<stdio.h> int main(){ int sum = 1; int i =1; // increase sum by one each iteratiob using openmp #pragma omp parallel for private(i) reduction( + : sum ) for (int j = i; j < 100; j++) { sum +=1; } printf("sum is %d\n",sum); }
iRCCE_atomic.c
//*************************************************************************************** // Functions for handling Atomic Increment Registers (AIR). //*************************************************************************************** // // Copyright 2012, Chair for Operating Systems, RWTH Aachen University // //...
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_unaryop__abs_bool_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
threading-funneled-solution.c
#include "mpi.h" #include <stdio.h> void compute_row(int row_index, float input[6][8], float output[6][8]) { for (int j = 0; j < 8; j = j + 1) { /* Here is the 5-point stencil */ const int right_column_index = (j + 1) % 8; const int left_column_index = (j + 8 - 1) % 8; const int...
util.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include <math.h> #include <gsl/gsl_matrix.h> #include <gsl/gsl_blas.h> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> void read_matrix(int** index, int** matrix, double scaling, int N_kw, char* input_fileName) { FILE *fp = fop...
chebyshev.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
Parallel Programming in C - Selection Sort.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include "omp.h" /* OpenMP implementation example Details of implementation/tutorial can be found here: http://madhugnadig.com/articles/parallel-processing/2017/02/25/parallel-computing-in-c-using-openMP.html */ clock_t t, end; double cpu_time_used; // Structu...
IJVector_parcsr.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) **************************************...
image_random-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 may no...
SwathFile.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
omp-maxof-elements-lock.c
/*********************************************************************************** Example 3.2 : omp-maxof-elements-lock.c Objective : Write an OpenMP program to print Largest of an element in an array This example demonstrates the use of omp_init_lock(),omp...
integral_serial.c
#include<stdio.h> #include<omp.h> #define NUM_THREADS 4 static long num_steps = 100000; double step; int main(){ int i, nthreads; double pi = 0.0, init_time, finish_time; step = 1.0 / (double)num_steps; init_time = omp_get_wtime(); omp_set_num_threads(NUM_THREADS); #pragma omp parallel { int i, id, nthrds; ...
MD5_std.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-2001,2003,2006,2011 by Solar Designer * * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * There's ABSOLUTELY NO WARRANTY, express or implied. * * This implementation of FreeBSD...
strMdataBinary.c
// // strMdataBinary.c // pstock // // Created by takayoshi on 2016/01/26. // Copyright © 2016年 pgostation. All rights reserved. // #include <stdio.h> #include <sys/stat.h> #include <apr-1/apr_file_io.h> #include <libiomp/omp.h> #include "strMdataBinary.h" extern void strMdataBinary_loadData(const char* path, str...
sp.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - SP This benchmark is an OpenMP C version of the NPB SP code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by NAS. ...
sequence.c
#include "sequence.h" #include <omp.h> #include <stdlib.h> #include <string.h> #include "type.h" unsigned char* read_msa(const char* path, int* ncol, int* nrow) { FILE* f = fopen(path, "r"); char buf[SEQ_BUFFER_SIZE]; int nc; *nrow = 0; *ncol = 0; while (fgets(buf, SEQ_BUFFER_SIZE, f)) { (*nrow)++; ...
omp_parallel_copyin.c
// RUN: %libomp-compile-and-run // REQUIRES: !(abt && (clang || gcc)) #include <stdio.h> #include <stdlib.h> #include "omp_testsuite.h" static int sum1 = 789; #pragma omp threadprivate(sum1) int test_omp_parallel_copyin() { int sum, num_threads; int known_sum; sum = 0; sum1 = 7; num_threads = 0; #pragma...
GB_unaryop__minv_uint16_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
nr_numint.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 required ...
gdal_pm_eto.c
#include<stdio.h> #include<omp.h> #include<math.h> #include "gdal.h" #include "pm_eto.h" void usage() { printf( "-----------------------------------------\n"); printf( "--Modis Processing chain--OpenMP code----\n"); printf( "-----------------------------------------\n"); printf( "./pm_eto inLst inDem inRnet\n"); ...
firstprivate-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...
GB_binop__lxor_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
a.32.1.c
/* { dg-do compile } */ /* { dg-require-effective-target tls } */ #include <stdlib.h> float *work; int size; float tol; void build (void); #pragma omp threadprivate(work,size,tol) void a32 (float t, int n) { tol = t; size = n; #pragma omp parallel copyin(tol,size) { build (); } } void build () { int i; ...
GB_unop__isfinite_bool_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
task_types_serialized.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> void print_task_type(int id) { #pragma omp critical { int task_type; char buffer[2048]; ompt_get_task_info(0, &task_type, NULL, NULL, NULL, NULL); format_task_type(task_type, buffer); printf...
acoustic-so8.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include "omp.h" struct dataobj { void *restrict data; int * size; int * npsize; int * dsize; int * hsize; int * hofs; int * oofs; } ; struct profiler { double sect...
cpd.c
/** * @file cpd.c * @brief Tensor factorization with the CPD model using AO-ADMM. * @author Shaden Smith <shaden@cs.umn.edu> * @version 2.0.0 * @date 2016-05-14 */ /****************************************************************************** * INCLUDES ***********************************************************...
pcgetrf.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/pzgetrf.c, normal z -> c, Fri Sep 28 17:38:11 2018 * **/ #include "plasma_async.h" #include "plasma_contex...
nestedfn-3.c
/* { dg-do run } */ #include <omp.h> extern void abort (void); int main (void) { int i = 5, l = 0; int foo (void) { return i == 6; } int bar (void) { return i - 3; } omp_set_dynamic (0); #pragma omp parallel if (foo ()) num_threads (bar ()) reduction (|:l) if (omp_get_num_threads () != 1) l = 1; i...
ConcatenateCoefficient.h
// -------------------------------------------------------------------------- // Binary Brain -- binary neural net framework // // Copyright (C) 2018-2019 by Ryuji Fuchikami // https://github.com/ryuz // ryuji.fuchikami@nift...
abs.c
#include <math.h> #include "../cdefs.h" #include "../types.h" #include "../misc/safeomp.h" void bib_mabs(mat_r x) { const int m = NROWS(x); const int n = NCOLS(x); #pragma omp parallel for if(m*n > OMP_MIN_SIZE) for (int j=0; j<n; j++) { SAFE_SIMD for (int i=0; i<m; i++) DATA(x)[i + n*j] = f...
dense.c
/* Copyright (c) 2015-2016 Drew Schmidt 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 condit...
GB_unaryop__ainv_uint32_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
act3.c
/* Owen Jauregui Borbon - A01638122 Program for calculating theapproximate area under the curve for a function using the trapezoidal rule. Parallelized using openMP. */ #include <stdio.h> #include <omp.h> int main() { // Number of threads for openMP int threads = 8; ...
omp-low.c
/* * Copyright (C) 2009 Advanced Micro Devices, Inc. All Rights Reserved. */ /* Lowering pass for OpenMP directives. Converts OpenMP directives into explicit calls to the runtime library (libgomp) and data marshalling to implement data sharing and copying clauses. Contributed by Diego Novillo <dnovillo@re...
multiplayer.h
//Windiarta - 2006535792 void multi(int refresh) { int sizey = 24; int sizex = 40; int x, y, yi; char world[sizey][sizex]; char world2[sizey][sizex]; char player = 'A'; char playerLaser = '^'; char enemy = 'M'; char enemyShielded = 'O'; char enemyLaser = 'v'; ...
GB_unaryop__minv_int16_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__frexpx_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_unop__sqrt_fc32_fc32.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...
omp2-2.c
#include<math.h> #include<stdio.h> #define N 1000000 int main() { int i; double x, area = 0; //#pragma omp parallel for private(x) for (i = 0; i < N; i++) { x = (i + .5) / N; area += 4 / (1 + x*x); } printf("%.10lf\n", area/N); return 0; }
pr81006.c
/* PR c/81006 */ /* { dg-do compile } */ int a[] = {}; void foo() { #pragma omp task depend(out: a[:]) /* { dg-error "zero length array section in .depend. clause" } */ {} }
GB_unop__identity_uint16_uint64.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...
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> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You c...
GB_unop__cos_fc64_fc64.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...