source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
multi_thread_main.c | /*************************************************************************/
/* */
/* Language Technologies Institute */
/* Carnegie Mellon University */
/* ... |
omp_get_num_threads.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
int test_omp_get_num_threads()
{
/* checks that omp_get_num_threads is equal to the number of
threads */
int nthreads_lib;
int nthreads = 0;
nthreads_lib = -1;
#pragma omp parallel
{
#pragma omp critical
{
n... |
gimplify.c | /* Tree lowering pass. This pass converts the GENERIC functions-as-trees
tree representation into the GIMPLE form.
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
Major work done by Sebastian Pop <s.pop@laposte.net>,
Diego Novillo <dnovillo@redhat.com> and Jason Merrill <jason@red... |
GB_binop__bxnor_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-... |
03_loop_decompose_2.c | #include <stdio.h>
#include <omp.h>
#define MAX_ITS 10000
int main()
{
int nproc, i, sum;
nproc = omp_get_max_threads();
int its_per_proc[nproc];
for (i = 0; i< nproc; ++i){
its_per_proc[i] = 0;
}
#pragma omp parallel for
for (i = 0; i< MAX_ITS; ++i){
its_per_proc[omp_get_thread_num()]++;
}
s... |
relu_hcl_arm.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 ma... |
mpiCodeGenerator.h | /*
*
*
* V 0.2 using real frontend parser and dedicated OpenMP-like AST nodes for program representation
* This is necessary to parse complex extended map clause with dist_data info.
* The previous version's MPI_PragmaAttribute is no longer used.
*
* Liao 12/11/2015
*
* V 0.1
* Parsing pragmas and ge... |
GB_unaryop__lnot_fp64_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... |
DenseVector.h | //=================================================================================================
/*!
// \file blaze/math/smp/openmp/DenseVector.h
// \brief Header file for the OpenMP-based dense vector SMP implementation
//
// Copyright (C) 2012-2020 Klaus Iglberger - All Rights Reserved
//
// This file is part ... |
openmp_common.c | // RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
#pragma omp // expected-error {{expected an OpenMP directive}}
#pragma omp unknown_directive // expected-error {{expected an OpenMP directive}}
void foo() {
#pragma omp // expected-error {{expected an OpenMP directive}}
#pragma omp unknown_directi... |
GB_binop__min_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:... |
residualbased_predictorcorrector_velocity_bossak_scheme_turbulent.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
#if !defined... |
ScatterHelper.h | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ccavl_impl.h | //Copyright (c) 2010 Philip W. Howard
//
//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, publish, d... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
displacement_op_opencl.h | // -----------------------------------------------------------------------------
//
// Copyright (C) The BioDynaMo Project.
// All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// See the LICENSE file distrib... |
GB_unop__asinh_fp64_fp64.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... |
rotLibIDLLoopsDbl.c | #include "rotLibIDLLoopsDbl.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#define OPENMPLIMIT 100000l
#endif
#include "rotationLibCDbl.h"
int ax2cuLoop (double* ax, double* cu, unsigned long long n, int p){
int trash;
unsigned long long i, iIn, iOut, axstep = 4... |
timer.h | /***************************************************************************
* include/stxxl/bits/common/timer.h
*
* Part of the STXXL. See http://stxxl.sourceforge.net
*
* Copyright (C) 2002, 2005 Roman Dementiev <dementiev@mpi-sb.mpg.de>
* Copyright (C) 2007-2009 Andreas Beckmann <beckmann@cs.uni-frankfurt.... |
GB_unop__ainv_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... |
copy-private.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());
}
#prag... |
GB_binop__le_int32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
3d25pt_var.c | /*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) >... |
paint.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% PPPP AAA IIIII N N TTTTT ... |
GB_unop__identity_uint32_uint32.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... |
openmp.c | static void benchmark_osm(char* path)
{
// [.. parse input data ..]
// Setup OpenMP
omp_set_dynamic(0);
omp_set_num_threads(NUM_THREADS);
#pragma omp parallel
{
// Calculate limits for this thread
int id = omp_get_thread_num();
int first = id * nodes_per_thread;
... |
GB_subassign_10_and_18.c | //------------------------------------------------------------------------------
// GB_subassign_10_and_18: C(I,J)<M or !M,repl> = A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License... |
GB_binop__bget_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
main.c | //==============================================================================
//==============================================================================
// DEFINE / INCLUDE
//==============================================================================
//===================================================... |
qsort_arg_mt.c | /*
* Imported from PostgreSQL sources by Teodor Sigaev <teodor@sigaev.ru>, <sigaev@corp.mail.ru>
*/
/*
* qsort_arg.c: qsort with a passthrough "void *" argument
*
* Modifications from vanilla NetBSD source:
* Add do ... while() macro fix
* Remove __inline, _DIAGASSERTs, __P
* Remove ill-considered "swap_... |
pi.c | /*
OpenMP example program that computes the value of Pi using the trapeziod rule.
Compile with gcc -fopenmp -O3 omp_pi.c -o omp_pi
*/
// Online source: http://users.abo.fi/mats/PP2012/examples/OpenMP/omp_pi.c
// // permission obtained
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#includ... |
transformntl-impl.h | //==================================================================================
// BSD 2-Clause License
//
// Copyright (c) 2014-2022, NJIT, Duality Technologies Inc. and other contributors
//
// All rights reserved.
//
// Author TPOC: contact@openfhe.org
//
// Redistribution and use in source and binary forms, wi... |
relic_core.c | /*
* RELIC is an Efficient LIbrary for Cryptography
* Copyright (C) 2007-2019 RELIC Authors
*
* This file is part of RELIC. RELIC is legal property of its developers,
* whose names are not listed here. Please refer to the COPYRIGHT file
* for contact information.
*
* RELIC is free software; you can redistribute... |
feature.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
backprop.c | /*
******************************************************************
* HISTORY
* 15-Oct-94 Jeff Shufelt (js), Carnegie Mellon University
* Prepared for 15-681, Fall 1994.
* Modified by Shuai Che
******************************************************************
*/
#include "backprop.h"
#include <ass... |
divsufsort.c | /*
* divsufsort.c for libdivsufsort-lite
* Copyright (c) 2003-2008 Yuta Mori All Rights Reserved.
*
* 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 wit... |
general_basis_rep.h | #ifndef _GENERAL_BASIS_REP_H
#define _GENERAL_BASIS_REP_H
#include <complex>
#include <limits>
#include <iostream>
#include "general_basis_core.h"
#include "numpy/ndarraytypes.h"
#include "misc.h"
#include "openmp.h"
namespace basis_general {
template<class I,class J,class P=signed char>
int general_normalization(ge... |
grav2d_cube.h | #include "includes.h"
class grav2d_cube
{
public:
grav2d_cube(){}
~grav2d_cube(){}
int routine(char*,char*,char*);
int initCubes(char*);
int initObs(char*);
void outObs();
void calG();
void calGx();
void calGy();
void calGz();
private:
int obsNum, cubeNum;
cubeArray modCube;
obspointArray obsPoint;
};
in... |
AB.h | #include "stdio.h"
#include "omp.h"
#pragma omp declare target to(omp_is_initial_device)
#pragma omp declare target
void Hello(const char *N, int V = 0);
template<int val>
struct ABTy {
int Dummy = 0;
int Val = val;
};
// static int AB2 = 2;
// static ABTy<4> AB4;
#pragma omp end declare target
void fAB1();... |
GB_binop__ge_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_binop__isge_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:... |
inter_fracture_triangle_utility.h | /*
==============================================================================
KratosStructuralApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Felix... |
routines.c | #include "matrix.h"
void scalar_multiply(struct COO matrix, double scalar) {
int i;
if (matrix.type == TYPE_INT) {
#pragma omp parallel for shared(matrix,scalar) num_threads(param.threads)
for (i = 0; i < matrix.count; i++) {
matrix.elements[i].value.f = (double) matrix.elements[i].... |
COOTile.h | /******************************************************************************
* ** Copyright (c) 2016, Intel Corporation **
* ** All rights reserved. **
* ** ... |
blur_omp.c | #include <stdio.h>
#include <stdlib.h>
#include <immintrin.h>
#include <math.h>
#include <omp.h>
#ifndef NUM_THREADS
#define NUM_THREADS 64
#endif
int read_BMP(char* filename, unsigned char *info, unsigned char **dataR, unsigned char **dataG, unsigned char **dataB, int *size, int *width, int *height, int *offset, int... |
ObservableContainer.h | /***************************************************************************
* Copyright (C) 2009 by Florian Goth *
* fgoth@wthp095 *
* *
* All rights reserved. *
* ... |
sparse_create_mex.c | /*
Copyright (c) 2012 by Marcin Krotkiewski, University of Oslo
See ../License.txt for License Agreement.
*/
#include <libutils/config.h>
#include "sparse_opts.h"
#include <libutils/mtypes.h>
#include <libutils/utils.h>
#include <libutils/sorted_list.h>
#include <libutils/memutils.h>
#include <libutils/tictoc.h... |
model_initializer.h | // -----------------------------------------------------------------------------
//
// Copyright (C) 2021 CERN & University of Surrey 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... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
test_utils.h | #pragma once
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <limits>
#include <utility>
#include <cstdint>
extern "C" {
#include "mmio.h"
}
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_... |
galaxy_openmp.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <sys/time.h>
#include "../common/galaxy_utils.h"
float *real_rasc, *real_decl, *rand_rasc, *rand_decl;
long int numberOfGalaxies = 100000;
int main(int argc, char* argv[])
{
struct timeval _ttime;
struct timezone _tzone;
... |
fft.c | /* Copyright 2013-2014. The Regents of the University of California.
* Copyright 2016-2018. Martin Uecker.
* Copyright 2018. Massachusetts Institute of Technology.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2011-2018 ... |
func.h | #pragma once
void showGplumVersion(std::string version)
{
if ( PS::Comm::getRank() == 0 ) {
version.resize(16,' ');
std::cout << " \n "
<< " __________________________________ \n"
<< " / ... |
TemporalMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/TemporalMaxPooling.c"
#else
static inline void THNN_(TemporalMaxPooling_shapeCheck)(
THNNState *state,
THTensor *input,
THTensor *gradOutput,
THIndexTensor *indic... |
ActivationsExecutioner.h | //
// @author raver119@gmail.com
//
#ifndef PROJECT_ACTIVATIONSEXECUTIONER_H
#define PROJECT_ACTIVATIONSEXECUTIONER_H
#include <layers/activations.h>
using namespace nd4j;
template <typename T> class ActivationsExecutioner {
public:
// This method should be backend-specific, and should be implemented... |
parallel.h | #pragma once
namespace pbbs {
//***************************************
// All the pbbs library uses only four functions for
// accessing parallelism.
// These can be implemented on top of any scheduler.
//***************************************
// number of threads available from OS
// template <>
int num_workers();
... |
7624.c | // this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c' as parsed by frontend compiler rose
void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[1000 + 0][1200 + 0], double ey[1000 + 0][1200 + 0], doub... |
prepress.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
update.c | /*
* =======================================================================================
*
* Author: Jan Eitzinger (je), jan.eitzinger@fau.de
* Copyright (c) 2020 RRZE, University Erlangen-Nuremberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of th... |
LayerNormOps.h | #pragma once
#include <string.h>
#include <cmath>
#include <algorithm>
#include "General.h"
#include "TensorRef.h"
#include "Vector-inl.h"
OPS_API int TS_LayerNorm(
TensorRef* out_,
TensorRef* in_,
TensorRef* gamma_,
TensorRef* beta_,
float eps,
int rows,
int cols);
OPS_API int TS_LayerNormGrad(
TensorRef *... |
c-parser.c | /* Parser for C and Objective-C.
Copyright (C) 1987-2020 Free Software Foundation, Inc.
Parser actions based on the old Bison parser; structure somewhat
influenced by and fragments based on the C++ parser.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the ter... |
GB_unop__exp2_fp64_fp64.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... |
lapack_wrapper.c | /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */
/* This file is part of phonopy. */
/* Redistribution and use in source and binary forms, with or without */
/* modification, are permitted provided that the following conditions */
/* are met: */
/* * Redistributions of source code must retain the abo... |
facedetectcnn.h | /*
By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install,
copy or use the software.
License Agreement For libfacedetection
(3-clause BSD License)
Copyright (c) 2018-2020, Shiqi Yu, all ... |
remarks_parallel_in_target_state_machine.c | // RUN: %clang_cc1 -verify=host -Rpass=openmp-opt -Rpass-analysis=openmp-opt -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
// RUN: %clang_cc1 -fno-legacy-pass-manager -verify -Rpass=openmp-opt -Rpas... |
tree.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_TREE_H_
#define LIGHTGBM_TREE_H_
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <string>
#include <map>
#includ... |
GB_unaryop__abs_bool_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
cycles.h | /*
* Copyright 2018-2021 Kyle Berney
*
* 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 agreed to ... |
pr27388-1.c | /* PR middle-end/27388 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-omplower" } */
int n, o;
void
foo (void)
{
#pragma omp parallel firstprivate (n)
{
int i;
#pragma omp parallel for firstprivate (n)
for (i = 0; i < 10; i++)
++n;
#pragma omp atomic
o += n;
}
}
/* { dg-final ... |
scheme.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
#if !def... |
multiply.h | #include "CSR.h"
#include <omp.h>
#include <algorithm>
// #include <mkl_spblas.h>
template <bool sortOutput, typename IT>
int MKLSpGEMM_symbolic(const CSR<IT,float> &A, const CSR<IT,float> &B, CSR<IT,float> &C)
{
int request = 1;
int sort = 7; // don't sort anything
int info = 0; // output info flag
... |
GB_binop__pair_uint8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
Example_nestable_lock.1.c | /*
* @@name: nestable_lock.1c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
*/
#include <omp.h>
typedef struct {
int a,b;
omp_nest_lock_t lck;
} pair;
int work1();
int work2();
int work3();
void incr_a(pair *p, int a)
{
/* Called only from incr_pair, no need to lock. */
p->a += a;... |
parallel.c | #include<assert.h>
int main(void)
{
int i =100;
int j = 77;
#pragma omp parallel firstprivate(i)
{
assert(i == 100);
assert(j == 77);
}
#pragma omp parallel private(i)
{
assert(i != 100);
}
return 0;
}
|
shared_array.h | #ifndef OPENMC_SHARED_ARRAY_H
#define OPENMC_SHARED_ARRAY_H
//! \file shared_array.h
//! \brief Shared array data structure
#include "openmc/memory.h"
namespace openmc {
//==============================================================================
// Class declarations
//=========================================... |
for-6.c | /* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
extern void bar(int);
void foo (int n)
{
int i;
#pragma omp for schedule(runtime)
for (i = 0; i < n; ++i)
bar(i);
}
/* { dg-final { scan-tree-dump-times "GOMP_loop_runtime_start" 1 "ompexp" } } */
/* { dg-final { scan-tree-dump-tim... |
tests.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <complex.h>
#include <math.h>
#include "tests.h"
#include "reader.h"
#include "utils.h"
#include "linalg.h"
#include "projector.h"
#include "sbt.h"
#include <mkl.h>
#include <mkl_types.h>
#include <assert.h>
#define PI 3.14159265359
double Ylmr(int l... |
3d7pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 7 point stencil with variable coefficients
* Adapted from PLUTO and Po... |
2018-ordered-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... |
labels.h | /*
An Experimental Study on Hub Labeling based Shortest Path Algorithms [Experiments and Analyses]
Authors: Ye Li, Leong Hou U, Man Lung Yiu, Ngai Meng Kou
Contact: yb47438@umac.mo
Affiliation: University of Macau
The MIT License (MIT)
Copyright (c) 2016 University of Macau
Permission is hereby granted, ... |
restriction.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
omp_for.c | #include<stdio.h>
#include<omp.h>
int main(){
int i, n = 10000;
double a[10000], b[10000], sum;
for(i=0;i<n;i++){
a[i] = b[i] = i*1.0;
}
sum = 0.0;
#pragma omp parallel for reduction(+:sum) num_threads (8)
for(i=0;i<n;i++){
sum = sum + (a[i]*b[i]);
}
... |
LAGraph_pagerankx4.c | //------------------------------------------------------------------------------
// LAGraph_pagerankx4: pagerank using a real semiring
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2020 LAGraph Contributors.
(se... |
graph.c | /*!
* \file
*
* \brief Various routines with dealing with sparse graphs
*
* \author George Karypis
* \version\verbatim $Id: graph.c 13328 2012-12-31 14:57:40Z karypis $ \endverbatim
*/
#include <GKlib.h>
#define OMPMINOPS 50000
/*************************************************************************... |
DRACC_OMP_054_Counter_working_atomic_inter_no.c | /*
Counter incrementation on an atomic counter. Inter Region.
*/
#include <stdio.h>
#define N 100000
int countervar = 0;
int count(){
#pragma omp target map(tofrom:countervar) device(0)
#pragma omp teams distribute
for (int i=0; i<N; i++){
#pragma omp atomic update
countervar++;
... |
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 NA... |
LETKFSolver.h | /*
* (C) Copyright 2020 UCAR.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*/
#ifndef OOPS_ASSIMILATION_LETKFSOLVER_H_
#define OOPS_ASSIMILATION_LETKFSOLVER_H_
#include <Eigen/Dense>
#include <cfloat>
#incl... |
bubbleacc.c |
// C program for implementation of Bubble sort
#include <stdio.h>
#include <time.h>
#define getClock() ((double)clock()/CLOCKS_PER_SEC)
#include <omp.h>
double begin,end;
void swap(int *xp, int *yp)
{
int temp = *xp;
*xp = *yp;
*yp = temp;
}
// A function to implement bubble sort
void bubbleSort(int ... |
nest_lock.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
#include "callback.h"
#include <omp.h>
int main()
{
//need to use an OpenMP construct so that OMPT will be initalized
#pragma omp parallel num_threads(1)
print_ids(0);
omp_nest_lock_t nest_lock;
printf("%" PRIu64 ": &nest_lock: %lli\n", ompt... |
expected_output.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
//---------------------------------------------------------------------
// program BT
//---------------------------------------------------------------------
//----------
// Class S:
//----------
//----------
// Class W:
... |
magsac.h | #pragma once
#include <limits>
#include <chrono>
#include <memory>
#include "model.h"
#include "model_score.h"
#include "sampler.h"
#include "statistics.h"
#include "uniform_sampler.h"
#include <math.h>
#include "gamma_values.h"
#ifdef _WIN32
#include <ppl.h>
#endif
template <class DatumType, class ModelEstimator... |
FriendAlignFinder.h | ///////////////////////////////////////////////////////////////////////////////
// SOFTWARE COPYRIGHT NOTICE AGREEMENT //
// This software and its documentation are copyright (2012) by the //
// Broad Institute. All rights are reserved. This software is supplied //
... |
omp3.c | // RUN: mlir-clang %s --function=* -fopenmp -S | FileCheck %s
void square(double* x) {
int i;
#pragma omp parallel for private(i)
for(i=3; i < 10; i+= 2) {
x[i] = i;
i++;
x[i] = i;
}
}
// CHECK: func @square(%arg0: memref<?xf64>)
// CHECK-NEXT: %c1 = arith.constant 1 : in... |
example-omp.c | // PWR005: Disable default OpenMP scoping
// https://www.appentra.com/knowledge/checks/pwr005
void example(int* result, unsigned size) {
// Default data scoping is used which may not be correct
#pragma omp parallel for
for (int i = 0; i < size; i++) {
result[i] = i;
}
}
|
GB_unaryop__identity_uint16_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
bt_hash_type_192.c | /*
* This software is Copyright (c) 2015 Sayantan Datta <std2048 at gmail dot com>
* and it is hereby released to the general public under the following terms:
* Redistribution and use in source and binary forms, with or without modification, are permitted.
*/
#ifdef HAVE_OPENCL
#include <stdlib.h>
#include <stdi... |
GB_unaryop__abs_uint16_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_binop__hypot_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-... |
pr38633.c | /* PR middle-end/38633 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
void
foo ()
{
#pragma omp parallel
{
struct A { int i; } j;
j.i = 6;
j.i++;
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.