source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
3d7pt.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 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tare... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
cryptsha256_fmt_plug.c | /*
* This file is part of John the Ripper password cracker,
* based on rawSHA256_fmt.c code and Drepper's spec at
* http://www.akkadia.org/drepper/SHA-crypt.txt
*
* This software is Copyright (c) 2012 magnum, and it is hereby released to the
* general public under the following terms: Redistribution and use in ... |
FG_vector.h | #ifndef __FG_VECTOR_H__
#define __FG_VECTOR_H__
/*
* Copyright 2014 Open Connectome Project (http://openconnecto.me)
* Written by Da Zheng (zhengda1936@gmail.com)
*
* This file is part of FlashGraph.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compli... |
2626.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
*/
#define EXTRALARGE_DATASET
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
/* Include polybench co... |
pr59917-2.c | /* PR middle-end/59917 */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp" } */
struct J { long buf[8]; };
extern int setjmp (struct J[1]);
void foo (int);
void
bar (void)
{
int k;
foo (-1);
#pragma omp parallel
for (k = 0; k < 10; ++k)
{
struct J j[1];
if (setjmp (j) == 0)
foo (k);
}... |
DRB079-taskdep3-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... |
DX.c | /* Generated by Cython 0.26.1 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
#error Cython ... |
openmp_lock.c | #include <stdio.h>
#include <omp.h>
int main(){
int data=0;
#pragma omp parallel num_threads(3)
{
for(int i = 0; i < 100; i++){
#pragma omp critical
{
data = data + 1;
}
}
}
printf("data = %d.\n", data);
return 0;
} |
GxB_Desc_get.c | //------------------------------------------------------------------------------
// GxB_Desc_get: get a field in a descriptor
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apac... |
GB_binop__bset_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... |
GB_binop__lxor_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
intersectionFunctor.h | // Copyright 2014 Nicolas Mellado
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
GB_unaryop__ainv_uint64_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... |
target_enter_data_map_messages.c | // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s -Wuninitialized
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s -Wuninitialized
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp-simd -ferror-limit 10... |
kMedoidPlusPlus.c | #include <stdio.h>
#include <stdlib.h>
#include "../../dataStruct/data.h"
#include "../../input/random.h"
/**
*
*
*
*
**/
extern dataIF data;
void GetRandomWithDist(int ,double*, double*);
void KMedoidPlusPlusInit(int k){
int i = 0;
int size;
double *D = malloc(sizeof(double)*GetDataSize());
double *pro... |
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 ... |
task_reduction2.c | // RUN: %libomp-compile-and-run
//
// XFAIL: icc
// UNSUPPORTED: clang-4, clang-5, clang-6, clang-7, clang-8, clang-9, clang-10
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8
#include <stdio.h>
#include <stdlib.h>
int a = 0, b = 1;
int main(int argc, char **argv) {
#pragma omp parallel
{
int i;
#prag... |
GB_binop__ldexp_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... |
pc_process.h | //
// Created by lab on 2021/12/8.
//
#ifndef CHECKERBOARD_LC_CALIB_PC_PROCESS_H
#define CHECKERBOARD_LC_CALIB_PC_PROCESS_H
#include "global.h"
#include "utils.h"
#include "opt_plane_param.hpp"
#include <pcl/features/boundary.h>
#include <pcl/features/normal_3d.h>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.... |
GB_unop__identity_uint8_uint8.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_unaryop__ainv_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... |
GB_binop__lt_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
Booster.h | /*!
@file Booster.h
@author David Hirvonen (modifications);
@brief Internal declaration of the XGBoost C++ interface class.
\copyright Copyright 2014-2016 Elucideye, Inc. All rights reserved.
\license{This project is released under the 3 Clause BSD License.}
*/
#ifndef __xgboostcpp_Booster_h__
#define __... |
openmp_task1.c | ///TAFFO_TEST_ARGS -fopenmp
#include <stdio.h>
#define N (100)
int main(int argc, char *argv[])
{
float first_task_var __attribute((annotate("target('first_task_var') scalar(range(0,10) final)"))) =
1.0f;
float second_task_var
__attribute((annotate("target('second_task_var') scalar(range(0,2000) final... |
own_resize.c | /*******************************************************************************
* Copyright (c) 2020, Intel Corporation
*
* 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 mus... |
HybridRepSetReader.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2019 QMCPACK developers.
//
// File developed by: Ye Luo, yeluo@anl.gov, Arg... |
omp_parallel_for_private.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
/*! Utility function to spend some time in a loop */
static void do_some_work (void)
{
int i;
double sum = 0;
for(i = 0; i < 1000; i++){
sum += sqrt (i);
}
}
int test_omp_parallel_for_private()
{
int sum;
i... |
GB_sort_template.c | //------------------------------------------------------------------------------
// GB_sort_template: sort all vectors in a matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier:... |
THTensorConv.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/THTensorConv.c"
#else
/*
2D Input, 2D kernel : convolve given image with the given kernel.
*/
TH_API void THTensor_(validXCorr2Dptr)(real *r_,
real alpha,
real *t_, long ir, long ic... |
lrthresh.c | /* Copyright 2015. The Regents of the University of California.
* Copyright 2015. Tao Zhang and Joseph Cheng.
* Copyright 2016-2018. Martin Uecker.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2014-2015 Frank Ong <frank... |
main.c | /*
Il programma funziona solo de il numero di elementi dell'array è esattamente divisibile per il numero di core.
Per esempio con N = 8 e t = 4.
*/
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main()
{
int N, i, t, nloc;
float sumtot, sum, *a;
sumtot = 0;
printf("Inserire N: ");
... |
BEIntegrator.h | /*!
* @file BEIntegrator.h
* @author Michal Merta
* @author Jan Zapletal
* @date July 10, 2013
* @brief Header file for pure virtual class BEIntegrator
*
*/
#ifndef BEINTEGRATOR_H
#define BEINTEGRATOR_H
#define EUC_SP(a,b) (a[0]*b[0]+a[1]*b[1]+a[2]*b[2])
#include "BESpace.h"
#include "FullMatrix.h... |
core_sttlqt.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/core_blas/core_zttlqt.c, normal z -> s, Fri Sep 28 17:38:24 2018
*
**/
#include <plasma_core_blas.h>
#include "pla... |
test.c |
// test if openMP is running well
#ifdef _OPENMP
#include <omp.h>
#endif
#include <R.h>
#include <Rmath.h>
#include <Rinternals.h>
#include <R_ext/Lapack.h>
#include <R_ext/BLAS.h>
#include <R_ext/Utils.h>
#include "util.h"
SEXP test(SEXP Sigma_r, SEXP n_r){
const int incOne = 1; int info; int k;
int n = I... |
GB_unop__exp_fp64_fp64.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... |
mdot.c | /*
----------------------------------------------------
-- Distributed matrix project --
Author: FORNALI Damien
Grade: Master I - IFI
University: Nice-Sophia-Antipolis
Year: 2017-2018
Project subject link: https://sites.google.com/site/fabricehuet/teaching/parallelisme-et-distribution/projet--... |
dia.h | #ifndef __DIA_H
#define __DIA_H
#include <algorithm>
#include "complex_ops.h"
#include "utils.h"
#include "numpy/ndarraytypes.h"
template <typename I, typename T1, typename T2>
void dia_matvec_noomp_contig(const bool overwrite_y,
const I n_row,
const I n_col,
... |
BFEgg_fmt_plug.c | /*
* This file is part of Eggdrop blowfish patch for John The Ripper.
* Copyright (c) 2002 by Sun-Zero <sun-zero at freemail.hu>
* This is a free software distributable under terms of the GNU GPL.
*/
#if FMT_EXTERNS_H
extern struct fmt_main fmt_BFEgg;
#elif FMT_REGISTERS_H
john_register_one(&fmt_BFEgg);
#else
#in... |
GB_unaryop__lnot_int64_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
initialcondition.c | #include <string.h>
#include <math.h>
#include <mpi.h>
#include <gsl/gsl_rng.h>
#include <fastpm/libfastpm.h>
#include <fastpm/logging.h>
#include "pmpfft.h"
/* The following functions fill the gaussian field*/
static void
pmic_fill_gaussian_gadget(PM * pm, FastPMFloat * delta_k, int seed);
static void
pmic_fill_gau... |
adept_backup_source.h | /* adept_source.h - Source code for the Adept library
Copyright (C) 2012-2015 The University of Reading
Copyright (C) 2015-2017 European Centre for Medium-Range Weather Forecasts
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. Y... |
Tanh.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/Tanh.c"
#else
void THNN_(Tanh_updateOutput)(
THNNState *state,
THTensor *input,
THTensor *output)
{
THTensor_(tanh)(output, input);
}
void THNN_(Tanh_updateGradInput)(
THNNState *state,
THTensor *gradOutput,
... |
biphasic_filling_utilities.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Kazem Kamran
// Ricca... |
single.c | /* PMSIS includes */
#include "pmsis.h"
#include "omp.h"
#define NUM_THREADS (6)
static int a[NUM_THREADS] = {0};
static uint32_t errors = 0;
/* Cluster main entry, executed by core 0. */
void cluster_delegate(void *arg)
{
printf("Cluster delegate\n");
#pragma omp parallel num_threads(NUM_THREADS)
{
... |
DRB007-indirectaccess3-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... |
feature.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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)
#... |
displacement_lagrangemultiplier_residual_frictional_contact_criteria.h | // KRATOS ___| | | |
// \___ \ __| __| | | __| __| | | __| _` | |
// | | | | | ( | | | | ( | |
// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
//
// License: BSD License
// ... |
fwk_render.h | // naive rendering framework
// - rlyeh, public domain
//
// IQM skeletal meshes by @lsalzman (public domain) - https://bit.ly/2OQh0Me
// SH code by @ands (public domain) - https://github.com/ands/spherical_harmonics_playground
#ifndef RENDER_H
#define RENDER_H
typedef unsigned handle; // GLuint
// -----------------... |
mm2parallel.c | /*mm2 parallel code*/
// same code for different schedule
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <memory.h>
#include <malloc.h>
#include <omp.h>
#define SIZE 1000 // for time analisis use 100, 250, 500, 1000, 2000
int main(int argc, char** argv) {
float matrixa[... |
feature.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
bt.c | /*
* This software is Copyright (c) 2015 Sayantan Datta <std2048 at gmail dot 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.
* Based on paper 'Perfect Spatial Hashing' by Lefebvre ... |
main.c | ///
/// @copyright Copyright (c) 2013-2016, Université Pierre et Marie Curie
/// All rights reserved.
///
/// <b>hiCL</b> is owned by Université Pierre et Marie Curie (UPMC),
/// funded by TOTAL, and written by Issam SAID <said.issam@gmail.com>.
///
/// Redistribution and use in source and binary forms, with or without... |
GB_binop__first_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-... |
mc.c | /**
* mc.c
* Authors: Yizhao Gao <yizhaotsccsj@gmail.com>
* Date: {08/01/2017}
*/
#include <stdio.h>
#include <stdlib.h>
#include <random>
#include <omp.h>
#include "scan.h"
using namespace std;
void simulateCases(double * intensity, int * simCases, int locCount, int casCount) {
static std::random_device rd;
... |
hybrid_report_mask.c | /* Routine reports hybrid affinity information for MPI processes
within an OpenMP region.
Within a parallel region--
Rank 0 gathers thread affinities from each rank & reports.
a.) Within a master region:
Determine maximum length of node name.
Gather node names from each ran... |
problem2.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
mpi_omp_radix.c | #include <stdio.h> /* for standard input-output */
#include <stdlib.h> /* for malloc,free,atoi etc... */
#include <mpi.h> /* for MPI standard functions */
#include <omp.h> /* for OMP functions */
#include "MyMPI_OMP.h" /* for my functions */
int main(int argc,char **argv)
{
int N; /* the number of keys ... |
GB_binop__isge_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... |
spacetime_heat_kernel.h | /*
Copyright (c) 2020, VSB - Technical University of Ostrava and Graz University of
Technology
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyr... |
hello.c | #include<stdio.h>
#include<omp.h>
int main() {
int ID = omp_get_thread_num();
printf("ID main : %d\n", ID);
#pragma omp parallel
{
ID = omp_get_thread_num();
printf("Hello(%d)", ID);
printf("world!!(%d)\n", ID);
}
return 0;
}
|
GB_builder.c | //------------------------------------------------------------------------------
// GB_builder: build a matrix from tuples
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apache-... |
load_state.c | /*
* (C) Copyright 1988- 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 not waive the privileges and immunities
* granted to it by virtue of its status as an interg... |
parallel-if-numthreads.c | // Test if clause handling
// number of threads should be set to 1 if the if-clause's expression evaluates to be false
// if clause has higher precedence. if it evaluates to 0, num_threads() has no effect.
#include <assert.h>
#include <stdio.h>
#include <omp.h>
int main(void)
{
int i=0;
#pragma omp parallel if(i==0)... |
LAGraph_pagerank3b.c | //------------------------------------------------------------------------------
// LAGraph_pagerank3b: pagerank using a real semiring
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2019 LAGraph Contributors.
(see Contributo... |
a12_bad.c | #define N 1000000
#define MAX 4
int a[N],b[N],ind[N];
long long s=0;
main()
{
int i;
/* inicialitzacio, no en paral.lel */
for(i=0;i<N;i++)
{
a[i]=1;
b[i]=2;
ind[i]=i%MAX;
}
#pragma omp parallel for
for (i=0;i<N;i++)
b[ind[i]] += a[i];
for (i=0;i<MAX;i++)
{
printf("Valor %d, de b %d \n",i,b[i]);
s+=b[i];
}
... |
random.h | #ifndef RANDOM_H_INCLUDED
#define RANDOM_H_INCLUDED
#include <stdlib.h>
#include <assert.h>
uint32_t randomUint(unsigned, unsigned);
// // See random.cpp for notes.
// #include <cstdint>
// #include <climits>
// struct RandomUintGenerator{
// private:
// // for the Marsaglia algorithm
// uint32_t rngx;
// ... |
pr68762.h | // PR middle-end/68762
#pragma omp declare simd
double baz (double x);
#pragma omp declare simd
inline double
foo (double d)
{
return baz (d);
}
|
sections.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#define omp_get_num_threads() 1
#endif
void funcA() {
printf("En funcA: esta ejecuta el thread %d\n",omp_get_thread_num());
}
void funcB() {
printf("En funcB: esta sección la ejecuta el thread %d\n",o... |
testTwoFor_omp-lols.c | /* -- Libraries for C/C++ -- */
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <iostream>
using namespace std;
/* -- library for parallelization of code -- */
// #include <pthread.h>
#ifdef MPI
#include <mpi.h>
#endif
#ifdef _OPENMP
#include <omp.h>
#endif
/* variables to supp... |
copy.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define ELEMENT double
ELEMENT *copy(ELEMENT *vect, int size) {
ELEMENT *vect_new = malloc(sizeof(ELEMENT) * size);
for (int i = 0; i < size; i++) {
vect_new[i] = vect[i];
}
return vect_new;
}
ELEMENT *copy_parallel(ELEMENT *vect, int si... |
nodal_residualbased_block_builder_and_solver.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
... |
streaming_find_most_influential.h | //===------------------------------------------------------------*- C++ -*-===//
//
// Ripples: A C++ Library for Influence Maximization
// Marco Minutoli <marco.minutoli@pnnl.gov>
// Pacific Northwest National Laboratory
//
//===-------------------------------------------... |
GB_unop__creal_fp64_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... |
mixed_tentusscher_myo_epi_2004_S1_17.c | // Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S1_17.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... |
inexact_match.c | //-------------------------------------------------------
// Inexact Matching
// Victoria Popic (viq@stanford.edu), Apr 2012
//-------------------------------------------------------
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdint.h>
#include <math.h>
#include <time.h>
#... |
main.c | #include "main.h"
#include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
// ---------------------------------
// Utility functions
// ---------------------------------
void printVec(const char *name, const Vector3 *v)
{
printf("%s[%.3f, %.3f, %.3f]\n", name, v->x, v->y, v->z);
}
... |
2018-private-origin-no.c | // Declared in a scope inside the construct: private by default
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char* argv[])
{
int i;
int len=100;
int a[100];
for (i=0;i<len;i++)
a[i]=i;
#pragma omp parallel for
for (i=0;i<len;i++)
{
int tmp =a[i]+i;
a[i] = tmp;
}
printf("a[50]... |
omp-par-for.c | #include <stdio.h>
int main() {
int i = 0;
#pragma omp parallel for
for(i = 0; i < 10; i++)
{
printf("Hello World #%d\n", i );
}
return 0;
}
|
ocp_nlp_sqp.c | /*
* Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
* Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
* Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
* Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl
*
* This file is part o... |
residual_based_bdf_displacement_scheme.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Vicente Mataix Ferrandiz
//
#if !defined(KRATOS... |
GB_binop__lt_bool.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
sparse_msg_filter.c | /*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute... |
matrix_mult_omp.c | #include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <omp.h>
#include "papi.h"
#ifdef L1
#define SIZE 52 //Matrix size to fit L1 cache
#endif
#ifdef L2
#define SIZE 147 //Matrix size to fit L2 cache
#endif
#ifdef L3
#define SIZE 1329 //Matrix size to fit L3 cache
#endif
#ifdef EXT_MEM
#define SIZE... |
problem.c | /**
* Radiation forces
*
* This example provides an implementation of the
* Poynting-Robertson effect. The code is using the IAS15 integrator
* which is ideally suited for this velocity dependent force.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <math.h>
#include "rebound.h"
void rad... |
spmt.h | /**
* Copyright (c) 2015 by Contributors
*/
#ifndef DIFACTO_COMMON_SPMT_H_
#define DIFACTO_COMMON_SPMT_H_
#include <cstring>
#include <vector>
#include "dmlc/data.h"
#include "dmlc/omp.h"
#include "./range.h"
#include "data/row_block.h"
#include "difacto/base.h"
namespace difacto {
/**
* \brief multi-thread sparse ... |
GB_binop__rminus_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-... |
nanort.h | //
// NanoRT, single header only modern ray tracing kernel.
//
//
// Notes : The number of primitives are up to 2G. If you want to render large
// data, please split data into chunks(~ 2G prims) and use NanoSG scene graph
// library(`${nanort}/examples/nanosg`).
//
/*
The MIT License (MIT)
Copyright (c) 2015 - 2019 ... |
GB_unaryop__lnot_uint64_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... |
iw_core.c | /*
// Copyright 2016-2017 Intel Corporation All Rights Reserved.
//
// The source code, information and material ("Material") contained herein is
// owned by Intel Corporation or its suppliers or licensors, and title
// to such Material remains with Intel Corporation or its suppliers or
// licensors. The Material con... |
rose_test2.c | #pragma wave trace ( enable )
int a[100UL][100UL];
void foo()
{
int i;
int j;
int hypre__nx;
int hypre__ny;
#define HYPRE_BOX_SMP_PRIVATE i,j
#define HYPRE_SMP_PRIVATE HYPRE_BOX_SMP_PRIVATE,hypre__nx,hypre__ny
#pragma omp parallel for private ( HYPRE_SMP_PRIVATE )
for (i = 0; i < 100; i++)
for (j = 0... |
lone_target_exit_data.c | // Check that a target exit data directive behaves correctly when the runtime
// has not yet been initialized.
// RUN: %libomptarget-compile-run-and-check-generic
#include <stdio.h>
int main() {
// CHECK: x = 98
int x = 98;
#pragma omp target exit data map(from:x)
printf("x = %d\n", x);
return 0;
}
|
dmg_fmt_plug.c | /* DMG cracker patch for JtR. Hacked together during August of 2012
* by Dhiru Kholia <dhiru.kholia at gmail.com>
*
* This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>
* and is based on "dmg.c" from
*
* hashkill - a hash cracking tool
* Copyright (C) 2010 Milen Rangelov <gat3way@gat3w... |
ast-dump-openmp-parallel-master-XFAIL.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -fopenmp-version=50 -ast-dump %s 2>&1 | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
// REQUIRES: broken-PR41022
// https://bugs.llvm.org/show_bug.cgi?id=41022
void test_zero() {
#pragma omp parallel master
;
}
// CHECK: {{.*}... |
parallel.c | //////////////////////////////////////////////////////////////
//
// parallel.c
//
// Copyright (c) 2017, Hassan Salehe Matar
// All rights reserved.
//
// This file is part of Clanomp. For details, see
// https://github.com/hassansalehe/Clanomp. Please also
// see the LICENSE file for additional BSD notice
//
// Redis... |
grid.h | // -----------------------------------------------------------------------------
//
// Copyright (C) The BioDynaMo Project.
// 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.
//
// See the LICENSE file distrib... |
3d7pt.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 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tare... |
single3.c | /*
* a pragma immediately following another
*/
#ifdef _OPENMP
#include <omp.h>
#endif
void foo(void)
{
int num_threads =0;
#pragma omp parallel
{
#pragma omp single
num_threads = omp_get_num_threads();
}
}
|
jki_optimize.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int A_row;
int A_col;
int B_row;
int B_col;
int **constructMatrix(int row, int col){
int **matrix = (int **)malloc(sizeof(int *) * row);
for (int i = 0; i < row;i++){
matrix[i] = (int *)malloc(sizeof(int) * col);
}
return matrix;
}
void ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.