source
stringlengths
3
92
c
stringlengths
26
2.25M
pixel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__trunc_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...
compton.c
// Licensed under a 3-clause BSD style license - see LICENSE #include "common.h" #include "stdlib.h" double KN(double epsilon, double gamma, double nu){ double epsilon1 = nu*h; double gamma_e = 4*epsilon*gamma/(M_e*c*c); double q = epsilon1/(gamma_e*(gamma*M_e*c*c - epsilon1)); double res = 3*sigma...
noarg_target_function.c
#include <stdio.h> #pragma omp declare target void my_noarg_func(){printf("This is a noarg function \n"); } #pragma omp end declare target int main(){ #pragma omp target my_noarg_func(); return 0; }
GB_binop__second_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
FlopCounterFunctor.h
/** * @file FlopCounterFunctor.h * * @date 22 Jan 2018 * @author tchipevn */ #pragma once #include "autopas/pairwiseFunctors/Functor.h" #include "autopas/utils/ArrayMath.h" namespace autopas { /** * This class helps in getting the number of performed floating point * operations. It is a functor that only calc...
GB_binop__islt_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-...
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...
convolution_3x3_int8.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // author:BUG1989 (https://github.com/BUG1989/) Long-term support. // author:FuGuangping (https://github.com/fu1899) Implemented the first version of INT8 quantization on ARMv7. // // Copyright (C) 2019 BUG1989. All rights reser...
GB_unop__identity_fc32_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
pf_fold.c
/* * partiton function for single RNA secondary structures * * Simplified interfaces and backward compatibility * wrappers * * Ivo L Hofacker + Ronny Lorenz * Vienna RNA package */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* * ...
syncbench.c
/*************************************************************************** * * * OpenMP MicroBenchmark Suite - Version 2.0 * * * * ...
16_omp_heap.c
// clang-format off // RUN: %c-to-llvm %omp_c_flags %s | %apply-typeart -S 2>&1 | %filecheck %s // REQUIRES: openmp // clang-format on #include <stdlib.h> void foo(int** x) { #pragma omp parallel // transformed to @__kmpc_fork_call { double* pd = calloc(10, sizeof(double)); pd = realloc(pd, 20 * si...
GB_unop__isfinite_bool_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...
test_verify_rowcols.c
#include "config.h" /* getopt needs _POSIX_C_SOURCE 2 */ #define _POSIX_C_SOURCE 2 #include <ctype.h> #include <limits.h> #include <math.h> #include <stddef.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #if defined(_MSC_VER) #include "wingetopt/src/getopt.h" #els...
mkldnn_common.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 ...
neuralClasses.h
#pragma once #include <iostream> #include <fstream> #include <algorithm> #include <cassert> #include <cmath> #include <vector> #include <boost/unordered_map.hpp> #include <Eigen/Dense> #include "maybe_omp.h" #include "util.h" #include "graphClasses.h" #include "USCMatrix.h" // classes for various kinds of layers #i...
symgs.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
GB_unaryop__lnot_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...
fig4.36-lastprivate-alternative.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...
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...
morn_list.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...
GB_binop__islt_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...
openmp.h
/* ---------------------------------------------------------------------- miniMD is a simple, parallel molecular dynamics (MD) code. miniMD is an MD microapplication in the Mantevo project at Sandia National Laboratories ( http://www.mantevo.org ). The primary authors of miniMD are Steve Plimpton (sjplimp...
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...
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) #...
1875.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...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
layerramdistancetransform.h
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2017-2021 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
pr81052.c
/* PR middle-end/81052 */ /* { dg-do compile } */ /* { dg-options "-fopenmp-simd -O2" } */ int foo (int x, int y) { int i; #pragma omp simd for (i = x; i < y; ++i) return 0; /* { dg-error "invalid branch to/from OpenMP structured block" } */ return 1; } #ifdef __cplusplus template <typename T> T bar (T x,...
persistent.c
#include "persistent.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <math.h> #include <omp.h> int compute_commit_dsv(Box* box_arr) { int count = 1; int thread_count; //omp_set_dynamic(0); // Explicitly disable dynamic teams omp_set_num_threads(NUM_TH...
transform.h
/*! * Copyright 2018 XGBoost contributors */ #ifndef XGBOOST_COMMON_TRANSFORM_H_ #define XGBOOST_COMMON_TRANSFORM_H_ #include <dmlc/omp.h> #include <dmlc/common.h> #include <xgboost/data.h> #include <utility> #include <vector> #include <type_traits> // enable_if #include "xgboost/host_device_vector.h" #include "x...
GB_binop__isge_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-...
opi.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> int main(int argc, char **argv) { //seed random number generator // Q2b: get the number of threads to run with from agrv and // add OpenMP API code to set number of threads here if (argv <= 1) { exit(1); } int arg1 = atoi(arg...
meanshift_static.h
#ifndef MEAN_SHIFT_STATIC_H #define MEAN_SHIFT_STATIC_H #include <algorithm> #include <cmath> #include "container.h" #include "container_io.h" #include <iostream> #include "utils.h" namespace mean_shift { namespace omp { template <typename T, const size_t N, const size_t D> std::vector<vec<T, D>...
3d_array_ptr_v1.c
// PASS: * // RUN: ${CATO_ROOT}/src/scripts/cexecute_pass.py %s -o %t // RUN: diff <(mpirun -np 2 %t) %s.reference_output #include <stdio.h> #include <stdlib.h> #include <omp.h> int main() { int*** M = (int***) malloc(sizeof(int**)*2); M[0] = (int**)malloc(sizeof(int**)*2); M[1] = (int**)malloc(sizeof(int*...
reduce3.h
/* * reduce3.h * * Created on: Dec 28, 2015 * Author: agibsonccc */ #ifndef REDUCE3_H_ #define REDUCE3_H_ #define EXTRA_PARAMS_LENGTH 10 #include <op.h> #include <templatemath.h> #include <helper_cuda.h> #include <sharedmem.h> #include <omp.h> #include <pairwise_util.h> #include <dll.h> #include <shape.h>...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__ainv_uint32_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...
smooth.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "../admm.h" /****************************************************************************** * TYPES ********************************...
eltwise_layernorm.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
GB_unaryop__abs_uint64_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...
exercicio02_full.c
#include <stdio.h> #include <stdlib.h> #include "omp.h" static long num_steps = 100000000; int main() { double pi, sum = 0.0, tempo_inicial, tempo_final, step; int nthreads = 4; step = 1.0 / (double)num_steps; omp_set_num_threads(nthreads); tempo_inicial = omp_get_wtime(); #pragma omp parallel { ...
convolution_3x3_pack4to1.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 ...
wino_conv_kernel_arm.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
genome.c
/* ============================================================================= * * genome.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =========================================...
scheduleg-clause.c
/* El tipo guiado es lo mismo que el tipo dinamico solo que repartimos de forma max(n/h,chunk) si tenemos 20 iteraciones y 3 hebras => n = 20, h = 3 chunk = 2 - a la primera hebra libre le damos (20/3, 2) => (round(6.66666) = 7, 2) le damos 7 => n = 20 - 7 = 13 - a la siguiente hebra libre le damos (13/3, 2) => (roun...
imm.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
ordered2.c
#include <stdio.h> #include <omp.h> int main(void) { int i=0,t_id; #pragma omp parallel for ordered private (t_id) for (i=0;i<100;i++) { t_id= omp_get_thread_num(); #pragma omp ordered { printf("I am i=%d in thread %d\n",i,t_id); } } return 0; }
omp_barrier.c
#include<stdio.h> #include<omp.h> #include<stdlib.h> int main() { int x=2; #pragma omp parallel num_threads(2) shared(x) { if (omp_get_thread_num()==0) { x = 5; } else { printf("1 : Thread %d : x = %d\n", omp_get_thread_num(), x); } ...
Q2_Solution_Batch.h
#pragma once #include <queue> #include <algorithm> #include <cassert> #include <numeric> #include <memory> #include <set> #include "utils.h" #include "load.h" #include "Q2_Solution.h" class Q2_Solution_Batch : public Q2_Solution { protected: static std::vector<uint64_t> convert_score_type_to_comment_id(const ...
parallel-reduction2.c
#include<assert.h> #include<omp.h> #include<stdio.h> int main(void) { int i =100, sum=100; int thread_num; #pragma omp parallel reduction(+:sum) { #pragma omp single { thread_num = omp_get_num_threads(); } sum += i; } printf("thread num=%d sum =%d\n", thread_num, sum); assert(sum == (i*th...
GB_unop__lnot_uint64_uint64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
main.c
/* * Main program * * This file is a part of solution of a Intel Winter Summer School problem * Copyright (c) 2010 Roman Tsisyk <roman@tsisyk.com> * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ar...
ten_tusscher_2004_epi_S2_14.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S2_14.h" GET_CELL_MODEL_DATA(init_cell_model_data) { assert(cell_model); if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } //TODO...
GB_binop__iseq_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:...
GB_unaryop__lnot_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
omp_orphan.c
/****************************************************************************** * FILE: omp_orphan.c * DESCRIPTION: * OpenMP Example - Parallel region with an orphaned directive - C/C++ Version * This example demonstrates a dot product being performed by an orphaned * loop reduction construct. Scoping of the re...
reg_detect.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...
billownoise.h
#pragma once #ifndef BILLOW_NOISE_H #define BILLOW_NOISE_H #include "noisecommon.h" #define DEFAULT_BILLOW_FREQUENCY 1.0 #define DEFAULT_BILLOW_LACUNARITY 2.0 #define DEFAULT_BILLOW_PERSISTENCE 0.5 #define DEFAULT_BILLOW_OCTAVE_COUNT 6 #define DEFAULT_BILLOW_SEED 0 #define DEFAULT_BILLOW_POSITION_X 0.0 #define DEFAUL...
GB_binop__second_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...
vseprefine.c
/** * @file vseprefine.c * @brief Vertex separator refinement routines * @author Dominique LaSalle <mtmetis@domnet.org> * Copyright 2014, Regents of the University of Minnesota * @version 1 * @date 2014-10-13 */ #ifndef MTMETIS_REFINE_C #define MTMETIS_REFINE_C #include "vseprefine.h" #include "check.h"...
convolution_pack1to4.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
PerturbField.c
// Re-write of perturb_field.c for being accessible within the MCMC int ComputePerturbField( float redshift, struct UserParams *user_params, struct CosmoParams *cosmo_params, struct InitialConditions *boxes, struct PerturbedField *perturbed_field ){ /* ComputePerturbField uses the first-order Langragia...
OpenMPClause.h
//===- OpenMPClause.h - Classes for OpenMP clauses --------------*- 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 // //===---------------------------...
django_fmt_plug.c
/* Django 1.4 patch for JtR. Hacked together during May of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binar...
area2.c
#include <stdio.h> #include <math.h> #define LEFT 0.0F #define RIGHT 3.1416F #define SLICES 100000000 #define WIDTH ((RIGHT-LEFT)/SLICES) int main() { int i; double area=0.0f; #pragma omp parallel for reduction(+: area) for (i=0;i<SLICES;++i) { area += sin(LEFT+i*WIDTH)*WIDTH; } printf("...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (1024*3) #define M (16*32) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) double A[M][N], B[M][N], C[N], D[N], E[N]; double S[M]; d...
GB_binop__rminus_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:...
GB_unop__sqrt_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...
bfm_evo.h
/* -*- mode:c++; c-basic-offset:2 -*- */ /****************************************************************************/ /* Aug 2012 */ /* Hantao Yin */ /* ...
Problem.h
#pragma once #include "Constraint.h" #include "Define.h" #include "LinearSolver.h" #include "Objective.h" #ifdef EQLIB_USE_MKL #include "PardisoLDLT.h" #endif #include "ProblemData.h" #include "Settings.h" #include "SimplicialLDLT.h" #include "SparseStructure.h" #include "Timer.h" #include <omp.h> #include <mutex> #...
deconvolution_3x3.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 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 ...
tree.h
/* * tree.h * * Created on: Oct 9, 2016 * Author: Yimin Zhong */ #ifndef FMM_TREE_H #define FMM_TREE_H #include "node.h" #include "measure.h" #include <chrono> #include <fstream> #include <cassert> #include <queue> #ifdef RUN_OMP #include "omp.h" #endif class tree { public: vector<node> dict; int...
ExceptionPropagator.h
#if !defined EXCEPTION_PROPAGATOR_H #define EXCEPTION_PROPAGATOR_H // Experimental class to propagate exceptions around OpenMP pragmas (and other // constructs) that cannot cope with exceptions. Exceptions thrown inside a lambda // function that is given to the () operator are propagated and rethrown when the // prog...
residualbased_newton_raphson_mpc_contact_strategy.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
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...
lu.pluto.par.l2tile.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.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)) double L[N][N]; double U[N][N]; double A[N][...
zherk.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include "pla...
helper_classes_for_constraint_builder.h
// ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Aditya Ghantasala // // #if !defined(AUXILIARY_GLOBAL_MASTER_SLAVE_RELA...
nodal_two_step_v_p_strategy_for_FSI.h
// // Project Name: KratosPFEMFluidDynamicsApplication $ // Last modified by: $Author: AFranci $ // Date: $Date: June 2018 $ // Revision: $Revision: 0.0 $ // // #ifndef KRATOS_NODAL_TWO_STEP_V_P_STRATEGY_FOR_FSI_H #defi...
metrics.h
/* * Created on: Feb 06, 2017 * Author: Steffen Rechner <steffen.rechner@informatik.uni-halle.de> * * This file is part of the marathon software. * * Copyright (c) 2016, Steffen Rechner * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation...
imageHelper.h
#pragma once class ImageHelper { public: ImageHelper() {} ~ImageHelper() {} static inline float gaussR(float sigma, float dist) { return exp(-(dist*dist) / (2.0f*sigma*sigma)); } static inline float gaussR(float sigma, const vec3f& d) { float dist = d.length(); return exp(-(dist*dist) / (2.0f*sigma*sigm...
DoAllWrap.h
/* * This file belongs to the Galois project, a C++ library for exploiting parallelism. * The code is being released under the terms of the 3-Clause BSD License (a * copy is located in LICENSE.txt at the top-level directory). * * Copyright (C) 2018, The University of Texas at Austin. All rights reserved. * UNIVER...
DataGen.h
// Copyright (C) 2019-2020 Zilliz. 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 l...
Cover.h
/* * Cover.h * * Created on: 03.10.2013 * Author: cls */ #ifndef COVER_H_ #define COVER_H_ #include <cinttypes> #include <set> #include <vector> #include <map> #include <cassert> #include <limits> #include "Partition.h" #include "../Globals.h" namespace NetworKit { /** * @ingroup structures * Implement...
copysplit.c
int main () { int X = 9; int diff = 10; int diff1 = 20; #pragma omp parallel { while (1) { if (X < 10) { #pragma omp single { diff = diff1; } #pragma omp barrier break; } #pragma omp barrier } } X = diff; }
portrend.c
#include <math.h> #include <SDL.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> /* Define window size */ #define W2 640 // width of screen #define H 480 // height of screen #define W 640 // width of _game_ screen (in SplitScreen mode, map is drawn in the remaining space) /* Define c...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__min_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
cg_main.c
//MIT License // //Copyright (c) 2018 Sicong Zhuang // //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, mer...
GB_binop__le_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
singleFlowConflict.c
int main() { // int X = 0; int *A, *B, *C; int p[20], q[20]; int X = 0; #pragma omp parallel { #pragma omp atomic X = X +1; #pragma omp single nowait { C = A; A = B; B = C; } #pragma omp barrier int i = 10; B[i] = A[i] + 10; } }
zherk.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include "pla...
a.9.1.c
/* { dg-do compile } */ void XAXIS (); void YAXIS (); void ZAXIS (); void a9 () { #pragma omp parallel sections { #pragma omp section XAXIS (); #pragma omp section YAXIS (); #pragma omp section ZAXIS (); } }
black-scholes.c
/* * Copyright (C) 2014-2015, 2018 Intel Corporation * * SPDX-License-Identifier: MIT */ #include <omp.h> #include <mathimf.h> #include "euro_opt.h" #ifdef __DO_FLOAT__ # define EXP(x) expf(x) # define LOG(x) logf(x) # define SQRT(x) sqrtf(x) # define ERF(x) erff(x) # define INVSQRT(x...
rotlet_direct_rsrc.c
#include "math.h" #include "rotlet_direct.h" #ifdef _OPENMP #include "omp.h" #endif void rotlet_direct_rsrc(double* restrict u, const double* restrict xt, const int Nt, const double* restrict x, const double* restrict f, const int N, const ewald_opts opt) { double r[3]; double xm[3]; ...
pi-v13.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 #endif int main(int argc, char *argv[]) { do...
looop.c
#include<stdio.h> #include<stdlib.h> #include<omp.h> #define TAM 64*127*5 #define ITERACOES_TESTE 100000 int main(){ int i,contador; long soma; int *vetor = calloc(TAM,sizeof(int)); if(vetor == NULL){ printf("Falha ao alocar memória"); return -1; } for(contador=0; contador < ITERACOES_TESTE; con...
GB_binop__isgt_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-...