source
stringlengths
3
92
c
stringlengths
26
2.25M
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) #...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
openmp_closest_bygraph.c
/* Bag of Tasks OpenMP implementation to find the closest pairs of waypoints in each of a set of METAL TMG graph files. The tasks to complete are to find the closest pair of points in METAL TMG files given as command-line parameters in argv[2] through argv[argc-1]. The tasks are distributed in an order ba...
tinyexr.h
/* Copyright (c) 2014 - 2015, Syoyo Fujita All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and t...
dataset.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_DATASET_H_ #define LIGHTGBM_DATASET_H_ #include <LightGBM/config.h> #include <LightGBM/feature_group.h> #include <LightGBM/meta.h> ...
SingleBodyLink.c
int x; int main() { #pragma omp single { int x; } #pragma omp single { 13; } }
convolution_sgemm_pack8to1_int8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GB_unaryop__minv_int64_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...
kmp_csupport.c
/* * kmp_csupport.c -- kfront linkage support for OpenMP. */ //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE....
spot.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "pix.h" /*------------------------------------------------------------------------- * * Used to sort spots in descent of frame IDs. * *------------------------------------------------------------------------*/ int spot_cmp(const void *a, const void *...
pw_threads.c
#include <papi_wrapper.h> #include <stdio.h> #include <stdlib.h> #include "test_lib.h" int main() { int N = 1000; int x[N]; pw_init_start_instruments; #pragma omp parallel for for (int i = 0; i < N; ++i) { x[i] = i * 42.3; } pw_stop_instruments; pw_print_instruments; /* av...
matrixutil.h
#pragma once #include <global.h> #include <memoryutil.h> #include <randomutil.h> ns_easyquantum template<typename Ty, typename uint, typename allocator> struct DenseVector; /* Class of dense matrix. */ template<typename Ty, typename uint = unsigned int, typename allocator = safe_allocator<Ty>> struct DenseMatr...
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_binop__bget_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...
ocp_nlp_common.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...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
zposv.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
fill_ints.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required ...
mttkrp_omp.c
/* This file is part of ParTI!. ParTI! 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. ParTI! is distributed...
filter.h
#ifndef OPENMC_TALLIES_FILTER_H #define OPENMC_TALLIES_FILTER_H #include <cstdint> #include <memory> #include <string> #include <unordered_map> #include <vector> #include <gsl/gsl> #include "openmc/constants.h" #include "openmc/hdf5_interface.h" #include "openmc/particle.h" #include "pugixml.hpp" namespace openmc ...
unpk.c
/* unpack_grib * 3/2008 public domain Wesley Ebisuzaki * 5/2016 public domain DWD */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <stddef.h> #include "wgrib2.h" #include "grb2.h" #ifdef USE_PNG #include <png.h> int dec_png_clone(unsigned char *,int *,int *,char *); ...
modifier_view.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
VolumetricDilatedMaxPooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VolumetricDilatedMaxPooling.c" #else static inline void THNN_(VolumetricDilatedMaxPooling_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, TH...
image.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/image.c" #else #undef MAX #define MAX(a,b) ( ((a)>(b)) ? (a) : (b) ) #undef MIN #define MIN(a,b) ( ((a)<(b)) ? (a) : (b) ) #undef TAPI #define TAPI __declspec(dllimport) #ifndef M_PI #define M_PI 3.14159265358979323846 #endif #undef temp_t #if defined(TH_...
nn_index.h
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. * * THE BSD LICENSE * * Redistrib...
udr-2.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ struct W { int w; }; void init (struct W *, int, int *); int v; #pragma omp declare reduction (foo : long int : omp_out |= v) /* { dg-error "combiner refers to variable" } */ #pragma omp declare reduction (foo : char : omp_out = v) /* { dg-error "combiner refers ...
onset.c
#include <math.h> #ifndef _OPENMP #define STRING2(x) #x #define STRING(x) STRING2(x) #pragma message (__FILE__ "(" STRING(__LINE__) "): error: This module should be compiled with /openmp on the command line") /* Generate a compiler error to stop the build as the above message doesn't stop the build when buil...
GB_binop__lor_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unaryop__lnot_int32_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...
soap.c
// SPDX-License-Identifier: BSD-2-Clause /* Copyright 1998-1999 Bernard Parent Copyright 2020 Prasanna Thoguluva Rajendran 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 t...
GB_binop__eq_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
omp_loop1.c
#include <stdio.h> #include <omp.h> int main() { int i; #pragma omp parallel num_threads(2) #pragma omp for for (i = 0; i < 8; i++) { printf("[%d] Hello OpenMP (%d)\n", i, omp_get_thread_num()); } return 0; }
GB_binop__rminus_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-...
omp_matrix_matrix.c
#include <omp.h> #include <stdio.h> #define R_1 300 #define R_2 300 #define C_1 300 #define C_2 300 int main () { int m = R_1, n = C_1, p = R_2, q = C_2, c, d, k; double first[R_1][C_1] = {0}; double second[R_2][C_2] = {0}; double multiply[R_1][C_2] = {0}; for ( c = 0 ; c < m ; c++ ) ...
hill_climbing_engine.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
eigrp_fmt_plug.c
/* * Cracker for EIGRP (Cisco's proprietary routing protocol) MD5 + HMAC-SHA-256 authentication. * http://tools.ietf.org/html/draft-savage-eigrp-00 * * This is dedicated to Darya. You inspire me. * * This software is Copyright (c) 2014, Dhiru Kholia <dhiru [at] openwall.com>, * and it is hereby released to the g...
atomic.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> main(int argc, char **argv){ int i, n=20, a[n],suma=0,sumalocal; if(argc<2){ fprintf(stderr,"\nFalta iteraciones\n"); exit(-1); } n=atoi(argv[1]); if (n>20) n=20; for(i=0;i<n;i++) a[i]=i; #pragma omp parallel private(sumalocal) {sumalocal=...
rawKeccak_512_fmt_plug.c
/* Keccak-512 cracker patch for JtR. Hacked together during January of 2013 * by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This file is part of John the Ripper password cracker, * Copyright (c) 2012 by Solar Designer * based on rawMD4_fmt.c code, with trivial changes by groszek. */ #if FMT_EXTERNS_H extern s...
nest.c
#include<stdio.h> #include<omp.h> // DOESN'T WORK!! int main(int argc, char *argv[]){ int nThreads = 4; omp_set_num_threads(nThreads); omp_set_nested(1); int n = 0; scanf("%d", &n); #pragma omp parallel { #pragma omp for for(int i = 0; i < n; i++){ #pragma omp for for(int j = 0; j < n; j++){ p...
osc.c
// A Splitting Method for Optimal Control // by Brendan O'Donoghue, George Stathopoulos and Stephen Boyd // this file contains the code to perform a single cold-start #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> ...
matrix.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
nested_parallel_for_irregular_omp.c
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * See LICENSE.txt in top-level directory. */ /* Nested Pragma omp parallel for directive evaluation * Output: avg time */ #include <assert.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <sys/time.h> #defin...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ej4.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <unistd.h> #define TAM 100 void asignarValores(float *v){ for(int i=0;i<TAM;++i) *(v+i)=rand()%1000; } void obtenerMayor(float *v) { float res=0; #pragma omp parallel for firstprivate(res) lastprivate(res) for(int i=0;i<TAM;++i){ #pragma omp cr...
ompfor-default.c
/* * default loop scheduling */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int main(void) { int i,j; #pragma omp parallel { #pragma omp single printf ("Using %d threads.\n",omp_get_num_threads()); #pragma omp for private(j) for (i=0;i<10;i++) { j = omp_get_thread_num(); print...
deflated_gmres_solver.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !...
move_particle_utility.h
/* ============================================================================== KratosIncompressibleFluidApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc...
GB_dense_ewise3_noaccum_template.c
//------------------------------------------------------------------------------ // GB_dense_ewise3_noaccum_template: C = A+B where all 3 matrices are dense //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. /...
omp-sections.c
#include <stdio.h> #include <unistd.h> #include <omp.h> int main(int argc, char **argv) { int x = 0; #pragma omp parallel { printf("entered the parallel region\n"); #pragma omp sections { printf("entered the sections region\n"); #pragma omp section { sleep(1)...
tree-pretty-print.c
/* Pretty formatting of GENERIC trees in C syntax. Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Adapted from c-pretty-print.c by Diego Novillo <dnovillo@redhat.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it un...
hd_joint_probability_generator_inl.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 ...
Locks.h
// -*- C++ -*- Copyright (c) Microsoft Corporation; see license.txt #ifndef MESH_PROCESSING_LIBHH_LOCKS_H_ #define MESH_PROCESSING_LIBHH_LOCKS_H_ #include "Hh.h" #if 0 { // critical section parallel_for_each(range(100), [&](const int i) { something(); HH_LOCK { something_synchronized(): } ...
gbdt.h
#ifndef LIGHTGBM_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include <LightGBM/prediction_early_stop.h> #include <LightGBM/json11.hpp> #include "score_updater.hpp" #include <cstdio> #include <vector> #include <string> #include <fstream> ...
residualbased_newton_raphson_contact_strategy.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
veccopy.c
#include <stdio.h> #include <omp.h> int main() { int N = 10; int a[N]; int b[N]; int i; for (i=0; i<N; i++) a[i]=0; for (i=0; i<N; i++) b[i]=i; #pragma omp target parallel for { for (int j = 0; j< N; j++) a[j]=b[j]; } int rc = 0; for (i=0; i<N; i++) if (a[i] != b[i] ) { ...
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)...
EW.c
// SW4 LICENSE // # ---------------------------------------------------------------------- // # SW4 - Seismic Waves, 4th order // # ---------------------------------------------------------------------- // # Copyright (c) 2013, Lawrence Livermore National Security, LLC. // # Produced at the Lawrence Livermore Nationa...
convolution_sgemm_pack1to4_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 ...
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...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
6811.c
// this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c' as parsed by frontend compiler rose void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[1000 + 0][1200 + 0], double ey[1000 + 0][1200 + 0], doub...
absval_hcl_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); you ma...
GB_dense_ewise3_accum_template.c
//------------------------------------------------------------------------------ // GB_dense_ewise3_accum_template: C += A+B where all 3 matrices are dense //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. //...
test_init_mt.c
/** * Copyright (C) Mellanox Technologies Ltd. 2020. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <ucp/api/ucp.h> #if _OPENMP #include <omp.h> #endif int main(int argc, char **argv) { int count = 0; #pragma omp parallel { ucs...
GB_subassign_11.c
//------------------------------------------------------------------------------ // GB_subassign_11: C(I,J)<M,repl> += scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identi...
9035.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...
nr_direct.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
ewem.c
#include "seismic.h" #include "ewem.h" void ewem(float **ux, float **uy, float **uz, float **mpp, float **mps1, float **mps2, float **wav, int nt, float ot, float dt, int nmx,float omx, float dmx, int nmy,float omy, float dmy, float sx,float sy, int nz, float oz, float dz, float gz, float sz, f...
omp-par.c
#include <stdio.h> #include <time.h> int main() { struct timespec requestStart, requestEnd; clock_gettime(CLOCK_REALTIME, &requestStart); #pragma omp parallel { } clock_gettime(CLOCK_REALTIME, &requestEnd); printf("Parallel region took %d second, and %d nanoseconds\n", requestEnd.tv_sec - reque...
stribog_fmt_plug.c
/* * GOST R 34.11-2012 cracker patch for JtR. Hacked together during * the Hash Runner 2015 contest by Dhiru Kholia and Aleksey Cherepanov. * * Based on https://www.streebog.net/ and https://github.com/sjinks/php-stribog * code. See "LICENSE.gost" for licensing details of the original code. */ #include "arch.h" ...
ast-dump-openmp-target-teams-distribute-parallel-for-simd.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_one(int x) { #pragma omp target teams distribute parallel for simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target team...
pvmt-OpenMP.c
#include <stdlib.h> #include <stdio.h> #include<time.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif //#define PRINT_ALL //#define VECTOR_GLOBAL #define VECTOR_DYNAMIC #ifdef VECTOR_GLOBAL #define MAX 32768 //=2^10 double v[MAX], m[MAX][MAX], r[MAX]; #endif omp_sched_t charToSchedT...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
mixed_tentusscher_myo_epi_2004_S3_4.c
// Scenario 3 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt + Rc) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S3_4.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...
sparse_block_matrix_diagonal.h
// g2o - General Graph Optimization // Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard // 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 r...
micro-app-aos-openmp.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <getopt.h> #include <lua.h> #include <lauxlib.h> #include <lualib.h> #define NPOINTS 10000 #define NEDGES 10000 struct edge { int v0; int v1; float data; float v0_pt_data[3]; float v1_pt_data[3]; }; struct edge edges[NEDGES]; ...
cycle_share.c
// SPDX-License-Identifier: BSD-2-Clause /* Copyright 1998-2018,2021 Bernard Parent Copyright 2020 Minindu Weerakoon Copyright 2001 Giovanni Fusina Copyright 2002 Thomas E. Schwartzentruber Copyright 2021 Prasanna Thoguluva Rajendran Redistribution and use in source and binary forms, with or without modification, are ...
globals.h
#include <iostream> using std::cout; using std::endl; #ifndef _flops_globals_H #define _flops_globals_H //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////...
test-mempool.c
#include <pthread.h> #include <omp.h> #include <xztl.h> #include <xztl-mempool.h> #include <ztl-media.h> #include "CUnit/Basic.h" static const char **devname; static void cunit_mempool_assert_ptr (char *fn, void *ptr) { CU_ASSERT ((uint64_t) ptr != 0); if (!ptr) printf ("\n %s: ptr %p\n", fn, ptr); } static...
vector.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) **************************************...
openmp-2dheat.c
/* * B. Estrade <estrabd@cs.uh.edu> * Original coding: Spring 2004 * Serialized: Summer 2010 * Wrapped into MPI/OpenMP 2dheat Suite: Summer 2010 * OpenMP added: ..not yet! :) * * Serial implementation of 2d heat conduction * finite difference over a rectangular domain using: * - Jacobi * - Gauss-Seidel * - ...
viterbi_decode_op.h
/* Copyright (c) 2021 PaddlePaddle Authors. 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 applicable law or agreed...
GB_unop__identity_uint32_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...
update_ops_matrix_dense_double.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "constant.h" #include "utility.h" #include "update_ops.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif #ifdef _USE_SIMD void double_qubit_dense_matrix_gate_simd_hi...
common.h
#pragma once #include <Eigen/Core> #include <Eigen/SparseCore> #include <glog/logging.h> #include <iostream> namespace solvers { #if USE_FLOAT using Double = float; #else using Double = double; #endif using Matrix = Eigen::Matrix<Double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>; using MatrixMap = Eigen::...
DRB003-antidep2-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...
dotp.c
#include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define REPEAT 100 int array_size = 10000000; double *gen_array(int n) { double *array = malloc(sizeof(*array) * n); for (int i = 0; i < n; i++) array[i] = drand48(); return array; } double dotp_naive(d...
image-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % IIIII M M AAA GGGG EEEEE ...
GB_binop__isne_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-...
GB_unaryop__identity_uint64_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
BenchUtils.h
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * 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. */ #pragma once #include <chrono> #include <functional> #include <vector> #include <immintrin.h> #ifdef ...
DRB052-indirectaccesssharebase-orig-no.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...
GB_unaryop__minv_uint8_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...
comm.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 ...
sillyGPU.c
/* Tempo sequencial real 0m9,743s user 0m9,674s sys 0m0,030s real 0m9,695s user 0m9,673s sys 0m0,004s real 0m9,692s user 0m9,669s sys 0m0,011s real 0m9,649s user 0m9,631s sys 0m0,004s real 0m9,694s user 0m9,682s sys 0m0,000s Tempo paralelo - multicore real 0m2...
repeat_base.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2013, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
GB_unaryop__lnot_int64_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
DRB029-truedep1-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...
cancel-for-1.c
/* { dg-do run } */ /* { dg-set-target-env-var OMP_CANCELLATION "true" } */ #include <stdlib.h> #include <omp.h> int main () { #pragma omp parallel num_threads (32) { int i; #pragma omp for for (i = 0; i < 1000; ++i) { #pragma omp cancel for if (omp_get_cancellation ()) abort (); } ...
fill_ints.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required ...