source
stringlengths
3
92
c
stringlengths
26
2.25M
ks_cpp.c
#include <stdio.h> #include <malloc.h> #include <assert.h> #include <memory.h> #include <math.h> // C bool typedef enum { true=1, false=0 } bool; inline void update_min(float* p1, float v2) { if (v2 < *p1) *p1 = v2; } // https://stackoverflow.com/questions/28258590/using-openmp-to-get-the-in...
blas2_cusp.h
#ifndef _DG_BLAS_CUSP_H #define _DG_BLAS_CUSP_H #ifdef DG_DEBUG #include <cassert> #endif //DG_DEBUG #include <typeinfo> #include <limits.h> #include <cusp/multiply.h> #include <cusp/convert.h> #include <cusp/array1d.h> #include "config.h" #include "tensor_traits.h" ///@cond namespace dg{ namespace blas2{ namespace...
configurator.c
/* Simple tool to create config.h. * Would be much easier with ccan modules, but deliberately standalone. * * Copyright 2011 Rusty Russell <rusty@rustcorp.com.au>. MIT license. * * c12r_err, c12r_errx functions copied from ccan/err/err.c * Copyright Rusty Russell <rusty@rustcorp.com.au>. CC0 (Public domain) Lice...
main.c
#include <stdio.h> #include<omp.h> #include <stdlib.h> int main() { // Define the domain double x_len = 2.0; double y_len = 2.0; int x_points = 201; int y_points = 201; printf("\n The grid is of %d x %d points \n", x_points, y_points); double del_x = x_len/(x_points-1); dou...
parallel_for.h
/*! * Copyright (c) 2021 by Contributors * \file runtime/container.h * \brief Defines the container object data structures. */ #ifndef DGL_RUNTIME_PARALLEL_FOR_H_ #define DGL_RUNTIME_PARALLEL_FOR_H_ #include <dmlc/omp.h> #include <algorithm> namespace { int64_t divup(int64_t x, int64_t y) { return (x + y - 1) ...
GB_unop__identity_fp64_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...
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 // //===---------------------------...
avx.c
// https://software.intel.com/sites/default/files/m/d/4/1/d/8/Intro_to_Intel_AVX.pdf // https://software.intel.com/en-us/articles/introduction-to-intel-advanced-vector-extensions/ // hardware supporting AVX consists of 16 256-bit YMM registers ymm0..ymm15 // and a 32-bit control/status register MXCSR // data should b...
omp_mm.c
/****************************************************************************** * FILE: omp_mm.c * DESCRIPTION: * OpenMp Example - Matrix Multiply - C Version * Demonstrates a matrix multiply using OpenMP. Threads share row iterations * according to a predefined chunk size. * AUTHOR: Blaise Barney * LAST REVISE...
picolrn.c
/* * This code is released under the MIT License. * Copyright (c) 2013 Nenad Markus */ #include <stdio.h> #include <malloc.h> #include <math.h> #include <stdint.h> #include <omp.h> // hyperparameters #define NRANDS 1024 /* auxiliary stuff */ #define MAX(a, b) ((a)>(b)?(a):(b)) #define MIN(a, b) ((a)<(b)?(a):...
task-taskwait-nested.c
/* * task-taskwait-nested.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-excep...
two_step_v_p_strategy.h
// // Project Name: KratosPFEMFluidDynamicsApplication $ // Last modified by: $Author: AFranci $ // Date: $Date: January 2016 $ // Revision: $Revision: 0.0 $ // // #ifndef KRATOS_TWO_STEP_V_P_STRATEGY_H #define KRATOS_TWO_...
GB_binop__minus_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
stream.c
// Copyright 2009-2018 NTESS. Under the terms // of Contract DE-NA0003525 with NTESS, the U.S. // Government retains certain rights in this software. // // Copyright (c) 2009-2018, NTESS // All rights reserved. // // Portions are copyright of other developers: // See the file CONTRIBUTORS.TXT in the top level directory...
LinearSolvers.h
#ifndef LINEAR_SOLVERS_INCLUDE #define LINEAR_SOLVERS_INCLUDE #ifdef USE_CHOLMOD #include <Cholmod/cholmod.h> #if defined( WIN32 ) || defined( _WIN64 ) #pragma message( "[WARNING] Need to explicitly exclude VCOMP.lib" ) #pragma comment( lib , "CHOLMOD_FULL.lib" ) #endif // WIN32 || _WIN64 #ifdef DLONG typedef long lon...
bug_set_schedule_0.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <omp.h> #include "omp_testsuite.h" /* Test that the chunk size is set to default (1) when chunk size <= 0 is specified */ int a = 0; int test_set_schedule_0() { int i; a = 0; omp_set_schedule(omp_sched_dynamic,0); #pragma omp parallel { #pr...
veda_device_omp.h
#pragma once #ifndef __cplusplus #error "veda_device_omp.h only supports C++!" #endif #include <cstdint> #include <omp.h> #include <type_traits> #include <functional> #include <algorithm> //------------------------------------------------------------------------------ template<typename T> inline void veda_omp_schedu...
tanh_ref.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...
K-Means-OpenMP.c
/* Author: Makarios Christakis Compiled and ran on a 7th gen i7 on Ubuntu 18.04, the algorithm converges after 31 iterations. Timed using time() we get: real 0m53,564s user 6m40,944s sys 0m0,176s NOTE: SIMD optimization in the euclidian distance function causes the program to ca...
VolumetricConvolutionMM.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VolumetricConvolutionMM.c" #else /* note: due to write issues, this one cannot be parallelized as well as unfolded_copy */ static void nn_(unfolded_acc_vol)(THTensor *finput, THTensor *input, int kT, int kW, int kH, ...
GB_dense_subassign_21.c
//------------------------------------------------------------------------------ // GB_dense_subassign_21: C(:,:) = x where x is a scalar //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitespars...
cp-tree.h
/* Definitions for C++ parsing and type checking. Copyright (C) 1987-2015 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
cifradoHill.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> typedef struct text { int size; char * restrict body; }Text; typedef struct node { int data; struct node * restrict next; struct node * restrict prev; }Node; typedef struct queue { int size; Node * restrict bottom...
3d25pt.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-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
Ellpack_impl.h
#pragma once #include <Benchmarks/SpMV/ReferenceFormats/Legacy/Ellpack.h> #include <TNL/Containers/Vector.h> #include <TNL/Math.h> #include <TNL/Exceptions/NotImplementedError.h> namespace TNL { namespace Benchmarks { namespace SpMV { namespace ReferenceFormats { namespace Legac...
GB_binop__bget_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-...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
perftest.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #...
FGP_dTV_core.c
/* This work is part of the Core Imaging Library developed by Visual Analytics and Imaging System Group of the Science Technology Facilities Council, STFC Copyright 2019 Daniil Kazantsev Copyright 2019 Srikanth Nagella, Edoardo Pasca Licensed under the Apache License, Version 2.0 (the "License"); you may not use this...
GB_unop__lnot_uint32_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
GB_unop__identity_fp64_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...
GB_binop__iseq_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
sousTabMax.c
#include <stdlib.h> #include <stdio.h> #include <math.h> // Source pour cette façon de faire le max: // https://gcc.gnu.org/onlinedocs/gcc/Statement-Exprs.html#Statement-Exprs #define maxint(a,b) ({int _a = (a), _b = (b); _a > _b ? _a : _b; }) /* *************Fonctions utiles********** */ int* createArra...
bml_transpose_triangle_dense_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_transpose_triangle.h" #include "../bml_types.h" #include "bml_allocate_dense.h" #include "bml_transpose_triangle_dense.h" #include "bml_types_dense.h" #include <complex.h> #include <stdlib.h> #include <string.h> #include <...
GB_binop__min_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
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 -no-opaque-pointers -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-n...
8.norace7.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 20 int main() { double A[N], B[N], sum0 = 0.0, sum1 = 0.0; #pragma omp parallel { #pragma omp for // nowait for (int i = 0; i < N; i++) { A[i] = i; B[i] = i * i; } #pragma omp for reduction(+ : sum0) for ...
enhance.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
9012.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 <...
bug_nested_proxy_task.c
// RUN: %libomp-compile -lpthread && %libomp-run // The runtime currently does not get dependency information from GCC. // UNSUPPORTED: gcc #include <stdio.h> #include <omp.h> #include <pthread.h> #include "omp_my_sleep.h" /* With task dependencies one can generate proxy tasks from an explicit task being executed b...
perturbations.c
/** @file perturbations.c Documented perturbation module * * Julien Lesgourgues, 23.09.2010 * * Deals with the perturbation evolution. * This module has two purposes: * * - at the beginning; to initialize the perturbations, i.e. to * integrate the perturbation equations, and store temporarily the terms * contr...
GB_binop__first_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-...
ast-dump-openmp-target-parallel.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() { #pragma omp target parallel ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-ope...
singleSubsectionc.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> void subdomain( float *x, int iam,int ipoints); void pdomain( float *x, int iam,int ipoints); void subdomain( float *x, int iam,int ipoints) { int ibot,itop,i; int sum; ibot=(iam)*ipoints+1; itop=ibot+ipoints-1; for(i=ibot;i<=itop;i++) ...
bli_axpyv_bgq_int.c
/* BLIS An object-based framework for developing high-performance BLAS-like libraries. Copyright (C) 2014, The University of Texas at Austin Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Re...
GB_unaryop__minv_int8_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
tensor_cpu-inl.h
/*! * Copyright (c) 2014 by Contributors * \file tensor_cpu-inl.h * \brief implementation of CPU host code * \author Bing Xu, Tianqi Chen */ #ifndef MSHADOW_TENSOR_CPU_INL_H_ #define MSHADOW_TENSOR_CPU_INL_H_ #include <cstring> #include <functional> #include <utility> #include <vector> #include "./base.h" #includ...
adi.pluto.par.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <math.h> double X[N][N+20]; double A[N][N+20]; double B[N][N+20]; void init_arrays() { int i, j; for (i=0; i<N; i++) for (j=0; j<N; j++) { A[i][j] = (1+(i*j)%1024)/2.0; B[i][j] = (1+(i*j)%1024)/3.0; X[i][j] =...
vector_list_math.c
#include "vector_list_math.h" #include "../../vector/common/common_vector_math.h" #include "../../vector/sparse/sparse_vector_math.h" #include "../../global_defs.h" #include <stdlib.h> void update_vector_list_lengths(struct sparse_vector* vector_array , uint64_t no_clusters ...
tree-parloops.c
/* Loop autoparallelization. Copyright (C) 2006-2020 Free Software Foundation, Inc. Contributed by Sebastian Pop <pop@cri.ensmp.fr> Zdenek Dvorak <dvorakz@suse.cz> and Razya Ladelsky <razya@il.ibm.com>. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms ...
GB_binop__div_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...
mg.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - MG This benchmark is an OpenMP C version of the NPB MG code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by NA...
par_multi_interp.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) **************************************...
phonopy.c
/* Copyright (C) 2021 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...
openmp_factors.c
/* Suggested makefile: ---------- P=openmp_factors CFLAGS=`pkg-config --cflags glib-2.0` -g -Wall -std=gnu99 -O3 -fopenmp LDLIBS=`pkg-config --libs glib-2.0` -fopenmp $(P): ---------- */ #include <omp.h> #include <stdio.h> #include <stdlib.h> //malloc #include <string.h> //memset #include "openmp_getmax.c" int main(...
lis_precision_vec.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...
streaming_rrr_generator.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
SparseDenseProduct.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2015 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...
contact_utilities.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
GB_unop__identity_fp32_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...
MathTools.h
/** * * \copyright * Copyright (c) 2012-2017, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license * */ #pragma once #include <boost/math/constants/co...
GB_unop__acos_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
deconvolution_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 ...
GB_unop__minv_int32_int32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
pfem_2_monolithic_slip_strategy.h
#ifndef KRATOS_PFEM2_MONOLITHIC_SLIP_STRATEGY_H #define KRATOS_PFEM2_MONOLITHIC_SLIP_STRATEGY_H #include "includes/define.h" #include "includes/model_part.h" #include "utilities/openmp_utils.h" #include "processes/process.h" #include "solving_strategies/schemes/scheme.h" #include "solving_strategies/strategies/solving...
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> #include <time.h> #i...
lap.h
#include <cassert> #include <cstdio> #include <limits> #include <memory> #include <vector> #include "knn.h" #ifdef __GNUC__ #define always_inline __attribute__((always_inline)) inline #define restrict __restrict__ #elif _WIN32 #define always_inline __forceinline #define restrict __restrict #else #define always_inline ...
barrier.c
/* PMSIS includes */ #include "pmsis.h" #include "omp.h" #define ARRAY_SIZE 64 uint32_t a[ARRAY_SIZE] = {0}; uint32_t b[ARRAY_SIZE] = {0}; uint32_t c[ARRAY_SIZE] = {0}; /* Cluster main entry, executed by core 0. */ void cluster_delegate(void *arg) { printf("Cluster master core entry\n"); #pragma omp paralle...
target_parallel_for_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized //...
time.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <unistd.h> #include <omp.h> // Определение функции double Func(double x) { // Недействительные значения не должны вносить вклад в интеграл if (x > 2) { return 0; } return sqrt(4 - x*x); } // Формула Котеса рассчета определенного...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
health.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...
ridgedfractalnoise.h
#pragma once #ifndef RIDGID_FRACTAL_NOISE_H #define RIDGID_FRACTAL_NOISE_H #include "noisecommon.h" #define DEFAULT_RIDGED_FREQUENCY 1.0 #define DEFAULT_RIDGED_LACUNARITY 2.0 #define DEFAULT_RIDGED_OCTAVE_COUNT 6 #define DEFAULT_RIDGED_SEED 0 #define DEFAULT_RIDGED_POSITION_X 0.0 #define DEFAULT_RIDGED_POSITION_Y 0.0...
616fb_dev.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" #include <stdio.h> #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size; i...
reduce_mean.h
// Copyright 2018 Xiaomi, Inc. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicab...
jacobi_avx512.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.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; } /******************************************...
GB_binop__ge_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...
3d25pt.c
/* * Order-2, 3D 25 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)...
DRB001-antidep1-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...
dynamic_module.c
// RUN: %libomptarget-compile-aarch64-unknown-linux-gnu -DSHARED -fPIC -shared -o %t.so && %libomptarget-compile-aarch64-unknown-linux-gnu %t.so && %libomptarget-run-aarch64-unknown-linux-gnu 2>&1 | %fcheck-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu -DSHARED -fPIC -shared -o %t.so &...
dc.c
/* !-------------------------------------------------------------------------! ! ! ! N A S P A R A L L E L B E N C H M A R K S 3.3 ! ! ! ! ...
GB_binop__ne_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-...
DRB019-plusplus-var-yes.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
matvec_int_avx2.c
//matvec.c //Multiplies a matrix by a vector #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 1000 #define N 1200 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 100...
mysql_fmt_plug.c
/* MYSQL_half_fmt.c * * Copyright (c) 2008 by <earthquake at rycon.hu> * * John the ripper MYSQL-fast module * * * Note: The mysql hash's first 8byte is relevant, * the another ones depends on the first 8. Maybe * the passwords after 9-10character have collision * in the first 8byte, so we have to check the f...
yescrypt-simd.c
/*- * Copyright 2009 Colin Percival * Copyright 2012-2015 Alexander Peslyak * 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 copy...
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...
DRB115-forsimd-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...
main.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> #include <string.h> int number_of_threads; double **A; double **L; double **U; void crout0(double **L, double **U, int n) { int i, j, k; double sum = 0; for (i = 0; i < n; i++) { U[i][i] = 1; } for (j = 0; j < n; j++) { for (i = j; i < n; i++) { sum...
DRB032-truedepfirstdimension-var-yes.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
conv_im2col_sgemm_neon_sgemm.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. 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 of the License at // //...
DRB025-simdtruedep-var-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
pr39591-1.c
/* PR other/39591 */ /* { dg-do run } */ /* { dg-options "-O2" } */ extern void abort (void); int err; int main (void) { #pragma omp parallel { int array[40]; int i; for (i = 0; i < sizeof array / sizeof array[0]; i++) array[i] = 0x55555555; #pragma omp for schedule(dynamic) for (i = 0; i < ...
mandelbrot.c
/* To compile: gcc -O3 -o mandelbrot mandelbrot.c png_util.c -I. -lpng -lm -fopenmp Or just type: module load gcc make To create an image with 4096 x 4096 pixels (last argument will be used to set number of threads): ./mandelbrot 4096 4096 1 */ #include <math.h> #include <stdio.h> #include <stdlib...
image.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRB013-nowait-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...
atomic-18.c
int i, v; float f; void foo (int j) { #pragma omp atomic update,update /* { dg-error "too many atomic clauses" } */ i = i + 1; #pragma omp atomic seq_cst release /* { dg-error "too many memory order clauses" } */ i = i + 1; #pragma omp atomic read,release /* { dg-error "incompatible with 'acq_rel' or 'releas...
GB_binop__eq_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-...
simd_loop_private.c
/* Example using private variables in a simd construct The two function calls return intermediate results that must be stored in private variables to avoid a data race. Each SIMD lane has its own instance of a private variable. */ void simd_loop_private(double *a, double *b, double *c, int n) { int ...
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...