source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
iRCCE_get.c | //***************************************************************************************
// Get data from communication buffer.
//***************************************************************************************
//
// Author: Rob F. Van der Wijngaart
// Intel Corporation
// Date: 008/30/2010
//
//****... |
test.c |
#include <stdio.h>
#include <omp.h>
#pragma omp requires unified_shared_memory
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (992)
#define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;})
#define ZERO(X) ZERO_ARRAY(N, X)
//
// TODO: Add the following runti... |
GB_binop__bor_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-... |
cholesky.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include "nb/math_bot.h"
#include "nb/memory_bot.h"
#include "nb/container_bot.h"
#include "nb/graph_bot.h"
#include "nb/solver_bot.h"
#include "../sparse_struct.h"
#define POW2(a) ((a)*(a))
int nb_sparse_decompose_Chol... |
nbodysystem.h | /*MIT License
Copyright (c) 2021 Keigo Nitadori
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, ... |
GB_unop__isfinite_bool_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... |
scheduling_time_cluster.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... |
transform.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
main.c | /*
Основной файл для запуска с функцией main. Разбор параметров запуска и основной DataFlow
*/
// #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#ifndef FIM_H
#include "fim.h"
#endif
void run_overall(char *design_file, char *faults_file, int first_tst_num, int iter_num, int tst_num, int ... |
static_general_builder_and_solver.h | //
// Project Name: Kratos
// Last Modified by: $Author: mpetracca $
// Date: $Date: 2013-06-06 10:37:00 $
// Revision: $Revision: 1.00 $
//
//
#if !defined(KRATOS_STATIC_GENERAL_BUILDER_AND_SOLVER )
#define KRATOS_STATIC_GENERAL_BUILDER_AND_SOLVER
/* System i... |
util.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
void zero4d(int dim1, int dim2, int dim3, int dim4, double * a)
{
int i;
#pragma omp parallel for private(i) schedule(static)
for (i=0;i<(dim1*dim2*dim3*dim4);i++) a[i] = 0.0;
return;
}
void rand4d(int dim1, int dim2, int dim3, int dim4, double * a)... |
imd_forces_eam2.c |
/******************************************************************************
*
* IMD -- The ITAP Molecular Dynamics Program
*
* Copyright 1996-2004 Institute for Theoretical and Applied Physics,
* University of Stuttgart, D-70550 Stuttgart
*
**************************************************************************... |
GB_unop__identity_int8_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
GB_select_phase2.c | //------------------------------------------------------------------------------
// GB_select_phase2: C=select(A,thunk)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0... |
GB_binop__max_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
omp.c | #include "stdio.h"
int main() {
#pragma omp parallel
{
printf("Hello, world.\n");
}
return 0;
}
|
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... |
MatrixFreeSolver.h | #ifndef __MatrixFreeSolver_H__
#define __MatrixFreeSolver_H__
#include <Eigen/Core>
#include <Eigen/Dense>
#include <Eigen/Sparse>
using SystemMatrixType = Eigen::SparseMatrix<Real>;
namespace SPH
{
class MatrixReplacement;
}
namespace Eigen
{
namespace internal
{
template<> struct traits<SPH::MatrixReplacemen... |
IntegralOrbitals.c | /* CoulombOrbitals.c */
/**********************************************************************************************************
Copyright (c) 2002-2013 Abdul-Rahman Allouche. All rights reserved
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentati... |
irbuilder_unroll_partial_factor_for.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=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
// expected-no-diagnostics
#ifnd... |
omp-hello-world.c |
/*****************************************************************************
Example : omp-hello-world.c
Objective : OpenMP program to print "Hello World"
This example demonstrates the use of
omp_get_thread_num()
omp_... |
openssl_enc_fmt_plug.c | /* OpenSSL "enc" cracker for JtR.
*
* This software is Copyright (c) 2013, Dhiru Kholia <dhiru at openwall.com>
*
* $ openssl enc -aes-256-cbc -p -e -a -salt -in hello.txt -out hello.txt.enc
* enter aes-256-cbc encryption password:
* Verifying - enter aes-256-cbc encryption password:
* salt=305CEDC2A0521011
* k... |
relax.c | /*BHEADER**********************************************************************
* Copyright (c) 2006 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
* Written by the HYPRE team. UCRL-CODE-222953.
* All rights reserved.
*
* This file is part of HYPRE (see ht... |
perftest.c | /**
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
* Copyright (C) The University of Tennessee and The University
* of Tennessee Research Foundation. 2015. ALL RIGHTS RESERVED.
* Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
#... |
multipleCBQuantizedLQPFeatures.h | /*
Copyright (c) 2013, Sibt ul Hussain <sibt.ul.hussain at gmail dot com>
All rights reserved.
Released under BSD License
-------------------------
For license terms please see license.lic
*/
#ifndef MULTIPLECBQUANTIZEDLQPFEATURES_H_
#define MULTIPLECBQUANTIZEDLQPFEATURES_H_
#include "encodedPatchFeatures.h"
#include ... |
gemtools_binding.c | /*
GEMTools python binding utilities
*/
#include "gemtools_binding.h"
#include <omp.h>
bool gt_input_file_has_qualities(gt_input_file* file){
return (file->file_format == FASTA && file->fasta_type.fasta_format == F_FASTQ) || (file->file_format == MAP && file->map_type.contains_qualities);
}
void gt_write_st... |
fourier.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
displacement_lagrangemultiplier_mixed_contact_criteria.h | // KRATOS ___| | | |
// \___ \ __| __| | | __| __| | | __| _` | |
// | | | | | ( | | | | ( | |
// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
//
// License: BSD License
// ... |
array_swap.c | #include<stdio.h>
#include<omp.h>
#include<stdlib.h>
int main(int argc, char* argv[])
{
int i, temp, n=5;
int a[5] = {1, 2, 3, 4, 5};
int b[5] = {6, 7, 8, 9, 10};
#pragma omp parallel for private(temp)
for (i=0;i<n;i++) {
temp = a[i];
a[i] = b[i];
b[i] = temp;
}
prin... |
omp_rw_lock.h | /*
@copyright Russell Standish 2000-2013
@author Russell Standish
This file is part of EcoLab
Open source licensed under the MIT license. See LICENSE for details.
*/
/**\file
\brief A read/write lock pattern for OpenMP
*/
#ifndef OMP_RW_LOCK_H
#define OMP_RW_LOCK_H
#ifdef _OPENMP
#include <omp.h>
names... |
test_nvector_openmpdev.c | /* -----------------------------------------------------------------
* Programmer(s): David J. Gardner @ LLNL
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2019, Lawrence Livermore National Security
* and Southern Methodist University.
* All ri... |
GB_unop__abs_fp64_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... |
grid.c | #include "grid.h"
#include "utils.h"
#include <cmath>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
using namespace std;
void init_rhs( GRID u ) {
#pragma omp parallel for
for (int i=1; i<=u.n; i++)
for (int j=1; j<=u.n; j++)
for (int k=1; k<=u.n; k++)
u.p[i][j][k] = 0.0;
}
void init_bor... |
3d25pt.c | /*
* Order-2, 3D 25 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)... |
10_omp_empty.c | // clang-format off
// RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | FileCheck %s
// REQUIRES: openmp
// clang-format on
#include "omp.h"
// CHECK-NOT: {{.*}} __typeart_alloc
void foo(int* x) {
#pragma omp parallel // transformed to @__kmpc_fork_ca... |
private_mapping.c | // RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu
// RUN: %libomptarget-compile-run-and-check-nvpt... |
GB_unaryop__lnot_fp64_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... |
facedetectcnn.h | /*
By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install,
copy or use the software.
License Agreement For libfacedetection
(3-clause BSD License)
Copyright (c) 2018-2020, Shiqi Yu, all ... |
is.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 2.3 OpenMP C versions - IS
This benchmark is an OpenMP C version of the NPB IS code.
The OpenMP C versions are developed by RWCP and derived from the serial
Fortran versions in "NPB 2.3-serial" developed by NAS... |
bf16_vec_kernel.h | #include "vec_type_cvt.h"
#if defined(CPU_CAPABILITY_AVX512)
#include <immintrin.h>
#else
#include "csrc/cpu/vec512/ref/add_ker.h"
#include "csrc/cpu/vec512/ref/mov_ker.h"
using namespace torch_ipex::cpu::kernel;
#endif
#if defined(CPU_CAPABILITY_AVX512)
inline __m512 pack_bf16_to_fp32(const __m256i top, const __m256... |
mobilenet_32.c | /*
Pretrained MobileNet Convolutional Neural Network in C language and
OpenMP API GitHUB Page: https://github.com/jcanore/vgg16 Author:
ZFTurbo/jocare
Compilation: gcc -O3 MobileNet_CPU_cifar.c -lm -fopenmp -o
MobileNet_CPU_cifar Usage: MobileNet_CPU_cifar <weights_path>
<file_with_list_of_... |
GB_binop__remainder_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-... |
ark_heat1D_omp.c | /*---------------------------------------------------------------
* Programmer(s): Shelby Lockhart @ LLNL
*---------------------------------------------------------------
* Based on the serial code ark_heat1D.c developed by
* Daniel R. Reynolds @ SMU and parallelized with OpenMP
*----------------------------------... |
RACBVH.h | #ifndef RACBVH_H
#define RACBVH_H
#include "common.h"
#include <queue>
#include "RangeDecoder_File.h"
#include "RangeDecoder_Mem.h"
#include "positionquantizer_new.h"
#include "integercompressorRACBVH.h"
#include "stopwatch.hpp"
//#define DEBUG_CODEC // enable extra codec info to verify correctness
#define USE_D... |
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: {{.*}... |
alignment.c | /**********************************************************************************************/
/* This program is part of the Barcelona OpenMP Tasks Suite */
/* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */
/* Copyright (C) 2009 Univer... |
fibo_para_1.c | //fibo_para_1.c
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <stdint.h>
#include <windows.h>
double fibo_pd( int n , double a[])
{
long double i,j;
if ( a[n] == 0 ){
#pragma omp task shared( i ) firstprivate ( n )
i = fibo_pd(n - 1, a );
#pragma omp task... |
target_data_at_exit.c | // RUN: %libomptarget-compile-generic -fopenmp-version=51
// RUN: %libomptarget-run-generic 2>&1 \
// RUN: | %fcheck-generic
#include <stdio.h>
int main() {
int i;
#pragma omp target enter data map(alloc:i)
// i isn't present at the end of the target data region, but the "present"
// modifier is only checked... |
GB_unop__tan_fc64_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_unop__identity_bool_bool.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... |
FullyDistVec.h | /****************************************************************/
/* Parallel Combinatorial BLAS Library (for Graph Computations) */
/* version 1.6 -------------------------------------------------*/
/* date: 6/15/2017 ---------------------------------------------*/
/* authors: Ariful Azad, Aydin Buluc --------------... |
compiler_cgen.c | /* Generated by Nim Compiler v0.15.0 */
/* (c) 2016 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.h>
typedef struct Tcgen530027 Tcgen530027;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ... |
update_ops_control_single_target_single.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "constant.h"
#include "update_ops.h"
#include "utility.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#ifdef _MSC_VER
#include <intrin.h>
#else
#include <x86intrin.h>
#endif
//void single_qubit_control_single_qubit_dense_matrix_gate_... |
test.c | #include <stdio.h>
#pragma omp requires unified_shared_memory
#include "../utilities/check.h"
#define N 100
int main()
{
check_offloading();
int a[N], aa[N];
int i, error = 0;
// initialize
for(i=0; i<N; i++)
aa[i] = a[i] = -1;
// offload
#pragma omp target map(tofrom: a[0:100])
{
#pragm... |
vptree_openmp.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <omp.h>
#include "../inc/vptree.h"
// Threshold of points to switch to sequential execution
#define POINT_THRESHOLD 10000
// Threshold of maximum live threads simultaneously for distance calculation
#define THREA... |
GB_unaryop__identity_uint16_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
3d25pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted fr... |
HelloWorld_2.c | #include <omp.h>
#include <stdio.h>
int main()
{
int id_thread, num_threads;
/*
-id_thread: it must be private, that is, it must take on a different value for each
thread that will execute the parallel piece of code.
-num_threads: It can be left shared so it is left unique
*/
#pragma omp p... |
xgboost_regrank.h | #ifndef XGBOOST_REGRANK_H
#define XGBOOST_REGRANK_H
/*!
* \file xgboost_regrank.h
* \brief class for gradient boosted regression and ranking
* \author Kailong Chen: chenkl198812@gmail.com, Tianqi Chen: tianqi.tchen@gmail.com
*/
#include <cmath>
#include <cstdlib>
#include <cstring>
#include "xgboost_regrank_data.h"
#in... |
GB_unop__identity_int64_int8.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
reduction-clauseModificado7.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main(int argc, char **argv) {
int i, n=20, a[n],suma=0;
if(argc < 2) {
fprintf(stderr,"Falta iteraciones\n");
exit(-1);
}
n = atoi(argv[1]);
if (n>20) {n=20; printf("n=%d",n);}
for (i=0; i<n... |
msgmerge.c | /* GNU gettext - internationalization aids
Copyright (C) 1995-1998, 2000-2010, 2012 Free Software Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as pu... |
nh_p_grad.h | #ifndef NH_P_GRAD_H
#define NH_P_GRAD_H
void nh_p_grad(Storage3D& uout, Storage3D& vout, const Storage3D& uin, const Storage3D& vin, const Storage3D& rdx,
const Storage3D& rdy, const Storage3D& gz, const Storage3D& pp, const Storage3D& pk3,
const Storage3D& wk1, Storage3D& wk, Storage3D& ... |
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) ... |
Vanka.h |
#define TOKENPASTE(x, y, z) x ## y ##_## z
#define TOKENPASTE1(x, y) x ## y
#define computeResidualAtIdx(T,S) TOKENPASTE(computeResidualAtIdx_, T, S)
void computeResidualAtIdx(ValName,IndName)(spIndType *rowptr , spValType *valA ,spIndType *colA, spValType *b, spValType *x,long long* Idxs, spValType *local_r, spIn... |
loop-4.c | /* { dg-do run } */
extern void abort (void);
int
main (void)
{
int e = 0;
#pragma omp parallel num_threads (4) reduction(+:e)
{
long i;
#pragma omp for schedule(dynamic,1)
for (i = __LONG_MAX__ - 30001; i <= __LONG_MAX__ - 10001; i += 10000)
if (i != __LONG_MAX__ - 30001
&& i != __LONG_MAX__... |
local_parametrization.h | #ifndef LOCAL_PARAMETRIZATION
#define LOCAL_PARAMETRIZATION
#include "defines.h"
///fitting
//#include <vcg/space/fitting3.h>
#include <vcg/math/matrix33.h>
#include <vcg/space/triangle2.h>
#include "texcoord_optimization.h"
#include "mesh_operators.h"
//#include <vcg/complex/algorithms/point_sampling.h>
//#define... |
par_strength.c | /*BHEADER**********************************************************************
* Copyright (c) 2017, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* Written by Ulrike Yang (yang11@llnl.gov) et al. CODE-LLNL-738-322.
* This file is part of AMG. See files READ... |
effect.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
DeclOpenMP.h | //===- DeclOpenMP.h - Classes for representing OpenMP directives -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------------... |
pi.c | /*
OpenMP example program that computes the value of Pi using the trapeziod rule.
Compile with gcc -fopenmp -O3 omp_pi.c -o omp_pi
*/
// Online source: http://users.abo.fi/mats/PP2012/examples/OpenMP/omp_pi.c
// // permission obtained
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void p... |
GxB_Matrix_Option_get.c | //------------------------------------------------------------------------------
// GxB_Matrix_Option_get: get an option in a matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifie... |
prime.c | #include <stdio.h> // Gives us printf
#include <stdbool.h> // Gives us the bool type
#include <stdlib.h> // Gives us dynamic memory functions
#include <math.h> ... |
stat_ops.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "stat_ops.h"
#include "utility.h"
#include "constant.h"
double expectation_value_X_Pauli_operator(UINT target_qubit_index, const CTYPE* state, ITYPE dim);
double expectation_value_Y_Pauli_operator(UINT target_qubit_index, const CTYPE... |
GB_unop__identity_int32_int64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
private-clauseModificado.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(){
int i, n = 7;
int a[n], suma;
for (i=0; i<n; i++)
a[i] = i;
suma = 10000;
#pragma omp parallel private(suma)
{
//suma=500;
#pragma omp for
for (i=0; i<n; i++){
suma = suma ... |
DRB060-matrixmultiply-orig-no.c | /*
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it andor
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the L... |
GB_binop__lt_uint32.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__cos_fc32_fc32.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... |
kmp_taskwait_nowait.c | // RUN: %libomp-compile-and-run
// test checks IN dep kind in depend clause on taskwait nowait
// uses codegen emulation
// Note: no outlined task routine used
#include <stdio.h>
#include <omp.h>
// ---------------------------------------------------------------------------
// internal data to emulate compiler codegen... |
omp_pragma_example2.c | #if 0
//inputBug342-3.c
// -rose:C
// roseomp: main.C:3114: static int
// OmpMidend::transOmpFor(SgPragmaDeclaration*): Assertion isSgForStatement(forstmt) != __null failed.
int i;
int m;
void foo()
{
// Extra block inserted around subcollection of statements in original block!
{
//#pragma omp for
for (i = 0; i <... |
GB_unop__floor_fc64_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... |
6.norace2.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
// Taken from ompVerify, Fig. 4
#include <omp.h>
#define N 20
#define M 20
int main() {
int uold[N][M], u[N][M];
int i, j;
double b = 1.0, omega = 0.8, resid, error = 0.0;
#pragma omp parallel for private(j, resid) reduction(+ : error)
for (i = 1; i <... |
GB_unop__identity_uint64_int32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
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 ... |
SVRGUpdater.h | /*
* Copyright 2016 [See AUTHORS file for list of authors]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
my_dgemm.c | #include "bl_dgemm_kernel.h"
#include "bl_dgemm.h"
inline void packA_mcxkc_d(
int m,
int k,
double *XA,
int ldXA,
int offseta,
double *packA
)
{
int i, p;
double *a_pntr[ DGEMM_MR ];
for ( i = 0; i < m; i ++ ) {
a_pntr[ i ] = X... |
GB_binop__min_uint32.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__ge_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-... |
mediancut.c | /*
** © 2009-2018 by Kornel Lesiński.
** © 1989, 1991 by Jef Poskanzer.
** © 1997, 2000, 2002 by Greg Roelofs; based on an idea by Stefan Schneider.
**
** See COPYRIGHT file for license.
*/
#include <stdlib.h>
#include <stddef.h>
#include "libimagequant.h"
#include "pam.h"
#include "mediancut.h"
#define index_of_cha... |
YAKL_atomics.h |
#pragma once
// Included by YAKL.h
namespace yakl {
// These are YAKL's atomic operations: atomicAdd, atomicMin, and atomicMax
// Where possible, hardware atomics are used. Where that's not possible, CompareAndSwap (CAS)
// implementations are used.
template <class T> inline void atomicAdd_host(T &update, ... |
2008.c | /* POLYBENCH/GPU-OPENMP
*
* This file is a part of the Polybench/GPU-OpenMP suite
*
* Contact:
* William Killian <killian@udel.edu>
*
* Copyright 2013, The University of Delaware
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
/* Include polybench common header. */
#include <... |
StmtOpenMP.h | //===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
GB_unop__isnan_bool_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... |
resize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
dbj_omp.c |
#include <assert.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
// for testing make it 0
#define DBJ_BENCHMARKING 1
// when on godbolt make it 1
// godbolt times out for even small sizes
// is is used just to confirm code compiles with no warnings
#define DBJ_ON_GODBOLT 0
#ifdef _MSC_VER
#pragma region c... |
parallel_queue_first_n_push.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <omp.h>
#define MAX 20
int intArray[MAX];
int front = 0;
int rear = -1;
int itemCount = 0;
bool isEmpty() {
return itemCount == 0;
}
bool isFull() {
return itemCount == MAX;
}
int size() {
return itemCount;
}
void ... |
target_implicit_partial_map.c | // RUN: %libomptarget-compile-generic
// RUN: %libomptarget-run-generic 2>&1 \
// RUN: | %fcheck-generic
// END.
#include <omp.h>
#include <stdio.h>
int main() {
int arr[100];
#pragma omp target data map(alloc: arr[50:2]) // partially mapped
{
#pragma omp target // would implicitly map with full size but alrea... |
producer-consumer.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <omp.h>
#define MAX 10
int arr[MAX];
int front = 0;
int rear = -1;
int itemCount = 0;
int peek() {
return arr[front];
}
bool isEmpty() {
return itemCount == 0;
}
bool isFull() {
return itemCount ... |
eval.h | #pragma once
#include<string>
using std::string;
#include"files.h"
#include<fstream>
using std::fstream;
using std::ios;
#include<unordered_map>
using std::unordered_map;
using std::pair;
#include<cmath>
#include<vector>
using std::vector;
#include<algorithm>
using std::sort;
#include<limits>
using std::numeric... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.