source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
helloMP.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main (int argc, char **argv) {
//number of parallel threads that OpenMP should use
int NumThreads = 4;
//tell OpenMP to use NumThreads threads
omp_set_num_threads(NumThreads);
#pragma omp parallel
{
int rank = omp_get_thread_num(); //thread's rank
... |
cpl_imagelist_io-test.c | /*
* This file is part of the ESO Common Pipeline Library
* Copyright (C) 2001-2017 European Southern Observatory
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the ... |
openmp_wrapper.h | #ifndef LIGHTGBM_OPENMP_WRAPPER_H_
#define LIGHTGBM_OPENMP_WRAPPER_H_
#ifdef _OPENMP
#include <omp.h>
#include <exception>
#include <stdexcept>
#include <mutex>
#include <vector>
#include <memory>
#include "log.h"
class ThreadExceptionHelper {
public:
ThreadExceptionHelper() {
ex_ptr_ = nullptr;
}
~Threa... |
spacetime_heat_hs_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... |
stacks.c | // -*-Mode: C++;-*- // technically C99
// * BeginRiceCopyright *****************************************************
//
// $HeadURL$
// $Id$
//
// --------------------------------------------------------------------------
// Part of HPCToolkit (hpctoolkit.org)
//
// Information about sources of support for research an... |
NETSPLITLM_fmt_plug.c | /*
* NETHALFLM_fmt.c
* Written by DSK (Based on NetLM/NetNTLM patch by JoMo-Kun)
* Performs brute-force cracking of the HalfLM challenge/response pairs.
*
* Modified for performance and OMP support by magnum 2011
*
* Storage Format:
* domain\username:::lm response:nt response:challenge
*
* NOTE, in loader.c,... |
CalcPiOMP.c | /*
* PiCode.c
*
* Created on: May 25, 2016
* Author: Barrett
* Uses the Monte Carlo method of pi calculation and pthreads
* to accurately and consistently approximate pi, getting more
* accurate as the number of threads increase
*/
#include <omp.h>
#include <stdio.h>
#include <st... |
libgomp.h | /* Copyright (C) 2005-2017 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU Offloading and Multi Processing Library
(libgomp).
Libgomp is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public Licen... |
DenseMatrix.h | //=================================================================================================
/*!
// \file blaze/math/smp/openmp/DenseMatrix.h
// \brief Header file for the OpenMP-based dense matrix SMP implementation
//
// Copyright (C) 2012-2019 Klaus Iglberger - All Rights Reserved
//
// This file is part ... |
KDTree.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_KDTREE_H_
#define _SPTAG_COMMON_KDTREE_H_
#include <vector>
#include <string>
#include <shared_mutex>
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "QueryResultSet.h"
#include "WorkS... |
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++... |
rar_fmt_plug.c | /* RAR 3.x cracker patch for JtR. Hacked together during
* April of 2011 by Dhiru Kholia <dhiru.kholia at gmail.com> for GSoC.
* magnum added -p mode support, using code based on libclamav
* and OMP, AES-NI and OpenCL support.
* jimf added dyna_salt support, Oct 2014.
*
* This software is Copyright (c) 2011, Dhir... |
LAGraph_cc_fastsv5.c | //------------------------------------------------------------------------------
// LAGraph_cc_fastsv4: connected components
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2020 LAGraph Contributors.
(see Contribu... |
FeatureUtils.h | #pragma once
#include <cmath>
#include <vector>
#include <utility> // std::pair
#include <tuple> // std::tuple
#include <memory> // std::unique_ptr
#include "SpidrAnalysisParameters.h"
#include <Eigen/Dense>
/*! Normalizes all values in vec wrt to normVal
* Basically normedVec[i] = vec[i] / normVal
*
* \param ... |
ZQ_CNN_MTCNN.h | #ifndef _ZQ_CNN_MTCNN_H_
#define _ZQ_CNN_MTCNN_H_
#pragma once
#include "ZQ_CNN_Net.h"
#include "ZQ_CNN_BBoxUtils.h"
#include <omp.h>
namespace ZQ
{
class ZQ_CNN_MTCNN
{
public:
using string = std::string;
ZQ_CNN_MTCNN()
{
min_size = 60;
thresh[0] = 0.6;
thresh[1] = 0.7;
thresh[2] = 0.7;
nms_th... |
declare-variant-11.c | /* { dg-do compile } */
/* { dg-additional-options "-foffload=disable -fdump-tree-gimple" } */
/* { dg-additional-options "-mavx512bw -mavx512vl" { target { i?86-*-* x86_64-*-* } } } */
void f01 (void);
void f02 (void);
#pragma omp declare variant (f01) match (device={isa(avx512f,"avx512vl")})
#pragma omp declare vari... |
common.c | #include "common.h"
/* contains routines common to direct and indirect sparse solvers */
#define MIN_SCALE (1e-3)
#define MAX_SCALE (1e3)
#define NUM_SCALE_PASSES 1 /* additional passes don't help much */
scs_int copy_a_matrix(ScsMatrix **dstp, const ScsMatrix *src) {
scs_int Anz = src->p[src->n];
ScsMatrix *A = ... |
calcBox.h | #pragma once
#include <algorithm>
#include <future>
#include <numeric>
#include <thread>
#include <tuple>
#include "box.h"
#include "simd_double2.h"
#include "simd_double4.h"
#include "allocator.h"
using namespace std; //sorry for this "using" in global namespace
namespace for_for
{
double min(... |
shared-clause.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
main(){
int i,n=7;
int a[n];
for(i=0;i<n;i++)
a[i]=i+1;
#pragma omp parallel for default (none) shared (a , n)
for(i=0; i<n; i++) a[i]+=i;
printf("Después de parallel for:\n");
for(i=0; i<n; i++)
printf("a[%d]= %d\n",i,a... |
graph.h | #pragma once
#include<vector>
#include<algorithm>
#include<queue>
#include<stdlib.h>
#include"config.h"
#include"data.h"
#include<random>
#include<unordered_set>
#include<mutex>
#ifdef OMP
#include<omp.h>
#endif
typedef unsigned int vl_type;
class VisitedList {
public:
vl_type curV;
vl_type *mass;
unsigned int nu... |
wave.h | /**
Copyright 2013-2014 SYSTAP, LLC. http://www.systap.com
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ag... |
GB_binop__eq_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_binop__bxnor_int16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
feature.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
sam_layer.c | #include "sam_layer.h"
#include "dark_cuda.h"
#include "blas.h"
#include <stdio.h>
#include <assert.h>
layer make_sam_layer(int batch, int index, int w, int h, int c, int w2, int h2, int c2)
{
fprintf(stderr,"scale Layer: %d\n", index);
layer l = { (LAYER_TYPE)0 };
l.type = SAM;
l.batch = batch;
l.... |
parallel_radix_sort.h | #ifndef PARALLEL_RADIX_SORT
#define PARALLEL_RADIX_SORT
#include <algorithm>
#include <vector>
#include "test_util.h"
constexpr const uint kSizeTestVector = 4000000;
constexpr const uint kNumBits = 16; // must be a divider of 32 for this program to work
constexpr const uint kRandMax = 1 << 31;
/* Function: computeB... |
LAGraph_BF_full1a.c | //------------------------------------------------------------------------------
// LAGraph_BF_full1a.c: Bellman-Ford single-source shortest paths, returns tree,
// while diagonal of input matrix A needs not to be explicit 0
//------------------------------------------------------------------------------
// LAGraph, (... |
brilliantrussian.c | /*******************************************************************
*
* M4RI: Linear Algebra over GF(2)
*
* Copyright (C) 2007, 2008 Gregory Bard <bard@fordham.edu>
* Copyright (C) 2008 Martin Albrecht <M.R.Albrecht@rhul.ac.uk>
*
* Distributed under the terms of the GNU General Public License (G... |
GB_binop__lxor_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-... |
GB_binop__iseq_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
GB_binop__iseq_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-... |
atomic_write_codegen.c | // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -target-cpu core2 -fopenmp -x c -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -target-cpu core2 -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -target-cpu core2 -include-pch %t ... |
known_hosts_fmt_plug.c | /* Quick-and-dirty cracker for ~/.ssh/known_hosts hashes (HashKnownHosts yes).
*
* Based on http://blog.tremily.us/posts/known_hosts/
*
* This software is Copyright (c) 2014, Dhiru Kholia <dhiru at openwall.com>,
* and it is hereby released to the general public under the following terms:
*
* Redistribution and ... |
ecdh.h | /*
Description: Finds t and s such that a*t + b*s = gcd(a, b)
Output: return gcd(a, b).
*/
#pragma omp declare target
int ext_euclidian_alg(int a, int b, int& x, int& y)
{
x = 1, y = 0;
int x1 = 0, y1 = 1, a1 = a, b1 = b;
int s, t;
while (b1) {
int q = a1 / b1;
s = x1; t = x - q * x1;
x = s; ... |
test_verify_tables.c | #include "config.h"
/* getopt needs _POSIX_C_SOURCE 2 */
#define _POSIX_C_SOURCE 2
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#if defined(_MSC_VER)
#include "wingetopt/src/getopt.h"
#els... |
pr39591-2.c | /* PR other/39591 */
/* { dg-do run } */
extern void abort (void);
int err;
void __attribute__((noinline))
foo (int *array)
{
#pragma omp task
{
int j;
for (j = 0; j < sizeof array / sizeof array[0]; j++)
if (array[j] != 0x55555555)
#pragma omp atomic
err++;
}
}
int
main (void)
{
#pragma omp para... |
GB_binop__first_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
ZMatrix.c | /*
** compute correlation matrix
**
** G.Lohmann, Feb 2011
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_statistics.h>
#include <gsl/gsl_sort.h>
#include <gs... |
ljForce.c | /// \file
/// Computes forces for the 12-6 Lennard Jones (LJ) potential.
///
/// The Lennard-Jones model is not a good representation for the
/// bonding in copper, its use has been limited to constant volume
/// simulations where the embedding energy contribution to the cohesive
/// energy is not included in the two-b... |
pclange.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/pzlange.c, normal z -> c, Fri Sep 28 17:38:12 2018
*
**/
#include "plasma_async.h"
#include "plasma_contex... |
kiss_fft.c | /*
Copyright (c) 2003-2010 Mark Borgerding
Copyright (c) 2017 Mark Straver BASc
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of... |
matrix.c | #include "matrix.h"
#include <omp.h>
struct matrix* create_matrix(int rows, int cols) {
struct matrix* m;
#pragma omp single copyprivate(m)
m = malloc(sizeof(struct matrix));
m->rows_ = rows;
m->cols_ = cols;
m->rows_align_ = (rows % 4 == 0 ? 0 : 4 - (rows % 4)); //calculate an alignment
... |
task-barrier.c | /*
* task-barrier.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
... |
target_teams_distribute_parallel_for_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}}
#pragma omp target teams distribute parallel for
// expected-error@+1 {{unexpected OpenMP directive '#... |
cloudkeychain_fmt_plug.c | /* 1Password Cloud Keychain cracker patch for JtR. Hacked together during
* April of 2013 by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* This software is Copyright (c) 2013 Dhiru Kholia <dhiru.kholia at gmail.com>,
* Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> and Copyright (c) 2012
* magnum, and it is... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
sparse_tsne_user_def_probabilities_inl.h | /*
*
* Copyright (c) 2014, Nicola Pezzotti (Delft 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:
* 1. Redistributions of source code must retain the above ... |
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... |
XT_genSinogram.c | /* ============================================================================
* Copyright (c) 2013 K. Aditya Mohan (Purdue University)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* ... |
task_nested_omp.c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See COPYRIGHT in top-level directory.
*/
#include <assert.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define NUM_TASKS 50000
#define NUM_REPS 1
int o = 0;
void sscal(float value, float *a)
{
... |
GB_unaryop__ainv_fp64_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
updater_basemaker-inl.h | /*!
* Copyright 2014 by Contributors
* \file updater_basemaker-inl.h
* \brief implement a common tree constructor
* \author Tianqi Chen
*/
#ifndef XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_
#define XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_
#include <rabit/rabit.h>
#include <xgboost/base.h>
#include <xgboost/tree_updater.... |
matmul_omp.h | #include <omp.h>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "util.h"
static inline
void OMP_MatMatMul(FLOAT *A, FLOAT *B, FLOAT *C, int coldim, int rowdim, int tmpdim) {
int i=0, j=0, k=0, tid=-1;
FLOAT tot_tstart = omp_get_wtime();
FLOAT max_elapsed... |
GB_binop__lor_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
b4soild.c | /*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/
/**********
* Copyright 2010 Regents of the University of California. All rights reserved.
* Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang
* Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soild.c
* Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknej... |
convolution_1x1_pack8to4_int8.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
matrixop.h | #ifndef MATRIXOP_H
#define MATRIXOP_H
/* * Declarations of matrix functions in Dymola
*
* Copyright (C) 1997-2001 Dynasim AB.
* All rights reserved.
*
* Author: Hans Olsson Dynasim AB, 1999
* Version: 1.4, 1999-09-24*/
/* */
#include "matrixop1.h"
#include <math.h>
#if !defined(DSE_STRUCT)
#if defined(DS_EMBED... |
pr68339.c | /* PR middle-end/68339 */
/* { dg-do compile } */
/* { dg-additional-options "--param ggc-min-heapsize=0 --param ggc-min-expand=0 -fopenmp-simd" } */
#pragma omp declare simd notinbranch
int
f1 (int x)
{
return x;
}
#pragma omp declare simd notinbranch
int
f2 (int x)
{
return x;
}
|
flip_compute.h | // Copyright (c) 2019 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... |
IOR.c | /******************************************************************************\
* *
* Copyright (c) 2003, The Regents of the University of California *
* See the file COPYRIGHT for a complete copyright notice and license. ... |
bug_nested_proxy_task.c | // RUN: %libomp-compile -lpthread && %libomp-run
// REQUIRES: openmp-4.5
// The runtime currently does not get dependency information from GCC.
// UNSUPPORTED: gcc
#include <stdio.h>
#include <omp.h>
#include <pthread.h>
#include "omp_my_sleep.h"
/*
With task dependencies one can generate proxy tasks from an explici... |
GB_binop__pow_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
resize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
O9vertRec.c | #include <mpi.h>
#include "grid.h"
extern struct {
char *name;
int loc;
int dim;
union {
GVAL *restrict * restrict p2;
GVAL *restrict * restrict * restrict p3;
} data_pointer;
} *gv_temp;
extern struct {
char *name;
int loc;
int dim;
union {
GVAL *restrict * ... |
cancellation_point.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
void foo(int iend, int ist)
{
int i;
#pragma omp parallel
{
#pragma omp single
printf ("Using %d threads.\n",omp_get_num_threads());
#pragma omp for nowait schedule(static)
for (i=iend;i>=ist;i--)
{
printf("Iteration %d is carried out by t... |
GB_unaryop__identity_int8_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
blake2sp.c | /*
BLAKE2 reference source code package - optimized C implementations
Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
your option. The terms of these licenses can be found at:
- CC0 1.0 Universal :... |
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 ... |
par_mgr.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)
**************************************... |
main.c | /***************************************************************************
*cr
*cr (C) Copyright 2010 The Board of Trustees of the
*cr University of Illinois
*cr All Rights Reserved
*cr
********************************************************************... |
pr32468.c | /* PR libgomp/32468 */
/* { dg-do run } */
#include <omp.h>
#include <stdlib.h>
int
main (void)
{
int res[2] = { -1, -1 };
omp_set_dynamic (0);
omp_set_num_threads (4);
#pragma omp parallel
{
#pragma omp sections
{
#pragma omp section
res[0] = omp_get_num_threads () != 4;
#pragma omp section
res... |
ft.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - FT
This benchmark is an OpenMP C version of the NPB FT code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by NA... |
GB_unop__identity_uint64_uint64.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... |
prior_box_op.h | /* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
GB_subassign_14.c | //------------------------------------------------------------------------------
// GB_subassign_14: C(I,J)<!M> = A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.com See ... |
utility.h | #ifndef RACE_UTILITY_H
#define RACE_UTILITY_H
#include <algorithm>
#include <iterator>
template <typename T> inline void sort(T *arr, int range_lo, int range_hi, bool rev=false)
{
if(rev == false) {
std::stable_sort(arr+range_lo,arr+range_hi);
} else {
std::stable_sort(arr+range_lo,arr+range_... |
counters_ww_par.c |
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <memory.h>
#include <malloc.h>
#include <papi.h>
#define SIZE 1000
#define COUNTERS 2
int main(int argc, char **argv) {
float matrixa[SIZE][SIZE], matrixb[SIZE][SIZE], mresult[SIZE][SIZE];
int i,j,k;
... |
DRB047-doallchar-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... |
optimizer.h | #pragma once
#include <cmath>
#include "ps/server/param.h"
namespace ps {
template <typename V>
class Param;
template <typename V>
class Param2D;
template <typename V>
class CacheTable;
enum OptType {
SGD,
Momentum,
NesterovMomentum,
AdaGrad,
Adam,
None,
};
template <typename V>
class Optim... |
DenseMatrix.h | /*
* DenseMatrix.h
*
* Created on: Nov 25, 2015
* Author: Michael Wegner (michael.wegner@student.kit.edu)
*/
#ifndef NETWORKIT_CPP_ALGEBRAIC_DENSEMATRIX_H_
#define NETWORKIT_CPP_ALGEBRAIC_DENSEMATRIX_H_
#include "../Globals.h"
#include "AlgebraicGlobals.h"
#include "Vector.h"
#include <cassert>
#include <v... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
mpi_vector.h | #pragma once
#include <cassert>
#include <thrust/host_vector.h>
#include <thrust/gather.h>
#include "exceptions.h"
#include "exblas/mpi_accumulate.h"
#include "tensor_traits.h"
#include "blas1_dispatch_shared.h"
#include "mpi_communicator.h"
#include "memory.h"
#include "config.h"
//TODO: should we catch the cases wh... |
raytracing.h | #ifndef RAYTRACING_H
#define RAYTRACING_H
#include "scene.h"
#include <omp.h>
#define MAX_MANFANDEP 2
#define MAX_TOTALDEP 10
class raytracer
{
public:
scene nowscene;
color calmanfanshe(object* rightobj,zhuang info,int &nowhash)
{
color nowcolor;
if (rightobj->mt->background)
no... |
callback.h | #ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#define _DEFAULT_SOURCE
#include <stdio.h>
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h>
#include <omp.h>
#include <omp-tools.h>
#include "ompt-signal.h"
// Used to detect architecture
#include "../../src/kmp_platform.h"
static co... |
adi-parallel-no.c | /**
* adi.c: This file is part of the PolyBench/C 3.2 test suite.
*
* Alternating Direction Implicit solver:
*
* Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu>
* Web address: http://polybench.sourceforge.net
* License: /LICENSE.OSU.txt
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#in... |
mark_for_refinement.h | /*
==============================================================================
KratosIncompressibleFluidApplication
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
pooyan@cimne.upc... |
GB_binop__lt_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-... |
flux_avx512.c |
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <omp.h>
#include <mathimf.h>
#include <immintrin.h>
#include <ktime.h>
#include <geometry.h>
#ifdef __USE_HW_COUNTER
#include <perf.h>
#include <kperf.h>
#endif
#include <phy.h>
#define MAG0 (0.5 / 3)
#define MAG1 (-MAG0)
/*
Calculates the resid... |
sections.c | #include <omp.h>
#define N 10
int main (int argc, char * argv[]){
double a[N], b[N], c[N];
int i;
for(i=0; i<N; i++)
a[i] = 0;
for(i=0; i<N; i++)
b[i] = 0;
for(i=0; i<N; i++)
c[i] = 0;
#pragma omp parallel
#pragma omp sections
{
#pragma omp section
c[0... |
simulation.h | //! \file simulation.h
//! \brief Variables/functions related to a running simulation
#ifndef OPENMC_SIMULATION_H
#define OPENMC_SIMULATION_H
#include "openmc/mesh.h"
#include "openmc/particle.h"
#include <cstdint>
#include <vector>
namespace openmc {
constexpr int STATUS_EXIT_NORMAL {0};
constexpr int STATUS_EXIT... |
foo.c | # include<stdio.h>
#include<omp.h>
int main()
{
#pragma omp parallel
{
int ID = omp_get_thread_num();
printf("hello(%d)", ID);
printf("world(%d)\n", ID);
/*
hello(1)world(1)
hello(2)world(2)
hello(3)world(3)
hello(0)world(0)
... |
GB_unop__atanh_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... |
GB_subassign_07.c | //------------------------------------------------------------------------------
// GB_subassign_07: C(I,J)<M> += scalar ; no S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http://suitesparse.com Se... |
vbcm.c | /*
** BCM - bipartite connectivity mapping
**
** G.Lohmann, MPI-KYB, Aug 2017
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "viaio/Vlib.h"
#include "viaio/VImage.h"
#include "viaio/mu.h"
#include "viaio/option.h"
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#inclu... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
symm_x_dia_u_lo_row.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *... |
denseAsyncJacobi.h | //
// Created by mbarb on 17/02/2018.
//
#ifndef PARALLELITERATIVE_DENSEASYNCJACOBI_H
#define PARALLELITERATIVE_DENSEASYNCJACOBI_H
#include <omp.h>
#include <Eigen>
#include <iostream>
#include "utils.h"
namespace Iterative {
template <typename Scalar, long long SIZE>
class denseAsyncJacobi {
public:
... |
index.h | #ifndef GBWTGRAPH_CONSTRUCTION_H
#define GBWTGRAPH_CONSTRUCTION_H
#include <cstdlib>
#include <functional>
#include <omp.h>
#include <gbwtgraph/gbwtgraph.h>
#include <gbwtgraph/minimizer.h>
/*
index.h: Minimizer index construction from GBWTGraph.
*/
namespace gbwtgraph
{
//--------------------------------------... |
profile.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
mpi-openmp.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#warning Your compiler does not support OpenMP, at least with the flags you're using.
#endif
#include <mpi.h>
#define MPI_THREAD_STRING(level) \
( level==MPI_THREAD_SERIALIZED ? "THREAD_SERIALIZED" : \
( level==MPI_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.