source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
part2.c | // HW1 - Part 3
// Please implement OpenMP directives for this code.
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define CHUNKSIZE 10
#define N 100
int main (int argc, char *argv[])
{
int nthreads, tid, i, chunk,omp_id,tmp;
float a[N], b[N], c[N];
/* Some initializations */
for (i=0; i < N; i... |
progress-new.c | /*
* Copyright (c) 2009, 2010, 2011, 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, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group.
*/
#include <asse... |
GB_binop__first_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
dcraw.c | #ifndef IGNOREALL
/*
dcraw.c -- Dave Coffin's raw photo decoder
Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net
This is a command-line ANSI C program to convert raw photos from
any digital camera on any computer running any operating system.
No license is required to download and u... |
project2_Delaunoy_Crasset_EXPLICIT.c | #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <mpi.h>
#include <omp.h>
#include "project2_Delaunoy_Crasset_EXPLICIT.h"
#include "project2_Delaunoy_Crasset_IO.h"
#define M_PI 3.14159265358979323... |
gimplify.c | /* Tree lowering pass. This pass converts the GENERIC functions-as-trees
tree representation into the GIMPLE form.
Copyright (C) 2002-2020 Free Software Foundation, Inc.
Major work done by Sebastian Pop <s.pop@laposte.net>,
Diego Novillo <dnovillo@redhat.com> and Jason Merrill <jason@redhat.com>.
This fil... |
program_181.c | for (i = 2; i <= n + 1; ++i)
C[i] = C[i + 1] + D[i];
for (i = 2; i <= n + 1; ++i)
#pragma omp parallel for
for (j = 2; j <= m + 1; ++j)
B[i][j] = B[i - 1][j] + C[i];
#pragma omp parallel for
for (i = 2; i <= n + 1; ++i)
{
A[i][1][1] = C[n + 1];
for (j = 2; j <= m + 1; ++j)
... |
mxnet_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 ... |
ospf_fmt_plug.c | /*
* This software is Copyright (c) 2017, Dhiru Kholia <dhiru [at] openwall.com>,
* and it is hereby released to the general public under the following terms:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* Special thanks goes to the Loki project for prov... |
2.parallel.c | #include <stdlib.h>
#include <stdio.h>
#include "omp.h"
#define N 25
/* Q1: Is the code printing what you expected? Is it executing */
/* in parallel? What is wrong with it? */
/* Q2: Add a directive to make its execution correct. */
/* Q3: What would happe... |
GB_wait.c | //------------------------------------------------------------------------------
// GB_wait: finish all pending computations on a single matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Licen... |
integer_move_generator.h | /*****************************************************************************/
// Copyright (c) 2020-2021 Yuji KOGUMA
// Released under the MIT license
// https://opensource.org/licenses/mit-license.php
/*****************************************************************************/
#ifndef PRINTEMPS_NEIGHBORHOOD_INTEG... |
gain.h | /*
Project Name : OpenMEEG
© INRIA and ENPC (contributors: Geoffray ADDE, Maureen CLERC, Alexandre
GRAMFORT, Renaud KERIVEN, Jan KYBIC, Perrine LANDREAU, Théodore PAPADOPOULO,
Emmanuel OLIVI
Maureen.Clerc.AT.sophia.inria.fr, keriven.AT.certis.enpc.fr,
kybic.AT.fel.cvut.cz, papadop.AT.sophia.inria.fr)
The OpenMEEG so... |
FFTAbsLogRealImageFilter.h | /*
* MIT License
*
* Copyright (c) 2018-2019 Benjamin Köhler
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, c... |
expected_output.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
//---------------------------------------------------------------------
// program BT
//---------------------------------------------------------------------
//----------
// Class S:
//----------
//----------
// Class W:
... |
spmm.h | /*!
* Copyright (c) 2020 by Contributors
* \file array/cpu/spmm.h
* \brief SPMM CPU kernel function header.
*/
#ifndef DGL_ARRAY_CPU_SPMM_H_
#define DGL_ARRAY_CPU_SPMM_H_
#include <dgl/array.h>
#include <dgl/bcast.h>
#include <limits>
#include <algorithm>
namespace dgl {
namespace aten {
namespace cpu {
/*!
* ... |
main.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#define RADIUS 1
int N_THREADS = 2;
long N_POINTS = 100;
int argparse(int argc, char *argv[]) {
for (long i = 0; i < argc; i++)
if (argv[i][0] == '-')
switch (argv[i][1]) {
case 't':
... |
nn_index.h | /***********************************************************************
* Software License Agreement (BSD License)
*
* Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
* Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
*
* THE BSD LICENSE
*
* Redistribution an... |
parser.h | /* Data structures and function exported by the C++ Parser.
Copyright (C) 2010-2015 Free Software Foundation, Inc.
This file is part of GCC.
GCC 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; eit... |
GB_binop__times_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
collision_matrix.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... |
chap_fmt_plug.c | /* iSCSI CHAP authentication cracker. Hacked together during September of 2012
* by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>,
* and it is hereby released to the general public under the following terms:
* Redistribution and use in s... |
ejercicio1.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
main(){
int i, n = 7;
int a[n];
for (i=0; i<n; i++)
a[i] = i+1;
#pragma omp parallel for shared(a) default(none) private(n)
for (i=0; i<n; i++) a[i] += i;
printf("Después de parallel for:\n");
for (i=0; i<n; i++... |
openmp-ex11.c | #include <stdio.h>
#include <omp.h>
int main(void)
{
int N = 10;
#pragma omp parallel
{
int my_thread = omp_get_thread_num();
int i;
/* But openmp has a directive "for" for for loops */
#pragma omp for
for (i = 0; i < N; i++) {
printf("iteration %d, thread %d\n", i, my_thread);
}
}
... |
GB_unop__atan_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... |
mod.c | #include <math.h>
#include "../sailfish.h"
// ============================ COMPAT ========================================
// ============================================================================
#ifdef __ROCM__
#include <hip/hip_runtime.h>
#endif
#if !defined(__NVCC__) && !defined(__ROCM__)
#define __device_... |
kmeans.c | /*
** © 2011-2016 by Kornel Lesiński.
** See COPYRIGHT file for license.
*/
#include "libimagequant.h"
#include "pam.h"
#include "kmeans.h"
#include "nearest.h"
#include <stdlib.h>
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_max_threads() 1
#define omp_get_thread_num() 0
#endif
/*
* K-... |
GB_unop__signum_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... |
spinless_fermion_basis_core.h | #ifndef _SPINLESS_FERMION_BASIS_OP_H
#define _SPINLESS_FERMION_BASIS_OP_H
#include <complex>
#include "hcb_basis_core.h"
#include "numpy/ndarraytypes.h"
#include "openmp.h"
namespace basis_general {
template<class I>
void mergeSort(I nums[],I work[],const I left,const I mid,const I right, bool &f_count){
I left... |
colormap.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
wyhash.h | /* Author: Wang Yi <godspeed_china@yeah.net> */
#ifndef wyhash_version_1
#define wyhash_version_1
#include <string.h>
#include <math.h>
#if defined(_MSC_VER) && defined(_M_X64)
#include <intrin.h>
#pragma intrinsic(_umul128)
#endif
const unsigned long long _wyp0=0xa0761d6478bd642full, _wyp1=0xe7037ed1a0b428dbull, _wy... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- 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
//
//===---------------------------... |
time_threading.omp.c | #include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <qthread/qthread.h> // because we're build within the qthread source
#include <qthread/qloop.h>
#include <qthread/qtimer.h>
#include <omp.h>
#include "argparsing.h"
unsigned long THREADS = 1000000;
aligned_t count = 0;
static aligned_t null_thread(v... |
omp_hello.c | /******************************************************************************
* FILE: omp_hello.c
* DESCRIPTION:
* OpenMP Example - Hello World - C/C++ Version
* In this simple example, the master thread forks a parallel region.
* All threads in the team obtain their unique thread number and print it.
* The m... |
tov_interp.h | // This C header file reads a TOV solution from data file and performs
// 1D interpolation of the solution to a desired radius.
// Author: Zachariah B. Etienne
// zachetie **at** gmail **dot* com
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include "string.h"
#define REAL double
//#define ST... |
GB_unaryop__minv_int32_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
GraphReconstructor.h | //
// Copyright (C) 2015-2019 Yahoo Japan Corporation
//
// 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 applicab... |
parallelfor.c | /*
* Combined parallel for
* with multiple clauses
* */
int main(void)
{
int i, a[1000];
int sum;
#pragma omp parallel for if(1) ordered reduction(+:sum) schedule(dynamic, 5)
for (i=0;i<1000;i++)
{
a[i]=i*2;
sum+=i;
}
return 0;
}
|
omp_zher2k_batch.c | /**
* @file omp_zher2k_batch.c
*
* @brief BBLAS zher2k_batch double _Complex routine.
*
* BBLAS is a software package provided by Univ. of Manchester,
* Univ. of Tennessee.
*
* @version 1.0.0
* @author Samuel D. Relton
* @author Pedro V. Lara
* @author Mawussi Zounon
* @date 2016-02-20
*
**/
#if... |
pooling_2x2.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 ... |
crop_and_resize.c | #include <TH/TH.h>
#include <stdio.h>
#include <math.h>
void CropAndResizePerBox(
const float * image_data,
const int batch_size,
const int depth,
const int image_height,
const int image_width,
const float * boxes_data,
const int * box_index_data,
const int start_box,
const int... |
fast_gaussian_blur.h | // Copyright (C) 2017-2021 Basile Fraboni
// Copyright (C) 2014 Ivan Kutskir
// All Rights Reserved
// You may use, distribute and modify this code under the
// terms of the MIT license. For further details please refer
// to : https://mit-license.org/
//
#include <omp.h>
#include <algorithm>
//!
//! \file fast_gaus... |
bound_space_op.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... |
convolution_5x5_pack8_fp16s.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 ... |
kendalltau.c | /*KENDALLTAU Internal code for homogeneous region detection
** Please refer to file kendalltau.m
** License
** -------
** This work is protected by the CeCILL-C Licence, see
** - Licence_CeCILL_V2.1-en.txt
** - Licence_CeCILL_V2.1-fr.txt
**
** Copyright 2015 Charles Deledalle
*/
/*#ifdef MATLAB_MEX_FILE... |
Physics_CellVal.c | /*
* SideValues.c
*
* Created on: Jul 27, 2017
* Author: abauville
*/
#include "stokes.h"
void Physics_CellVal_retrieveFromSolution (compute* Val, int ISub, Grid* Grid, BC* BC, Numbering* Numbering, EqSystem* EqSystem)
{
// Where Val is the value to extract from the solution, and DVal the increment ... |
decorate.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
lastpass_cli_fmt_plug.c | /*
* LastPass CLI cracker patch for JtR.
*
* This software is Copyright (c) 2017, 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 F... |
gauss-openmp.c | /*
* Original author: Sandhya Dwarkadas, 2002 and before.
* Modified by Grant Farmer, 2003 and Kai Shen, 2010.
* Minor cleanup by Michael Scott, 2017.
* Parallelization by Sean Cooke, 2017.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/time.h>
#include <math.h>
#... |
residualbased_newton_raphson_contact_strategy.h | // KRATOS ___| | | |
// \___ \ __| __| | | __| __| | | __| _` | |
// | | | | | ( | | | | ( | |
// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
//
// License: BSD License
// ... |
GB_binop__band_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
no_option.c | // RUN: %clang_cc1 -verify -o - %s
// expected-no-diagnostics
int a;
#pragma omp threadprivate(a, b)
#pragma omp parallel
|
GB_unaryop__minv_bool_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... |
transformntl-impl.h | //==================================================================================
// BSD 2-Clause License
//
// Copyright (c) 2014-2022, NJIT, Duality Technologies Inc. and other contributors
//
// All rights reserved.
//
// Author TPOC: contact@openfhe.org
//
// Redistribution and use in source and binary forms, wi... |
ft_ao.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 required ... |
atomic_read_codegen.c | // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -target-cpu core2 -fopenmp -x c -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -target-cpu core2 -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -target-cpu core2 -include-pch %t ... |
GB_bitmap_AxB_saxpy_A_bitmap_B_bitmap_template.c | //------------------------------------------------------------------------------
// GB_bitmap_AxB_saxpy_A_bitmap_B_bitmap: C<#M>+=A*B, C bitmap, M any format
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- 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_subassign_09.c | //------------------------------------------------------------------------------
// GB_subassign_09: C(I,J)<M,repl> = scalar ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.c... |
resize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
par_relax.c | /******************************************************************************
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
**************************************... |
critical-unrelated.c | /*
* critical-unrelated.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-excepti... |
GB_unop__trunc_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- 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_unop__tgamma_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
LAGraph_SortByDegree.c | //------------------------------------------------------------------------------
// LAGraph_SortByDegree: sort a graph by its row or column degree
//------------------------------------------------------------------------------
// LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
// SPDX-License-Iden... |
optimize.c | /* Copyright 2014. The Regents of the University of California.
* Copyright 2016-2017. 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:
* 2013-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de>
*
*
* O... |
fx.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
kriging.h | #ifndef __KRIGING_H__69012DAB_4BA5_44E4_9DF9_749A5519E0AD
#define __KRIGING_H__69012DAB_4BA5_44E4_9DF9_749A5519E0AD
namespace hpgl
{
/**/
template<
typename values_t,
typename defineds_t,
typename coord_t,
typename means_t,
typename covariances_t,
typename neighbourhood_lookup_t,
typ... |
GB_binop__bget_uint64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
async_target-2.c | /* { dg-do run } */
/* { dg-require-effective-target offload_device_nonshared_as } */
#include <omp.h>
#include <stdlib.h>
#define EPS 0.00001
#define N 10000
#pragma omp declare target
void init (float *a, float *b, int n)
{
int i;
for (i = 0; i < n; i++)
{
a[i] = 0.1 * i;
b[i] = 0.01 * i * i;
... |
time_dgemm.c | /**
*
* @generated d Tue Jan 7 11:45:23 2014
*
**/
#define _TYPE double
#define _PREC double
#define _LAMCH LAPACKE_dlamch_work
#define _NAME "PLASMA_dgemm"
/* See Lawn 41 page 120 */
#define _FMULS FMULS_GEMM(M, N, K)
#define _FADDS FADDS_GEMM(M, N, K)
#include "./timing.c"
static int
RunTest(int *iparam, d... |
AddPropertyStep.h | #ifndef ADD_PROPERTY_STEP_H
#define ADD_PROPERTY_STEP_H
#define ADD_PROPERTY_STEP 0x75
#include "step/TraversalStep.h"
#include "step/InjectStep.h"
#include "structure/Vertex.h"
#include <boost/any.hpp>
// Edge properties currently not supported.
class AddPropertyStep : public TraversalStep {
private:
Cardinality ... |
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
//
//===---------------------------... |
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;
for(i=0;i<n;i++)
a[i]=i;
#pragma omp parallel private(suma)
{
suma=0;
#pragma omp for
for(i=0; i<n; i++){
suma=suma+a[i];
printf ("thread %d suma a[%d... |
pi_spmd_simple.c | /*
NAME: PI SPMD ... a simple version.
This program will numerically compute the integral of
4/(1+x*x)
from 0 to 1. The value of this integral is pi -- which
is great since it gives us an easy way to check the answer.
The program was parallelized using OpenMP and an SPMD
alg... |
feast_condition_number_utility.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Vicente Mataix Ferrandiz
//
#if !defined(KRATOS_... |
GB_binop__rminus_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
omp.c | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <omp.h>
int is_valid(int num) {
int sum = 0;
char buf[11];
sprintf(buf, "%u", num);
for (int i = 0; i < 6; i++) {
if (i > 0 && buf[i-1] == buf[i]) { return 0; }
sum += buf[i] - 48;
}
return (sum != 7 && sum != 11 && sum != 13); ... |
GB_binop__max_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-... |
csr_matmultivec.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)
**************************************... |
mlp_mpi_example_f32.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
pmv-OpenMP-reduction.c | // Compilar con -O2 y -fopenmp
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main(int argc, char** argv){
int i, j, f, c;
double t1, t2, total;
srand(time(NULL));
//Leer argumento de entrada (no de componentes del vector)
if (argc<2){
printf("Falta tamaño de matriz y vector\n");
exit(-1);
}
... |
inputSingle.c | // test case for single
//It contains private(), firstprivate(), nowait
//TODO copyprivate()
#include <stdio.h>
#ifdef _OPENMP
#include "omp.h"
#endif
int y;
int main()
{
int x;
int z=100;
#pragma omp parallel
{
#pragma omp single private(x,y) firstprivate(z) nowait
{
x = omp_get_thread_num();
y = omp_get... |
GB_memcpy.c | //------------------------------------------------------------------------------
// GB_memcpy: parallel memcpy
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.com See GraphBLAS/Doc/L... |
phylokernel.h | /*
* phylokernel.h
*
* Created on: Dec 14, 2014
* Author: minh
*/
#ifndef PHYLOKERNEL_H_
#define PHYLOKERNEL_H_
#include "phylotree.h"
//#include "vectorclass/vectorclass.h"
//#include "vectorclass/vectormath_exp.h"
#include "alignment/superalignment.h"
#ifdef __SSE2__
inline Vec2d horizontal_add(Vec2d x[... |
GB_binop__lor_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
test72.c | void foo();
void max () {
int z = 0;
z = 10;
foo();
z = 33;
#pragma omp barrier
z = 15;
}
void bar() {
int y;
if (2) {
y = 6;
max();
} else {
#pragma omp barrier
}
}
void foo () {
int x = 0;
if (1) {
bar();
#pragma omp barrier
x = 4;
} else {
bar();
#pragma omp barrier
x = 3;
}
}
int main() {
... |
16_blur_parallel_copy.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... |
GB_binop__ge_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-... |
teams_notarget_get_team_num.c | #include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#define N 10000
#define TOTAL_TEAMS 16
int main() {
int n = N;
int team_id;
int team_counts[TOTAL_TEAMS];
int *a = (int *)malloc(n*sizeof(int));
for (int i = 0; i < TOTAL_TEAMS; i++)
team_counts[i] = 0;
#pragma omp teams distribute num_teams(T... |
update_ops_multi.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "constant.h"
#include "update_ops.h"
#include "utility.h"
#ifdef _OPENMP
#include <omp.h>
#endif
/**
* perform multi_qubit_Pauli_gate with XZ mask.
*
* This function assumes bit_flip_mask is not 0, i.e., at least one bit is flipped. If no bit is... |
opi.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
int main(int argc, char **argv) {
//seed random number generator
// Q2b: get the number of threads to run with from argv and
// add OpenMP API code to set number of threads here
int Nthreads = atoi(argv[1]);
// OpenMP call to set... |
graph.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef GRAPH_H_
#define GRAPH_H_
#include <cinttypes>
#include <iostream>
#include <type_traits>
#include <algorithm>
#include "pvector.h"
#include "util.h"
/*
GAP Benchmark Suite
Class: CSRGraph
A... |
omp_thread_attach_test_1.c | // execute in sequence
// input the number of num_user_threadsation
#include <stdlib.h>
#include <pthread.h>
#include <omp.h>
#include <sys/timeb.h>
#include <omp_interop.h>
#include <unistd.h>
/* read timer in second */
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.t... |
utils.h | /* Copyright (C) 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:... |
lock-nested-unrelated.c | /*
* lock-nested-unrelated.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exce... |
ocp_nlp_sqp_rti.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... |
deprecate.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__plus_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.