source
stringlengths
3
92
c
stringlengths
26
2.25M
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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 // //===---------------------------...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
cactus_consolidated.c
/* * Released under the MIT license, see LICENSE.txt */ #include <time.h> #include <getopt.h> #include "sonLib.h" #include "cactus.h" #include "cactus_setup.h" #include "stCaf.h" #include "poaBarAligner.h" #include "cactusReference.h" #include "addReferenceCoordinates.h" #include "traverseFlowers.h" #include "blockM...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
FullConvolutionRules.h
// Copyright 2016-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #ifndef FULLDECONVOLUTIONRULES_H #define FULLDECONVOLUTIONRULES_H #include "RectangularRegions.h" template <Int dimen...
bml_transpose_ellpack_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_parallel.h" #include "../bml_transpose.h" #include "../bml_types.h" #include "bml_allocate_ellpack.h" #include "bml_transpose_ellpack.h" #include "bml_types_ellpack.h" #include <complex.h> #include <math.h> #include <stdli...
GB_binop__second_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
struct.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> struct data { double *Matrix; int counter; }; int main() { struct data d; d.Matrix = malloc(sizeof(double)*4); d.Matrix[0] = 42; d.Matrix[1] = 43; d.Matrix[2] = 44; d.Matrix[3] = 45; d.counter = 0; #pragma omp parallel ...
false_sharing_correct.c
#include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <sys/time.h> static void init_array(double a[], int start, int stop, int incr); static void do_work(double a[], int nr_runs, int start, int stop, int incr); #define N 1000 int main(void) { const int nr_threads = 2; const int n...
mxnet_op.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
visual-effects.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
mlp_example_bf16_amx_numa.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
Parallelizer.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2010 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 can ob...
DelayedUpdate.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2019 QMCPACK developers. // // File developed by: Ye Luo, yeluo@anl.gov, Arg...
Vector.h
/* * Vector.h * * Created on: 12.03.2014 * Author: Michael Wegner (michael.wegner@student.kit.edu) */ #ifndef VECTOR_H_ #define VECTOR_H_ #include <vector> #include "../Globals.h" #include <cassert> namespace NetworKit { // forward declaration of Matrix class class Matrix; /** * @ingroup algebraic * T...
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) #...
bug_nested_proxy_task.c
// RUN: %libomp-compile-and-run // The runtime currently does not get dependency information from GCC. // UNSUPPORTED: gcc // Very flaky on openmp-clang-x86_64-linux-debian. // https://bugs.llvm.org/show_bug.cgi?id=45397 // UNSUPPORTED: linux #include <stdio.h> #include <omp.h> #include <pthread.h> #include "omp_my_s...
timestep_avx512.c
/* Author: Mohammed Al Farhan Email: mohammed.farhan@kaust.edu.sa */ #include <stdio.h> #include <string.h> #include <stdint.h> #include <omp.h> #include <math.h> #include <immintrin.h> #include "inc/ktime.h" #include "inc/geometry.h" #include "inc/ker/phy.h" /* Calculate a time step for each cell Note that...
GB_unop__erfc_fp64_fp64.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_reduce_to_vector.c
//------------------------------------------------------------------------------ // GB_reduce_to_vector: reduce a matrix to a vector using a binary op //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
Krylov.h
#ifndef BFM_KRYLOV_H #define BFM_KRYLOV_H #include <util/lattice/bfm_evo.h> #include <alg/eigen/Deflate.h> #include <alg/eigen/Francis.h> #include <cstdlib> #include <string> #include <stdexcept> #include <cmath> #include <vector> #include <algorithm> #include <iostream> #include <time.h> #include <util/lattice/bfm_...
IJMatrix_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) **************************************...
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>...
GB_binop__bxor_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
declare-variant-6.c
double f1 (int, long, float); double f2 (int, long, float); #pragma omp declare variant (f1) match (user={condition(0)},construct={parallel}) double f3 (int, long, float); #pragma omp declare variant (f1) match (construct={parallel},user={condition(score(1):1)}) double f4 (int, long, float); double f5 (int, long, float...
dqp3.c
/*! @copyright (c) 2017 King Abdullah University of Science and * Technology (KAUST). All rights reserved. * * STARS-H is a software package, provided by King Abdullah * University of Science and Technology (KAUST) * * @file src/backends/openmp/blrm/dqp3.c * @version 0.3.0 * @au...
segment_reduce.h
/*! * Copyright (c) 2020 by Contributors * \file array/cpu/spmm.h * \brief Segment reduce kernel function header. */ #ifndef DGL_ARRAY_CPU_SEGMENT_REDUCE_H_ #define DGL_ARRAY_CPU_SEGMENT_REDUCE_H_ #include <dgl/array.h> #include <dgl/runtime/parallel_for.h> #include <dgl/base_heterograph.h> #include <vector> #inc...
cp-tree.h
/* Definitions for C++ parsing and type checking. Copyright (C) 1987, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribu...
double_reduction_min.c
#include <stdio.h> #include <omp.h> int main() { double result = 0.0; #pragma omp parallel reduction(min:result) { result = omp_get_thread_num(); } printf("Result: %f\n", result); }
vgg_winograd.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <mkl.h> #include <string.h> #include <hbwmalloc.h> #include <assert.h> #include "falcon.h" void direct_conv(float * D0, float * F, float * O, const int N, const int K, const int P, const int Q, const int C, const int R, const int S) { const int P_pa...
pfx_fmt_plug.c
/* pfx cracker patch for JtR. Hacked together during June of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2021, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and bi...
level.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
GB_binop__ne_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...
mandel.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <getopt.h> #include "mandel.h" void mandel_basic(unsigned char *image, const struct spec *s); void mandel_altivec(unsigned char *image, const struct spec *s); void mandel_avx(unsigned char *image, const struct spec *s); void mandel_sse2(unsigned char *i...
quick_sort.h
// Copyright 2021 Bessolitsyn Sergey #ifndef MODULES_TASK_2_BESSOLITSYN_S_QUICK_SORT_QUICK_SORT_H_ #define MODULES_TASK_2_BESSOLITSYN_S_QUICK_SORT_QUICK_SORT_H_ #include <omp.h> #include <vector> #include <random> #include <utility> template<typename T> void quick_sort(T arr[], int right) { if (right > 0) { ...
atomic-3.c
/* { dg-do compile } */ /* { dg-options "-fopenmp -fdump-tree-gimple" } */ /* LLVM LOCAL test not applicable */ /* { dg-require-fdump "" } */ int *xyzzy; void f1(void) { #pragma omp atomic xyzzy++; } /* { dg-final { scan-tree-dump-times "xyzzy, 4" 1 "gimple" { target i?86-*-* x86_64-*-* ia64-*-* powerpc*-*-* a...
GB_unaryop__ainv_uint32_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_unaryop__ainv_uint32_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
dpado.202001231035.multiple_rounds_for_checking.h
// // Created by Zhen Peng on 1/6/20. // #ifndef PADO_DPADO_H #define PADO_DPADO_H #include <vector> //#include <unordered_map> #include <map> #include <algorithm> #include <iostream> #include <limits.h> //#include <xmmintrin.h> #include <immintrin.h> #include <bitset> #include <math.h> #include <fstream> #include <o...
GB_binop__bxnor_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
residual_based_bdf_displacement_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS...
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...
openmp_demo.c
//------------------------------------------------------------------------------ // GraphBLAS/Demo/Program/openmp_demo: example of user multithreading //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
cgk_embed.h
// // Created by xinyan on 29/12/2019. // #pragma once #include <unordered_set> #include <unordered_map> #include <random> #include <omp.h> #include <boost/progress.hpp> #include "utils.h" using std::string; using std::vector; using std::unordered_set; using std::unordered_map; using IndexType = unordered_map<strin...
omp.c
/******************************************************************************* * * File: omp.c * Description: Example for memory access pattern of sequential access with * openmp. * * Author: Alif Ahmed * Email: alifahmed@virginia.edu * Updated: Aug 06, 2019 * ******************************************...
omp.c
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <omp.h> int is_valid(int num) { int sum = 0; char buf[11]; sprintf(buf, "%u", num); for (int i = 0; i < 6; i++) { if (i > 0 && buf[i-1] == buf[i]) { return 0; } sum += buf[i] - 48; } return (sum != 7 && sum != 11 && sum != 13); ...
SwathFileConsumer.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) >...
QSkycubeG.h
#include <unordered_map> #include <stdint.h> #include <vector> #include "QSkycube.h" #include "BSkyTreeP.h" #include "BSkyTreeEM.h" #pragma once #ifndef _SKYCUBEG_H #define _SKYCUBEG_H bool inverse_snoob(int a, int b) { return __builtin_popcount(a) < __builtin_popcount(b); } void AddMissingSkyPoin...
fractional_step_strategy.h
/* ********************************************************* * * Last Modified by: $Author: rrossi $ * Date: $Date: 2009-01-13 15:39:56 $ * Revision: $Revision: 1.14 $ * * ***********************************************************/ #if !defined(KRATOS_RESIDUALBASED_FRACTIONAL...
par_cheby.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) ***************************************...
SourceCode.c
#ifdef _WIN32 #include <stdio.h> #else #define _GNU_SOURCE // for fcloseall() on linux #include <stdio.h> #endif #include <stdbool.h> #include <string.h> #include <stdlib.h> #include <omp.h> #include <math.h> #include <SpiceUsr.h> #include <PAConfig.h> #ifdef _WIN32 #include <windows.h> // needed for search wu directo...
declare_simd_aarch64.c
// REQUIRES: aarch64-registered-target // -fopemp and -fopenmp-simd behavior are expected to be the same. // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -fopenmp -x c -emit-llvm %s -o - -femit-all-decls | FileCheck %s --check-prefix=AARCH64 // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-featu...
detector.c
#include "darknet.h" static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90}; void train_detector(char *datacfg, cha...
integrator_hermes.c
/** * @file integrator_hermes.c * @brief HERMES. A WHFAST/IAS15 hybrid integration scheme. * @author Ari Silburt <silburt@astro.utoronto.ca> * @details This file implements a hybrid integration scheme capable * of handling close encounters, simple collisions, and * planetesimal forces. Details are describ...
GB_unop__identity_fc64_int16.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...
openMPIntergal.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #ifdef _OPENMP #include <omp.h> #endif #define precision 10 struct func { double a, b, c; }; double f(struct func* func, double x) { return func->a * x * x + func->b * x + func->c; } double integral(struct func* func, double lb, double ...
PVMappingFilterTimeWeek.h
/* * MIT License * * © ESI Group, 2015 * * 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, copy, modify, merge, pub...
qr_decompose.h
/** * @file * \brief Library functions to compute [QR * decomposition](https://en.wikipedia.org/wiki/QR_decomposition) of a given * matrix. * \author [Krishna Vedala](https://github.com/kvedala) */ #ifndef NUMERICAL_METHODS_QR_DECOMPOSE_H_ #define NUMERICAL_METHODS_QR_DECOMPOSE_H_ #include <cmath> #include <cst...
GB_unop__identity_fp64_int64.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_AxB_saxpy3_flopcount.c
//------------------------------------------------------------------------------ // GB_AxB_saxpy3_flopcount: compute flops for GB_AxB_saxpy3 //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-...
vmul.c
/* This file is part of HiParTI!. HiParTI! is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. HiParTI! is distr...
GB_unop__identity_fp64_int8.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__minv_uint32_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
j3d27pt.gold.h
#include <cstdio> #include <cstring> void jacobi_gold(double *fout, double *ftemp, const double *fin, double h2inv, double a, double b, int L, int M, int N) { double (*out)[M][N] = (double (*)[M][N]) fout; double (*in)[M][N] = (double (*)[M][N]) fin; double (*temp)[M][N] = (double (*)[M][N]) ftemp; double c = b * ...
rt_dlacpy.c
#include "runtime.h" #include "core_blas-gpu.h" #ifdef PLASMA_WITH_SMP #pragma omp target device (smp) copy_deps #pragma omp task in([lda*(n-1)+m]A) out([ldb*(n-1)+m]B) label(dlacpy_smp) void CORE_dlacpy_ompss(PLASMA_enum uplo, int m, int n, double *A, int lda, double *B, int ldb) { LAPACKE_dlacpy_work(LAPACK_COL_MAJ...
trmm_x_sky_n_hi_col_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ldy) { #ifdef COMPLE...
rsvp_fmt_plug.c
/* * Cracker for HMAC-MD5 and HMAC-SHA1 based authentication in RSVP. * * This software is Copyright (c) 2014 Dhiru Kholia <dhiru at openwall.com>, * and it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary forms, with or without# * modification, ...
deconv_dw_kernel_arm.c
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); ...
private_mapping.c
// RUN: %libomptarget-compile-run-and-check-generic #include <assert.h> #include <stdio.h> int main() { int data1[3] = {1}, data2[3] = {2}, data3[3] = {3}; int sum[16] = {0}; #pragma omp target teams distribute parallel for map(tofrom \ : sum...
mandelbrot.c
/* * mandelbrot.c: simple anti-aliasing method * (c)2010-2018 Seiji Nishimura * $Id: mandelbrot.c,v 1.1.1.3 2018/09/11 00:00:00 seiji Exp seiji $ */ #include <math.h> #include <stdlib.h> #include <pixmap.h> #include <palette.h> #include <stdbool.h> #define ROUND(x) ((int) round(x)) #define MIN(x,y) (((x)<(y))?(x)...
imagelib.c
// // Created by josetobias on 5/11/19. // #include "imagelib.h" /** * * @param file_path * @param width * @param height * @param color_type * @param bit_depth * @param row_pointers */ void read_png_file(char *file_path, int *width, int *height, png_byte *color_type, png_byte *bit_depth, ...
backprop.c
/* ****************************************************************** * HISTORY * 15-Oct-94 Jeff Shufelt (js), Carnegie Mellon University * Prepared for 15-681, Fall 1994. * Modified by Shuai Che ****************************************************************** */ #include <omp.h> #include <stdio...
parallelEnvironment.c
/***************************************************************************** * * * Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 * * * * ...
pi.c
#ifndef _MONTECARLO_H #define _MONTECARLO_H #include"pi.h" #endif int main(int argc, char *argv[]){ double elapsed_time; double serialPI = 0, parallelPI = 0; if(argc != 3){ printf("Correct way to execute this program is:\n"); printf("./pi stepNum numberOfThreads\n"); return 1; } int num_steps = atoi(arg...
LISAutils.c
#include "LISAutils.h" #include "omp.h" /************ Global Parameters ************/ LISAParams* injectedparams = NULL; LISAGlobalParams* globalparams = NULL; LISAPrior* priorParams = NULL; LISAAddParams* addparams = NULL; double logZdata = 0.; SimpleLikelihoodPrecomputedValues* simplelikelihoodinjvals = NULL; /***...
timeTest.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <mpi.h> #include <omp.h> #include <immintrin.h> void print_vec(int* vec, int l) { for (int i = 0; i < l; i++) printf("%d ", vec[i]), fflush(stdout); printf("\n"); fflush(stdout); } void sum_AVX(int* vec1, int* vec2, int* vec3, i...
GB_assign_zombie2.c
//------------------------------------------------------------------------------ // GB_assign_zombie2: delete all entries in C(i,:) for GB_assign //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Lice...
DRB050-functionparameter-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...
taskq.c
#define _XOPEN_SOURCE 500 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <semaphore.h> #include <errno.h> #include <unistd.h> #include "ghost/config.h" #include "ghost/types.h" #include "ghost/core.h" #include "ghost/locality.h" #include "ghost/task.h" #include "ghost/taskq.h"...
c_timers.c
#include "wtime.h" #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif /* Prototype */ void wtime( double * ); /*****************************************************************/ /****** E L A P S E D _ T I M E ******/ /************************************************************...
GB_binop__isle_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-...
main.c
#include <stdio.h> #include<stdlib.h> #include <string.h> #include "mpi.h" #include<omp.h> void merge(int l1, int r1, int r2, int* data, int* temp) { int top = l1, p = l1, q = r1; while (p < r1 || q < r2) { if (q >= r2 || (p < r1 && data[p] <= data[q])) { temp[top++] = data[p++]; } else { ...
omp_calloc_def_fb.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <omp.h> int main() { omp_alloctrait_t at[2]; omp_allocator_handle_t a; void *p[2]; at[0].key = omp_atk_pool_size; at[0].value = 2 * 1024 * 1024; at[1].key = omp_atk_fallback; at[1].value = omp_atv_default_mem_fb; a = omp_init_allocator(omp_la...
par_interp.c
/*BHEADER********************************************************************** * Copyright (c) 2017, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * Written by Ulrike Yang (yang11@llnl.gov) et al. CODE-LLNL-738-322. * This file is part of AMG. See files READ...
BEMSolver.h
/** * * @file BEMSolver.h * * @copyright 2018 King Abdullah University of Science and Technology (KAUST). * All rights reserved. * * @author Mustafa Abduljabbar [mustafa.abduljabbar@kaust.edu.sa] and Mohammed Al Farhan [mohammed.farhan@kaust.edu.sa]. * **/ #ifndef BEMSOLVER #de...
GB_unop__identity_int64_uint64.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...
data_to_png.c
#include "data_to_png.h" #include <omp.h> #define MAXIMUM(A,B) (A>B?A:B) void data_to_png(char* data_fn, char* png_fn){ #pragma omp parallel { FILE* fp; fp = fopen(data_fn, "r"); if (fp==NULL){ printf("File %s does not exist\n", data_fn); exit(-1); } int buffer_length=4096; int width, heigh...
GB_binop__plus_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
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)...
LAGraph_bfs_pushpull.c
//------------------------------------------------------------------------------ // LAGraph_bfs_pushpull: push-pull breadth-first search //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2020 LAGraph Contributors. ...
Compiler.c
// this is autogenerated file, do not edit it. #include "ficus/ficus.h" struct _fx_Nt6option1N10Ast__exp_t_data_t; static void _fx_free_Nt6option1N10Ast__exp_t(struct _fx_Nt6option1N10Ast__exp_t_data_t** dst); struct _fx_Nt6option1N10Ast__typ_t_data_t; static void _fx_free_Nt6option1N10Ast__typ_t(struct _fx_Nt6opt...
GB_binop__minus_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
cielab.h
#ifndef _FAST_SLIC_CIELAB_H #define _FAST_SLIC_CIELAB_H #include <cmath> #include <cstdint> #include <vector> #include "parallel.h" #include "simd-helper.hpp" #include "fast-slic-common.h" /* def get_xyz_nonlin_tbl(a): v = a / 255. if v <= 0.04045: X = v / 12.92 else: X = ((v + 0.055) / 1....
taskwait-depend.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // taskwait with depend clause was introduced with gcc-9 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 // icc does not yet support taskwait with depend clause // XFAIL: icc // clang does not yet support taskwait with depend clause /...
nested2.c
// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES=threads OMP_PROC_BIND=spread,close KMP_HOT_TEAMS_MAX_LEVEL=2 %libomp-run | %python %S/check.py -c 'CHECK' %s #include <stdio.h> #include <stdlib.h> #include <omp.h> // Currently, KMP_HOT_TEAMS_MAX_LEVEL has to be equal to the // nest depth for intuit...
randomGenerator.h
#pragma once #include <random> #include <vector> #include <omp.h> #include "datatypes.h" #include "timing.h" #include <limits.h> #if THRUST_DEVICE_SYSTEM == THRUST_DEVICE_SYSTEM_CUDA #include <cuda.h> #include <curand_kernel.h> extern __device__ curandState* dstates; #endif class RandomGenerator { static std::vect...
oned_csr.c
/* Copyright (C) 2010-2011 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
DigraphTemplate.h
/////////////////////////////////////////////////////////////////////////////// // SOFTWARE COPYRIGHT NOTICE AGREEMENT // // This software and its documentation are copyright (2014) by the // // Broad Institute. All rights are reserved. This software is supplied // ...
SumaVectoresC.c
/* SumaVectoresC.c Suma de dos vectores: v3 = v1 + v2 Para compilar usar (-lrt: real time library): gcc -O2 SumaVectores.c -o SumaVectores -lrt Para ejecutar use: SumaVectoresC longitud */ #include <stdlib.h> // biblioteca con funciones atoi(), malloc() y free() #include <stdio.h> // biblioteca donde se en...