source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
DRB104-nowait-barrier-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... |
GB_binop__div_int64.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_unaryop__abs_bool_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
target-2.c | /* { dg-do compile } */
void
foo (int x, int y)
{
bad1:
#pragma omp target data map(tofrom: y)
goto bad1; // { dg-error "invalid branch to/from OpenMP structured block" }
goto bad2; // { dg-error "invalid entry to OpenMP structured block" }
#pragma omp target data map(tofrom: y)
{
bad2: ;
}
... |
par_mod_lr_interp.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)
**************************************... |
MinMax.h | #ifndef DASH__ALGORITHM__MIN_MAX_H__
#define DASH__ALGORITHM__MIN_MAX_H__
#include <dash/internal/Config.h>
#include <dash/Allocator.h>
#include <dash/algorithm/LocalRange.h>
#include <dash/util/Config.h>
#include <dash/util/Trace.h>
#include <dash/util/UnitLocality.h>
#include <dash/internal/Logging.h>
#include <... |
GB_unop__tan_fc32_fc32.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... |
OMPTest.c |
/*=======================
OpenMP Test
Evan William Gretok
February 5, 2019
=======================*/
// Inclusions
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
// Main
int main( int argc, char **argv ) {
if( argc != 2 ) {
printf( "ERROR: must pass in a number of ... |
GB_unaryop__lnot_int64_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
atomic-18.c | /* PR c/64824 */
/* { dg-do run } */
void
f1 (void)
{
short a;
short b = 1;
int c = 3;
#pragma omp atomic capture
a = b = c << b;
if (b != 6 || a != 6)
__builtin_abort ();
}
void
f2 (void)
{
short a;
short b = 1;
int c = 3;
#pragma omp atomic capture
a = b = c + b;
if (b != 4 || a != 4)
__... |
consecutive_write_byte.c | #include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "constants.h"
/**
* Deinterleave (transpose) an IQUV ring buffer page to the ordering needed for FITS files
* Note that this is probably a slow function, and is not meant to be run real-time
*
* data in: tab, channel/4, tim... |
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)
#... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ten_tusscher_2004_epi_S2_8.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S2_8.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO:... |
local_search_core.h | /*****************************************************************************/
// Copyright (c) 2020-2021 Yuji KOGUMA
// Released under the MIT license
// https://opensource.org/licenses/mit-license.php
/*****************************************************************************/
#ifndef PRINTEMPS_SOLVER_LOCAL_SEARC... |
bucle-forModificado.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv){
int i,n=9;
if(argc<2){
fprintf(stderr,"\nFalta nº de iteraciones\n");
exit(-1);
}
n= atoi(argv[1]);
#pragma omp parallel
{
#pragma omp for
for(i=0;i<n;i++)
#pragma omp parallel
printf("thread %d... |
opencl_7z_fmt_plug.c | /*
* This software is Copyright (c) 2015-2017 magnum
* 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.
*/
/*
* We've seen one single sample where we could not trust the padding check
* ... |
area.c | #include <stdio.h>
#include <math.h>
#define LEFT 0.0F
#define RIGHT 3.1416F
#define SLICES 100000000
#define WIDTH ((RIGHT-LEFT)/SLICES)
int
main()
{
int i;
double area=0.0f, s;
#pragma omp parallel for private(s)
for (i=0;i<SLICES;++i) {
s = sin(LEFT+i*WIDTH)*WIDTH;
#pragma omp critical
... |
util.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "base.h"
#include "thd_info.h"
#include "util.h"
/******************************************************************************
* PU... |
GB_binop__isge_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-... |
gs.c | #include <stdio.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#ifdef _OPENACC
#include <openacc.h>
#endif
#ifdef _OPENMP
#include <omp.h>
#endif
#include "c99.h"
#include "name.h"
#include "fail.h"
#include "types.h"
#define gs_op gs_op_t /* fix conflict with fortran */
#include "gs_defs.h"
#includ... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
complex_to_complex_2d.h | #ifndef SCITBX_FFTPACK_COMPLEX_TO_COMPLEX_2D_H
#define SCITBX_FFTPACK_COMPLEX_TO_COMPLEX_2D_H
#include <scitbx/fftpack/complex_to_complex.h>
#include <scitbx/error.h>
#include <omptbx/omp_or_stubs.h>
//#define SCITBX_FFTPACK_COMPLEX_TO_COMPLEX_2D_NO_PRAGMA_OMP
namespace scitbx { namespace fftpack {
//! 2-dimensio... |
soma_clustering.h | // -----------------------------------------------------------------------------
//
// Copyright (C) 2021 CERN & Newcastle University for the benefit of the
// BioDynaMo collaboration. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compl... |
GB_unop__identity_fp32_int8.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
GB_binop__ldexp_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
main.c | #include <stdio.h>
#include <string.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
#include <omp.h>
#include <cblas.h>
//Threshold for testing validity of matrix matrix multiplication
#define ERROR_THRESHOLD 0.0001
//For measuring wall time using omp_get_wtime()
static double start;... |
approxDF.c | /*
Maximilien Danisch
Mai 2016
http://bit.ly/maxdan94
maximilien.danisch@telecom-paristech.fr
Info:
Feel free to use these lines as you wish. This program computes an approximation of the density-friendly decomposition.
To compile:
gcc approxDF.c -fopenmp -o approxDF -O9
To execute:
./approxDF nthreads iter net.txt ... |
GB_binop__isle_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
comms.h | /*
//@HEADER
// *****************************************************************************
//
// XtraPuLP: Xtreme-Scale Graph Partitioning using Label Propagation
// Copyright (2016) Sandia Corporation
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government r... |
GB_bitmap_AxB_saxpy_A_sparse_B_bitmap_template.c | //------------------------------------------------------------------------------
// GB_bitmap_AxB_saxpy_A_sparse_B_bitmap: C<#M>+=A*B, C bitmap, M any format
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
... |
haval_fmt_plug.c | /* HAVAL cracker patch for JtR. Hacked together during April of 2013 by Dhiru
* Kholia <dhiru at openwall.com>.
*
* This software is Copyright (c) 2013 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 ... |
middle6r.c | /*
* Date: 11 December 2015
* Contact: Thomas Peyrin - thomas.peyrin@gmail.com
*/
/*
* Simulation of boomerang analysis for Skinny
* Date: March 21, 2020
* Author: Hosein Hadipour
* Contact: hsn.hadipour@gmail.com
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#in... |
omp_alloc_def_fb.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <omp.h>
int main() {
omp_alloctrait_t at[2];
omp_allocator_handle_t a;
void *p[2];
at[0].key = omp_atk_pool_size;
at[0].value = 2 * 1024 * 1024;
at[1].key = omp_atk_fallback;
at[1].value = omp_atv_default_mem_fb;
a = omp_init_allocator(omp_la... |
equipartition.h | // equipartition.h - Class implementing an algorithm for evenly partitioning a 1D space
//
// Copyright (C) 2020- ECMWF.
//
// This software is licensed under the terms of the Apache Licence Version 2.0
// which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
//
// In applying this licence, ECMWF does no... |
grid_basis.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... |
build_XCmat.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <omp.h>
#include "linalg_lib_wrapper.h"
#ifdef USE_LIBXC
#include <xc.h>
#endif
#include "utils.h"
#include "TinyDFT_typedef.h"
#include "gen_int_grid.h"
#include "build_XCmat.h"
#include "eval_... |
reduction-1.c | /* { dg-do compile } */
/* { dg-options "-fopenmp" } */
void bar (int a[10][10][10]);
extern int f[][2]; /* { dg-error "has incomplete type" "" { target c++ } } */
extern int g[]; /* { dg-error "has incomplete type" "" { target c++ } } */
void
foo (int a[10][10][10], int **b, int x)
{
int c[10][10][0];
in... |
GB_unop__minv_bool_bool.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... |
ParticleSimulationCpu.h | #pragma once
#include "ParticleSimulationBase.h"
class ParticleSimulationCpu: public ParticleSimulationBase
{
public:
static constexpr float G = 6.67E-5;
static constexpr float e0 = 8.97E3;
static constexpr float k0 = 1.0 / (4.0 * M_PI * e0 );
static constexpr float fric = 0.999;
static constex... |
omp_helper.h | #pragma once
#ifdef MULTICORE
#ifndef __clang__
#include <omp.h>
#endif
#endif
template <typename T, typename F>
bool OmpExecuteBool(std::vector<T>& items, F& f) {
int failed = 0;
#ifdef MULTICORE
#ifndef __clang__
#pragma omp parallel for
#endif
#endif
for (size_t i = 0; i < items.size(); ++i) {
... |
mixed_tentusscher_myo_epi_2004_S1_12.c | // Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S1_12.h"
GET_CELL_MODEL_DATA(init_cell_model_data)
{
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode... |
contraction_tests.h | /******************************************************************************
* contraction_tests.h
*
* Source of VieCut.
*
******************************************************************************
* Copyright (C) 2017 Alexander Noe <alexander.noe@univie.ac.at>
*
* Published under the MIT license in the ... |
area.omp.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <omp.h>
# define NPOINTS 4000
# define MAXITER 4000
struct complex{
double real;
double imag;
};
int main(){
int i, j, iter, numoutside = 0;
int num_threads;
double area, error, ztemp;
struct complex z, c;
double star... |
VolumetricAdaptiveAveragePooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/VolumetricAdaptiveAveragePooling.c"
#else
#define START_IND(a,b,c) (int)floor((float)(a * c) / b)
#define END_IND(a,b,c) (int)ceil((float)((a + 1) * c) / b)
// #define START_IND(a,b,c) a * c / b
// #define END_IND(a,b,c) (a + 1) * c / b + ((a + 1) * c % b > 0)?... |
residualbased_elimination_builder_and_solver_slip.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
//
#if !defined(KRATOS_RESIDUA... |
GB_unaryop__identity_int64_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
filter3.c | #include "mex.h"
#include <time.h>
#include <omp.h>
#include <immintrin.h>
//mex CFLAGS='$CFLAGS -ffast-math' filter.c
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
mwSize n_data_samples = mxGetNumberOfElements(prhs[2]);
mwSize b_length = mxGetNumberOfElements(prhs[0]);
... |
ten_tusscher_2004_epi_S3_3.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S3_3.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO:... |
19_blur_parallel_collapse.c | #include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
#include <omp.h>
#define NX 1002
#define NY 1002
void blur(int *image, size_t szx, size_t szy, size_t iters){
int *temp = malloc(sizeof(int) * szx * szy);
for (size_t i = 0; i< NX*NY; ++i) temp[i]=image[i];
for (s... |
graph.h | //===------------------------------------------------------------*- C++ -*-===//
//
// Ripples: A C++ Library for Influence Maximization
// Marco Minutoli <marco.minutoli@pnnl.gov>
// Pacific Northwest National Laboratory
//
//===-------------------------------------------... |
target-6.c | #include <omp.h>
#include <stdlib.h>
int
main ()
{
omp_set_dynamic (0);
omp_set_nested (1);
if (omp_in_parallel ())
abort ();
#pragma omp parallel num_threads (3)
if (omp_get_thread_num () == 2)
{
if (!omp_in_parallel ())
abort ();
#pragma omp parallel num_threads (3)
if (omp_get_thread_n... |
Example_scan.2.c | /*
* @@name: scan.2.c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_5.0
*/
#include <stdio.h>
#define N 100
int main(void)
{
int a[N], b[N];
int x = 0;
// initialization
for (int k = 0; k < N; k++)
a[k] = k + 1;
// a[k] is not included i... |
aix_ssha_fmt_plug.c | /* AIX ssha cracker patch for JtR. Hacked together during April of 2013 by Dhiru
* Kholia <dhiru at openwall.com> and magnum.
*
* Thanks to atom (of hashcat project) and philsmd for discovering and
* publishing the details of various AIX hashing algorithms.
*
* This software is Copyright (c) 2013 Dhiru Kholia <dh... |
GrB_Matrix_ncols.c | //------------------------------------------------------------------------------
// GrB_Matrix_ncols: number of columns of a sparse matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Ide... |
convolutiondepthwise_5x5_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 copy ... |
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 ... |
sp.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - SP
This benchmark is an OpenMP C version of the NPB SP code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by N... |
utils.c | #include "tallybench_header.h"
double pairwise_sum_dbl( double * v, long len )
{
double sum = 0;
if( len <= 16 )
{
for( long i = 0; i < len; i++ )
sum += v[i];
}
else
{
long left_len = len / 2;
long right_len = len - left_len;
double left_sum = pairwise_sum_dbl( v, left_len );
double right_sum = pai... |
utility.h | #ifndef _UTILITY_H
#define _UTILITY_H
#include <stdlib.h>
#include <stdint.h>
#include <climits>
#include <iostream>
#include <cmath>
#include <vector>
#include <fstream>
#include <omp.h>
#include <tbb/scalable_allocator.h>
using namespace std;
#define EPSILON 0.001
template <class T>
struct ErrorTolerantEqual:... |
GB_unop__identity_fc32_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... |
convolution_1x1_pack4to1.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2019 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 ... |
GB_binop__plus_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
13_sync_with_flush.c | /*NOTE THIS CODE DOESN'T WORK*/
#include <stdio.h>
#include <omp.h>
int main(){
int data;
int flag;
flag = 0;
data = 0;
#pragma omp parallel
if(omp_get_thread_num() == 0) {
//Thread 0 sets the payload and sets the flag
data = 42;
flag = 1;
#pragma omp flush(data, flag)
} else {
//On ... |
Common.h | // (C) 2012 John Romein/ASTRON
// 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 3 of the License, or
// (at your option) any later version.
// This program is distributed in ... |
GB_binop__isle_int64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
rf_tron.h | #ifndef RF_TRON_H
#define RF_TRON_H
#include <stdarg.h>
#include <stddef.h>
#include "rf_matrix.h" // to include BLAS/LAPACK header
enum {GD_LS=0, TRON_TR=1, TRON_LS=2};
static void default_print(const char *buf);
class function { // {{{
public:
virtual double fun(void *w) = 0 ;
virtual void gr... |
GB_unaryop__minv_uint64_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... |
laplace_omp.c | /*************************************************
* Laplace OpenMP C Version
*
* Temperature is initially 0.0
* Boundaries are as follows:
*
* 0 T 0
* 0 +-------------------+ 0
* | |
* | |
* | |
* T | ... |
fourier.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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... |
transform.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// The LLVM37 Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------------------... |
sum.c | #include <stdio.h>
#define NX 102400
int main(void)
{
long vecA[NX];
long sum, psum, sumex;
int i;
/* Initialization of the vectors */
for (i = 0; i < NX; i++) {
vecA[i] = (long) i + 1;
}
sumex = (long) NX * (NX + 1) / ((long) 2);
printf("Arithmetic sum formula (exact): ... |
pooling_pack_x86.h | #include <emmintrin.h>
#include <stdio.h>
#include <assert.h>
#include "pooling_param.h"
#define POOL_GENERIC 0
#define POOL_K2S2 1
#define POOL_K3S2 2
#define POOL_K3S1 3
typedef void (*pooling_kernel_t)(const float* input, float* output, int inc, int inh, int inw, int outh, int outw, int,
... |
main.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main()
{
int i;
#pragma omp parallel for private(i) num_threads(5) schedule(static)
for(i = 0; i <= 16; i++)
{
sleep(i);
printf("Il thread %d ha completato iterazione %d.\n", omp_get_thread_num() , i);
}
printf("Tut... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- 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
//
//===---------------------------... |
serial_tree_learner.h | #ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/tree_learner.h>
#include <LightGBM/dataset.h>
#include <LightGBM/tree.h>
#include <LightGBM/feature.h>
#include "feature_... |
LAGraph_pagerank3b.c | //------------------------------------------------------------------------------
// LAGraph_pagerank3b: pagerank using a real semiring
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2019 LAGraph Contributors.
(see Contributo... |
polybench.c | /**
* polybench.c: This file is part of the PolyBench/C 3.2 test suite.
*
*
* Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu>
* Web address: http://polybench.sourceforge.net
* License: /LICENSE.OSU.txt
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
... |
gemm.c | #include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include "gemm.h"
#include <time.h>
#include <windows.h>
//#include <polybench.h>
/**
* This version is stamped on May 10, 2016
*
* Contact:
* Louis-Noel Pouchet <pouchet.ohio-state.edu>
* Tomofumi Yuki <tomofumi.yuki.f... |
elemwise_binary_scalar_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 ... |
network_simplex_simple_omp.h | /* -*- mode: C++; indent-tabs-mode: nil; -*-
*
*
* This file has been adapted by Nicolas Bonneel (2013),
* from network_simplex.h from LEMON, a generic C++ optimization library,
* to implement a lightweight network simplex for mass transport, more
* memory efficient than the original file. A previous version of this fi... |
GB_binop__eq_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-... |
transform.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
outer_mult.h | #include "CSC.h"
#include "CSR.h"
#include "Triple.h"
#include "radix_sort/radix_sort.hpp"
#include "utility.h"
#include <map>
#include <algorithm>
#include <iostream>
#include <omp.h>
#include <unistd.h>
#include <cstring>
//#include <numa.h>
#include <thread>
#include <cstdlib>
#include <chrono>
#include<set>
using ... |
GxB_Matrix_serialize.c | //------------------------------------------------------------------------------
// GxB_Matrix_serialize: copy a matrix into a serialized array of bytes
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SP... |
GB_unop__identity_int32_fc64.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_uint16_uint16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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) ... |
irbuilder_for_unsigned_auto.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=45 -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
// expected-no-diagnostics
#if... |
BsplineFunctor.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: John R. G... |
special_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.
*
*... |
jutil.c | #include "jutil.h"
#include <stdint.h>
#include <stdarg.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <string.h>
#include <errno.h>
#include <math.h>
#include <sys/stat.h>
#include <omp.h>
#include "types.h"
/* Local Free Functions */
#define PASS_VA_ARGS(TO_FUNC, LAST_ARG, ... |
GB_binop__rminus_fp64.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__log2_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
C04Traversal.h | /**
* @file C04Traversal.h
* @author C.Menges, based on tchipevn (original source:
* ls1-mardyn/src/particleContainer/LinkedCellTraversals/C04CellPairTraversal.h)
* @date 15.06.2019
*/
#pragma once
#include "autopas/containers/cellPairTraversals/C08BasedTraversal.h"
#include "autopas/containers/linkedCells/trave... |
linear_math.c | #include "linear_math.h"
#include <stdio.h> /* for fprintf */
#include <string.h> /* for memset and memcpy */
#include <math.h>
#ifdef NDEBUG
#define HANDLE_ERROR
#else
#define HANDLE_ERROR /* if it's debugging, abort the program */
#endif
#ifdef LB_USE_ROW_MAJOR_MATRIX
#define MATRIX_INDEX(mat, i, j) i * mat.nCol +... |
ast-dump-openmp-begin-declare-variant_11.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify=c_mode -ast-dump %s | FileCheck %s --check-prefix=C
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify=cxx_mode -ast-dump %s -x c++| FileCheck %s --check-prefix=CXX
// c_mode-no-diagnostics
#ifdef __cplusplus
#define CONST cons... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.