source
stringlengths
3
92
c
stringlengths
26
2.25M
omp_taskwait.c
// RUN: %libomp-compile-and-run // This test is known to be fragile on NetBSD kernel at the moment, // https://bugs.llvm.org/show_bug.cgi?id=42020. // UNSUPPORTED: netbsd #include <stdio.h> #include <math.h> #include "omp_testsuite.h" #include "omp_my_sleep.h" int test_omp_taskwait() { int result1 = 0; /* Stores ...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__minus_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
jacobi.c
#include <stdio.h> #include <math.h> #ifdef _OPENMP #include <omp.h> #endif // Add timing support #include <sys/time.h> double time_stamp() { struct timeval t; double time; gettimeofday(&t, NULL); time = t.tv_sec + 1.0e-6*t.tv_usec; return time; } double time1, time2; void driver(void); void initialize(voi...
DES_bs_b.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-2001,2003,2010-2013 by Solar Designer */ #include "arch.h" #include "common.h" #include "DES_bs.h" #if DES_BS_ASM && defined(_OPENMP) && defined(__GNUC__) #warning Assembly code and OpenMP are both requested - will provide the former,...
hard.h
#pragma once typedef struct boolint{ bool isin; PS::S32 id; PS::S32 cid; }BoolInt, *PBoolInt; class ParticleCluster{ public: static std::vector<FPH_t> ptcl_hard; std::vector<PS::S32> id_list; static void resize_hard(PS::S32 n) { ptcl_hard.resize(n); } static void reserve_hard(PS::S32 n)...
ac2d_openmp.c
#include<stdio.h> #include"2d_lib.c" // vx void ac2d_openmp(double *vx, int BD_nx_vx, int BD_nz_vx, double *pvxbtpp, double *vz, int BD_nx_vz, int BD_nz_vz, double *pvzbtpp, double *tpp, double *ptppbvx, double *ptppbvz, int BD_nx_tpp, int BD_nz_tpp, double *rho, double *lambda, double *fdc, double dt, d...
transpose.h
// This code is part of the Problem Based Benchmark Suite (PBBS) // Copyright (c) 2011-2016 Guy Blelloch and the PBBS team // // 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 restri...
LAGraph_ConnectedComponents.c
//------------------------------------------------------------------------------ // LAGraph_ConnectedComponents: connected components //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-License-Identifier: BSD-2...
fft.c
#include <stdlib.h> #include "fft.h" #include "math.h" #include "omp.h" // max is non inclusive int bit_reverse(int a, int max) { int reverse = 0; while (a > 0) { max = max >> 1; if (a % 2 == 1) { reverse+=max; } a = a >> 1; } return reverse; } int num_bits(int n) { int count = 0; wh...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
GB_binop__lxor_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-...
interpolation_pl.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
sudoku-mpi.c
#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <stdint.h> #include <mpi.h> #include <omp.h> #include <argparse.h> #include "sp/config.h" #include "sp/list.h" #define UNASSIGNED 0 #define UNCHANGEABLE -1 #define POS 0 #define VAL 1 #define TAG_HYP 1 #define TAG_EXIT 2 #...
GB_binop__isle_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:...
dem_structures_coupling_utilities.h
/* * Author: Miguel Angel Celigueta * * maceli@cimne.upc.edu */ #ifndef KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H #define KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H // /* External includes */ // System includes // Project includes #include "includes/variables.h" /* System includes */ #include <limits> #includ...
alignment.c
// RUN: %compile-run-and-check #include <omp.h> #include <stdio.h> #pragma omp declare target static void putValueInParallel(int *ptr, int value) { #pragma omp parallel { *ptr = value; } } static int getId() { int id; putValueInParallel(&id, omp_get_thread_num()); return id; } #pragma omp end declare...
loop-2.c
#ifdef __cplusplus extern "C" { #endif int omp_get_thread_num (void); #ifdef __cplusplus } #endif void f0 (int *a) { int i; #pragma omp loop bind(teams) order(concurrent) for (i = 0; i < 64; i++) a[i] = i; } void f1 (int *a) { int i; #pragma omp teams { #pragma omp loop for (i = 0; i < 64; i++...
rawSHA384_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2010 by Solar Designer * based on rawMD4_fmt.c code, with trivial changes by groszek. * * Rewritten Spring 2013, JimF. SSE code added and released with the following terms: * No copyright is claimed, and the software is hereby placed in t...
critical.c
#include <stdio.h> #include <omp.h> int main() { #pragma omp parallel { printf("Start of Secret\n"); #pragma omp critical { printf("SECRET\n"); } printf("Secret Delivered\n"); } }
pjenccc.c
// Copyright (c) 2018 Intel Corporation // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publ...
if-2.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void foo (int a, int b, int *p, int *q, int task) { int i; #pragma omp parallel if (a) if (b) /* { dg-error "too many .if. clauses without modifier" } */ ; #pragma omp parallel if (a) if (parallel: b) /* { dg-error "if any .if. clause has modifier, then...
organismsbuffer.h
#pragma once #include "organism.h" #include "rng.h" #include <assert.h> namespace NEAT { template<typename TOrganism = Organism> class OrganismsBuffer { size_t _n; std::vector<TOrganism> _a; std::vector<TOrganism> _b; std::vector<TOrganism> *_curr; std::v...
GB_binop__bclr_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-...
THZTensorMath.c
/** * Copyright (c) 2015-present, Facebook, Inc. * 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. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ # include <...
UMESimdVecIntPrototype.h
// The MIT License (MIT) // // Copyright (c) 2015-2017 CERN // // Author: Przemyslaw Karpinski // // 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 lim...
apply_constant_scalarvalue_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !defined(KRATOS_APPLY_C...
lsm3d_blsm_openmp_v3.c
#include "openst/eikonal/lsm.h" #define M_LSM3D_IMP_NAME "BLSMv3" const char OPENST_LSM3D_COMPUTEPARTIAL_IMP_NAME[] = M_LSM3D_IMP_NAME; const size_t OPENST_LSM3D_COMPUTEPARTIAL_IMP_NAME_LENGTH = sizeof(M_LSM3D_IMP_NAME); int OpenST_LSM3D_ComputePartial(OPENST_FLOAT *U, char *LSM_UNLOCKED, OPENST_FLOAT *V, ...
GB_subassign_16.c
//------------------------------------------------------------------------------ // GB_subassign_16: C(I,J)<!M> += A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com See...
pado_weighted_unv_para.h
/* * pado.h * * Created on: Dec 18, 2018 * Author: Zhen Peng * Modified: 02/24/2019: change weight type from 8-bit int to 32-bit int. */ #ifndef INCLUDES_PADO_WEIGHTED_PARA_UNV_H_ #define INCLUDES_PADO_WEIGHTED_PARA_UNV_H_ #include <vector> #include <unordered_map> #include <map> #include <algorithm> #...
mpm_boundary_rotation_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Bodhinanda Chandra // #ifndef KRATOS_MPM_BOUND...
GB_binop__isge_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-...
coloring_jones_v1.h
#include "gms/third_party/gapbs/benchmark.h" #include "gms/third_party/gapbs/builder.h" #include "gms/third_party/gapbs/command_line.h" #include "gms/third_party/gapbs/graph.h" #include "coloring_common.h" #include <vector> #include <unordered_map> // We need to know the cache line size at compile-time for alignas, b...
vadd_par.c
#include <stdio.h> #include <omp.h> #define N 100000 #define TOL 0.0000001 // // This is a simple program to add two vectors // and verify the results. // // History: Written by Tim Mattson, November 2017 // int main() { float a[N], b[N], c[N], res[N]; int err=0; // fill the arrays #pragma omp paral...
GB_unaryop__minv_int32_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...
kmeans.h
#ifndef KMEANS_H #define KMEANS_H vector<vector<int>> parallel_average_face(vector<vector<int>>& image_pixel,vector<string>& img_info, vector<string>& avg_face_info,int THREADS) { int num_subjects = int(img_info.size()/IMAGES_PER_SUBJECT); vector<int> start_index(num_s...
simple_mortar_mapper_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_...
looptc_c1.c
#include <string.h> void deinterleave(char *page, char *transposed, const int ntabs, const int nchannels, const int ntimes, const int padded_size) { int tab; for (tab = 0; tab < ntabs; tab++) { int time; for (time = 0; time < ntimes; time++) { // build temporary array containing a complete channel ...
omp_critical.c
/*Este codigo usa el modelo de montecarlo para estimar el valor de la constante PI */ /* este codigo es original de http://stackoverflow.com/questions/17659652/calculating-pi-using-monte-carlo-method-gives-imprecise-answer*/ /* Ha sido modificado por Alejandro Parra Briones para fines academicos*/ #include <stdio.h> ...
reduce_mean.h
// Copyright 2018 Xiaomi, 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 applicab...
convolution_sgemm.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. 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 the License at // //...
lu.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - LU This benchmark is an OpenMP C version of the NPB LU code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
util.h
/* * This file is part of Quantum++. * * MIT License * * Copyright (c) 2013 - 2019 Vlad Gheorghiu (vgheorgh@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 restr...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
matvec_float.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #include <math.h> #define N_RUNS 20 #define N 10240 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } //Create a matrix an...
task_array.c
#include <omp.h> int main() { int A[1] = {1}; #pragma omp task { A[0]=1; } return A[0]; }
sort.c
/**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite */ /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ /* Copyright (C) 2009 Univer...
master_slave.c
#include<stdio.h> #include<omp.h> int main() { #pragma omp parallel { if(omp_get_thread_num() == 0) { printf("Master\n"); } else { printf("Slave\n"); } } }
jacobi25_2d-a.pluto.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)) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #include...
HybridCPUComp.h
#ifndef __HYBRID_CPU_COMPONENT_H__ #define __HYBRID_CPU_COMPONENT_H__ #include <cstring> #include <vector> #include "CPUFilter.h" #include "CPUGraph.h" #include "CPUIntersection.h" #include "CountProfiler.h" #include "PhaseProfiler.h" #include "Task.h" #include "TimeMeasurer.h" #include "TraversalPlan.h" // vanilla v...
GB_binop__remainder_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
GB_unaryop__ainv_uint32_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...
GB_unop__identity_fp64_uint32.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...
generic_tensor.h
// This program is free software: you can use, modify and/or redistribute it // under the terms of the simplified BSD License. You should have received a // copy of this license along this program. If not, see // <http://www.opensource.org/licenses/bsd-license.html>. // // Copyright (C) 2012, Javier Sánchez Pérez <jsan...
mixed_tentusscher_myo_epi_2004_S2_9.c
// Scenario 2 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S2_9.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_ode_...
GB_binop__ge_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
integral_loop.c
#include<stdio.h> #include<omp.h> static long num_steps = 100000; double step; int main(){ int i; double x, pi, sum = 0.0, init_time, finish_time; step = 1.0 / (double)num_steps; init_time = omp_get_wtime(); #pragma omp parallel for reduction(+: sum, x) for (i=0; i<num_steps; i++){ x = (i+0.5)*step; sum =...
atomic-5.c
/* PR middle-end/36106 */ /* { dg-additional-options "-mcx16" { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ #ifdef __x86_64__ # include "cpuid.h" #endif extern void abort (void); int __attribute__((noinline)) do_test (void) { long double d = .0L; int i; #pragma omp parallel for shared (d) for (i = 0;...
blake2bp.c
/* BLAKE2 reference source code package - optimized C implementations Written in 2012 by Samuel Neves <sneves@dei.uc.pt> To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is dist...
Task.h
#pragma once #include <vector> #include <fstream> #include <iostream> #include <algorithm> #include <limits> #include <sstream> #include "assert.h" #include <omp.h> #include <errno.h> #include <ctime> #include "../../Network/NetworkInterface.h" #include "../../Utils/Utils.h" #include "../VolumeMethod/Spaces/Decompos...
jacobi_par.c
/** * A parallel Jacobi iteration program for solving partial differential equations. * * Usage: ./a.out <gridSize> <numIters> <numWorkers> * Output: Prints command-line arguments used, execution time and maximum error to stdout. * Prints final grid values to a file 'seq-data.out' * * Authors: Lucas Vi...
gstats.h
/** * Usage goal: * gstats_all_data::create_stat(name, optional aggregation_and_print_function) * returns a STAT_ID, which I then #define * also inserts name, gstats_stat_id and gstats_stat_id, name into dictionaries * also saves gstats_stat_id, aggregation_and_print_function in a dict if it is ...
elementwise_add_arm_func.h
/* Copyright (c) 2018 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...
wbb3_fmt_plug.c
/* WoltLab Burning Board 3 (WBB3) cracker 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...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (992) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) int check_results(double* A){ for (int i = 0 ; i < N ; i++){ if (A[i] != ...
zhemm.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...
utils.h
#include <iostream> #include <string> #include <fstream> #include <sstream> #include <vector> #include <chrono> #include <random> #include <algorithm> #include <thread> #include <set> #include <bitset> #include <mutex> #include <sys/time.h> #include <unistd.h> #include <atomic> #include <limits> #include <omp.h> #inclu...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
ZQ_FaceDatabaseCompact.h
#ifndef _ZQ_FACE_DATABASE_COMPACT_H_ #define _ZQ_FACE_DATABASE_COMPACT_H_ #pragma once #include <malloc.h> #include <stdio.h> #include <vector> #include <omp.h> #include "ZQ_FaceRecognizerSphereFace.h" #include "ZQ_MathBase.h" #include "ZQ_MergeSort.h" namespace ZQ { class ZQ_FaceDatabaseCompact { enum CONST_VAL ...
crop_and_resize.c
#include <TH/TH.h> #include <THC/THC.h> #include <stdio.h> #include <math.h> // symbol to be automatically resolved by PyTorch libs extern THCState *state; void CropAndResizePerBox( const float * image_data, const int batch_size, const int depth, const int image_height, const int image_width, ...
GB_binop__pow_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-...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
convolution_3x3_pack8to4_int8.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 ...
ast-dump-openmp-target-teams-distribute-parallel-for-simd.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_one(int x) { #pragma omp target teams distribute parallel for simd for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp target team...
steepest_descent.c
#include "common_clib.h" #include "math.h" void sd_update_spin (double *spin, double *spin_last, double *magnetisation, double *mxH, double *mxmxH, double *mxmxH_last, double tau, int* pins, int n) { // Update the field ----------------------------------------------------...
omp_bug5fix.c
/****************************************************************************** * FILE: omp_bug5fix.c * DESCRIPTION: * The problem in omp_bug5.c is that the first thread acquires locka and then * tries to get lockb before releasing locka. Meanwhile, the second thread * has acquired lockb and then tries to get loc...
spmspv.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
rawMD4_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2010 by Solar Designer * Copyright (c) 2011, 2012 by magnum * * Use of Bartavelle's mmx/sse2/intrinsics and reduced binary size by * magnum in 2011-2012. * * OMP added May 2013, JimF * BE SIMD logic added 2017, JimF */ #if FMT_EXTERN...
upsample_nearest_op.h
/** * Copyright (c) 2016-present, Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
selu_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...
GB_binop__isne_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-...
DRB095-doall2-taskloop-orig-yes.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
gen_fffc.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) **************************************...
alipfold.c
/* Last changed Time-stamp: <2009-02-24 14:37:05 ivo> */ /* partiton function and base pair probabilities for RNA secvondary structures of a set of aligned sequences Ivo L Hofacker Vienna RNA package */ /** *** \file alipfold.c ...
copyprivate-clauseModificado.c
#include <stdio.h> #include <omp.h> main(){ int n = 9,i,b[n]; for(i=0;i<n;i++) b[i] = -1; #pragma omp parallel { int a; #pragma omp single { printf("\nIntroduce valor de inicialización a: "); scanf("%d",&a); printf("\nSingle ejecutada por el thread %d\n", omp_get_thread_num()); } #pragm...
grid.c
// ----------------------------------------------------------------------------- // // "00_AccelGraph" // // ----------------------------------------------------------------------------- // Copyright (c) 2014-2019 All rights reserved // ----------------------------------------------------------------------------- ...
GB_unop__log_fp32_fp32.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...
tetrahedron_method.c
/* tetrahedron_method.c */ /* Copyright (C) 2014 Atsushi Togo */ #include "mathfunc.h" #include "debug.h" /* 6-------7 */ /* /| /| */ /* / | / | */ /* 4-------5 | */ /* | 2----|--3 */ /* | / | / */ /* |/ ...
matmul.c
#include "matrix.h" /** \brief Computes matrix multiplication * * \param[in] A First input matrix * \param[in] B Second input matrix * \param[in] result Matrix to store the result * \return \f$ \mathbf{A}\mathbf{B} \f$ * */ MATRIX mat_mul(MATRIX A, MATRIX B, MATRIX result) { int i, j, k, m, n, o, p; m ...
agmgLevel.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus, Rajesh Gandham 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 w...
matmulomp.c
#include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <omp.h> float **A=NULL; float **B=NULL; float **S=NULL; float **P=NULL; void createMatrix(uint32_t n){ uint32_t i=0; uint32_t j=0; A=(float **)calloc(n,sizeof(float *)); B=(float **)calloc(n,sizeof(float *)); S=(float **)calloc(n,sizeof(float ...
polybench.c
/** * polybench.c: This file is part of the PolyBench/C 3.2 test suite. * * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <assert.h> #include <time.h> #include <s...
sparselevmarq.h
#ifndef ucoslam_SparseLevMarq_H #define ucoslam_SparseLevMarq_H #include <Eigen/Sparse> #include <functional> #include <iostream> #include <cmath> #include <omp.h> #include <ctime> #include <cstring> #include <vector> #include <chrono> #include <iomanip> namespace ucoslam{ //Sparse Levenberg-Marquardt method for genera...
simd1-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...
rose_v1_lastprivate.c
// an example of output dependence preventing parallelization // x: not live-in, yes live-out // outer scope // loop-carried output-dependence: x=... : accept values based on loop variable; or not. //Solution: Can be parallelized using lastprivate(x) #include <stdio.h> #include <omp.h> void foo() { int i; ...
convolution_3x3_pack8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 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__cmplx_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-...
GB_binop__plus_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...