source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
phantom_g5.c | // GRAPE-5 compatible APIs
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include "sse_type.h"
#include "pg5_table.h"
#include "gp5util.h"
#define NUM_PIPE 4
#define JMEMSIZE 65536
#define MAXDEV 24
static struct Ptcl_Mem{
Ipdata iptcl;
Fodata fout;
Jpdata jptcl[JMEMSIZE];
int Nbody, pad[15];
int alig... |
test.c | #include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include "spectrum_common.h"
#include "rgb2spec.h"
// we are trying to reproduce the streamlines on the chromaticity chart as in
// Fig. 7 (right):
// Nonlinearities in color coding: Compensating color
// appearance for the eye’s spectral sensitivity
// Yoko M... |
GB_unaryop__lnot_int64_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
psd.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
CycladesPartitioner.h | /*
* Copyright 2016 [See AUTHORS file for list of authors]
*
* 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 require... |
hypre_merge_sort.c | #include "_hypre_utilities.h"
#include "hypre_hopscotch_hash.h"
#include "../seq_mv/HYPRE_seq_mv.h"
//#define DBG_MERGE_SORT
#ifdef DBG_MERGE_SORT
#include <assert.h>
#include <algorithm>
#include <unordered_map>
#endif
#define SWAP(T, a, b) do { T tmp = a; a = b; b = tmp; } while (0)
static void hypre_merge(HYPRE_In... |
private-clauseModificado.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main()
{
int i, n = 7;
int a[n], suma = 18;
for (i=0; i<n; i++)
a[i] = i;
printf("-- suma_antes_de_parallel = %i\n", suma);
#pragma omp parallel private(suma)
{
suma=0;
#pragma omp for
for (i=0; i<n; i++){
... |
cpd_omp.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... |
test_lock.c | #include <stdio.h>
#include <omp.h>
omp_lock_t simple_lock;
int main() {
omp_init_lock(&simple_lock);
#pragma omp parallel num_threads(4)
{
int tid = omp_get_thread_num();
while (!omp_test_lock(&simple_lock))
printf("Thread %d - failed to acquire simple_lock\n",
... |
hypre_merge_sort.c | #include "_hypre_utilities.h"
#include "hypre_hopscotch_hash.h"
#include "../seq_mv/HYPRE_seq_mv.h"
//#define DBG_MERGE_SORT
#ifdef DBG_MERGE_SORT
#include <assert.h>
#include <algorithm>
#include <unordered_map>
#endif
#define SWAP(T, a, b) do { T tmp = a; a = b; b = tmp; } while (0)
/* union of two sorted (in ascen... |
omp3-2.c | #include<stdio.h>
#ifndef N
#define N 5000
#endif
#define M 1000000000
int a[N][N], b[N][N];
int main() {
int i, j, x, y, sum;
#pragma omp parallel sections
{
#pragma omp section
for (i = 0; i < N; i++)
for (j = 0; j < N; j++)
a[i][j] = i + j;
#pragma omp section
for (x = 0; x < N... |
ark_heat1D_ompdev.c | /*---------------------------------------------------------------
* Programmer(s): Shelby Lockhart @ LLNL
*---------------------------------------------------------------
* Based on the serial example ark_heat1D.c developed by
* Daniel R. Reynolds and parallelized with OpenMP 4.5.
*--------------------------------... |
V3_openmp.h | #include <time.h>
//Finds the triangles in the Adjacency Matrix stores them in c vector, returns the execution run-time
long v3_openmp( int * csc_row, int * csc_col,
int * c, int M)
{
//The Variables used to time the function
struct timespec ts_start;
struct timespec ts_end;
//Initial... |
cgetrf.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/zgetrf.c, normal z -> c, Fri Sep 28 17:38:06 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
variational_distance_calculation_process.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
// Ruben Zorrill... |
unset_callback.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
#include "callback.h"
#include <omp.h>
int main()
{
#pragma omp parallel num_threads(1)
{
}
ompt_set_callback(ompt_callback_parallel_begin, NULL);
#pragma omp parallel num_threads(1)
{
}
// Check if libomp supports the callbacks for th... |
pool.c | #include "lib.h"
#include <float.h>
#include <stdint.h>
#include <stdlib.h>
void neuralops_omp_caffe_avgpool2d_fwd(
size_t batch_sz,
size_t in_width,
size_t in_height,
size_t chan,
const float *in_buf,
size_t out_width,
size_t out_height,
float *out_buf,
size_t kernel_w_,
size_t... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
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
//------------------------------------------------------------------------------
/*
LAGrap... |
reduction-task-2.c | int v;
extern void foo (int);
void
bar (void)
{
int i;
#pragma omp for reduction (task, +: v) nowait /* { dg-error "'task' reduction modifier on a construct with a 'nowait' clause" } */
for (i = 0; i < 64; i++)
foo (i);
#pragma omp sections nowait reduction (task, +: v) /* { dg-error "'task' reduction modi... |
omp_ex_10.c | #include <stdio.h>
#include <omp.h>
/*
MIT License
Copyright (c) 2019 NOUREDDINE DAGHBOUDJ
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 ri... |
soft_closure_accel_ops.h | #include <stdlib.h>
struct crack_model_throughcrack_t {
double Eeff;
double Beta;
double r0_over_a;
int Symmetric_COD;
};
struct crack_model_tada_t {
double E;
double nu;
double Beta;
double r0_over_a;
};
union modeldat_t {
struct crack_model_throughcrack_t through;
struct crack_model_tada_t ... |
openmp_hello_world.c | #include <stdio.h>
#include <omp.h>
int main(int argc, char const *argv[])
{
//we will use 4 threads
omp_set_num_threads(4);
//we define the next section to be parallel with a pragma directive
#pragma omp parallel
{
//It will show a hello world message and the number of thread
prin... |
graph_generator.c | /* Copyright (C) 2009-2010 The Trustees of Indiana University. */
/* */
/* Use, modification and distribution is subject to the Boost Software */
/* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */
/* http:... |
test_verify.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... |
matrixvector1-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... |
mdc2_fmt_plug.c | /*
* Cracker for MDC-2 (MDC-2DES) hashes.
*
* 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 use in source and binary forms, with or without#
* modification, are permitted.
*/
#if FMT_... |
mandel_altivec.c | #include <altivec.h>
#include "mandel.h"
/*
* There's no one-instruction splat for float, although
* you can splat into a float from an element in another
* vector. Given that these are done outside of the innermost
* loop it might not be worth the effort.
*/
#define VF_ALL(x) ((vector float) { x, x, x, x })
voi... |
chlpca.h | /*
#
# File : chlpca.cpp
# ( C++ source file )
#
# Description : Example of use for the CImg plugin 'plugins/chlpca.h'.
# This file is a part of the CImg Library project.
# ( http://cimg.sourceforge.net )
#
# Copyright : Jerome Boulanger
# ... |
cast_ref.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... |
2DConvolution.c | /**
* 2DConvolution.c: This file was adapted from PolyBench/GPU 1.0 test suite
* to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardoso@st... |
array_args.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_UTILS_ARRAY_AGRS_H_
#define LIGHTGBM_UTILS_ARRAY_AGRS_H_
#include <LightGBM/utils/openmp_wrapper.h>
#include <algorithm>
#include ... |
GB_unop__identity_int8_uint64.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__identity_int16_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
3d7pt_var.c | /*
* Order-1, 3D 7 point stencil with variable 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) > (b) ? a : b)
#... |
GB_binop__hypot_fp32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
sir_omp.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
void write_solution(char const* filename, int Xmax, int Ymax, double **I)
{
int i, j;
FILE *fp = fopen(filename, "w+");
for (i = 0; i < Ymax; ++i)
{
for (j = 0; j < Xmax; ++j)
{
fprintf(fp, "%g ", I[i][j]);
}
fprintf(fp... |
runner_openmm.c | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team,
* check out http://www.gromacs.org for more information.
* Copyright (c) 2012,2013, by the GROMACS development team, l... |
12_soma_par1.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
void inicializa(unsigned long **v, int size) {
(*v) = (unsigned long *) malloc(sizeof(unsigned long)*size);
for (int i = 0; i < size; i++) {
(*v)[i] = 1;
}
}
int main(int argc, char **argv) {
unsigned long *vetor;
int size = 1000000;
... |
physmod.c | /*
This code simulates a resonating n-dimensional space using a simplified
physical model.
The code iterates over two arrays representing the positions and velocities of
points moving in the (n+1)th dimension in an n-dimensional grid. At each step, new
values are calculated for each point by following these steps:
1)... |
bks_fmt_plug.c | /*
* This software is Copyright (c) 2016, Dhiru Kholia <dhiru.kholia at gmail.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.
*/
#if FMT_EXTERNS_H
extern struct fmt_main fmt_bks;
... |
omp_parallel_reduction.c | <ompts:test>
<ompts:testdescription>Test which checks the omp parallel reduction directive with all its options.</ompts:testdescription>
<ompts:ompversion>3.0</ompts:ompversion>
<ompts:directive>omp parallel reduction</ompts:directive>
<ompts:testcode>
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
i... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
convolution_sgemm_pack1to4_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 ... |
image_cache.h | /*
Copyright (c) 2016, TU Dresden
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 copyright
notice, this list of conditions and the follow... |
GB_unop__identity_int8_fc64.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... |
redundant_1.tfm.c | int bar() { return 10; };
void foo(int N, double *A) {
int X, Y;
#pragma omp parallel
{
#pragma omp for default(shared) private(X, Y)
for (int I = 0; I < N; ++I) {
X = I;
if (I > N) {
Y = bar();
X = X + Y + 1;
}
A[I] = X;
}
}
}
|
GB_binop__times_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-... |
trmm_x_sky_n_hi_col.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ldy)
{
ALPHA_INT... |
requires.c | // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu && env LIBOMPTARGET_DEBUG=1 %libomptarget-run-aarch64-unknown-linux-gnu 2>&1 | %fcheck-aarch64-unknown-linux-gnu -allow-empty -check-prefix=DEBUG
// RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu && env LIBOMPTARGET_DEBUG=1 %libomptarget-run-powerpc64-ibm-linu... |
GB_dense_subassign_05d_template.c | //------------------------------------------------------------------------------
// GB_dense_subassign_05d_template: C<M> = x where C is dense
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License... |
YAKL_atomics.h |
#pragma once
#ifdef YAKL_ARCH_CUDA
__device__ __forceinline__ void atomicMin(float &update , float value) {
int oldval, newval, readback;
oldval = __float_as_int(update);
newval = __float_as_int( __int_as_float(oldval) < value ? __int_as_float(oldval) : value );
while ( ( readback = atomicCAS( (i... |
myFunc.h | #include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <malloc.h>
#include <math.h>
#include <omp.h>
#define MIC_DEV 0
#define ALLOC alloc_if(1) free_if(0)
#define FREE alloc_if(0) free_if(1)
#define REUSE alloc_if(0) free_if(0)
#pragma offload_attribute (push, target (mic))
typedef struct userData { ... |
interaction.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... |
clipperz_srp_fmt_plug.c | /* This software was repurposed by Dhiru Kholia (dhiru at openwall.com)
* in 2012.
*
* This software was written by Jim Fougeron jfoug AT cox dot net
* in 2012. No copyright is claimed, and the software is hereby
* placed in the public domain. In case this attempt to disclaim
* copyright and place the software in... |
3d25pt.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-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tar... |
example_06-StructOfArrays-CellLinkedList-InnerOmp.c | /*
* SPDX-License-Identifier: BSD-3-Clause
*
* example_06-StructOfArrays-CellLinkedList-InnerOmp.c :
* Example of SPH Density Calculation using
* fast neighbor search the main density loop via
* Cell Linked List method, Struct of Arrays (SoA)
* data layout, OpenMP parallelization at the ... |
.body.c |
#define S1(zT0,zT1,zT2,zT3,zT4,zT5,i,j,k) C[i][j]=beta*C[i][j]+alpha*A[i][k]*B[k][j];
int t0, t1, t2, t3, t4, t5, t6, t6t, newlb_t6, newub_t6, t7, t7t, newlb_t7, newub_t7, t8;
register int lb, ub, lb1, ub1, lb2, ub2;
register int lbv, ubv;
/* Generated from PLUTO-produced CLooG file by CLooG v0.14.1 64 bits in... |
slangb.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/zlangb.c, normal z -> s, Fri Sep 28 17:38:07 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
scalability.c | /**
* \file
* \brief libbomp test.
*/
/*
* Copyright (c) 2007, 2008, 2009, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Att... |
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 ... |
convolve.c | #include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#include "wm.h"
unsigned char toUnsignedCharSaturated(float v) {
if (v < 0) {
return 0;
}
if (v > 0xFF) {
return 0xFF;
}
return (char) v;
}
void transform(unsigned char **image, unsigned *width, unsigned *height, unsigned thre... |
boolarray.h | /**
* This code is released under the
* Apache License Version 2.0 http://www.apache.org/licenses/.
*
* (c) Daniel Lemire, http://lemire.me/en/
*/
#ifndef BOOLARRAY_H
#define BOOLARRAY_H
#include <iso646.h> // mostly for Microsoft compilers
#include <stdarg.h>
#include <cassert>
#include <cstring>
#include <iost... |
Example_barrier_regions.1.c | /*
* @@name: barrier_regions.1c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
*/
void work(int n) {}
void sub3(int n)
{
work(n);
#pragma omp barrier
work(n);
}
void sub2(int k)
{
#pragma omp parallel shared(k)
sub3(k);
}
void sub1(int n)
{
int i;
#pragma omp parallel private(i... |
elemwise_binary_op.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 ... |
GB_unop__identity_uint32_uint32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
openmp-ex28.c | #include <stdio.h>
int main(void)
{
int tickets_out = 0;
#pragma omp parallel
{
int my_ticket;
/* Only one thread may enter a critical region at a time.
* In fact, for most of these examples I have had threads writing to the
* stdout stream without any kind of protection between them. This h... |
phylokernelsafe.h | /*
* phylokernelsafe.h
* Safe likelihood kernel that scales likelihood per category
*
* Created on: Sept 23, 2016
* Author: minh
*/
#ifndef PHYLOKERNELSAFE_H_
#define PHYLOKERNELSAFE_H_
#include "phylotree.h"
//#include "vectorclass/vectorclass.h"
//#include "vectorclass/vectormath_exp.h"
#include "supera... |
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) ... |
rnd.c | #include "rnd.h"
static const float saub = FLT_MAX / 16;
static const float caub = FLT_MAX / 16;
static const double daub = DBL_MAX / 16;
static const double zaub = DBL_MAX / 16;
static void gen_rand8(const size_t n, uint8_t r[static restrict 1])
{
#ifdef _OPENMP
#pragma omp parallel for default(none) shared(n,r)
#e... |
c_timers.c | #include "wtime.h"
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif
/* Prototype */
void wtime( double * );
/*****************************************************************/
/****** E L A P S E D _ T I M E ******/
/************************************************************... |
a.5.1.c | /* { dg-do run } */
#include <omp.h>
int
main ()
{
omp_set_dynamic (1);
#pragma omp parallel num_threads(10)
{
/* do work here */
}
return 0;
}
|
residualbased_block_builder_and_solver.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
// ... |
displayUtils.h | /*
* utility functions for visualization of results (disparity in color, warped output, ...)
*/
#pragma once
#include <sstream>
#include <fstream>
#if (CV_MAJOR_VERSION ==2)
#include <opencv2/contrib/contrib.hpp> // needed for applyColorMap!
#endif
#include "point_cloud.h"
#include "point_cloud_list.h... |
Forza.h | #ifndef Forza_h__
#define Forza_h__
struct PatternData
{
uint32_t Count;
uint32_t Size;
uint32_t Length[16];
uint32_t Skip[16];
__m128i Value[16];
};
void GeneratePattern(const char* Signature, const char* Mask, PatternData* Out)
{
auto l = strlen(Mask);
Out->Count = 0;
for (auto i = 0; i < l; i++)
{
if... |
taskwait-depend.c | // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// The GOMP wrapper does not handle `task if(0) depend()` and drops the
// dependency. Once this is fixed, reevaluate the GCC status:
// XFAIL: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10
#include "callback.h"
#include <omp.h>
int ... |
symv_x_csc_n_lo.c | #include "alphasparse/kernel.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#include "alphasparse/util.h"
#include <memory.h>
static alphasparse_status_t
symv_csc_n_lo_unroll(const ALPHA_Number alpha,
const ALPHA_SPMAT_CSC *A,
const ALPHA_Number *x,
const ALPHA_Number beta,
ALPHA_Number *y)
{
const... |
sparselu-task.c | /**********************************************************************************************/
/* This program is part of the Barcelona OpenMP Tasks Suite */
/* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */
/* Copyright (C) 2009 Univer... |
DRB018-plusplus-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... |
transform.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
utils.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 ... |
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
//
//===---------------------------... |
GB_binop__second_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_unop__conj_fc64_fc64.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... |
omp_sum_strnum_tls2.c | /* vim: set ts=4 sw=4: */
/* Filename : sum_strnum_tls.c
* Description : specified-data key (pthread TLS)
* Author : SunYoung Kim <sunyzero@gmail.com>
* Notes :
*/
#define _XOPEN_SOURCE 600
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <omp.h>
#include "stda... |
utils.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#include "utils.h"
void print_mat(int n , int mat[N][N]) {
int i,j;
for (i = 0; i < n; i++){
printf("%X: ",mat[i]);
for (j = 0; j < n; j++){
printf("%d ",mat[i][j]);
}
printf("\n");
}
p... |
base_serialized.h | #include "callback.h"
#include <omp.h>
int main()
{
unsigned int i;
#pragma omp parallel for num_threads(1) schedule(SCHEDULE)
for (i = 0; i < 1; i++) {
}
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], paren... |
DRB062-matrixvector2-orig-no.c | /*
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it andor
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the L... |
GB_binop__copysign_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
ops.h | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
parallel_for_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}}
#pragma omp parallel for
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp paral... |
GB_unaryop__lnot_fp64_int32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
bindthreads.c | #define _GNU_SOURCE
#include <mpi.h>
#include <pthread.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/syscall.h>
#include <errno.h>
#include <string.h>
#include <numa.h>
#define MAX_CPUS_PER_NODE 176
#define POWER9 0x4e // witherspoon
/* Processor ... |
test_saber_base.h | /* Copyright (c) 2018 Anakin Authors, Inc. 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 appli... |
TSDFVoxelGridImpl.h | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018-2021 www.open3d.org
//
// Perm... |
thread_limit.c | // RUN: %compile-run-and-check
#include <omp.h>
#include <stdio.h>
int main(int argc, char *argv[]) {
int ThreadLimitL0 = -1, ThreadLimitL1 = -1, ThreadLimitL2 = -1;
#pragma omp declare reduction(unique64:int \
: omp_out = (omp_in == 64 ? omp_in : o... |
luks_fmt_plug.c | /* luks.c
*
* hashkill - a hash cracking tool
* Copyright (C) 2010 Milen Rangelov <gat3way@gat3way.eu>
*
* This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as p... |
mmult_par.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#define NROW 1024
#define NCOL NROW
#define TEST_RESULTS
struct timeval startTime;
struct timeval finishTime;
double timeIntervalLength;
//Input Array A
int inputArrayA [NROW][NCOL];
//Input Array B
int inputArrayB [N... |
GB_binop__min_fp32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
begin_declare_variant_no_end_for_matching_selector.c | // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
#pragma omp begin declare variant match(device={kind(cpu)})
int also_before(void) {
return 0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.