source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
openmp-ex02.c | #include <stdio.h>
#include <omp.h>
int main(void)
{
int max_threads = 5;
printf ("You're all individuals!\n");
omp_set_num_threads(max_threads);
/* now we have two competing values for the number of threads in this
* region: who wins? */
#pragma omp parallel num_threads(7)
{
printf("Yes, we're all ... |
GB_unaryop__lnot_int32_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... |
update_ops_named_state.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "constant.h"
#include "update_ops.h"
#include "utility.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#ifdef _USE_SIMD
#ifdef _MSC_VER
#include <intrin.h>
#else
#include <x86intrin.h>
#endif
#endif
void normalize(double squared_norm, CTYPE* state, ITYPE ... |
10.norace5.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
int main() {
int x = 0;
#pragma omp parallel num_threads(8)
{
#pragma omp sections lastprivate(x)
{
{ x = 1; }
#pragma omp section
{ x = 2; }
}
}
return x;
}
// CHECK: Region is Data Race Free.
// END
|
sieveOfErastotenes.c | /*
Adaptado de: https://ideone.com/JU5CfV
e https://github.com/stbrumme/eratosthenes
---
Medição do tempo usando clock
Erastothenes Sequencial: 5761455 / Tempo: 2.04s
Erastothenes Paralelo: 5761455 / Tempo: 1.07s
Speed up: 1.9
---
Medição do tempo usando comando time
Erastothenes Sequencial: 1,95s user 0,03s sys... |
fourier.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
flush_exampleA_21_1c.c | /*
OpenMP spec30.pdf Example A.21.1c
*/
#include <omp.h>
#define NUMBER_OF_THREADS 256
int synch[NUMBER_OF_THREADS];
float work[NUMBER_OF_THREADS];
float result[NUMBER_OF_THREADS];
float fn1(int i)
{
return i*2.0;
}
float fn2(float a, float b)
{
return a + b;
}
int main()
{
int iam, neighbor;
#pragma omp parall... |
DRB003-antidep2-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... |
stribog_fmt_plug.c | /*
* GOST R 34.11-2012 cracker patch for JtR. Hacked together during
* the Hash Runner 2015 contest by Dhiru Kholia and Aleksey Cherepanov.
*
* Based on https://www.streebog.net/ and https://github.com/sjinks/php-stribog
* code. See "LICENSE.gost" for licensing details of the original code.
*/
#include "arch.h"
... |
is_initial_device.c | // RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu
// RUN: %libomptarget-compile-x86_64-pc-linux-gnu -DUNUSED -Wall -Werror
#include <omp.h>
#include <stdio.h>
int main() {
int errors = 0;
#ifdef UNUSED
// Test if it is OK to leave the variants unused in the header
#else // UNUSED
int host = omp_is_i... |
166. QR Eigen Values.c | /**
* @file
* \brief Compute real eigen values and eigen vectors of a symmetric matrix
* method.
*
*/
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "qr_decompose.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#define LIMS 9 /**< limit of range of matrix... |
restriction.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
snefru_fmt_plug.c | /* Snefru cracker patch for JtR. Hacked together during May of 2013 by Dhiru
* Kholia <dhiru at openwall.com>.
*
* This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and
* it is hereby released to the general public under the following terms:
*
* Redistribution and use in source and binary f... |
GB_unaryop__identity_int16_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__isfinite_bool_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
odd-even-merge-sort_hybrid.c | #include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<omp.h>
#include"mpi.h"
#define MAX(a,b) ((a<b)?b:a)
#define MIN(a,b) ((a>=b)?b:a)
#define ODD(A,n,i) A[n+2*i]
#define EVEN(A,n,i) A[n+2*i+1]
void print_array(int *A,int l,int r)
{
printf("\n");
for(int i=l;i<r;i++)
printf("%3d ",i);
prin... |
es1.h | #ifndef es1_h
#define es1_h
#include <iostream>
#include <omp.h>
#include <cmath>
#define pi 3.14159
using namespace std;
double es1Static(unsigned dim, unsigned nmt) {
double *vec = new double [dim * dim];
double start = omp_get_wtime();
#pragma omp parallel num_threads(nmt)
{
... |
sample_nested.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See LICENSE.txt in top-level directory.
*/
#include <omp.h>
#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
int main(int argc, char * argv[]) {
int size=(argc>1)?atoi(argv[1]):100;
int i,j,k=0;
int nthreads;
struct... |
GB_binop__min_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-... |
RBF_evaluate_Fast.c | /* This file is part of redbKIT.
* Copyright (c) 2016, Ecole Polytechnique Federale de Lausanne (EPFL)
* Author: Federico Negri <federico.negri@epfl.ch>
*/
#include "mex.h"
#include <stdio.h>
#include <math.h>
#include "blas.h"
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#else
#warning "OpenMP not ena... |
IntSort.h | /*
* IntSort.h
*
* Author: Manuel Penschuck (networkit@manuel.jetzt)
*/
#ifndef INTSORT_H_
#define INTSORT_H_
#include <limits>
#include <array>
#include <vector>
#include <memory>
#include <tuple>
#include <algorithm>
#include <type_traits>
#include <cassert>
#include <numeric>
#include <omp.h>
namespace intsor... |
optQCCAvgVals.c | #include <mex.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
/* q_c.singleton = optQCMFC(condQB,prediction,Sigma_c,mu_c,c_c,mu_a_b,numColumnsPred,numColumnsShape,columnsPredShapeVec,columnsPredShapeFactorVec);
* */
int min(int A, int B) {
if (A < B) {
return A;
} else {
return B... |
GameOfLife.c | #include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <omp.h>
int main(){
const int N=20, T=100;
bool *grid, *tmp_grid, *tmp_ptr;
int init_pos[2];
int cnt;
bool show = true;
// Allocate some 1-D arrays - we'll use indexing to make it 2D
// Initialise to value 0
grid = calloc(N*N, sizeo... |
SE_fg_int_kaiser_mex.c | #include "mex.h"
#include "../SE_fgg.h"
#include "../SE_fkg.h"
void SE_FGG_MEX_params(SE_FGG_params*, const mxArray*, int);
#define X prhs[0]
#define HH prhs[1]
#define OPT prhs[2]
#define PHI_OUT plhs[0] // Output
#ifndef VERBOSE
#define VERBOSE 0
#endif
void mexFunction(int nlhs, mxArray *plhs[],
... |
GB_unop__identity_int32_uint8.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... |
calc_dnn.c | /*
* Copyright (c) 1991-2013 Kawahara Lab., Kyoto University
* Copyright (c) 2000-2005 Shikano Lab., Nara Institute of Science and Technology
* Copyright (c) 2005-2013 Julius project team, Nagoya Institute of Technology
* All rights reserved
*/
/* define this to test disabling expsum computation at softmax */
#u... |
omp_task_red_taskloop.c | // RUN: %libomp-compile-and-run
// Parsing error until gcc8:
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8
// Parsing error until clang11:
// UNSUPPORTED: clang-10, clang-9, clang-8, clang-7
// No icc compiler support yet
// XFAIL: icc
#include <stdio.h>
#include <omp.h>
int r;
int work(int k, int l)
{
retu... |
pcpaes_cbcdecrypt.c | /*******************************************************************************
* Copyright 2013-2019 Intel Corporation
* All Rights Reserved.
*
* If this software was obtained under the Intel Simplified Software License,
* the following terms apply:
*
* The source code, information and material ("Material") co... |
MINDSSCbox.h |
/// @brief Applies a box filter to image data
/// @note Box filters are often used to efficiently approximate Gaussian filters
///
/// @param [out] input is the image to filter
/// @param [out] temp1 is a temporary buffer the same size as the input, provided by the caller to provide the function with memory necessary ... |
pt_to_pt_haloexchange.c | /*****************************************************************************
* *
* Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 *
* *
* ... |
dropout-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 ... |
par_nongalerkin.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)
**************************************... |
RingSettlementCircuit.h | #ifndef _RINGSETTLEMENTCIRCUIT_H_
#define _RINGSETTLEMENTCIRCUIT_H_
#include "Circuit.h"
#include "../Utils/Constants.h"
#include "../Utils/Data.h"
#include "../Utils/Utils.h"
#include "../Gadgets/MatchingGadgets.h"
#include "../Gadgets/AccountGadgets.h"
#include "../Gadgets/TradingHistoryGadgets.h"
#include "../Gadge... |
GB_unaryop__ainv_uint8_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... |
Q5.3-d.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <string.h>
#define MAXIMO 100
int num_aleatorio() {
int numero = random() % MAXIMO;
return numero;
}
void geraMatriz(int * a, int n) {
int i;
for (i = 0; i < n; ++i) {
a[i] = num_aleatorio();
}
}
void imprimeMatriz(int * a, int n) ... |
ligra.h | // This code is part of the project "Ligra: A Lightweight Graph Processing
// Framework for Shared Memory", presented at Principles and Practice of
// Parallel Programming, 2013.
// Copyright (c) 2013 Julian Shun and Guy Blelloch
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of ... |
gmx_hbond.c | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2008, The GROMACS development team,
* check out http://www.gromacs.org for more information.
* Copyright (c) 2012,2013, by the GROMACS development team, l... |
GB_unaryop__identity_fp32_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
FunctionalDecomposition_Newadd.c | #include<stdlib.h>
#include<stdio.h>
#include<math.h>
#include<omp.h>
int NowYear; // 2017 - 2022
int NowMonth; // 0 - 11
float NowPrecip; // inches of rain per month
float NowTemp; // temperature this month
float NowHeight; // grain height in inches
int NowNumDeer; // number of deer in the current population
i... |
concurrent_unordered_map.cuh.h | /*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. 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 ... |
mass.h | #pragma once
class MassGrowth{
public:
static PS::F64 tau_mass;
static PS::F64 mass_crit;
static PS::F64 mass_max;
std::vector<PS::S32> id_list;
MassGrowth(){
id_list.clear();
}
template <class Tpsys>
PS::S32 makeList(Tpsys & pp,
PS::F64 time){
con... |
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... |
parallel-reduction.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... |
MultiwayMerge.h | #include "../CombBLAS.h"
/***************************************************************************
* Find indices of column splitters in a list of std::tuple in parallel.
* Inputs:
* tuples: an array of SpTuples each std::tuple is (rowid, colid, val)
* nsplits: number of splits requested
* Output:
... |
spacetime_heat_initial_m1_kernel_antiderivative.h | /*
Copyright (c) 2020, VSB - Technical University of Ostrava and Graz University of
Technology
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyr... |
clipperz_srp_fmt_plug.c | /* This software was repurposed by Dhiru Kholia (dhiru at openwall.com)
* in 2012.
*
* This software was written by Jim Fougeron jfoug AT cox dot net
* in 2012. No copyright is claimed, and the software is hereby
* placed in the public domain. In case this attempt to disclaim
* copyright and place the software in... |
dfe.c | /*! @copyright (c) 2017 King Abdullah University of Science and
* Technology (KAUST). All rights reserved.
*
* STARS-H is a software package, provided by King Abdullah
* University of Science and Technology (KAUST)
*
* @file src/backends/openmp/blrm/dfe.c
* @version 1.3.0
* @aut... |
omp_for_private.c | // RUN: %libomp-compile-and-run
// REQUIRES: !(abt && (clang || gcc))
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
/* Utility function do spend some time in a loop */
static void do_some_work()
{
int i;
double sum = 0;
for(i = 0; i < 1000; i++){
sum += sqrt ((double) i);
}
}
int sum1;
#pr... |
if-clause.c | /*
$ export OMP_NUM_THREADS=3
$ ./bin/if-clause 4
thread 0 suma de a[0]=0 sumalocal=0
thread 0 suma de a[1]=1 sumalocal=1
thread 0 suma de a[2]=2 sumalocal=3
thread 0 suma de a[3]=3 sumalocal=6
thread master=0 imprime suma=6
Ya que no se realiza el fork join de las hebras en la region parallel if(n>4)
$ ./bin... |
particleSimulator-mpi.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <omp.h>
#include <math.h>
#include <mpi.h>
#include <unistd.h>
#include <sys/types.h>
#include "parseFlags.h"
#define maxlength 1024
typedef struct {
double x;
double y;
} coordinates;
typedef struct {
coordinates position;
coordinates veloci... |
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_unop__identity_fc64_int16.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... |
nqueens.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... |
nvector_openmpdev.c | /* -----------------------------------------------------------------
* Programmer(s): David J. Gardner and Shelby Lockhart @ LLNL
* -----------------------------------------------------------------
* Acknowledgements: This NVECTOR module is based on the NVECTOR
* Serial module by Scott D. Cohen, A... |
DemBones.h | ///////////////////////////////////////////////////////////////////////////////
// Dem Bones - Skinning Decomposition Library //
// Copyright (c) 2019, Electronic Arts. All rights reserved. //
///////////////////////////////////////////////////////////////////////////////
... |
damax.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/dzamax.c, normal z -> d, Fri Sep 28 17:38:01 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
nodal_residualbased_elimination_builder_and_solver.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi, Alessandro... |
composite.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
dct_lee_cpu.h | /**
* @file dct_lee_cpu.h
* @author Yibo Lin (DREAMPlace)
* @date Oct 2018
*/
#ifndef DREAMPLACE_DCT_LEE_CPU_H
#define DREAMPLACE_DCT_LEE_CPU_H
#include <vector>
#include <cmath>
#include <stdexcept>
#include "utility/src/Msg.h"
DREAMPLACE_BEGIN_NAMESPACE
namespace lee
{
constexpr double PI = 3.14159265358... |
GB_binop__isge_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... |
arraybench.c | /****************************************************************************
* *
* OpenMP MicroBenchmark Suite - Version 3.1 *
* *
* ... |
primes.c | #include <stdio.h>
#include <math.h>
#include <sys/time.h>
#include <omp.h>
#include <offload.h>
const int a = 1;
const int b = 3000000;
double wtime()
{
struct timeval t;
gettimeofday(&t, NULL);
return (double)t.tv_sec + (double)t.tv_usec * 1E-6;
}
/*
* is_prime_number: Returns 1 if n is a prime numbe... |
MatrixMXN.h | #pragma once
#include "VectorND.h"
#include <fstream>
template<class T>
class MatrixMN
{
public:
int num_rows_; // m_
int num_cols_; // n_
T *values_;
MatrixMN()
: values_(nullptr), num_rows_(0), num_cols_(0)
{}
MatrixMN(const int& _m, const int& _n)
: values_(nullptr), num_rows_(0), num_cols_(0)
{}
vo... |
GB_unaryop__identity_int64_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... |
GB_binop__lt_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
setbv.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB LU code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
GB_binop__rminus_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-... |
3d25pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted fr... |
resource_manager.h | // -----------------------------------------------------------------------------
//
// Copyright (C) 2021 CERN & Newcastle University for the benefit of the
// BioDynaMo collaboration. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compl... |
fmm.h | #pragma once
/******************************************************************************
*
* mfmm
* A high-performance fast multipole method library using C++.
*
* A fork of ExaFMM (BSD-3-Clause lisence).
* Originally copyright Wang, Yokota and Barba.
*
* Modifications copyright HJA Bird.
*
**************... |
nested.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
void level3(int parent)
{
#pragma omp parallel num_threads(2)
{
#pragma omp critical
printf("L3: parent %d, thread %d / %d, level %d (nested regions %d)\n",
parent, omp_get_thread_num(), omp_get_num_... |
schedule-modifiers-1.c | /* { dg-do compile } */
/* { dg-options "-fopenmp" } */
void
foo (void)
{
int i;
#pragma omp for simd schedule (simd, simd: static, 5)
for (i = 0; i < 64; i++)
;
#pragma omp for simd schedule (monotonic, simd: static)
for (i = 0; i < 64; i++)
;
#pragma omp for simd schedule (simd , monotonic : stat... |
join.c | /* Copyright 2013-2015. The Regents of the University of California.
* Copyright 2015. Martin Uecker.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2013, 2015 Martin Uecker <martin.uecker@med.uni-goettingen.de>
* 2015 J... |
DRB099-targetparallelfor2-orig-no.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... |
ast-dump-openmp-taskgroup.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() {
#pragma omp taskgroup
;
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-ta... |
3D.h | #define sigma(i, j) (can_pair(RNA, i, j))
void n3D()
{
int n = N;
int c0,c1,c2,c3,c5,c6,c7,c9,c11,c10,c4,c12;
for (int c0 = floord(-31 * n + 115, 3132) + 2; c0 <= floord(79 * n - 158, 2436) + 2; c0 += 1) {
#pragma omp parallel for
for (int c1 = max(-c0 - (n + 52) / 54 + 2, -((n + 114) / 116)); c1 <= min(min(-c0... |
reduction_issue_16.c | #include <stdio.h>
#define N 1000000ll
#define SUM (N * (N-1)/2)
int main (void)
{
#pragma omp target
{
long long a, i;
a = 0;
#pragma omp parallel for reduction(+:a)
for (i = 0; i < N; i++) {
a += i;
}
{
if (a != SUM)
printf ("Incorrect result = %lld, expected = ... |
_phonopy.c | /* Copyright (C) 2011 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... |
exact_cover_omp_tasks.c | /**
* Version OpenMP avec tâches
*
* Quentin Deschamps, 2021
*/
#include <ctype.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <err.h>
#include <getopt.h>
#include <sys/time.h>
#include <omp.h>
double start = 0.0;
char *in_filename = NULL; // nom du fich... |
NeighborhoodGraph.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_NG_H_
#define _SPTAG_COMMON_NG_H_
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "Dataset.h"
#include "FineGrainedLock.h"
#include "QueryResultSet.h"
#include <chrono>
#if defined(GP... |
GB_binop__le_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-... |
ellipticBuildJacobi.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitatio... |
GB_binop__ldexp_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-... |
dynamic_smagorinsky_utilities.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
// System inc... |
DenseMatrix.h | // Copyright (c) 2004-2022 Tomáš Oberhuber et al.
//
// This file is part of TNL - Template Numerical Library (https://tnl-project.org/)
//
// SPDX-License-Identifier: MIT
#pragma once
namespace TNL {
namespace Matrices {
namespace details {
template< typename Device >
class DenseDeviceDependentCode;
template<>
clas... |
kvstore_dist_server.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
SmallestElement.c | /*
Gustavo T. Mastrobuono, NUSP 10734411;
Henrique de S. Q. dos Santos, NUSP 10819029;
Jhordan P. V. Pesantes, NUSP 11733353;
Witor M. A. de Oliveira, NUSP 10692190;
Yorvin A. R. Carrion, NUSP 11733332;
*/
#include <stdio.h>
#include <omp.h>
#include <stdlib.h>
// valor maximo na matriz. Se a matr... |
wand-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% W W AAA N N DDDD ... |
sa.c | #include "common.h"
static void restore_edge(const int groups, const int kind_opt, int* restrict edge, int* restrict restored_line, const int* restrict restored_edge)
{
if(kind_opt != D_1G_OPT && kind_opt != D_2G_OPT)
ERROR("Wrong kind_opt: %d\n", kind_opt);
#pragma omp parallel for
for(int i=0;i<groups*kind_... |
cpu_bound.c | /*
* Copyright (c) 2009, 2010, 2011, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
*/
#include <stdlib.h>... |
mandel-omp-task-point.c | /*
* Sequential Mandelbrot program
*
* This program computes and displays all or part of the Mandelbrot
* set. By default, it examines all points in the complex plane
* that have both real and imaginary parts between -2 and 2.
* Command-line parameters allow zooming in on a specific part of
* this range.
... |
laplace2d.c | /*
* Copyright 2017 NVIDIA Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law ... |
SpMat.h | /******************************************************************************
* ** Copyright (c) 2016, Intel Corporation **
* ** All rights reserved. **
* ** ... |
sindex_query_old.h | #include <assert.h>
#include <math.h>
#include "helpers.h"
#include "globals.h"
#include <iostream>
#include <algorithm>
#include <chrono>
#include <immintrin.h>
#ifndef _SINDEXQUERYOLD_
#define _SINDEXQUERYOLD_
inline uint32_t query_range(
ky_t* dev_key, ky_t &key, ky_t* keys,
uint32_t query_star... |
convolution_3x3_pack8to4_int8.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 ... |
SE1P_direct_fd.c | #include "mex.h"
#include "SE_direct.h"
#include "mathint.h"
#define IDX prhs[0]
#define X prhs[1] // Source locations
#define Q prhs[2] // Source strengths
#define OPT prhs[3] // Parameters
#define PHI plhs[0] // Output
#ifndef VERBOSE
#define VERBOSE 0
#endif
/* common option-unpacking */
void unpack_opt(ewa... |
convolution_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 copy ... |
pmmomp.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include <string.h>
void printMatriz (int n, int **m) {
int i, j;
for (i=0; i<n; i++) {
for (j=0; j<n; j++)
printf("%d ", m[i][j]);
printf("\n");
}
}
int main(int argc, char const *argv[]) {
i... |
DRB015-outofbounds-var-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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.