source
stringlengths
3
92
c
stringlengths
26
2.25M
Example_task_dep.3.c
/* * @@name: task_dep.3c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_4.0 */ #include <stdio.h> int main() { int x; #pragma omp parallel #pragma omp single { #pragma omp task shared(x) depend(out: x) x = 1; #pragma omp task shared(x) depend(out:...
GB_bitmap_assign_IxJ_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_IxJ_template: iterate over all of C(I,J) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-...
convolution.h
/* Copyright (c) 2018 NoobsHPC Authors All Rights Reserve. 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 applic...
MultiMergeSort.c
//#include <omp.h> double time, timeBefore, timeAfter, timeAuxBefore, timeAuxAfter; // left half is A[iBegin :iMiddle-1] // right half is A[iMiddle:iEnd-1 ] void TopDownMerge(int* A, int iBegin, int iMiddle, int iEnd, int* B) { int i0 = iBegin, i1 = iMiddle; // While there are elements in the left or right runs...
Matrix.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) **************************************...
kacz_analyze_print.c
#include "ghost/sparsemat.h" #include "ghost/omp.h" ghost_error kacz_analyze_print(ghost_sparsemat *mat) { ghost_lidx line_size = 12; ghost_lidx n_lines = mat->context->kacz_setting.active_threads / line_size; ghost_lidx rem_lines = mat->context->kacz_setting.active_threads % line_size; int start=0 ; int end=0; ...
depend-2.c
#include <stdlib.h> #include <unistd.h> void foo (int do_sleep) { int a[64], i, *p = a + 4, x = 0; asm volatile ("" : "+r" (p)); for (i = 0; i < 64; i++) a[i] = i + 8; #pragma omp parallel private (i) { #pragma omp single nowait { for (i = 0; i < 8; i++) { #pragma omp task depend(out: a...
exact_parallel_minimum_cut.h
/****************************************************************************** * exact_parallel_minimum_cut.h * * Source of VieCut. * ****************************************************************************** * Copyright (C) 2018 Alexander Noe <alexander.noe@univie.ac.at> * * Published under the MIT licens...
omp_barrier.c
// RUN: %libomp-compile-and-run // RUN: %libomp-compile && env KMP_BLOCKTIME=infinite %libomp-run // RUN: %libomp-compile && env KMP_PLAIN_BARRIER_PATTERN='hierarchical,hierarchical' KMP_FORKJOIN_BARRIER_PATTERN='hierarchical,hierarchical' %libomp-run // RUN: %libomp-compile && env KMP_BLOCKTIME=infinite KMP_PLAIN_BARR...
kvstore_dist_server.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 ...
is.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - IS This benchmark is an OpenMP C version of the NPB IS code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS...
omp-low.c
/* Lowering pass for OMP directives. Converts OMP directives into explicit calls to the runtime library (libgomp), data marshalling to implement data sharing and copying clauses, offloading to accelerators, and more. Contributed by Diego Novillo <dnovillo@redhat.com> Copyright (C) 2005-2020 Free Software...
ParticleFilterEstimationKernelDensity.h
#ifndef K_MATH_FILTER_PARTICLES_PARTICLEFILTERESTIMATIONKERNELDENSITY_H #define K_MATH_FILTER_PARTICLES_PARTICLEFILTERESTIMATIONKERNELDENSITY_H #include "ParticleFilterEstimation.h" #include <algorithm> #include <vector> #include "../Particle.h" #include "../../../../misc/gnuplot/Gnuplot.h" #include "../../../optimi...
header.h
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB SP code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
omp_transform_base.h
/*! @file omp_transform_base.h * @brief The base class for transforms which can be executed in parallel. * @author Markovtsev Vadim <v.markovtsev@samsung.com> * @version 1.0 * * @section Notes * This code partially conforms to <a href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml">Google C+...
GB_convert_full_to_sparse.c
//------------------------------------------------------------------------------ // GB_convert_full_to_sparse: convert a matrix from full to sparse //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
bml_norm_csr_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_norm.h" #include "../bml_parallel.h" #include "../bml_types.h" #include "bml_norm_csr.h" #include "bml_types_csr.h" #include "../bml_logger.h" #include "bml_allocate_csr.h" #include <complex.h> #include <math.h> #include <stdlib.h> #include <string.h>...
hello_world.c
#include <stdio.h> #include <omp.h> int main(int argc, char *argv[]) { int myrank=0; int mysize=1; #if defined (_OPENMP) #pragma omp parallel default(shared) private(myrank, mysize) { mysize = omp_get_num_threads(); myrank = omp_get_thread_num(); #endif printf("Hello from thread %d out of %d\n", myrank, ...
DenseMatrix.h
//================================================================================================= /*! // \file blaze/math/smp/openmp/DenseMatrix.h // \brief Header file for the OpenMP-based dense matrix SMP implementation // // Copyright (C) 2013 Klaus Iglberger - All Rights Reserved // // This file is part of th...
conv.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> #include "include/image.h" #include "include/conv.h" /** * @brief Apply a nxn filter to a nxn region of an image. */ static char conv2D_region(struct raw_image *img, int offset, const char *kernel, int n) { int i, j, k_offset = 0; unsigned char acc = 0; for...
6865.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/heat-3d/kernel.c' as parsed by frontend compiler rose void kernel_heat_3d(int tsteps, int n, double A[120 + 0][120 + 0][120 + 0], double B[120 + 0][120 + 0][120 + 0])...
morn_matrix.c
/* Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com> Licensed under the Apache License, Version 2.0; 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 to in wri...
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...
inv.c
/* Copyright (c) 2016 Drew Schmidt All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions ...
GB_binop__isne_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
emd.h
// fix inttypes for GCC #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include <cinttypes> // fix for the fix - it conflicts with numpy #undef __STDC_FORMAT_MACROS #include <cstdint> #include <cmath> #include <algorithm> #include <string> #include "cache.h" #include "graph/min_cost_flow.h" /*! @ma...
Image.h
/* * MIT License * * Copyright (c) 2018-2019 Benjamin Köhler * * 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 * t...
tetrahedron.c
#include "spglib.h" #include "tetrahedron_method.h" #include <stdio.h> #include <stdlib.h> static void test_tetrahedron_method(void); static void mat_copy_matrix_d3(double a[3][3], double b[3][3]); static double mat_get_determinant_d3(double a[3][3]); static int mat_inverse_matrix_d3(double m[3][3], double a[3][3...
residualbased_incrementalupdate_static_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // #if !defined(KRATOS_RESIDUALBA...
WinogradConv2D.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <time.h> #define CL_USE_DEPRECATED_OPENCL_1_2_APIS #include <CL/cl.h> #include "../polybenchUtilFuncts.h" //define the error threshold for the results "not matching" #define PERCENT_DIFF_ERROR_THRESHOLD 1.05 #define MAX_SOURCE_S...
gt.gtfcount.c
/* * PROJECT: GEM-Tools library * FILE: gt.gtfcount.c * DATE: 10/07/2013 * AUTHOR(S): Thasso Griebel <thasso.griebel@gmail.com> * DESCRIPTION: Annotation map a file against a reference annotation */ #include <getopt.h> #ifdef HAVE_OPENMP #include <omp.h> #endif #include "gem_tools.h" #define GT_GTFCOUNT_HEAD(o...
BsplineFunctor.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: John R. G...
GB_unop__sqrt_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
c-omp.c
/* This file contains routines to construct OpenACC and OpenMP constructs, called from parsing in the C and C++ front ends. Copyright (C) 2005-2018 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>, Diego Novillo <dnovillo@redhat.com>. This file is part of GCC. GCC is free...
sse.h
/* SPDX-License-Identifier: MIT * * 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, publish, ...
trmm_x_sky_n_hi_col.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) { ALPHA_INT...
serial_tree_learner.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_TREELEARNER_SERIAL_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #include <LightGBM/dataset.h> #include <Ligh...
omp2-2.c
#include<math.h> #include<stdio.h> #define N 1000000 int main() { int i; double x, area = 0; //#pragma omp parallel for private(x) for (i = 0; i < N; i++) { x = (i + .5) / N; area += 4 / (1 + x*x); } printf("%.10lf\n", area/N); return 0; }
GB_unaryop__ainv_fp64_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...
dahua_fmt_plug.c
/* * Format for cracking Dahua hashes. * * http://www.securityfocus.com/archive/1/529799 * https://github.com/depthsecurity/dahua_dvr_auth_bypass * * 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: * * Redist...
GB_unaryop__ainv_fp32_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...
mkl_convolution-inl.h
/******************************************************************************* * Copyright 2016 Intel Corporation * * 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.o...
SumaVectoresOMPfor.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 encuentra ...
clt_thread.c
/*------------------------------------------------------------------------------ | SOURCE: clt_thread.c | | AUTHOR: Alex Zielinski | | DESC: Module that represents the client program. The program takes | 3 additional cmd arguments: | - host IP | - ho...
clag2z.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions mixed zc -> ds * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include "pl...
rose_indirectIndex.c
// A loop with array references using indirect indexing // // Conventional parallelization algorithms will not parallelize the loop // since indirect indexing may result in overlapped elements being accessed, // which in turn introduces loop carried dependencies. // // However, if users can provide semantics that the ...
RCCE.h
// // Copyright 2010 Intel Corporation // // 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 app...
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. */ #...
threshold.c
/* Copyright 2014. The Regents of the University of California. * Copyright 2015-2017. Martin Uecker. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2013-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de> * 2015-20...
graph_decomposition_ref.h
#ifndef __GRAPH_DECOMPOSITION_REF_H__ #define __GRAPH_DECOMPOSITION_REF_H__ #include "graph.h" #include <mutex> #include <random> #include <omp.h> static float* genExp_ref(int n, float rate, float* maxVal, int* maxId) { std::default_random_engine generator; // note this will always generate the same values - which ...
taskdep_if0_2.c
// RUN: %libomp-compile-and-run // REQUIRES: !abt #include <stdio.h> #include <stdlib.h> #include <omp.h> #include "omp_my_sleep.h" int a = 0, b = 0; int task_grabbed = 0, task_can_proceed = 0; int task2_grabbed = 0, task2_can_proceed = 0; static void wait_on_flag(int *flag) { int flag_value; int timelimit = 30;...
refcount.c
/* Copyright (c) 2013-2017, Intel Corporation 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 the following dis...
workspace.h
#ifndef Workspace_H #define Workspace_H #include "logger.h" #include "matrix.h" #include "Printer.h" namespace puma { class Workspace { public: // --- Start Constructors --- // Workspace(long x, long y, long z, short val, double voxelLength) { log = new puma::Logger(); ...
main.c
#include "common.h" static void print_help(char *argv) { END("%s [-f edge_file] [-W width] [-H height] [-D degree] [-R length] [-o output_file] [-s random_seed]\ [-n calculations] [-w max_temperature] [-c min_temperature] [-g groups] [-C cooling_cycle] [-B] [-d]\ [-F fixed_temperature] [-Y] [-M] [-h]\n", argv); } ...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
zz2960ver2.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <omp.h> #define MAX_BIN_NUM 50 #define MAX_THREAD_NUM 100 void print_help(char *executable); int main(int argc, char *argv[]) { // Command line arguments processing char *executable = argv[0]; if (argc != 4) { ...
pt_to_pt_multiPingping.c
/***************************************************************************** * * * Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 * * * * ...
kmp_sch_simd_runtime_static.c
// RUN: %libomp-compile && %libomp-run // RUN: %libomp-run 1 && %libomp-run 2 // The test checks schedule(simd:runtime) // in combination with OMP_SCHEDULE=static[,chunk] #include <stdio.h> #include <stdlib.h> #include <omp.h> #if defined(WIN32) || defined(_WIN32) #include <windows.h> #define delay() Sleep(1); #defin...
fox_floats_timer_caching_omp_fileIO_benchmark.c
/* fox_floats_timer_caching_omp_fileIO_benchmark.c -- uses Fox's algorithm to multiply two square matrices * * Implementation of parallel matrix multiplication: * LaTeX: $C_{i,j} = \sum_{k} A_{i,k}B_{k,j}$ * * Input: * Input Matrix file name: A.dat, B.dat * * Output: * Output Matrix file name: C.dat...
openmp-ex37.c
#include <stdio.h> #if defined(_OPENMP) #include <omp.h> #endif int main(void) { #pragma omp parallel { int thread = 0; int nthreads = 1; int place = 0; int nplaces = 1; int i; #if defined(_OPENMP) thread = omp_get_thread_num(); nthreads = omp_get_num_threads(); place = omp_get_pla...
irbuilder_nested_openmp_parallel_empty.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 -verify -fopenmp -fopenmp-enable-irbuilder -x c++ -emit-llvm %s -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefixes=ALL,IRBUILDER // %clang_cc1 -fopenmp -fopenmp-enable-irbuild...
Stmt.h
//===--- Stmt.h - Classes for representing statements -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
GB_unaryop__minv_int8_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
adjmapbqm.h
// Copyright 2020 D-Wave Systems Inc. // // 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...
FunctorsOpenMP.h
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURP...
triangleCount.c
// ----------------------------------------------------------------------------- // // "00_AccelGraph" // // ----------------------------------------------------------------------------- // Copyright (c) 2014-2019 All rights reserved // ----------------------------------------------------------------------------- ...
DomainInfo.h
#ifndef _CZ_DOMAIN_INFO_H_ #define _CZ_DOMAIN_INFO_H_ /* ################################################################################### # # CubeZ # # Copyright (C) 2018-2020 Research Institute for Information Technology(RIIT), Kyushu University. # All rights reserved. # ###########################################...
cp-tree.h
/* Definitions for C++ parsing and type checking. Copyright (C) 1987-2014 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 ...
omp_nested_loop2.c
#include <stdio.h> #include <omp.h> int main() { int i, j; omp_set_num_threads(4); omp_set_nested(1); printf("OMP_NESTED=%d\n", omp_get_nested()); #pragma omp parallel for for (i=9; i>6; i--) { #pragma omp parallel for for (j=0; j<5; j++) { printf("[%d] (i,j=%d,%d)\n", omp_get_thread_num(), i, j); } } r...
omp_ex_02.c
#include <stdio.h> #include <omp.h> /* MIT License Copyright (c) 2019 NOUREDDINE DAGHBOUDJ 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 ri...
core_clascl.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zlascl.c, normal z -> c, Fri Sep 28 17:38:21 2018 * **/ #include <plasma_core_blas.h> #include "pla...
hybrid.c
#include <stdio.h> #include <mpi.h> #include <omp.h> int main(int argc, char *argv[]) // hybrid 'hello world' program { int size; int rank; int len; char name[MPI_MAX_PROCESSOR_NAME]; MPI_Init(&argc, &argv); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Comm_rank(MPI_COMM_WORLD, &rank); M...
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)...
fci_contract.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...
Par-07-ParallelOmpForNestedOmpParallelFor.c
int main(int argc, char **argv) { int a[4] = {1,2,3,4}; int b[4] = {0, 0, 0, 0}; #pragma omp parallel { #pragma omp for for (int i = 0; i < 4; ++i) { a[i] = 3*a[i]; #pragma omp parallel for for (int j = 0; j < 4; ++j) { b[j] = b[j] + a[i]; } } } return 0; }
compute_all_pluto_26_30_14.c
#include <omp.h> #pragma warning(disable : 4996) #include <math.h> #include <stdio.h> #include <stdlib.h> #define _CRT_SECURE_NO_WARNINGS #define min(x,y) ((x) < (y) ? (x) : (y)) #define max(x,y) ((x) > (y) ? (x) : (y)) #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) (((n)<0) ? -((-(n)+(...
core_dsyr2k.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zsyr2k.c, normal z -> d, Fri Sep 28 17:38:23 2018 * **/ #include <plasma_core_blas.h> #include "pla...
matUtils.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #pragma once #include <malloc.h> #include "types.h" #include "ks_types.h" #include "timer.h" namespace ISLE { template<class FPTYPE> class MKL_SpSpTrProd { FPTYPE *vals_CSC; word_id_t *rows_C...
GB_unop__minv_uint16_uint16.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_binop__lxor_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
zgeswp.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 ...
3d25pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
GB_unop__lnot_int64_int64.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...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
dct_lee_cpu.h
/* * @Author: Jake Gu * @Date: 2019-04-02 16:34:45 * @LastEditTime: 2019-04-15 18:01:42 */ /** * @file dct_lee_cpu.h * @author Yibo Lin * @date Oct 2018 */ #ifndef GPUPLACE_DCT_LEE_CPU_H #define GPUPLACE_DCT_LEE_CPU_H #include <vector> #include <cmath> #include <stdexcept> namespace lee { constexpr doub...
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 ...
functions_omp.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include "functions_omp.h" #include "globals.h" #ifndef _PGI_ #define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) #endif // -------------------------------------------------------------------- void getAverage_omp(double *restrict T, double *restrict T_new) { int i,j...
GB_binop__pair_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-...
m_sparsetools.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...
omp_loop_ordered.c
/* vim: set ts=4 sw=4: */ /* Filename : omp_loop_ordered.c * Description : simple OpenMP model * Author : SunYoung Kim <sunyzero@gmail.com> * Notes : */ #include <stdio.h> int main() { int i; #pragma omp parallel #pragma omp for ordered for (i=0; i<8; i++) { printf("[%d] Hello OpenMP\n", i); #pr...
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 // //===---------------------------...
ocean6868.c
/* * ===================================================================================== * * Filename: simulate.c * * Description: Code to simulate Ocean currents. * * Version: 1.0 * Created: 03/03/2018 09:59:42 IST * Revision: none * Compiler: gcc * * Auth...
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...
trap_omp1.c
#include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { int N = atoi( argv[1] ); double dx = 2./(N-1); double integral = 0.0; const double pi = 3.141592653589793; double x, f; #pragma omp parallel for private (x,f) for (int i=0;i<N;++i) { x = -1. + dx*i; // compute x_i f = 1. / (1. + x*x); // compu...
subCycleStrongCubatureVolumeHex3D.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus 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 t...
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)...
parallel.c
// gcc -o omp_helloc -fopenmp omp_hello.c // export OMP_NUM_THREADS=2 // ./omp_helloc // Hello World from thread = 0 // Hello World from thread = 1 // Number of threads = 2 #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #include <sys/time.h> #include <omp.h> int main(void) { int n = 55...
for-13.c
// At one point in development, a typo disabled the remapping of the // for iteration variable as private. // { dg-do compile } // { dg-options "-fopenmp -fdump-tree-ompexp" } /* LLVM LOCAL test not applicable */ /* { dg-require-fdump "" } */ extern void bar(int); void foo(void) { int i; #pragma omp parallel for d...
crivo_erastotenes.c
/* * Adapted from: http://w...content-available-to-author-only...s.org/sieve-of-eratosthenes */ /* Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz Time before parallelization 1.503 1.504 1.509 1.510 1.502 1.502 1.502 1.518 1.534 1.516 Average: 1.51 s Time after parallelization 1.098 0.994 1.064 1.031 1.144 1.072 1.070 1....
GB_unop__lnot_uint8_uint8.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...