source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
static_linking.c | // RUN: %libomptarget-compile-generic -DLIBRARY -c -o %t.o
// RUN: llvm-ar rcs %t.a %t.o
// RUN: %libomptarget-compile-generic %t.a && %libomptarget-run-generic 2>&1 | %fcheck-generic
// REQUIRES: nvptx64-nvidia-cuda-newDriver
// REQUIRES: amdgcn-amd-amdhsa-newDriver
#ifdef LIBRARY
int x = 42;
#pragma omp declare tar... |
scan-3.c | int a, b;
void
f1 (int *c, int *d)
{
int i;
#pragma omp for reduction (inscan, +: a)
for (i = 0; i < 64; i++)
{
d[i] = a;
#pragma omp scan inclusive (a)
a += c[i];
}
}
|
ordered_processing.h | #ifndef ORDERED_PROCESSING_H_
#define ORDERED_PROCESSING_H_
#include "graph.h"
#include "eager_priority_queue.h"
using namespace std;
const size_t kMaxBin = std::numeric_limits<size_t>::max()/2;
template <typename PriorityT_>
struct updatePriorityMin
{
void operator()(EagerPriorityQueue<PriorityT_>* pq,
... |
omp_fill_taskqueue.c | // RUN: %libomp-compile && env KMP_ENABLE_TASK_THROTTLING=0 %libomp-run
// RUN: %libomp-compile && env KMP_ENABLE_TASK_THROTTLING=1 %libomp-run
#include<omp.h>
#include<stdlib.h>
#include<string.h>
/**
* Test the task throttling behavior of the runtime.
* Unless OMP_NUM_THREADS is 1, the master thread pushes tasks ... |
GB_binop__first_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-... |
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... |
tasks.c | #include <stdio.h>
#include <omp.h>
#define N (2)
int A=0;
int main(void) {
int fail = 0;
int num_teams = 2;
fprintf(stderr, "Using num_teams %d\n", num_teams);
#pragma omp target teams distribute num_teams(num_teams) map(tofrom:A)
for (int k=0;k < num_teams; k++) {
#pragma omp parallel
for (int i=... |
image_pyramid.h | /*
*
* This file is part of the open-source SeetaFace engine, which includes three modules:
* SeetaFace Detection, SeetaFace Alignment, and SeetaFace Identification.
*
* This file is part of the SeetaFace Detection module, containing codes implementing the
* face detection method described in the following paper:... |
sieve.c | #include "sieve.h"
#include <omp.h>
#include <stdlib.h>
#include "magic.h"
#include "segment.h"
#include "utils.h"
#define MAX_UPPER 18446744073709551600U /* (2^64 - 1) / 30 * 30 */
typedef struct kit
{
u8 *magic;
u32 magic_size;
u32 *primes;
u32 primes_size;
} kit;
static const u32 pi[30] =
{
... |
simd_loop_collapse.c | /* Example of the reduction and collapse clauses on the simd construct
The two perfectly nested loops are collapsed into a single iteration
space. The reduction clause is required to parallelize the
accumulation into t1.
*/
void simd_loop_collapse(double *r, double *b, double *c,
... |
TomoP2DSinoNum_core.c | /*
* Copyright 2017 Daniil Kazantsev
*
* 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 in wr... |
DataVectorAlt.h |
/*****************************************************************************
*
* Copyright (c) 2003-2020 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development unt... |
loop_fusion_par.c |
void compute(double **a, double **b, double **c, double **d, int N, int num_threads) {
/*TODO:
Apply loop optimisations to the code below. Think about when certain optimisations are applicable and why.
For example, when should you apply loop fusion? Should you do this for large problem sizes or small or bot... |
ellipticBuildIpdg.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... |
omp51_alloc_env.c | // RUN: %libomp-compile
// RUN: env OMP_ALLOCATOR=omp_high_bw_mem_alloc %libomp-run
// RUN: env OMP_ALLOCATOR=omp_default_mem_space %libomp-run
// RUN: env OMP_ALLOCATOR=omp_large_cap_mem_space:alignment=16,pinned=true \
// RUN: %libomp-run
// RUN: env \
// RUN: OMP_ALLOCATOR=omp_high_bw_mem_space:pool_size=104... |
lock-1.c | #include <omp.h>
#include <stdlib.h>
int
main (void)
{
int l = 0;
omp_nest_lock_t lock;
omp_init_nest_lock (&lock);
if (omp_test_nest_lock (&lock) != 1)
abort ();
if (omp_test_nest_lock (&lock) != 2)
abort ();
#pragma omp parallel if (0) reduction (+:l)
{
/* In OpenMP 2.5 this was supposed to r... |
GB_binop__ne_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-... |
mmult_omp.c | #include "mat.h"
/**
* An parallelized algorithm for matrix multiplication using OMP.
*
* @param c : the matrix in which to place the result of the matrix multiplication.
* @param a : the first matrix.
* @param aRows : the number of rows in a.
* @param aCols : the number of columns in a.
* @param b : the secon... |
mmp.c | #include "XSbench_header.h"
#ifdef MPI
#include<mpi.h>
#endif
int main( int argc, char* argv[] )
{
// =====================================================================
// Initialization & Command Line Read-In
// =====================================================================
int version = 19;
int mype ... |
GB_unop__isnan_bool_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... |
internal_variables_interpolation_process.h | // KRATOS __ __ _____ ____ _ _ ___ _ _ ____
// | \/ | ____/ ___|| | | |_ _| \ | |/ ___|
// | |\/| | _| \___ \| |_| || || \| | | _
// | | | | |___ ___) | _ || || |\ | |_| |
// |_| |_|_____|____/|_| |_|___|_| \_|\____| APPLICATION
//
// License: BSD License
// ... |
Main.c | #include "XSbench_header.h"
#ifdef MPI
#include<mpi.h>
#endif
int main( int argc, char* argv[] )
{
// =====================================================================
// Initialization & Command Line Read-In
// =====================================================================
int version = 13;
int mype ... |
irbuilder_unroll_partial_heuristic_runtime_for.c | // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs
// RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
// expected-no-diagnostics
// RE... |
par_relax.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)
**************************************... |
pvector.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef PVECTOR_H_
#define PVECTOR_H_
#include "partition.h"
#include <algorithm>
/*
GAP Benchmark Suite
Class: pvector
Author: Scott Beamer
Vector class with ability to... |
GB_binop__rminus_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
eigrp_fmt_plug.c | /*
* Cracker for EIGRP (Cisco's proprietary routing protocol) MD5 + HMAC-SHA-256 authentication.
* http://tools.ietf.org/html/draft-savage-eigrp-00
*
* This is dedicated to Darya. You inspire me.
*
* This software is Copyright (c) 2014, Dhiru Kholia <dhiru [at] openwall.com>,
* and it is hereby released to the g... |
AuxiliaryUtilities.h | #pragma once
// Author: Miguel Angel Celigueta maceli@cimne.upc.edu
#include <pybind11/pybind11.h>
#include "includes/define.h"
#include "includes/model_part.h"
#include "pre_utilities.h"
namespace Kratos {
class AuxiliaryUtilities {
public:
typedef ModelPart::ElementsContainerType ... |
pi.c | /*
* pi.c calculates the value of Pi through numerical integration of
* the function f(x)=4/(1+x*x) over [0,1]. The interval [0,1] is divided
* into n subintervals each of size h=1/n.
*
*/
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <omp.h>
double CalcPi(int n);
int main(int argc, char... |
embedded_nodes_initialization_process.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Ruben Zorrilla
//
//
#ifndef KRATOS_EMBEDDED_NOD... |
softmax_hcl_arm.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
SegmentationUtil.h | /**
* spaint: SegmentationUtil.h
* Copyright (c) Torr Vision Group, University of Oxford, 2016. All rights reserved.
*/
#ifndef H_SPAINT_SEGMENTATIONUTIL
#define H_SPAINT_SEGMENTATIONUTIL
#include <boost/mpl/identity.hpp>
#include <itmx/base/ITMImagePtrTypes.h>
namespace spaint {
/**
* \brief This class provid... |
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) >... |
hypre_hopscotch_hash.c | #include "hypre_hopscotch_hash.h"
static HYPRE_Int NearestPowerOfTwo( HYPRE_Int value )
{
HYPRE_Int rc = 1;
while (rc < value) {
rc <<= 1;
}
return rc;
}
static void InitBucket(hypre_HopscotchBucket *b)
{
b->hopInfo = 0;
b->hash = HYPRE_HOPSCOTCH_HASH_EMPTY;
}
static void InitBigBucket(hypre_BigHopsc... |
stream.c | /*-----------------------------------------------------------------------*/
/* Program: STREAM */
/* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */
/* Original code developed by John D. McCalpin */
/* Programm... |
GB_binop__lxor_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-... |
transport.c | /*
* transport.c
* fixedgrid_serial
*
* Created by John Linford on 6/23/08.
* Copyright 2008 Transatlantic Giraffe. All rights reserved.
*
*/
#include "transport.h"
#include "discretize.h"
/**
* Discretize rows
*/
void discretize_all_x(fixedgrid_t* G, real_t dt)
{
#if DO_X_DISCRET == 1
int32_t x... |
mm.c | #include <stdio.h>
#include <stdlib.h>
/*
TEMPO SEQUENCIAL PERF:
56,306335417 seconds time elapsed
TEMPO PARALELO PERF:
12,394167292 seconds time elapsed
SPEED UP = 4,5
*/
void mm(double* a, double* b, double* c, int width)
{
#pragma omp parallel for
for (int i = 0; i < width; i++) {
for (int j = 0; j < wid... |
GB_unaryop__abs_bool_uint16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
GB_unaryop__abs_int32_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... |
graph.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef GRAPH_H_
#define GRAPH_H_
#include <algorithm>
#include <cinttypes>
#include <cstddef>
#include <iostream>
#include <type_traits>
#include "immintrin.h"
#include "pvector.h"
#include "util.h"
... |
GB_unop__exp_fc32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
fx.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
mg.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 2.3 OpenMP C versions - MG
This benchmark is an OpenMP C version of the NPB MG code.
The OpenMP C versions are developed by RWCP and derived from the serial
Fortran versions in "NPB 2.3-serial" developed by NAS... |
brox_optic_flow.h | // This program is free software: you can use, modify and/or redistribute it
// under the terms of the simplified BSD License. You should have received a
// copy of this license along this program. If not, see
// <http://www.opensource.org/licenses/bsd-license.html>.
//
// Copyright (C) 2012, Javier Sánchez Pérez <jsan... |
truecrypt_fmt_plug.c | /* TrueCrypt volume support to John The Ripper
*
* Written by Alain Espinosa <alainesp at gmail.com> 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 the
* public domain is deemed null and void, then ... |
mkl_functions-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 ... |
LG_brutal_malloc.c | //------------------------------------------------------------------------------
// LG_brutal_malloc: brutal memory debugging
//------------------------------------------------------------------------------
// LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
// SPDX-License-Identifier: BSD-2-Clause
... |
NetCDFMesh.h | /**
* @file
* This file is part of PUMGen
*
* For conditions of distribution and use, please see the copyright
* notice in the file 'COPYING' at the root directory of this package
* and the copyright notice at https://github.com/SeisSol/PUMGen
*
* @copyright 2017 Technical University of Munich
* @author Se... |
rose_regression01.c | /*
* Contributed by Jeff Keasler
*
* Liao 2/10/2010
* */
#include "omp.h"
typedef double real8;
void foo(real8 *a,real8 *b,real8 *c,real8 *d,int len)
{
int icol;
int jrow;
int l;
for (l = 0; l <= len - 1; l += 1) {
int l8 = l * 8;
real8 e = d[l * 3 + 0];
real8 f = d[l * 3 + 1];
real8 g = d... |
enhance.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
Searching.202002101535.reorganization.h | //
// Created by Zhen Peng on 11/11/19.
//
#ifndef BATCH_SEARCHING_SEARCHING_H
#define BATCH_SEARCHING_SEARCHING_H
#include <vector>
#include <boost/dynamic_bitset.hpp>
#include <iostream>
#include <fstream>
#include <unordered_map>
#include <immintrin.h>
#include <cstring>
#include <unordered_set>
#include <set>
//#... |
GB_binop__ne_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... |
StmtOpenMP.h | //===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
timing.h |
enum {
TIME_POTRF = 0,
TIME_TRSM = 1,
TIME_GEMM = 2,
TIME_SYRK = 3,
TIME_COMM = 4,
TIME_CREATE = 5,
TIME_TOTAL = 6,
TIME_CNT
};
typedef struct perthread_timing {
double ts[TIME_CNT];
} perthread_timing_t;
#ifdef USE_TIMING
#define INIT_TIMING(nthreads) \
perthread_timing_t... |
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_lock_t lock;
printf("%" PRIu64 ": &lock: %" PRIu64 "\n", ompt_get_thr... |
1.race11.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define N 20
int main() {
int A[N][N];
#pragma omp parallel
{
#pragma omp for
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
A[i][j] = A[i][j - 1];
#pragma omp for
for (int i = 1; i < N; i++)
for (int j = 1; j ... |
dpotri.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/zpotri.c, normal z -> d, Fri Sep 28 17:38:09 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
iw_core.c | /*
// Copyright 2016-2017 Intel Corporation All Rights Reserved.
//
// The source code, information and material ("Material") contained herein is
// owned by Intel Corporation or its suppliers or licensors, and title
// to such Material remains with Intel Corporation or its suppliers or
// licensors. The Material con... |
t_cholmod_super_numeric.c | /* ========================================================================== */
/* === Supernodal/t_cholmod_super_numeric =================================== */
/* ========================================================================== */
/* -------------------------------------------------------------------------... |
header.h | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB SP code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
computefourier.c | #include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <sys/time.h>
#include <assert.h>
#include <complex.h>
#include <math.h>
#include <omp.h>
#include "utils.h"
#include "timer.h"
#include "computefourier.h"
#include "filters.h"
#include "fft.h"
#include "wrapper.h"
#ifdef _OPENACC
#in... |
GB_extract_vector_list.c | //------------------------------------------------------------------------------
// GB_extract_vector_list: extract vector indices for all entries in a matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.... |
openmp.c | #include <stdio.h>
#include <omp.h>
#define size 32
#define N 5
#define r 0.1
#define value 32
//size is a grid size and N is how many times to calculate
int main(){
omp_set_num_threads(value);
float u_odd [size+2][size+2];
float u_even [size+2][size+2];
#pragma ompparallel for private(j)
for(int i = 0; i < si... |
libimagequant.c | /*
** © 2009-2016 by Kornel Lesiński.
**
** This file is part of libimagequant.
**
** libimagequant 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 3 of the License, or
** (at your option) any... |
GB_unaryop__abs_uint8_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... |
ASTMatchers.h | //===- ASTMatchers.h - Structural query framework ---------------*- 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
//
//===---------------------------... |
hard.h | #pragma once
class ParticleCluster{
public:
static std::vector<FPH_t> ptcl_hard;
std::vector<PS::S32> id_list;
static void resize_hard(PS::S32 n) { ptcl_hard.resize(n); }
static void reserve_hard(PS::S32 n) { ptcl_hard.reserve(n); }
static void clear_hard() { ptcl_hard.clear(); }
FPH_t... |
colorspace.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
progress_counter.h | /*
* Copyright (C) 2015, Nils Moehrle
* TU Darmstadt - Graphics, Capture and Massively Parallel Computing
* All rights reserved.
*
* This software may be modified and distributed under the terms
* of the BSD 3-Clause license. See the LICENSE.txt file for details.
*/
#ifndef TEX_PROGRESSCOUNTER_HEADER
#define TE... |
bt.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB BT code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
GB_unop__asin_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... |
colormap.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
single.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#define TRUE 1
#define FALSE 0
#else
#define omp_get_thread_num() 0
#endif
int main()
{
#ifdef _OPENMP
(void) omp_set_dynamic(FALSE);
if (omp_get_dynamic()) {printf("Warning: dynamic adjustment of threads has been set\n");}
(voi... |
quicksort.h | // -*- C++ -*-
// Copyright (C) 2007-2020 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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 3... |
openmp_imp.c | #include "imp.h"
#ifdef CT_OPENMP
void ct_openmp_init(const ct_env_var* env) {
(void)env;
}
void ct_openmp_fini(void) {
}
void ct_openmp_for(int n, ct_ind_func f, void* context, ct_canceller* c) {
int i;
int cancelled = 0;
#pragma omp parallel for schedule(dynamic,1)
for(i=0; i<n; ++i) {
if(... |
GB_unop__signum_fc32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
ParticleBConds3DSoa.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Jeongnim ... |
detector.c | #include "darknet.h"
static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90};
void train_detector(char *datacfg, cha... |
cgaditherfs2.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <omp.h>
#include "common.h"
extern int opt_alt; // RYGb
extern int opt_balt; // bias2
extern int opt_calt; // bias1
typedef struct {
size_t i;
img_t img;
float* c,* l;
float* err;
} tddata_t;
#define CLAMP(X, MIN, M... |
GB_unaryop__ainv_int64_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
GB_binop__gt_int8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
SectionsEndLink.c | int main() {
#pragma omp sections
{
}
#pragma omp sections
{
#pragma omp section
{
int x;
}
}
#pragma omp sections
{
#pragma omp section
{
}
#pragma omp section
{
}
}
#pragma omp sections
{
#pragma omp section
{
}
}
#pragma omp sections
{
#pragma omp section
{
int x;
}
#pragma omp ... |
curvilinear_parity_and_outer_boundary_conditions.h |
// First we define the struct that will be used to store the 10 parity conditions at all gridpoints:
// We store the 10 parity conditions in a struct consisting of 10 integers, one for each condition.
// Note that these conditions can only take one of two values: +1 or -1.
typedef struct parity_conditions {
int8_t p... |
boundary.c | #include <stdio.h>
#include <string.h>
#include "datadef.h"
#include "tiles.h"
#define max(x,y) ((x)>(y)?(x):(y))
#define min(x,y) ((x)<(y)?(x):(y))
/* Given the boundary conditions defined by the flag matrix, update
* the u and v velocities. Also enforce the boundary conditions at the
* edges of the matrix.
*/
vo... |
DRB013-nowait-orig-yes.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... |
GB_binop__second_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
debug-1.c | /* PR debug/36617 */
/* { dg-do run } */
/* { dg-options "-g -O0" } */
int
f1 (void)
{
int v1i, v1j, v1k, v1l = 0;
v1i = 6;
v1j = 8;
#pragma omp parallel private (v1k) firstprivate (v1j) shared (v1i) reduction (+:v1l)
{
v1k = v1i + v1j;
{
int v1m = 1;
v1l = v1m;
}
}
return v1l;
}
... |
bicubic.h | #ifndef batoid_bicubic_h
#define batoid_bicubic_h
#include "surface.h"
#include "table.h"
namespace batoid {
#if defined(BATOID_GPU)
#pragma omp declare target
#endif
class Bicubic : public Surface {
public:
Bicubic(const Table* table);
~Bicubic();
virtual const Surf... |
omp_barrier.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
#include "omp_my_sleep.h"
int test_omp_barrier()
{
int result1;
int result2;
result1 = 0;
result2 = 0;
#pragma omp parallel
{
int rank;
rank = omp_get_thread_num ();
if (rank ==1) {
my_sleep(((double)SLEEPTIME)... |
fourier.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
mtSpGEMM.h | #ifndef _mtSpGEMM_h
#define _mtSpGEMM_h
#include "CombBLAS.h"
namespace combblas {
/*
Multithreaded prefix sum
Inputs:
in: an input array
size: the length of the input array "in"
nthreads: number of threads used to compute the prefix sum
Output:
return an array of size "size+1"
the memory of ... |
GB_unop__log10_fc32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
reduction-5.c | /* PR middle-end/36506 */
extern void abort (void);
int
main (void)
{
int sum = 0, prod = 1;
#pragma omp parallel
#pragma omp sections reduction (+:sum)
{
#pragma omp section
sum += 2;
#pragma omp section
sum += 2;
#pragma omp section
sum += 2;
}
if (sum != 6)
abort ();... |
omp_foreign_thread_team_reuse.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
#define NUM_THREADS 10
/*
After hot teams were enabled by default, the library started using levels
kept in the team structure. The levels are broken in case foreign thread
exits and puts its team into the pool which is then re-used by ... |
mttkrp.c | /*
This file is part of ParTI!.
ParTI! is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
ParTI! is distributed... |
5728.c | /* POLYBENCH/GPU-OPENMP
*
* This file is a part of the Polybench/GPU-OpenMP suite
*
* Contact:
* William Killian <killian@udel.edu>
*
* Copyright 2013, The University of Delaware
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
/* Include polybench common header. */
#include <po... |
GeneralMatrixMatrix.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file... |
DataUtils.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_DATAUTILS_H_
#define _SPTAG_COMMON_DATAUTILS_H_
#include <sys/stat.h>
#include <atomic>
#include "CommonUtils.h"
#include "../../Helper/CommonHelper.h"
namespace SPTAG
{
namespace COMMON
{
... |
task2.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#define PI 3.14159265358979323846264
/*
* This method calculate the PI in parallel then print the value of 'mypi', 'mypi -PI' and 'execution time' and return the
* 'execution time'. For calculating PI in parallel I used #pragma command as well as done the reducti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.