source
stringlengths
3
92
c
stringlengths
26
2.25M
adam_op.h
/* Copyright (c) 2016 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...
optical_o.h
#include <iostream> #include <omp.h> #include <Eigen/Core> #include <Eigen/Dense> #include <opencv2/core/eigen.hpp> #include <opencv2/opencv.hpp> #include "dis_flow.h" #include "cluster.h" // #include "of/run_dense.h" using namespace cv; using namespace std; using namespace Eigen; bool ROI_flag=false; bool saveFlag=...
ConvolutionUnfold.h
#pragma once #include <string.h> #include <math.h> #include <algorithm> #include "General.h" #include "TensorRef.h" #include "Vector-inl.h" OPS_API int TS_Unfolded_Copy( TensorRef* finput, TensorRef* input, int kW, int kH, int dW, int dH, int padW, int padH, int nInputPlane, int inputWidth, int inputHeig...
familytree_par.c
#include "familytree.h" void traverse_tree(tree *node) { if(node != NULL) { node->IQ = compute_IQ(node->data); genius[node->id] = node->IQ; #pragma omp task { traverse_tree(node->right); } #pragma omp task { traverse_tree(node->left); } } } void traverse(tree *node, int numThreads) { // ...
convection_solver.h
#ifndef _CONVECTION_SOLVER_ #define _CONVECTION_SOLVER_ #include <complex> #include "spectral/spectral.h" enum target{ TEMPERATURE, VORTICITY, POTENTIAL }; struct Parameter { double R; double P; double nu; unsigned nx; unsigned nz; double lx; double lz; double h; doubl...
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__bget_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
IF97_Region2_met.c
// Copyright Martin Lord 2014-2014. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // IAPWS-IF97 Region 2: metastable vapour region <= 10 MPa equations /* ******************************...
implicit_blender.c
/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be use...
c-heatx.c
# include <stdlib.h> # include <stdio.h> # include <math.h> # include <float.h> # include <time.h> # include <omp.h> #define a(i,j,k) a[(k)*mxy+(j)*mx+(i)] #define anew(i,j,k) anew[(k)*mxy+(j)*mx+(i)] int main ( int argc, char *argv[] ) { double error ; double epsilon ; int i,j...
SpatialClassNLLCriterion.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "THNN/generic/SpatialClassNLLCriterion.c" #else #define INITIAL_CHECK \ THArgCheck(THIndexTensor_(nDimensionLegacyAll)(target) == 3, 3, \ "only batches of spatial targets supported (...
Trap_Gian_A01638108.c
/** * @file Trap_Gian_A01638108.c * @author Giancarlo Franco Carrillo * @brief Trapezoidal aproximation for integral calculation using omp library. * @date 2021-12-3 */ #include <stdio.h> #include <omp.h> #include <math.h> // Function to compute integral #define f(x) sin(x) int main(){ // main variables ...
Gemm_MT_Loop5_MRxNRKernel_smooth.c
#include <stdio.h> #include <stdlib.h> #include<immintrin.h> #include "omp.h" #define alpha( i,j ) A[ (j)*ldA + (i) ] // map alpha( i,j ) to array A #define beta( i,j ) B[ (j)*ldB + (i) ] // map beta( i,j ) to array B #define gamma( i,j ) C[ (j)*ldC + (i) ] // map gamma( i,j ) to array C #define min( x, y ) (...
GB_unaryop__minv_fp64_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
multipole.h
#include <math.h> #include <stdio.h> #include <iostream> #include <omp.h> #define REAL double int setIndex_cy(int P, int i, int j, int k); void getIndex_arr_cy(int P, int N, int *indices, int indicesSize, int *ii, int iiSize, int *jj, int jjSize, int *kk, int kkSize); int __inline__ getIndex(int P, int i, int j, int...
ccsd_t.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_for1modified.c
// this source is derived from CHILL AST originally from file 'distribute.c' as parsed by frontend compiler rose // code from CHiLL manual reverse example void mm(float **A, float **B, float **C, int ambn, int an, int bm) { int t6; int t4; int t2; for (t2 = 0; t2 <= an - 1; t2 += 1) for (t4 = 0; t4 <= bm...
GB_unaryop__identity_uint16_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
broadcast_reduce-inl.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 ...
LG_CC_FastSV6.c
//------------------------------------------------------------------------------ // LG_CC_FastSV6: connected components //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-License-Identifier: BSD-2-Clause //---...
GB_binop__times_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-...
mm_v1.c
/* * Assignment2 (CSE436) * Kazumi Malhan * 06/08/2016 */ /* Ongoing issues !! */ // Need to put init code back // Need to remove all debug printf // Current code assumes that N and M are dividable by num_tasks #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <sys/timeb.h>...
aux_parcsr_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) **************************************...
ctl_scroll.c
/********************************************************************[libaroma]* * Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.com/) * * 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 Lic...
3d7pt.c
/* * Order-1, 3D 7 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) ...
pi-v11.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #include "extrae_user_events.h" #define PROG...
GB_unop__identity_int32_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...
helloWorld.c
/* Author: Luiz Hello World using as much threads as supported by your processor */ #include <stdio.h> void main(){ #pragma omp parallel { int ID = omp_get_thread_num(); printf("Hello world from thread %d\n", ID); } }
functions.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include "functions.h" #include "omp.h" //compute a*b mod p safely unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) { unsigned int za = a; unsigned int ab = 0; while (b > 0) { if (b%2 == 1) ab = (ab + za) % p;...
test.c
#include <stdlib.h> #include <check.h> #include <omp.h> START_TEST(omp_atomic) {/*{{{*/ int a = 42; int a_copy = a; #pragma omp parallel shared(a) { #pragma omp single { #pragma omp task shared(a) { #pragma omp atomic a++; } #pragma omp task shared(a) ...
interpolate_v2_op.h
/* Copyright (c) 2018 PaddlePaddle 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 applicable...
yescrypt-opt.c
/*- * Copyright 2009 Colin Percival * Copyright 2013,2014 Alexander Peslyak * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copy...
omp_single_copyprivate.c
<ompts:test> <ompts:testdescription>Test which checks the omp single copyprivate directive.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp single copyprivate</ompts:directive> <ompts:dependences>omp parllel,omp critical</ompts:dependences> <ompts:testcode> #include "omp_testsuite....
residualbased_predictorcorrector_velocity_bossak_scheme_turbulent.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // #if !defined(KRATOS_RESIDUALBAS...
2-3t.c
#include <stdio.h> #include <omp.h> int main() { omp_set_num_threads(3); #pragma omp parallel { printf(" Hello "); } printf("\n\n GoodBye – Team Destroyed – Exiting Program \n\n"); }
main_openmp.c
// gcc -O3 main_openmp.c -fopenmp -o openmp // ./openmp 10000 100 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> typedef unsigned long long int uli; typedef struct problem{ int nb_bits; int size_bitarray; int population_size; uli *solution; uli **bitarrays; int *distances; int *so...
GB_unaryop__identity_bool_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...
GB_unop__identity_fp32_uint16.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...
DRACC_OMP_044_Wrong_ordered_clause_simd_Intra_yes.c
/* Data race between the values in countervar leading to changing results with simd. by utilising the ordered construct the execution will be sequentially consistent. .*/ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #define N 42000 #define C 16 int countervar[N]; int init(){ for(int i=0; i<N; i++){...
pyfr_driver_asp_reg.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
data_absent_at_exit.c
// RUN: %libomptarget-compile-run-and-check-generic #include <stdio.h> // OpenMP 5.1, sec. 2.21.7.1 "map Clause", p. 351 L14-16: // "If the map clause appears on a target, target data, or target exit data // construct and a corresponding list item of the original list item is not // present in the device data environ...
compatibility.h
// -*- C++ -*- // Copyright (C) 2007, 2008 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version ...
dynmat.c
/* Copyright (C) 2015 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...
for_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s // expected-error@+1 {{unexpected OpenMP directive '#pragma omp for simd'}} #pragma omp for simd // expected-error@+1 {{unexpected OpenMP directive '#pragma omp for simd'}} #pragma omp for simd foo void test_no_clause() { int i; #pragma omp for simd for (i = 0...
nstream-memcpy-target.c
/// /// Copyright (c) 2019, 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 ...
findSubGraphs.c
#include "defs.h" double findSubGraphs(graph* G, edge* maxIntWtList, int maxIntWtListSize) { //mcsim_skip_instrs_begin(); VERT_T* S; LONG_T *start; char* visited; LONG_T *pSCount; #ifdef _OPENMP omp_lock_t* vLock; #endif LONG_T phase_num, numPhases; LONG_T count; double elap...
yeefdtd.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "yeefdtd.kernel_inc.h" int openmp_kgm_eqn_core_init (openmp_pscmc_env * pe ,openmp_kgm_eqn_core_struct * kerstr ){ return 0 ;} void openmp_kgm_eqn_core_get_struct_len (size_t * len ){ ((len)[0...
edgeset_apply_functions.h
// // Created by Yunming Zhang on 7/11/17. // #ifndef GRAPHIT_EDGESET_APPLY_FUNCTIONS_H #define GRAPHIT_EDGESET_APPLY_FUNCTIONS_H #include "vertexsubset.h" #include "infra_gapbs/builder.h" #include "infra_gapbs/benchmark.h" #include "infra_gapbs/bitmap.h" #include "infra_gapbs/command_line.h" #include "infra_gapbs/gr...
omp_workshare3.c
/* { dg-do compile } */ /****************************************************************************** * OpenMP Example - Combined Parallel Loop Work-sharing - C/C++ Version * FILE: omp_workshare3.c * DESCRIPTION: * This example attempts to show use of the parallel for construct. However * it will generate error...
GB_binop__ne_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
valid.mob6.src.h
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_256_14_14_256_3_3.h" #include "gen_ukr_A4B2gemm_1_256_14_14_256_3_3.h" void testrun(float* A ,float*B, float*C, float*oriB ){ int tid = omp_get_thread_num(); int Nx = 14; int Ny = 14; int Nh = 3; long long...
gbsa.c
#if (defined(_OPENMP) || defined(SPEC_OPENMP)) && !defined(SPEC_SUPPRESS_OPENMP) && !defined(SPEC_AUTO_SUPPRESS_OPENMP) # undef OPENMP # define OPENMP #else # undef OPENMP #endif /* * Calculate either the volume or the surface area component of the AGB * nonpolar hydration free energy. Use Eqs 2-15 of Galli...
GB_unaryop__lnot_bool_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...
rose_v1_scalar_anti.c
/* * Scalar-to-scalar dependencies * */ #include <stdio.h> #include <omp.h> int a[100]; #if 1 void foo2() { int i; int tmp; tmp = 10; // It would be wrong to parallelize the following loop // since the true dependence between tmp in an iteration // and tmp in the following iteration. // Even firstprivate can...
GB_binop__isle_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
maxpool_layer.c
#include "maxpool_layer.h" #include "convolutional_layer.h" #include "dark_cuda.h" #include "utils.h" #include "gemm.h" #include <stdio.h> image get_maxpool_image(maxpool_layer l) { int h = l.out_h; int w = l.out_w; int c = l.c; return float_to_image(w,h,c,l.output); } image get_maxpool_delta(maxpool_...
recursive.c
int counter = 0; void foo() { #pragma omp critical { counter++; if (counter <100) foo(); } } int main() { foo(); return 0; }
atomic.c
#include <stdio.h> #define N 100 int main() { int fail = 0; int error = 0; int a = 0; int ii = 0; #pragma omp target map(tofrom:a) { #pragma omp parallel for for(ii = 0; ii < N; ++ii) #pragma omp atomic a++; } // Check result int result = a; int expect = N; if (result != ex...
GB_assign_zombie5.c
//------------------------------------------------------------------------------ // GB_assign_zombie5: delete entries in C for C_replace_phase //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License...
egcs.c
/** * @file egcs.c * * An implemenation of the ElGamal cryptosystem. */ #include <stdio.h> #include <gmp.h> #include "../include/libhcs/hcs_random.h" #include "../include/libhcs/egcs.h" #include "com/util.h" #include "com/omp.h" egcs_public_key* egcs_init_public_key(void) { egcs_public_key *pk = malloc(sizeo...
2426.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...
mpm_search_element_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Bodhinanda Chandra // #ifndef KRATOS_MPM...
omp_dynamic_shared_memory.c
// RUN: %libomptarget-compile-nvptx64-nvidia-cuda // RUN: env LIBOMPTARGET_SHARED_MEMORY_SIZE=256 \ // RUN: %libomptarget-run-nvptx64-nvidia-cuda | %fcheck-nvptx64-nvidia-cuda // REQUIRES: nvptx64-nvidia-cuda #include <omp.h> #include <stdio.h> int main() { int x; #pragma omp target parallel map(from : x) { ...
fig4.62-atomic-func.c
/* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2009 Sun Microsystems, Inc. All rights reserved. The contents of this file are subject to the terms of the BSD License("BSD")(the "License"). You can obtain a copy of the License at: http://www.opensparc.net/pubs/t1/licenses/BSD+_Lice...
GB_binop__minus_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
critical.c
#include<stdio.h> #include<omp.h> float balance = 1000.0; float big_job(int id){ int i, res=0; for (i=0; i<10;i++){ res +=i; } return 500+id; } float consume(float B){ balance-=B; return balance; } int main(){ int niters = 10; float res; #pragma omp parallel { ...
homp_dev.c
/* * homp_dev.c * * contains dev-specific implementation of homp.h functions, mainly those with * * Created on: Oct 4, 2014 * Author: yy8 */ /** * an easy way for defining dev-specific code: #if defined (DEVICE_NVGPU_CUDA_SUPPORT) #elif defined (DEVICE_THSIM) #else #endif */ #include <stdio.h> #includ...
MinMax.h
#ifndef DASH__ALGORITHM__MIN_MAX_H__ #define DASH__ALGORITHM__MIN_MAX_H__ #include <dash/internal/Config.h> #include <dash/Allocator.h> #include <dash/algorithm/LocalRange.h> #include <dash/util/Config.h> #include <dash/util/Trace.h> #include <dash/util/UnitLocality.h> #include <dash/iterator/GlobIter.h> #include ...
blas.c
#include "blas.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); //printf("\n out_...
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 * * Redistribution an...
convolution_1x1_pack4.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 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_binop__isne_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
pmm-OpenMP.c
/* * pmm-OpenMP.c * * Created on: 04/05/2014 * Author: Carlos de la Torre */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #ifdef _OPENMP #include <omp.h> // biblioteca para programas paralelos #else #define omp_get_thread_num() 0 #endif #define PRINT_ALL_MIN 15 // Ponemos q...
Fig_10.4_loopCollapse.c
// sample compile command: "gcc -fopenmp -c Fig_10.4_loopCollapse.c" to generate *.o object file #include <omp.h> // apply a function (*MFUNC) to each element of an N by M array void Apply(int N, int M, float* A, void(*MFUNC)(int, int, float*)) { #pragma omp parallel for num_threads(4) collapse(2) if(N*M>100) ...
GB_binop__plus_uint32.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__second_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
3_helloworld3.c
// Condicional compilation Facility #include <stdio.h> #include <omp.h> int main(int argc, char** argv) { int thread_num = 0; printf("Hello World :)\n"); #pragma omp parallel { #if _OPENMP thread_num = omp_get_thread_num(); #endif printf("Hello World from thread %d\n",thread_...
v_add.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #define ARRAY_SIZE 10000000 #define REPEAT 100 void v_add_naive(double *x, double *y, double *z) { #pragma omp parallel { for (int i = 0; i < ARRAY_SIZE; i++) z[i] = x[i] + y[i]; } } // Edit this function (Method 1) void v_add_optimized_adjacent(double ...
mixed_tentusscher_myo_epi_2004_S2_1.c
// Scenario 2 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt + Rc) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S2_1.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...
Parallelizer.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr> // // Eigen 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 Soft...
GB_unop__identity_bool_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...
GB_binop__bget_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_unop__asin_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...
omp_detach_taskwait.c
// RUN: %libomp-compile -fopenmp-version=50 && env OMP_NUM_THREADS='3' %libomp-run // RUN: %libomp-compile -fopenmp-version=50 && env OMP_NUM_THREADS='1' %libomp-run // Checked gcc 9.2 still does not support detach clause on task construct. // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9 // clang supports det...
GB_binop__first_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
zkboo_verify.c
/* Name: zkboo_verify.c Author: Tan Teik Guan Description: Verify function for ZKBoo for baseline comparison. Modified from MPC_SHA256_VERIFIER.c */ /* ============================================================================ Name : MPC_SHA256_VERIFIER.c Author : Sobuno Vers...
facedetectcnn.h
/* By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software. License Agreement For libfacedetection (3-clause BSD License) Copyright (c) 2018-2019, Shiqi Yu, all ...
GB_unaryop__abs_int8_int8.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_unaryop__identity_uint64_fp32.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_binop__plus_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...
zuker_traco3.h
void zuker_traco3() { int c0,c1,c2,c3,c4,c5,c6,c7,c8,c9,c11,c10,c12,c13,c14,c15; // tstile if(1==1) for( c0 = 0; c0 <= floord(N - 2, 8); c0 += 1) #pragma omp parallel for schedule(dynamic, 1) shared(c0) private(c1,c2,c3,c4,c5,c6,c7,c8,c9,c11,c10,c12,c13,c14,c15) for( c1 = (c0 + 1) / 2; c1 <= min(c0, (N - 1)...
OpenMP.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: Jeongnim ...
Evaluate.h
/* Copyright (c) 2005-2016, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Aboria. Redistribution and use in source and binary forms...
GB_binop__pair_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-...
nebm_lib.c
#include "nebm_lib.h" #include "math.h" #include <stdlib.h> void cross_product(double *restrict output, double * A, double * B){ /* Cross product between arrays A and B, assuming they * have length = 3 * Every resulting component is stored in the *output array */ output[0] = A[1] * B[2] - A[2] ...
GB_unop__exp_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...
py-cky.h
// py-cky.h // // (c) Mark Johnson, 27th January 2006, last modified 2nd May, 2013 #ifndef PY_CKY_H #define PY_CKY_H #include <algorithm> #include <cassert> #include <cmath> #include <cstdlib> // #include <ext/hash_map> #include <iostream> #include <map> #include <set> #include <sstream> #include <utility> #include <...
imd_colrad_nolb.c
#include "imd.h" #include <sys/time.h> #include <gsl/gsl_integration.h> #include <gsl/gsl_errno.h> // *************************************************** // * TODO: // * mpi2 und mpi3 anpassen weil energies delE und kbTe in eV // * SPEEDUP pragma omp auch in ydot // * floats wo möglich // ***************************...
GB_unaryop__ainv_uint64_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...
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...