source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
nmt_master.c | #include "utils.h"
static void purify_generic(nmt_field *fl,flouble *mask,fcomplex **walm0,flouble **maps_in,fcomplex **alms_out)
{
if(fl->pure_b || fl->pure_e) {
nmt_purify(fl,mask,walm0,maps_in,maps_in,alms_out);
}
else {
int im1;
for(im1=0;im1<fl->nmaps;im1++)
he_map_product(fl->nside,maps_i... |
Task2.h | #pragma once
#include <omp.h>
#include <vector>
#include <iostream>
template<class T>
void print_vector(std::vector<T> vec) {
for (unsigned int i = 0; i < vec.size(); i++) {
std::cout << vec[i] << ' ';
}
}
// Returns time of execution
double bubble_sort(std::vector<double> a) {
int n = a.size();... |
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... |
dsdd.c | /*! @copyright (c) 2017 King Abdullah University of Science and
* Technology (KAUST). All rights reserved.
*
* STARS-H is a software package, provided by King Abdullah
* University of Science and Technology (KAUST)
*
* @file src/backends/mpi/blrm/dsdd.c
* @version 0.3.0
* @autho... |
point_outlier.h | /****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Co... |
target_teams_distribute_parallel_for_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}}
#pragma omp target teams distribute parallel for
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}}
#pragma ... |
CompressNeighboursWorklet.h | //============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt for details.
// This software is distributed WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
// PURPOSE... |
sequence.c | #include <stdio.h>
#define MAXN 2048
#define INF (1LL<<60)
int N;
long long dp[MAXN*MAXN], SZ[MAXN+1];
int main() {
while (scanf("%d", &N) == 1) {
for (int i = 0; i <= N; i++)
scanf("%lld", &SZ[i]);
for (int i=0; i<N; i++)
dp[i*N + i] = 0;
#pragma omp parallel
for (i... |
VectorArgorithm.c | #include <memory.h>
#include <omp.h>
#include "../VectorArgorithm.h"
C_API Vector* VectorDup(Vector* self, StructDupFunc structDupFunc) {
int i;
Vector *dup = VectorCreateWithCapacity(self->Capacity);
if (!dup) {
return Null;
}
#pragma omp parallel for
for (i = 0; i < (int)self->Size; ++i... |
CalcBlowingSnow.c | /******************************************************************************
* @section DESCRIPTION
*
* Calculate energy of sublimation from blowing snow.
*****************************************************************************/
#include <vic_run.h>
/*******************************************************... |
ast-dump-openmp-task.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -fopenmp-version=50 -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
typedef unsigned long omp_event_handle_t;
void test(void) {
omp_event_handle_t evt;
#pragma omp task detach(evt)
;
}
// CHECK: TranslationUnitDe... |
gradf_mex.c | #include <inttypes.h>
#include <omp.h>
#include "mex.h"
void gradff(float *dx, float *dy, float *dz,
const float *u, const double *h, const size_t *sz);
void gradfd(double *dx, double *dy, double *dz,
const double *u, const double *h, const size_t *sz);
void
mexFunction(int nlhs, mxArray *p... |
ft.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - FT
This benchmark is an OpenMP C version of the NPB FT code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by N... |
5779.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 <po... |
GB_binop__isle_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-... |
__clang_cuda_cmath.h | /*===---- __clang_cuda_cmath.h - Device-side CUDA cmath support ------------===
*
* 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
*
*===----------------------------... |
ellipticSEMFEMSetup.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
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 limitatio... |
libimagequant.c | /* pngquant.c - quantize the colors in an alphamap down to a specified number
**
** Copyright (C) 1989, 1991 by Jef Poskanzer.
** Copyright (C) 1997, 2000, 2002 by Greg Roelofs; based on an idea by
** Stefan Schneider.
** © 2009-2013 by Kornel Lesinski.
**
** Permission to use, copy, modi... |
BsplineFunctor.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: John R. G... |
statistic.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
c-omp.c | /* This file contains routines to construct GNU OpenMP constructs,
called from parsing in the C and C++ front ends.
Copyright (C) 2005 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>,
Diego Novillo <dnovillo@redhat.com>.
This file is part of GCC.
GCC is free software; y... |
SE_fg_extend_fcn_kaiser_mex.c | #include "mex.h"
#include "../SE_fgg.h"
#include "../SE_fkg.h"
void SE_FGG_MEX_params(SE_FGG_params*, const mxArray*, int);
#define HIN prhs[0]
#define OPT prhs[1]
#define HOUT plhs[0] // Output
#ifndef VERBOSE
#define VERBOSE 0
#endif
void mexFunction(int nlhs, mxArray *plhs[],
int nrhs, const mxArray... |
GB_unop__identity_fp32_int16.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... |
matrix_math.h | #ifndef MATRIX_MATH_H_
#define MATRIX_MATH_H_
namespace acspo {
template <typename T>
matrix<T> unary_op(const matrix<T> &mat, T (*op)(T))
{
unsigned int elem = mat.elem();
matrix<T> ret(mat.size());
T *rptr = ret.ptr();
const T *mptr = mat.ptr();
#pragma omp parallel for
for (unsigned int i =... |
task_late_fulfill.c | // RUN: %libarcher-compile -fopenmp-version=50 && env OMP_NUM_THREADS='3' \
// RUN: %libarcher-run-race | FileCheck %s
// Checked gcc 9.2 still does not support detach clause on task construct.
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9
// clang supports detach clause since version 11.
// UNSUPPORTED: ... |
GB_binop__isne_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-... |
cpu_backend_conv-inl.h | #ifndef SRC_BACKENDS_CPU_BACKEND_CONV_INL_H_
#define SRC_BACKENDS_CPU_BACKEND_CONV_INL_H_
static void Convolution2DForwardFunc(
const CPUTensor<DType>* input,
const CPUTensor<DType>* filter,
CPUTensor<DType>* output,
ConvolutionContext<CPUTensor, DType>* context) {
// shape decode
size_t NIN, C, H, W;
si... |
syr2k.c | /**
* syr2k.c: This file was adapted from PolyBench/GPU 1.0 test suite
* to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardoso@students.i... |
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... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- 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
//
//===---------------------------... |
shape.h | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
fx.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
sssp.h | #ifndef UTIL_SSSP_H_
#define UTIL_SSSP_H_
#include <algorithm>
#include <string.h>
#include <queue>
#include <vector>
#include <omp.h>
#include "debug.h"
#include "parameter.h"
//#define USE_CPU
// using namespace boost;
using std::fill_n;
using std::vector;
extern "C" void batched_sssp_cuGraph(int *source_node, in... |
target_data_array_extension_at_exit.c | // --------------------------------------------------
// Check extends before
// --------------------------------------------------
// RUN: %libomptarget-compile-generic \
// RUN: -fopenmp-version=51 -DEXTENDS=BEFORE
// RUN: %libomptarget-run-generic 2>&1 \
// RUN: | %fcheck-generic
// -----------------------------... |
plot.h | #ifndef OPENMC_PLOT_H
#define OPENMC_PLOT_H
#include <unordered_map>
#include <sstream>
#include "pugixml.hpp"
#include "xtensor/xarray.hpp"
#include "hdf5.h"
#include "openmc/position.h"
#include "openmc/constants.h"
#include "openmc/cell.h"
#include "openmc/error.h"
#include "openmc/geometry.h"
#include "openmc/pa... |
mg.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - MG
This benchmark is an OpenMP C version of the NPB MG code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by N... |
generator.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef GENERATOR_H_
#define GENERATOR_H_
#include <algorithm>
#include <cinttypes>
#include <iostream>
#include <random>
#include "graph.h"
#include "pvector.h"
#include "util.h"
/*
GAP Benchmark Su... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- 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
//
//===---------------------------... |
H2P_build_H2_UJ_proxy_levelup.c |
// Build H2 projection matrices using proxy points, level by level
void H2P_build_H2_UJ_proxy(H2Pack_p h2pack)
{
int pt_dim = h2pack->pt_dim;
int xpt_dim = h2pack->xpt_dim;
int krnl_dim = h2pack->krnl_dim;
int n_node = h2pack->n_node;
int n_leaf_n... |
interpolate_op.h | /* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
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... |
attention.c | #include "darknet.h"
#include <sys/time.h>
#include <assert.h>
void extend_data_truth(data *d, int n, float val)
{
int i, j;
for(i = 0; i < d->y.rows; ++i){
d->y.vals[i] = realloc(d->y.vals[i], (d->y.cols+n)*sizeof(float));
for(j = 0; j < n; ++j){
d->y.vals[i][d->y.cols + j] = val;... |
omp_alloc_def_fb.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <omp.h>
int main() {
omp_alloctrait_t at[2];
omp_allocator_handle_t a;
void *p[2];
at[0].key = omp_atk_pool_size;
at[0].value = 2 * 1024 * 1024;
at[1].key = omp_atk_fallback;
at[1].value = omp_atv_default_mem_fb;
a = omp_init_allocator(omp_la... |
DataGen.h | // Copyright (C) 2019-2020 Zilliz. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable l... |
variables.c | /*
test input
handling of variable scopes:
private, firstprivate, lastprivate
shared : from the same scope or from upper level scope
By C. Liao
*/
#include <stdio.h>
#ifdef _OPENMP
#include "omp.h"
#endif
int gi=0;
int m=1;
double mm=9.0;
#pragma omp threadprivate(m)
//#pragma omp threadprivate(mm)
int main... |
implicit_task_data.c | // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// This test checks that values stored in task_data in a barrier_begin event
// are still present in the corresponding barrier_end event.
// Therefore, callback implementations different from the ones in callback.h are neccessary.
// This... |
SplineR2RAdoptor.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Jeremy Mc... |
denseAsyncOverlappingJacobi.h | //
// Created by mbarb on 16/02/2018.
//
#ifndef PARALLELITERATIVE_DENSEASYNCOVERLAPPINGJACOBI_H
#define PARALLELITERATIVE_DENSEASYNCOVERLAPPINGJACOBI_H
#include <Eigen>
#include <iostream>
#include "utils.h"
#include "denseParallelJacobi.h"
namespace Iterative {
template <typename Scalar, long long SIZE>
... |
trans2d.c | /*Daala video codec
Copyright (c) 2013 Daala project contributors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this
list o... |
endif3.c | /* various cases of #if ...#endif
* */
#include<stdio.h>
static int par_res;
int fib (int, int);
// Easiest case: the extend of #if ..#endif is explicit as {} is used
int fib0 (int n)
{
//#pragma omp parallel
#pragma omp single
{
#if defined(MANUAL_CUTOFF) || defined(IF_CUTOFF)
par_res = fib(n,0);
#else
par... |
GB_binop__max_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
kernel_cpu.c | // #ifdef __cplusplus
// extern "C" {
// #endif
//========================================================================================================================================================================================================200
// DEFINE/INCLUDE
//=============================================... |
mixed_tentusscher_myo_epi_2004_S2_2.c | // Scenario 2 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt + Rc)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S2_2.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... |
mxEvaluateFlux2d.c | #include "mex.h"
#include "mxSWE2d.h"
#ifdef _OPENMP
#include <omp.h>
#endif
/** */
void evaluateNodalFlux(double hcrit,
double gra,
double h,
double qx,
double qy,
double* Eh,
dou... |
image_manipulation.h | #ifndef KUTILITY_IMAGE_MANIPULATION_H
#define KUTILITY_IMAGE_MANIPULATION_H
#include "kutility/kutility.def"
#include "kutility/general.h"
namespace kutility
{
template<typename T1, typename T2>
void scale( T1* src, int h, int w, float sc, T2* dst, int dh, int dw )
{
int nh = int( h*sc );
int nw ... |
test_verify_traces.c | #include "config.h"
#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#if defined(_MSC_VER)
#include "wingetopt/src/getopt.h"
#else
#include <unistd.h>
#endif
#include "parasail.h"
#include "pa... |
primo_omp.c | #include <omp.h>
#include <math.h>
int ompPrime(long int n) {
int i, in = 1;
int sqrtn = sqrt(n)-2;
if (n == 3) return 1;
else if (n % 2 == 0 || n % 3 == 0) return 0;
#pragma omp parallel shared(sqrtn,n,in) private(i)
{
#pragma omp for schedule(dynamic,50) nowait
for (i = 5; i <= sqrtn; ... |
openMP_for_par.c | #ifdef _OPENMP
#include <omp.h>
#endif
#include <cover_functions.h>
unsigned short int nb_thread;
unsigned long long nb_sol = 0;
void solve_OMP(const struct instance_t * instance, struct context_t ** ctxs)
{
int i, chosen_item;
struct sparse_array_t * active_options;
chosen_item = choose_next_item(ctxs[0]);
a... |
resource_strings.h | #pragma once
#include <torch/csrc/jit/frontend/code_template.h>
namespace torch {
namespace jit {
namespace fuser {
namespace cpu {
/*with type_as not checking type of its input, a fusion group can have non-fp32
tensor as input. Correct code for this case is generated, however, nvrtc does
not know how to handle int*... |
kernel_coulomb_potential.c | /*! @copyright (c) 2017 King Abdullah University of Science and
* Technology (KAUST). All rights reserved.
*
* STARS-H is a software package, provided by King Abdullah
* University of Science and Technology (KAUST)
*
* @generate NDIM -> n 1 2 3 4
* Generate different functions fo... |
udr-3.c | /* { dg-do compile } */
/* { dg-options "-fopenmp -std=gnu89" } */
struct S { int s; };
struct T { int t; };
struct U { int u; };
#pragma omp declare reduction (+: struct S: omp_out.s += omp_in.s)
#pragma omp declare reduction (*: struct S: omp_out.s *= omp_in.s) \
initializer (omp_priv = {1})
#pragma omp decla... |
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) ... |
regularisation.h | /* Incremental diffusion regularisation of parametrised transformation
using (globally optimal) belief-propagation on minimum spanning tree.
Fast distance transform uses squared differences.
Similarity cost for each node and label has to be given as input.
*/
void messageDT(int ind, float *data, short *indout, int l... |
pyfr_gemm_cm.c | /******************************************************************************
** Copyright (c) 2016-2019, Intel Corporation **
** All rights reserved. **
** **
... |
GB_unop__identity_fp64_int64.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... |
trmv_x_dia_n_hi_trans.c | #include "alphasparse/kernel.h"
#include "alphasparse/opt.h"
#include "alphasparse/util.h"
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha,
const ALPHA_SPMAT_DIA* A,
const ALPHA_Number* x,
... |
omp-general.c | /* General types and functions that are uselful for processing of OpenMP,
OpenACC and similar directivers at various stages of compilation.
Copyright (C) 2005-2020 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 ... |
analyze.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% AAA N N AAA L Y Y ZZZZZ EEEEE ... |
gb_utils.h | #pragma once
#include <memory>
#include <numeric>
extern "C" {
#define LAGRAPH_EXPERIMENTAL_ASK_BEFORE_BENCHMARKING 1
#include <GraphBLAS.h>
#include <LAGraph.h>
}
#include "utils.h"
//------------------------------------------------------------------------------
// ok: call a GraphBLAS method and check the result
... |
close_modifier.c | // RUN: %libomptarget-compile-run-and-check-generic
// REQUIRES: unified_shared_memory
// UNSUPPORTED: clang-6, clang-7, clang-8, clang-9
// amdgcn does not have printf definition
// XFAIL: amdgcn-amd-amdhsa
// XFAIL: amdgcn-amd-amdhsa-newRTL
#include <omp.h>
#include <stdio.h>
#pragma omp requires unified_shared_m... |
scheduled-clauseModificado.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) {
omp_sched_t kind;
int modifier;
int i, n=200,chunk,a[n],suma=0;
if(argc < 3) {
fprintf(stderr,"\nFalta iteraciones o chunk \n");
exit(-1);
}
n = atoi(argv[1])... |
clip_ref.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
GrB_Type_wait.c | //------------------------------------------------------------------------------
// GrB_Type_wait: wait for a user-defined GrB_Type to complete
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Licens... |
reduction-classic.c | /*
1. A local copy of reduction variable is made and initialized depending on the op(e.g. 0 for +).
2. Compiler finds standard reduction expressions containing op and uses them to update the local copy.
3. Local copies are reduced into a single value and combined with the original global value.
*/
#include <stdio.h>... |
5287.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 <po... |
iRCCE_get.c | //***************************************************************************************
// Get data from communication buffer.
//***************************************************************************************
//
// Author: Rob F. Van der Wijngaart
// Intel Corporation
// Date: 008/30/2010
//
//****... |
calculate_E_field_flat_all_in_one-zachsversion.h | /*
int k_delta[3][3] = {{1,0,0},
{0,1,0},
{0,0,1}};
*/
/*
Calculate the electric flux on both faces in the input direction.
*/
/*
TO CALL THIS FROM MAIN DRIVER:
for(int count = 1;count <= 2;count++) {
int Ai = (flux_dirn+count)%3; // flux_dirn=1, count=1;... |
GB_unop__identity_int16_uint32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
OpenMP_ArrayCountGE500.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(){
int A[100];
int i;
int count = 0;
srand(1234);
for(i=0;i<100;i++)
A[i] = rand()%1000;
#pragma omp parallel for reduction(+:count)
for(i=0;i<100;i++)
if(A[i] >= 500)
count = count + 1;
for (i=0;i<100;i++)
printf("A[%d]:%d\n", i, A[i]);... |
DRB028-privatemissing-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... |
target_data-3.c | /* { dg-do run } */
#include <stdlib.h>
const int ROWS = 5;
const int COLS = 5;
void init (int Q[][COLS], const int rows, const int cols)
{
int i, j;
for (i = 0; i < rows; i++)
for (j = 0; j < cols; j++)
Q[i][j] = (i + 1) * 100 + (j + 1);
}
void check (int a[][COLS], int b[][COLS], const int rows, con... |
cg_main.h | //MIT License
//
//Copyright (c) 2018 Sicong Zhuang
//
//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, mer... |
elementary.h | /*!
* \file elementary.h
* \author Jun Yoshida
* \copyright (c) Jun Yoshida 2019
* The project is released under BSD3 License.
* \detail
* Defining elementary operations on matrices.
*/
#ifndef NUMERIC_LINEARALGEBRA_BINARY_ELEMENTARY_H
#define NUMERIC_LINEARALGEBRA_BINARY_ELEMENTARY_H
#i... |
kvstore_dist_server.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 ... |
fx.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
thd_info.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "thd_info.h"
#include "util.h"
#include <omp.h>
/******************************************************************************
* PRIV... |
omp_orphan.c | /******************************************************************************
* FILE: omp_orphan.c
* DESCRIPTION:
* OpenMP Example - Parallel region with an orphaned directive - C/C++ Version
* This example demonstrates a dot product being performed by an orphaned
* loop reduction construct. Scoping of the re... |
rawmd5u_fmt_plug.c | /*
* Thick raw-md5-unicode (come-back :)
*
* This software is Copyright (c) 2011 magnum, and it is hereby released to the
* general public under the following terms: Redistribution and use in source
* and binary forms, with or without modification, are permitted.
*
*/
#if FMT_EXTERNS_H
extern struct fmt_main f... |
GB_unop__identity_int64_int16.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... |
shared-1.c | extern void abort (void);
extern int omp_get_num_threads (void);
struct Y
{
int l[5][10];
};
struct X
{
struct Y y;
float b[10];
};
void
parallel (int a, int b)
{
int i, j;
struct X A[10][5];
a = b = 3;
for (i = 0; i < 10; i++)
for (j = 0; j < 5; j++)
A[i][j].y.l[3][3] = -10;
#pragma omp ... |
surfmorph.h |
#ifndef SURFMORPH_H
#define SURFMORPH_H
#include "surfmorph_codegen.h"
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <Eigen/LU>
#include <Eigen/Sparse>
#include <Eigen/SparseCholesky>
#include <Eigen/SVD>
#include <cmath>
#include <stdexcept>
#include <unordered_map>
#include <utility>
#include <vector>
... |
9711.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 <po... |
speed_test.h | /*
Copyright (c) 2005-2016, University of Oxford.
All rights reserved.
University of Oxford means the Chancellor, Masters and Scholars of the
University of Oxford, having an administrative office at Wellington
Square, Oxford OX1 2JD, UK.
This file is part of Aboria.
Redistribution and use in source and binary forms... |
8174.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 <po... |
sum.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include <sys/time.h>
enum {
N = 1000000
};
double wtime()
{
struct timeval t;
gettimeofday(&t, NULL);
return (double)t.tv_sec + (double)t.tv_usec * 1E-6;
}
double sum(double *v, int low, int high)
{
if (low == high)
... |
fabio_c.c | /*
Contains the IO routines for fabio module
*/
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#define FILE_MODE ( S_IRUSR | S_IWUS... |
assumes_messages.c | // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
#pragma omp assumes // expected-error {{expected at least one 'ext_', 'absent', 'contains', '... |
9694.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 <po... |
core_dpotrf_blasfeo.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @generated from core_blas/core_zpotrf.c, normal z -> d, Thu Aug 8 17:24:58 2019
*
**/
#include <plasma_core_blas.h>
#include "plasma_types.h"
#include "core_lapack.h"
#include "b... |
GB_binop__le_int64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.