source
stringlengths
3
92
c
stringlengths
26
2.25M
func.c
#include <stdio.h> #include <omp.h> void write_result(double *U, int N, double delta, char filename[40]) { double u, y, x; FILE *matrix=fopen(filename, "w"); for (int i = 0; i < N; i++) { x = -1.0 + i * delta + delta * 0.5; for (int j = 0; j < N; j++) { y = -1.0 + j * delta + delta * 0.5; u = U[i*N + j]; ...
omp.c
/* * Copyright 2019-2020 SALMON developers * * 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 ...
pi-v9.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #endif int main(int argc, char *argv[]) { do...
compatibility.h
// -*- C++ -*- // Copyright (C) 2007-2021 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
cpu.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...
bzlevd2.c
#include "laev2.h" #include "wnrme.h" #include "rnd.h" #include "timer.h" int main(int argc, char *argv[]) { (void)set_cbwr(); if (4 != argc) { (void)fprintf(stderr, "%s filename 2^{batch_size} #batches\n", *argv); return EXIT_FAILURE; } const size_t n = ((size_t)1u << atoz(argv[2u])); int th = 0; ...
mrcore.c
/*************************************************************************** * Copyright 2013 CertiVox UK Ltd. * * This file is...
MMultiple3.c
/* Hi, everybody! * ===================================================================================== * * Filename: MMmultiple.c * * Description: Do Matrix Multiplication C = A x B with A and B blocks generated by * mkmatrices.c. * * Version: 1.0 * Created: 09/21/2016 22:53:...
csrmm_task.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #pragma once #include <malloc.h> #include <cstring> #include "tasks/task.h" namespace anon { // scatter from src to dest using sinfo template<typename T> void scatter(T *dest, T *src, flash::StrideInfo sinfo) { ...
pngquant.c
/* pngquant.c - quantize the colors in an alphamap down to a specified number ** ** © 2009-2019 by Kornel Lesiński. ** © 1989, 1991 by Jef Poskanzer. ** © 1997-2002 by Greg Roelofs; based on an idea by Stefan Schneider. ** ** See COPYRIGHT file for license. */ char *PNGQUANT_USAGE = "\ usage: pngquant [options] [ncol...
core_dttqrt.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/core_blas/core_zttqrt.c, normal z -> d, Fri Sep 28 17:38:25 2018 * **/ #include <plasma_core_blas.h> #include "pla...
parallel-simple.c
/* * parallel-simple.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 ...
GB_unaryop__ainv_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...
openmpLBM.c
// http://www.caam.rice.edu/~timwar/CAAM210/Flows.html #include <math.h> #include <stdlib.h> #include <stdio.h> #include "png_util.h" #include <omp.h> #define dfloat double #define FLUID 0 #define WALL 1 #define NSPECIES 9 // loop up 1D array index from 2D node coordinates int idx(int N, int n, int m){ return n ...
kernels.c
#include "trace.h" #include "common.h" #include <math.h> #include <stdlib.h> void panel(Matrix A, int i){ int m, ld, info, np, ii; ii = i*A.B; np = A.B; m = A.N-ii; ld = A.N; #if defined(DBG) printf("%2d -- panel : %d\n",omp_get_thread_num(),i); #endif trace_event_start(PNL); dgetrf_(&m, &np, A....
GB_binop__cmplx_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
convolution_1x1_pack4to8_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a ...
GB_unop__log_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...
2mm.c
/** * 2mm.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@students.ic....
dataCostD.h
void interp3xyz(float* datai,float* data,float* datax,float* datay,int len1,int len2){ //x-interp for(int k=0;k<len1;k++){ for(int j=0;j<len2;j++){ int j2=(j+1)/2; if(j%2==1){ for(int i=0;i<len1;i++){ datax[i+j*len1+k*len1*len2]=data[i+j2*len1...
matrix.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "base.h" #include "matrix.h" #include "util.h" #include "timer.h" #include "splatt_lapack.h" #include "splatt_debug.h" #include <math.h> ...
mandel-omp-task-row.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
GB_unaryop__ainv_int16_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
rose_livenessTest.c
#include <omp.h> typedef double real8; void foo(real8 *y,real8 *d__,real8 *d11,real8 *d12,real8 *d13,real8 *d22,real8 *d23,real8 *d33,real8 *m,int *nell,real8 *p,int t,int flagB,int flagA,int ub) { int l; int nel; int t1 = t - 1; if (flagB == 0) { for (l = 0; l <= ub - 1; l += 1) { int l8 = l * 8; ...
glove_cython.c
/* Generated by Cython 0.29.14 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "extra_compile_args": [ "-fopenmp", "-ffast-math" ], "extra_link_args": [ "-fopenmp" ], "name": "glove.glove_cython", "sources": [ ...
TreeSpanWorker.h
/* * TreeSpanWorker.h * * Created on: Apr 21, 2020 * Author: wen */ #ifndef PREFIXTREESPAN_TREESPANWORKER_H_ #define PREFIXTREESPAN_TREESPANWORKER_H_ #include <strstream> #include "../prefixtreespan/TreeSpanTask.h" class TreeSpanWorker:public Worker<TreeSpanTask> { public: int trans_cnt; // to used for ad...
MKL_flops_32_omp.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include <omp.h> #include "gene_bruit_rayleigh_scalaire.c" #ifdef MKL_LIB #include "mkl.h" #include "mkl_dfti.h" #endif int main(int argc, char** argv) { int NFFT,NPOINTS,NTOT; NTOT=67108864; printf("-*/*-*/- Programme ...
GB_unop__frexpx_fp32_fp32.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...
GB_unaryop__identity_fp32_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
convolution_pack1to8_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__min_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...
exact_cover_hybrid_tasks.c
/** * Version Hybride : MPI + OpenMP avec tâches * * Quentin Deschamps, 2021 */ #include <ctype.h> #include <stdio.h> #include <stdbool.h> #include <string.h> #include <stdlib.h> #include <err.h> #include <getopt.h> #include <sys/time.h> #include <mpi.h> #include <omp.h> /* Rang du processeur principal */ #defin...
opal_test.c
// Copyright 2009-2020 Sandia Corporation. Under the terms // of Contract DE-NA0003525 with Sandia Corporation, the U.S. // Government retains certain rights in this software. // // Copyright (c) 2009-2020, Sandia Corporation // All rights reserved. // // Portions are copyright of other developers: // See the file CONT...
sufsort_priv.h
/* * nvbio * Copyright (c) 2011-2014, NVIDIA CORPORATION. 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,...
DRB018-plusplus-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...
mixed_tentusscher_myo_epi_2004_S1_1.c
// Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S1_1.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_...
atomic-6.c
/* PR middle-end/36106 */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -mieee" { target alpha*-*-* } } */ /* { dg-options "-O2 -march=i586" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #ifdef __i386__ # include "cpuid.h" #endif extern void abort (void); union { unsigned long long l; double d; } u = { .l =...
omp_thread_create_overhead.c
// execute in sequence // input the number of num_user_threadsation #include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <omp.h> #include <sys/timeb.h> //#include <omp_interop.h> #include <unistd.h> /* read timer in second */ double read_timer() { struct timeb tm; ftime(&tm); ...
tetrahedron_method.c
/* Copyright (C) 2014 Atsushi Togo */ /* All rights reserved. */ /* This file was originally part of spglib and is part of kspclib. */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* * Redistributions ...
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) #...
rose_jacobi_avx2.c
#include "rex_kmp.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #include <immintrin.h> #include <immintrin.h> #define REAL float static double read_timer_ms() { struct timeb tm; ftime(&tm); return ((double )tm . time) * 1000.0 + ((double )tm . millitm);...
delete.c
#include <omp.h> int main () { int x = 0; int i; #pragma omp parallel { if(x){ i = 1; } else { i = 0; } } }
core_single_cpu.c
/* -*- mode: C; tab-width: 2; indent-tabs-mode: nil; -*- */ /* * This code has been contributed by the DARPA HPCS program. Contact * David Koester <dkoester@mitre.org> or Bob Lucas <rflucas@isi.edu> * if you have questions. * * GUPS (Giga UPdates per Second) is a measurement that profiles the memory * architect...
GB_unaryop__minv_uint16_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
convolutiondepthwise_5x5_pack8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 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__bxnor_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...
log_progress.h
/* * * Copyright (c) 2014, Nicola Pezzotti (Delft University of Technology) * 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 ...
TriangleMesh.h
#ifndef TRIANGLE_MESH_INCLUDED #define TRIANGLE_MESH_INCLUDED template< class Real > void XForm( std::vector< Point3D< Real > >& vertices , const SquareMatrix< Real , 3 >& xForm , int threads=1 ); template< class Real > void XForm( std::vector< Point3D< Real > >& vertices , const SquareMatrix< Real , 4 >& xForm , int ...
poollayer.h
#ifndef POOLLAYER_H #define POOLLAYER_H #include "vol.h" #include "layer.h" #include "utils.h" #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <boost/serialization/vector.hpp> #include <boost/serialization/map.hpp> #include <boost/serialization/utility.hpp> #include <ios...
GB_binop__eq_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
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) #...
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 // //===---------------------------...
NeuralNetwork_OMP_CPU4.c
/* NEURAL NETWORK OMP CPU4.c * by Lut99 * * Created: * 4/18/2020, 11:25:46 PM * Last edited: * 19/11/2020, 17:18:45 * Auto updated? * Yes * * Description: * The NeuralNetwork class implements a matrix-based Feedforward Neural * Network which is hardcoded to use Mean Squared Error for cost functi...
train9.c
#define _GNU_SOURCE #include <syscall.h> #include <sched.h> #include "graph.h" #include "mainFunctions.h" #include "powerperformacetracking.h" #include "print.h" #include <stdlib.h> #include<unistd.h> #define NO_OF_ARGS 2 //#define REPEAT 25 #define REPEAT 15 long long iters[8]; struct timeval start, end; // We d...
GB_unaryop__ainv_uint16_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
flux.c
#include <string.h> #include <stdint.h> #include <omp.h> #include <math.h> #include <ktime.h> #include <geometry.h> #include <phy.h> #ifdef __USE_HW_COUNTER #include <perf.h> #include <kperf.h> #endif #define MAG0 (0.5 / 3) #define MAG1 (-MAG0) /* Calculates the residual */ void compute_residual(struct residua...
GB_unaryop__lnot_fp32_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...
w7_e3c_matvec.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> #include "matvec.h" // Indexing function. #define idx(i,j) (i*n + j) int main(int argc, char const *argv[]) { if (argc < 3) { printf("Must provide m and n.\n"); return 1; } int m = atoi(argv[1]); int n = atoi(argv[2]); double...
GB_binop__min_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-...
llramp.c
#include<Python.h> #include<numpy/arrayobject.h> #include<math.h> #include<omp.h> #define IND(a,i) *((double *)(a->data+i*a->strides[0])) static PyObject *llramp(PyObject *self, PyObject *args, PyObject *keywds); static PyObject *llramp(PyObject *self, PyObject *args, PyObject *keywds) { PyObject *etc; PyArrayOb...
omp_parallel_for_reduction.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" #define DOUBLE_DIGITS 20 /* dt^DOUBLE_DIGITS */ #define MAX_FACTOR 10 #define KNOWN_PRODUCT 3628800 /* 10! */ int test_omp_parallel_for_reduction() { int sum; int known_sum; double dsum; double dknown_sum; do...
dump-new-function-2.c
/* { dg-do compile } */ /* { dg-options "-O2 -fopenmp -fdump-tree-gimple" } */ void __attribute__((noinline)) baz (int *p) { } void foo (void) { int p[2]; p[0] = 1; p[1] = 3; #pragma omp task firstprivate (p) baz (p); } /* Check that new function does not end up in gimple dump. */ /* { dg-final { scan-t...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
tinybert_test.h
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. // 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,...
task.c
/* Copyright (C) 2007-2018 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #include "OmpAttribute.h" #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determ...
GB_unop__identity_int64_fp32.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...
3453.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...
irbuilder_unroll_partial_factor_for_collapse.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics #ifnd...
declare_target-4.c
/* { dg-do run } */ /* { dg-additional-options "-DTESTITERS=20" { target { ! run_expensive_tests } } } */ #include <stdlib.h> #define EPS 0.00001 #define N 1000 #ifndef TESTITERS #define TESTITERS N #endif #pragma omp declare target float Q[N][N]; float Pfun (const int i, const int k) { return Q[i][k] * Q[k][i]; }...
GB_binop__div_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
CALPHADEqConcSolverBinary.h
#ifndef included_CALPHADEqConcSolverBinary #define included_CALPHADEqConcSolverBinary #include "NewtonSolver.h" #include "datatypes.h" namespace Thermo4PFM { class CALPHADEqConcSolverBinary : public NewtonSolver<2, CALPHADEqConcSolverBinary, JacobianDataType> { public: #ifdef HAVE_OPENMP_OFFLOAD #pragma omp decl...
matrix.c
#include "matrix.h" #include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <omp.h> // Include SSE intrinsics #if defined(_MSC_VER) #include <intrin.h> #elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) #include <immintrin.h> #include <x86intrin.h> #endif /* Below are some intel intrins...
SlicedC02BasedTraversal.h
/** * @file SlicedC02BasedTraversal.h * * @date 24 May 2020 * @author fischerv */ #pragma once #include <algorithm> #include "autopas/containers/cellPairTraversals/SlicedBasedTraversal.h" #include "autopas/utils/DataLayoutConverter.h" #include "autopas/utils/ThreeDimensionalMapping.h" #include "autopas/utils/Wr...
parallel.c
/* Copyright (C) 2005-2014 Free Software Foundation, Inc. C ontributed by Richard Henderson <r*th@redhat.com>. This file is part of the GNU OpenMP Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Softw...
omp_nested.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" /* * Test if the compiler supports nested parallelism * By Chunhua Liao, University of Houston * Oct. 2005 */ int test_omp_nested() { #ifdef _OPENMP if (omp_get_max_threads() > 4) omp_set_num_threads(4); #endif int counter = 0; ...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
MergeSort.c
#include <stdio.h> #include <stdlib.h> #include "omp.h" #define MAX 100 #define STEPS 100 void generate_random_array(int arr[MAX], int N) { int i; for (i = 0; i < N; i++) { arr[i] = rand() % 1000; } } void merge_sort(int arr[MAX], int low, int high) { int N = high - low; int mid = low + N/2; if (N <= 1) re...
par_interp.c
/****************************************************************************** * Copyright (c) 1998 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) ***************************************...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
dotp.c
#include <dotp.h> // modify this function double dotp(double* x, double* y) { double global_sum = 0.0; #pragma omp parallel { #pragma omp for for(int i=0; i<ARRAY_SIZE; i++) #pragma omp critical global_sum += x[i] * y[i]; } return global_sum; }
convolutiondepthwise_5x5_packn_fp16s.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 ...
jacobi-2d.c
/** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /* jacobi-2d.c: this file is part of PolyBench/C */ #include <stdio.h> #include <unistd.h> #include <string.h> #in...
add-brisbane.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB BT code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
brkTie.c
/* This code is part of this project: Donato E, Ouyang M, * Peguero-Isalguez C. Triangle counting with a multi-core computer. * Proceedings of IEEE High Performance Extreme Computing Conference * (HPEC), 2018, 1-7. * * Copyright (c) 2018 Ming Ouyang * * Permission is hereby granted, free of charge, to any perso...
resource_manager.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_thread_local.c
//------------------------------------------------------------------------------ // GB_thread_local: manage thread-local storage //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com S...
GB_reduce_build_template.c
//------------------------------------------------------------------------------ // GB_reduce_build_template.c: Tx=build(Sx), and assemble any duplicate tuples //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved...
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...
interp1.c
/* * File: interp1.c * * MATLAB Coder version : 3.0 * C/C++ source code generated on : 15-Nov-2015 19:51:15 */ /* Include Files */ #include "rt_nonfinite.h" #include "yaapt.h" #include "interp1.h" #include "yaapt_emxutil.h" #include "pchip.h" /* Function Definitions */ /* * Arguments : const emx...
ft.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - FT This benchmark is an OpenMP C version of the NPB FT code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS. ...
GB_unop__identity_int32_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
utilities.c
// // MIT license // // Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved. // // 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 limit...
convolution_3x3_pack1to8_fp16.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 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 ...
struct_innerprod.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...
millionaire.h
/* Authors: Deevashwer Rathee, Mayank Rathee Copyright: Copyright (c) 2021 Microsoft Research 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 r...
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...
uninit-1.c
// PR 24612 // { dg-do compile } // { dg-options "-O -Wuninitialized -fopenmp" } void foo() { int i; #pragma omp parallel shared(i) { i = 0; ++i; } }