source
stringlengths
3
92
c
stringlengths
26
2.25M
parallel_unit.c
#include <stdio.h> #include <errno.h> // for errno #include <math.h> #include <limits.h> // for INT_MAX #include <stdlib.h> // for strtol #include <time.h> #include <omp.h> long number_of_threads = 2; long max_number_of_char = 10; long number_of_types_char = 10; long number_of_results = 5; long number_of_queues = 2; ...
GB_unop__identity_int64_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_binop__iseq_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
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...
Grid.h
/* * Grid.h * Cubism * * Copyright 2018 ETH Zurich. 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 <vector> #include <iostream> #include <fstream> #include <cassert> #include <algo...
GB_unop__identity_uint8_int16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
TagList.h
// // Created by lopea on 5/29/20. // #ifndef GIGAENGINE_TAGLIST_H #define GIGAENGINE_TAGLIST_H #include <cstdint> #include <vector> #include <deque> #include <set> typedef uint64_t Entity; class GenericTagList { public: virtual ~GenericTagList() = default; }; template<typename T> class TagList : public GenericT...
kernel_matern2.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) * * @generate NDIM -> n 1 2 3 4 * Generate different functions fo...
impliedBarrier.c
// OpenMP Implied Barrier Example // Inclusions #include <omp.h> #include <stdio.h> #include <stdlib.h> // Main int main( int argc, char** argv ) { int i = 0; // Loop Iterator int n = 0; // Number of Iterations double start = 0.0; // Start Time double middle = 0.0; // Middle Time ...
facedetectcnn.h
/* The MIT License (MIT) Copyright (c) 2018-2019 Shiqi Yu shiqi.yu@gmail.com 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, c...
H2ERI_build_Coulomb.c
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <assert.h> #include <omp.h> #include "H2Pack_matvec.h" #include "H2Pack_utils.h" #include "H2ERI_typedef.h" #include "H2ERI_build_Coulomb.h" #include "H2ERI_matvec.h" #include "utils.h" // In H2Pack // "Uncontract" the density matrix ...
THTensorMath.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/THTensorMath.c" #else #define TH_OMP_OVERHEAD_THRESHOLD 100000 void THTensor_(fill)(THTensor *r_, real value) { TH_TENSOR_APPLY(real, r_, THVector_(fill)(r__data, value, r__size); break;); } void THTensor_(zero)(THTensor *r_) { TH_TENSOR...
phono3py.c
/* Copyright (C) 2021 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ /* are met: */ /* * Redistributions of source code must retain the abo...
GB_unaryop__minv_bool_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...
rs2_depth_metrics.h
// License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2017 Intel Corporation. All Rights Reserved. // // Plane Fit implementation follows http://www.ilikebigbits.com/blog/2015/3/2/plane-from-points algorithm #pragma once namespace rs2 { namespace depth_quality { struct snapshot_m...
mlmstream.c
/ Copyright 2009-2015 Sandia Corporation. Under the terms // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. // Government retains certain rights in this software. // // Copyright (c) 2009-2015, Sandia Corporation // All rights reserved. // // This file is part of the SST software package. For license /...
covariance.c
/** * covariance.c: This file was adapted from PolyBench/GPU 1.0 test * suite to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@stude...
omp.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <omp.h> void main (){ int i,N,j,trouve; printf("entrez-le nombre N :"); scanf("%d",&N); i=1; double debut,fin; debut=omp_get_wtime(); omp_set_num_threads(4); #pragma omp parallel for private (trouve,j) lastprivate(fin) for (int cpt=1;c...
Trainer.h
/* * Copyright 2016 [See AUTHORS file for list of authors] * * 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 require...
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...
GB_binop__max_uint16.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_unop__identity_uint64_int8.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...
main_spmv.c
#include"common.h" #include"mmio_highlevel.h" #include"utils.h" #include "encode.h" # define INDEX_DATA_TYPE unsigned char //# define VAL_DATA_TYPE double typedef struct { MAT_VAL_TYPE *value; int *columnindex; MAT_PTR_TYPE *rowpointer; }SMatrix; int main(int argc, char ** argv) { if (argc < 2) { ...
latency_ctx.h
/* * Copyright (c) 2018 Intel Corporation. All rights reserved. * This software is available to you under the BSD license below: * * Redistribution and use in source and binary forms, with or * without modification, are permitted provided that the following * conditions are met: * * - Redistributi...
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...
rgb2yuv_openmp.c
/* * Tecnologico de Costa Rica (www.tec.ac.cr) * Course: MP-6171 High Performance Embedded Systems * Developers Name: Verny Morales and Luis Carlos Alvarez * Developers email: verny.morales@gmail.com and lcam03@gmail.com * General purpose: * Input: * Output: * */ //gcc -fopenmp rgb2yuv_openmp.c -o rgb2yuv_...
reorder_ref.h
/* Copyright (c) 2018 NoobsHPC Authors, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applic...
third.c
#include <stdio.h> #include <omp.h> int main(){ int A[10] = {1,2,3,4,5,6,7,8,9,10}, i, m, k; omp_set_dynamic(0); m = omp_get_num_procs(); omp_set_num_threads(m); printf("Parallel\n------------"); #pragma omp parallel for shared(A) private(i) for(i = 0; i < 10; i++){ p...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__islt_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-...
GB_binop__plus_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
ripemd_fmt_plug.c
/* ripemd cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 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...
axpy_float.c
//axpy.c #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 20 #define N 102400000 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } //Create a matrix and a v...
aula2809_section.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define N 50 int main (int argc, char *argv[]) { int i, nthreads, tid; float a[N], b[N], c[N], d[N]; /* Some initializations */ for (i=0; i<N; i++) { a[i] = i * 1.5; b[i] = i + 22.35; c[i] = d[i] = 0.0; } #pragma omp parallel shared(a,b,c,d,nthreads...
GB_transpose.c
//------------------------------------------------------------------------------ // GB_transpose: C=A' or C=op(A'), with typecasting //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifie...
GB_unaryop__abs_int16_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
declare_variant_messages.c
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s #pragma omp declare // expected-error {{expected an OpenMP directive}} int foo(void); #pra...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
custom_functions.h
// // Project Name: Kratos // Last Modified by: $Author: G.Casas (gcasas@cimmne.upc.edu) $ // Date: $Date: 2011-6-13 08:56:42 $ // Revision: $Revision: 1.5 $ // // //README::::look to the key word "VERSION" if you want to find all the points where you have to change something...
model_initializer.h
// ----------------------------------------------------------------------------- // // Copyright (C) The BioDynaMo Project. // 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. // // See the LICENSE file distrib...
GB_unaryop__ainv_uint8_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
3.taskloop.c
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include "omp.h" /* Q1: Execute the program several times and make sure you are able */ /* to explain when each thread in the threads team is actually */ /* contributing to the execution of work (tasks) generated in the */ /* taskloop. ...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
stacks.c
// -*-Mode: C++;-*- // technically C99 // * BeginRiceCopyright ***************************************************** // // $HeadURL$ // $Id$ // // -------------------------------------------------------------------------- // Part of HPCToolkit (hpctoolkit.org) // // Information about sources of support for research an...
nesting.c
#include <stdio.h> #include <stdlib.h> #include <assert.h> #include <math.h> #include <omp.h> static inline void foo(void) { printf("foo called by %d of %d\n", omp_get_thread_num(), omp_get_num_threads() ); #pragma omp parallel { printf("foo parallel reached by %d of %d\n", omp_get_thread_num(), omp_ge...
dynamic_fmt.c
/* * This software was written by Jim Fougeron jfoug AT cox dot net * in 2009-2013. No copyright is claimed, and the software is hereby * placed in the public domain. In case this attempt to disclaim * copyright and place the software in the public domain is deemed * null and void, then the software is Copyright (...
udr-3.c
/* { dg-do compile } */ /* { dg-options "-fopenmp -std=gnu89" } */ struct S { int s; }; struct T { int t; }; struct U { int u; }; #pragma omp declare reduction (+: struct S: omp_out.s += omp_in.s) #pragma omp declare reduction (*: struct S: omp_out.s *= omp_in.s) \ initializer (omp_priv = {1}) #pragma omp decla...
GB_binop__first_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
partition.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
GB_binop__plus_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...
wem.c
#include "seismic.h" #include "wem.h" void wem(float **d, float **m, 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, float **vel, int nref, float fmin, float fmax, int padt, int padx, ...
Blaze.h
//================================================================================================= /*! // \file blaze/Blaze.h // \brief Primary include file of the Blaze library // // Copyright (C) 2013 Klaus Iglberger - All Rights Reserved // // This file is part of the Blaze library. You can redistribute it and/...
parallel_master_taskloop_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 -triple x86_64-unknown-unknown %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 -triple x86_64-unknown-unknown %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -f...
GB_unop__asinh_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...
r_direct_o1.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...
master.c
#include<stdio.h> #include<omp.h> int main(){ int id; #pragma omp parallel { #pragma omp master { id = omp_get_thread_num(); printf("Master block thread %d.\n", id); } id = omp_get_thread_num(); printf("Parallel block thread %d.\n", id); } }
cython_dL_update_omp.c
/* cython_dL_update_hmc.c * * Rutger van Haasteren, December 12 2015, Pasadena * */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* The aggregated algorithm for use in the Hamiltonian Sampler */ void dL_update_hmc2(const double *pdL, const double *pdLi, const double *pdp, dou...
gbdt.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_BOOSTING_GBDT_H_ #define LIGHTGBM_BOOSTING_GBDT_H_ #include <LightGBM/boosting.h> #include <LightGBM/objective_function.h> #include...
kt_sbucket.c
#include "kt_sbucket.h" #include "yche/log.h" void sbucket_update_edge( support_bucket_t * const sbucket, int64_t const edge_id, int32_t const support, int32_t const ktruss) { slist_s * const slist = sbucket->slist; /* no-op if edge has already been deleted or updated */ if(support < 0 || su...
MergeSortOMP.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> #include <time.h> FILE * fp; // Merges two subarrays of arr[]. // First subarray is arr[l..m] // Second subarray is arr[m+1..r] void merge(int *arr, int l, int m, int r) { int i, j, k; int n1 = m - l + 1; int n2 = r - m; int *L = (int *)malloc(n1*siz...
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) #...
backprop.ref.c
#include <sys/time.h> #include <time.h> #include <stdio.h> static unsigned long long current_time_ns() { #ifdef __MACH__ clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), c...
SplineC2CAdoptor.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: // // Fil...
subsref_mex_openmp.c
/* DOES NOT WORK PROPERLY, AS GETTING OPENMP SUPPORT IN MATLAB IS DIFFICULT. * * Compile using: * mex -lmwlapack -lmwblas -largeArrayDims subsref_mex_openmp.c * calling (do NOT call directly. Only meant to be called through TTeMPS.subsref * subsref_mex( n, r, transpose(ind), Cores) */ /* * TTeMPS ...
YAKL_mem_transfers.h
#pragma once // Included by YAKL.h namespace yakl { // Your one-stop shop for memory transfers to / from host / device template <class T1, class T2, typename std::enable_if< std::is_same< typename std::remove_cv<T1>::type , typename std::remove_cv<T...
critical.c
/* Copyright (C) 2005 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU OpenMP Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the ...
GB_unaryop__ainv_uint8_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_AxB_colscale_meta.c
//------------------------------------------------------------------------------ // GB_AxB_colscale_meta: C=A*D where D is a square diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_unaryop__minv_uint32_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
LinearStrainMapping.h
/****************************************************************************** * SOFA, Simulation Open-Framework Architecture, development version * * (c) 2006-2017 INRIA, USTL, UJF, CNRS, MGH * * * ...
taskwait-depend-1.c
void foo (int *p) { #pragma omp taskwait depend(iterator(i = 0:16) , in : p[i]) depend(out : p[32]) } void bar (int *p) { #pragma omp taskwait depend(mutexinoutset : p[0]) /* { dg-error "'mutexinoutset' kind in 'depend' clause on a 'taskwait' construct" } */ }
CPUMatrixImpl.h
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.md file in the project root for full license information. // // CPUMatrix.h : template implementation of all matrix functions on the CPU side // #pragma once #include "Basics.h" #include "File.h" #include "CPUMatrix.h"...
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...
blas.c
#include "blas.h" #include "utils.h" #include <math.h> #include <assert.h> #include <float.h> #include <stdio.h> #include <stdlib.h> #include <string.h> void reorg_cpu(float *x, int out_w, int out_h, int out_c, int batch, int stride, int forward, float *out) { int b,i,j,k; int in_c = out_c/(stride*stride); ...
GB_unaryop__identity_uint16_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
main.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "aux.h" #include "omp.h" #define MAX_THREADS 8 #define MAXIT 1000000 double sequential_minimization(double s, int p, double x0, double y0); double parallel_minimization(double s, int p, double x0, double y0); int main(int argc, char **argv){ long ...
lu_decompose.c
/** * \file * \brief [LU decomposition](https://en.wikipedia.org/wiki/LU_decompositon) of a * square matrix * \author [Krishna Vedala](https://github.com/kvedala) */ #include <stdio.h> #include <stdlib.h> #include <time.h> #ifdef _OPENMP #include <omp.h> #endif /** Perform LU decomposition on matrix * \param[in]...
rawMD5_fmt_plug.c
/* * Raw-MD5 (thick) based on Raw-MD4 w/ mmx/sse/intrinsics * This software is Copyright (c) 2011 magnum, 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, are permitted. * * OMP added May 2013, JimF */...
private-clauseModificado.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif main() { int i, n = 7; int a[n], suma; for (i=0; i<n; i++) a[i] = i; suma=10; #pragma omp parallel private(suma) { #pragma omp for for (i=0; i<n; i++) { suma = suma + a[i]; printf("thread %d suma a[%d...
convolution_1x1_pack4to16.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 ...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
DRB065-pireduction-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...
libperf.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015-2016. ALL RIGHTS RESERVED. * Copyright (C) ARM Ltd. 2017. AL...
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) >...
GB_unop__identity_uint64_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
hello_world_omp.c
#include <stdio.h> #include <omp.h> int main(int argc, char* argv[]) { #pragma omp parallel { int id = omp_get_thread_num(); int nthrds = omp_get_num_threads(); printf("Hello from thread %d of %d\n", id, nthrds); } return 0; }
GB_unop__identity_fc64_bool.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...
push_superphotons.c
/****************************************************************************** * * * PUSH_SUPERPHOTONS.C * * * ...
task-taskgroup-nested.c
/* * task-taskgroup-nested.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exce...
utils.h
/** * Copyright 2021 Huawei Technologies Co., Ltd * * 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...
omptough.c
#include <pthread.h> #include <stdlib.h> #include <malloc.h> #include <unistd.h> #include <stdio.h> #include <omp.h> #include "papi_test.h" #define NITER (100000) int main( int argc, char* argv[] ) { int i; int ret; int nthreads; int *evtset; int *ctrcode; nthreads = omp_get_max_threads(); evtset = (...
project.c
//----------------------------------------------------------------------------- // project.c // // Project: EPA SWMM5 // Version: 5.1 // Date: 03/19/14 (Build 5.1.000) // 04/14/14 (Build 5.1.004) // 09/15/14 (Build 5.1.007) // 03/19/15 (Build 5.1.008) // ...
GB_unop__minv_fp32_fp32.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...
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 <string> #include <cmath> #include ...
openmp-ex32.c
/* Even named critical regions can't prevent deadlocks() */ #include <stdio.h> #include <omp.h> int main(void) { #pragma omp parallel { int id = omp_get_thread_num(); #pragma omp critical(A) { printf("I am thread %d and I am in A, waiting for B...",id); fflush(stdout); #pragma omp cri...
common_main.h
#ifndef COMMON_MAIN_H #define COMMON_MAIN_H #include <omp.h> #include <stdlib.h> #include <stdio.h> #include <chrono> #if defined(__GNUC__) || defined(__SUNPRO_CC) #include <pthread.h> #endif #include "gm.h" class main_t { protected: gm_graph G; int num_threads; bool is_all_thread_...
ptsrc.c
#include <stdlib.h> #include <complex.h> #include <math.h> #include <float.h> #include "fastsphere.h" #include "fsht.h" #include "translator.h" #include "util.h" /* Compute directivity envelope dot(s, ax) * exp(alpha * (1 - dot(s, ax)**2)), * where s and ax are both unit vectors. If ax is NULL or has zero magnitude,...
rawSHA1_fmt_plug.c
/* * This software is Copyright (c) 2004 bartavelle, <simon at banquise.net>, 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, are permitted. * * Optimised set_key() and reduced binary size by magnum, 2012 ...
relu6_ref.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
convolution_quantize_arm.h
// SenseNets is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2018 SenseNets Technology Ltd. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of t...