source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
broadcast_reduce-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 ... |
cholesky.c | /*****************************************************
* Site: https://rosettacode.org/wiki/Cholesky_decomposition
*****************************************************/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <omp.h>
#include <sys/time.h>
void cholesky(double** A, int ... |
open-mp.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include <sched.h>
#include <sys/time.h>
#define MAXWORK 5
int work[MAXWORK]; // work to be done
int nitems = 0; // number of items in the queue
int nextput = 0; // producer will place number # at work[nextput]
int nextget = -1; // consumer... |
bridge.h | // This file is a bridge connecting the "lib interface" gbbs exports and the
// interfact that the current pbbslib exports. We would like to support both
// C++11 users, and the current (C++17) implementation of the lib. Using this
// bridge will hopefully simplify having two separate implementations of the lib
// inte... |
target-4.c | #include <omp.h>
#include <stdlib.h>
int
main ()
{
omp_set_dynamic (0);
#pragma omp parallel num_threads (4)
#pragma omp target if (0)
#pragma omp single
if (omp_get_num_threads () != 1)
abort ();
return 0;
}
|
simd.c | /*
* OpenMP implementation of dot product calculation.
* This program is used as the driving example in demos in the module Heterogeneous Programming with OpenMP
*
* @author Apan Qasem
*/
#include<stdio.h>
#include<stdlib.h>
#include<sys/time.h>
#include <omp.h>
#define REPS 10000
double t0;
double mysec... |
9953.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... |
update_ops_named_Z.c |
#include "constant.h"
#include "update_ops.h"
#include "utility.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#ifdef _USE_SIMD
#ifdef _MSC_VER
#include <intrin.h>
#else
#include <x86intrin.h>
#endif
#endif
//void Z_gate_old_single(UINT target_qubit_index, CTYPE *state, ITYPE dim);
//void Z_gate_old_parallel(UINT target_... |
_implicit.c | /* Generated by Cython 0.24.1 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [],
"extra_compile_args": [
"-Wno-unused-function",
"-O3",
"-fopenmp",
"-ffast-math",
"-march=native"
],
"extra_link_args": [
... |
rand.c | /* Copyright 2013. The Regents of the University of California.
* Copyright 2021. Uecker Lab. University Center Göttingen.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors: Martin Uecker, Dara Bahri, Moritz Blumenthal
*/
#defi... |
munit.c | /* Copyright (c) 2013-2018 Evan Nemerson <evan@nemerson.com>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy... |
pr96867.c | /* PR c++/96867 */
int *v;
void
foo (int x)
{
#pragma omp target update to (x, v[:]) /* { dg-error "for pointer type length expression must be specified" } */
}
|
move_particle_utility.h | // KRATOS ___ ___ _ ___ __ ___ ___ ___ ___
// / __/ _ \| \| \ \ / /__| \_ _| __| __|
// | (_| (_) | .` |\ V /___| |) | || _|| _|
// \___\___/|_|\_| \_/ |___/___|_| |_| APPLICATION
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Pablo Beck... |
PAddOP.h | #ifndef PAddOP
#define PAddOP
/*
* PAddOP.h:
* (pointwise) add
*
* Created on: June 13, 2017
* Author: mszhang
*/
#include "Eigen/Dense"
#include "MyLib.h"
#include "Node.h"
#include "Graph.h"
class PAddNode : public Node {
public:
vector<PNode> ins;
~PAddNode() {
ins.clear();
}
publ... |
lighting.c | #include "image.h"
#include <stdlib.h>
#include <assert.h>
#include <memory.h>
#include <kazmath/vec3.h>
static float _occlusion_scale = 1.0f;
void heman_lighting_set_occlusion_scale(float s)
{
_occlusion_scale = s;
}
heman_image* heman_lighting_compute_normals(heman_image* heightmap)
{
assert(heightmap->nba... |
SystemMatrix.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... |
sbessel.h | // Copyright (c) 2013-2017 Anton Kozhevnikov, Thomas Schulthess
// 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 copyright notic... |
truedep1-var-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... |
yuv_to_rgb2.c | /*
* YUV to RGB convert
*
* Copyright (C) 2019 Hiroshi Kuwagata <kgt9221@gamil.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#define ROTATE0 0x00000000
#define ROTATE90 0x00000001
#define ROTATE180 0x00000002
#define ROTATE270 0x00000003
#define FLIP ... |
impact_acc.c | /* impact_acc.c
A Basilisk script to model the impact of a droplet of water impacting onto a
moving plate. The domain is set to be in an accelerating frame with the
plate, so an additional body force is added.
*/
#include "parameters.h" // Includes all defined parameters
#include "axi.h" // Axisymmetric c... |
time_dgetrf-task.c | /**
*
* @generated d Tue Jan 7 11:45:24 2014
*
**/
#define _TYPE double
#define _PREC double
#define _LAMCH LAPACKE_dlamch_work
#define _NAME "PLASMA_dgetrf_Tile"
/* See Lawn 41 page 120 */
#define _FMULS FMULS_GETRF(M, N)
#define _FADDS FADDS_GETRF(M, N)
#include "./timing.inc"
static double
RunTest(real_Do... |
GB_binop__lor_int64.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.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... |
rt_dttmqr.c | #include "runtime.h"
void RT_CORE_dttmqr(Quark *quark, Quark_Task_Flags *task_flags,
PLASMA_enum side, PLASMA_enum trans,
int m1, int n1, int m2, int n2, int k, int ib, int nb,
double *A1, int lda1,
double *A2, int lda2,
... |
zkboo_prove.c | /*
Name: zkboo_prove.c
Author: Tan Teik Guan
Description: Prove function for ZKBoo for baseline comparison. Modified from MPC_SHA256.c
*/
/*
============================================================================
Name : MPC_SHA256.c
Author : Sobuno
Version : 0.1
Description : MPC SHA256... |
dnn.c | //------------------------------------------------------------------------------
// LAGraph/Test/DNN/dnn: run all neural networks from http://graphchallenge.org
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2019 LAGr... |
GB_unop__isfinite_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... |
GB_unop__identity_fc32_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... |
Example_lock_owner.1.c | /*
* @@name: lock_owner.1c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
*/
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main()
{
int x;
omp_lock_t lck;
omp_init_lock (&lck);
omp_set_lock (&lck);
x = 0;
#pragma omp parallel shared (x)
{
#pragma omp master
... |
fourier.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_subassign_04.c | //------------------------------------------------------------------------------
// GB_subassign_04: C(I,J) += A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apache-... |
3d7pt.c | /*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b) ... |
max_active_levels_serialized.c | // RUN: %libomp-compile-and-run | FileCheck %s
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck --check-prefix=THREADS %s
// REQUIRES: ompt
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
#include "callback.h"
#include <omp.h>
int main()
{
omp_set_nested(1);
omp_set_max_active_levels(1);
#pragma omp paral... |
host_as_target.c | // Check that specifying device as omp_get_initial_device():
// - Doesn't cause the runtime to fail.
// - Offloads code to the host.
// - Doesn't transfer data. In this case, just check that neither host data nor
// default device data are affected by the specified transfers.
// - Works whether it's specified direct... |
TSDFVoxelGridImpl.h | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
pr67502.c | /* PR c/67502 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
/* { dg-additional-options "-std=c99" { target c } } */
void bar (int, int);
void
foo (void)
{
#pragma omp parallel
#pragma omp for simd collapse(2)
for (int i = 0; i < 16; ++i)
for (int j = 0; j < 16; ++j)
bar (i, j);
}
|
convolution_3x3_pack4_bf16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a ... |
GB_binop__second_fc64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
residualbased_predictorcorrector_velocity_bossak_scheme_turbulent.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
#if !defined(KRATOS_RESIDUALBAS... |
rotlet_direct_rsrc.c | #include "math.h"
#include "rotlet_direct.h"
#ifdef _OPENMP
#include "omp.h"
#endif
void rotlet_direct_rsrc(double* restrict u,
const double* restrict xt,
const int Nt,
const double* restrict x,
const double* restrict f,
const int N,
const ewald_opts opt)
{
double r[3];
double xm[3];
... |
GB_binop__eq_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-... |
pcpdlpverifydsaca.c | /*******************************************************************************
* Copyright 2005-2018 Intel Corporation
* All Rights Reserved.
*
* If this software was obtained under the Intel Simplified Software License,
* the following terms apply:
*
* The source code, information and material ("Material") co... |
kernel.h | // Copyright (c) 2021 Jisang Yoon
// All rights reserved.
//
// This source code is licensed under the Apache 2.0 license found in the
// LICENSE file in the root directory of this source tree.
//
#define EPS 1e-6f
#pragma omp declare target
inline float ReduceSum(const float* vec, const int length) {
float s = 0.f... |
aomp_mappings.c | #include <stdio.h>
#include <omp.h>
#include <string.h>
//Shared Variables
int THREAD_LIMIT = 4;
int MAX_TEAMS = 128;
int GENERIC = 0;
int SPMD = 1;
int MAX_THREADS_PER_TEAM = 256;
int WARP_SIZE = 64;
/*
* Function: recordError
* Description: Updates error number and prints error messages
*/
void recordError(int* ... |
GB_AxB_saxpy3_slice_balanced.c | //------------------------------------------------------------------------------
// GB_AxB_saxpy3_slice_balanced: construct balanced tasks for GB_AxB_saxpy3
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
/... |
fx.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
SplineR2RAdoptor.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: Jeremy Mc... |
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... |
omp_alloc.c | // RUN: %libomp-compile-and-run
// REQUIRES: openmp-5.0
#include <stdio.h>
#include <stdint.h>
#include <omp.h>
#include "omp_testsuite.h"
#define ARRAY_SIZE 10000
int test_omp_alloc() {
int err;
int i, j;
int *shared_array;
const omp_allocator_t *allocator;
const omp_allocator_t *test_allocator;
// Cur... |
tree_shap.h | /**
* Fast recursive computation of SHAP values in trees.
* See https://arxiv.org/abs/1802.03888 for details.
* Scott Lundberg, 2018 (independent algorithm courtesy of Hugh Chen 2018)
*
* Fast TreeSHAP algorithm v1 and Fast TreeSHAP algorithm v2.
* See https://arxiv.org/abs/2109.09847 for details.
* Jilei Yang, ... |
task_types_serialized.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
#include "callback.h"
#include <omp.h>
__attribute__ ((noinline)) // workaround for bug in icc
void print_task_type(int id)
{
#pragma omp critical
{
int task_type;
char buffer[2048];
ompt_get_task_info(0, &task_type, NULL, NULL, NULL, NU... |
channel.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
convolution_sgemm_pack1to4_bf16s.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 ... |
omp_flush.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
#include "omp_my_sleep.h"
int test_omp_flush()
{
int result1;
int result2;
int dummy;
result1 = 0;
result2 = 0;
#pragma omp parallel
{
int rank;
rank = omp_get_thread_num ();
#pragma omp barrier
if (rank == 1)... |
arraybench.c | /****************************************************************************
* *
* OpenMP MicroBenchmark Suite - Version 3.1 *
* *
* ... |
mask_rasterize.c | /*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* 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 License, or (at your option) any later version.
*
* This program is d... |
nr_numint.c | /* Copyright 2014-2020 The PySCF Developers. 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 ... |
fill_r_4c.c | /* Copyright 2014-2018 The PySCF Developers. 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 requi... |
cvAdvDiff_bnd_omp.c | /* -----------------------------------------------------------------
* Programmer(s): Daniel Reynolds and Ting Yan @ SMU
* Based on cvAdvDiff_bnd.c and parallelized with OpenMP
* -----------------------------------------------------------------
* Example problem:
*
* The following is a simple example problem ... |
yoloDection.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2018 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 ... |
HashmapCPU.h | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
SP1.c |
/////////////////////////// 8INF854 - ARCHITECTURES PARRALLELES - DEVOIR #2 ///////////////////////////////////
///////////////////////////// SP1.c - Corentin RAOULT - Adrien Cambillau /////////////////////////////////////
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
////////////////////// déclarati... |
GB_binop__ge_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... |
bug_nested_proxy_task.c | // RUN: %libomp-compile -lpthread && %libomp-run
// 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 explicit task
being executed b... |
GB_unop__identity_uint32_int32.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... |
dynmat.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... |
3d7pt.c | /*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b) ... |
omp-expand.c | /* Expansion pass for OMP directives. Outlines regions of certain OMP
directives to separate functions, converts others into explicit calls to the
runtime library (libgomp) and so forth
Copyright (C) 2005-2020 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute ... |
test.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int main(int argv, char* argc)
{
int inode = 1, nnode = 1;
#ifdef _OPENMP
nnode = omp_get_num_procs();
omp_set_num_threads(nnode);
#endif
printf ("Found %d CPUs. Using all of them!\n", nnode);
#pragma omp parallel private(inode)
{
#ifdef _OPENMP
i... |
vc5.c | #define A(a, x, y, z) (a[(z) * ny * nx + (y) * nx + x])
static void inner(const float *restrict const f,
float *restrict const fp,
const int nx,
const int ny,
const int nz,
const int nxi,
const float *restrict const model_padded2_dt2,
const float dt,
const float *restrict const sources... |
averaging.c | /*
This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license.
Github repository: https://github.com/OpenNWP/GAME
*/
/*
This file contains functions that perform averagings.
*/
#include <stdio.h>
#include <geos95.h>
#include "../game_types.h"
in... |
place_report_mpi_omp.c | #define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sched.h>
#include <mpi.h>
#include <omp.h>
/* Heavily modified from xthi.c code */
/* xthi.c code is used in examples for hybrid MPI/OpenMP affinity from a few HPC sites */
/* xthi.c originally borrowed some of this code from uti... |
omp_single_nowait.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
int my_iterations;
#pragma omp threadprivate(my_iterations)
int test_omp_single_nowait()
{
int nr_iterations;
int total_iterations = 0;
int i;
nr_iterations = 0;
my_iterations = 0;
#pragma omp parallel private(i)
{
for (... |
a.32.1.c | /* { dg-do compile } */
/* { dg-require-effective-target tls } */
#include <stdlib.h>
float *work;
int size;
float tol;
void build (void);
#pragma omp threadprivate(work,size,tol)
void
a32 (float t, int n)
{
tol = t;
size = n;
#pragma omp parallel copyin(tol,size)
{
build ();
}
}
void
build ()
{
int i;
... |
omp3.c | #include<stdio.h>
int main() {
int i;
omp_set_num_threads();
#pragma omp parallel for
for (i = 0; i <= 15; i++) {
if (omp_get_thread_num() == 0) {
printf("%d\n", omp_get_num_procs());
printf("%d\n", omp_get_num_threads());
}
}
return 0;
}
|
feature.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__plus_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
ast-dump-openmp-section.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test() {
#pragma omp sections
{
#pragma omp section
;
}
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- 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
//
//===---------------------------... |
parallel_fann.c | /*
* parallel_FANN.c
* Author: Alessandro Pietro Bardelli
*/
#ifndef DISABLE_PARALLEL_FANN
#include <omp.h>
#include "parallel_fann.h"
#include "config.h"
#include "fann.h"
FANN_EXTERNAL float FANN_API fann_train_epoch_batch_parallel(struct fann *ann, struct fann_train_data *data, const unsigned int threadnumb)... |
parallel.c | /*
Quicksort parallel
*/
#include <omp.h>
#include "parallel.h"
void quickSort_parallel(int* array, int lenArray, int numThreads){
int cutoff = 1000;
#pragma omp parallel num_threads(numThreads)
{
#pragma omp single nowait
{
quickSort_parallel_internal(array, 0, lenArray - 1, cutoff);
}
}
}
void quic... |
GB_binop__min_uint64.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_unop__identity_uint16_uint16.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... |
equality.h | /*
Authors: Mayank Rathee
Copyright:
Copyright (c) 2020 Microsoft Research
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,... |
nanort.h | //
// NanoRT, single header only modern ray tracing kernel.
//
/*
The MIT License (MIT)
Copyright (c) 2015 - 2016 Light Transport Entertainment, Inc.
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 Softw... |
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... |
libimagequant.c | /*
** © 2009-2018 by Kornel Lesiński.
** © 1989, 1991 by Jef Poskanzer.
** © 1997, 2000, 2002 by Greg Roelofs; based on an idea by Stefan Schneider.
**
** See COPYRIGHT file for license.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint... |
ch-placement-benchmark.c | /*
* Copyright (C) 2013 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <limits.h>
#include <sys... |
blackscholes.c | #include "bullmoose.c"
// Copyright (c) 2007 Intel Corp.
// Black-Scholes
// Analytical method for calculating European Options
//
//
// Reference Source: Options, Futures, and Other Derivatives, 3rd Edition,
// Prentice
// Hall, John C. Hull,
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.... |
GB_binop__first_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... |
serialized.c | // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
#define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN
#include "callback.h"
#include <omp.h>
#include <math.h>
int main()
{
omp_set_nested(0);
print_frame(0);
#pragma omp parallel num_threads(2... |
GB_binop__div_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-... |
ospf_fmt_plug.c | /*
* This software is Copyright (c) 2017, Dhiru Kholia <dhiru [at] openwall.com>,
* and it is hereby released to the general public under the following terms:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* Special thanks goes to the Loki project for prov... |
main.c | ///
/// @copyright Copyright (c) 2016-, Issam SAID <said.issam@gmail.com>
/// 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 abov... |
wand-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% W W AAA N N DDDD ... |
GB_binop__le_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-... |
GB_unop__identity_int32_int8.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
GB_unaryop__ainv_bool_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
DirectSum.h | /**
* @file DirectSum.h
*
* @date 17 Jan 2018
* @author tchipevn
*/
#pragma once
#include "autopas/containers/CellBorderAndFlagManager.h"
#include "autopas/containers/CompatibleTraversals.h"
#include "autopas/containers/ParticleContainer.h"
#include "autopas/containers/cellPairTraversals/CellPairTraversal.h"
#in... |
SpatialClassNLLCriterion.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialClassNLLCriterion.c"
#else
#define INITIAL_CHECK \
THArgCheck(THIndexTensor_(nDimension)(target) == 3, 3, \
"only batches of spatial targets supported (3D tensors)" ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.