source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
SpatialZeroPadding.c | #include <string.h>
#include "../thnets.h"
THFloatTensor *nn_SpatialZeroPadding_updateOutput(struct module *module, THFloatTensor *input)
{
int idim = input->nDimension;
if(idim != 3 && idim != 4)
THError("input dimension must be 3 or 4");
int pad_l = module->SpatialZeroPadding.pad_l;
int pad_r = module->Spatial... |
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... |
vsAbs.c | /*
* Copyright (c) 2016 Idein Inc. ( http://idein.jp/ )
* All rights reserved.
*
* This software is licensed under a Modified (3-Clause) BSD License.
* You should have received a copy of this license along with this
* software. If not, contact the copyright holder above.
*/
#include "mkl.h"
#include <stdio.h>
#... |
threshold.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
computepi.c | #include <stdio.h>
#include <immintrin.h>
#include <omp.h>
#include "computepi.h"
double compute_pi_baseline(size_t N)
{
double pi = 0.0;
double dt = 1.0 / N; // dt = (b-a)/N, b = 1, a = 0
for (size_t i = 0; i < N; i++) {
double x = (double) i / N; // x = ti = a+(b-a)*i/N = i/N
... |
matrix.c | /*
Copyright © INRIA 2009-2014.
Authors: Matthijs Douze & Herve Jegou
Contact: matthijs.douze@inria.fr herve.jegou@inria.fr
This file is part of Yael.
Yael 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 Founda... |
3d7pt_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 7 point stencil with variable coefficients
* Adapted from PLUTO and Po... |
uts.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... |
conv_direct_hcl_x86.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... |
LAGraph_BF_full.c | //------------------------------------------------------------------------------
// LAGraph_BF_full.c: Bellman-Ford single-source shortest paths, returns tree
//------------------------------------------------------------------------------
// LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
// SPDX-... |
par_multi_interp.c | /******************************************************************************
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
**************************************... |
optimize.h | /* -------------------------------------------------------------------------------
* Tomocam Copyright (c) 2018
*
* The Regents of the University of California, through Lawrence Berkeley
*National Laboratory (subject to receipt of any required approvals from the
*U.S. Dept. of Energy). All rights reserved.
*
* I... |
tensor_operators.h | #pragma once
template <typename Type>
tensor<Type> tensor<Type>::operator+=(tensor<Type> const& other)
{
if (shape().first == other.shape().first && other.shape().second == 1)
{
#pragma omp parallel for
for (int64_t i = 0; i < shape().first; ++i)
{
auto const elem = other[{i, 0}];
for (int64_t j = 0; j <... |
MasterBodyLink.c | int x;
int main () {
#pragma omp master
{
100;
}
#pragma omp master
{
int x;
}
}
|
linalg.c | /******************************************************************************
* Copyright (c) 2015 - 2016 Philipp Schubert. *
* All rights reserved. This program and the accompanying materials are made *
* available under the terms of LICENSE.txt. *
... |
pmv-OpenMP-a.c | /*
Multiplica una matriz por un vector
*/
#include <stdlib.h> // biblioteca con funciones atoi(), malloc() y free()
#include <stdio.h> // biblioteca donde se encuentra la función printf()
#include <time.h> // biblioteca donde se encuentra la función clock_gettime()
#ifdef _OPENMP
#include <omp.h>
#else
... |
mcip_omp_main.c | /****************
*
* DSP-side
* http://fengyh.cn/
*
*****************/
#include <c6x.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <ti/ndk/inc/netmain.h>
#include <ti/ndk/inc/_stack.h>
#include <ti/ndk/inc/tools/console.h>
#include <ti/ndk/inc/tools/servers.h>
#include <x... |
halos.c | #include "../comms.h"
#include "../mesh.h"
// Enforce reflective boundary conditions on the problem state
void handle_boundary_2d(const int nx, const int ny, Mesh* mesh, double* arr,
const int invert, const int pack) {
START_PROFILING(&comms_profile);
const int pad = mesh->pad;
int* neig... |
Example_atomic.1.c | /*
* @@name: atomic.1c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_3.1
*/
float work1(int i)
{
return 1.0 * i;
}
float work2(int i)
{
return 2.0 * i;
}
void atomic_example(float *x, float *y, int *index, int n)
{
int i;
#pragma omp parallel for shared(x, y, index, ... |
ten_tusscher_2004_epi_S2_9.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S2_9.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO:... |
GB_unaryop__ainv_int8_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
convolution_3x3_packn_fp16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 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 ... |
map_thread.c | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "uimpl.h"
void map(struct mapcont *mc)
{
if ( mc->mtype == MT1 )
{
const uint32_t (*fun4)(uint32_t) = mc->fun;
int i;
#pragma omp parallel for
for (i = 0; i < mc->param->size; ++i)
{
*(((ui... |
team.c | /* Copyright (C) 2005-2017 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU Offloading and Multi Processing Library
(libgomp).
Libgomp is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public Licen... |
redetect.c | // RUN: %libomp-compile
// RUN: env KMP_AFFINITY=none %libomp-run
// REQUIRES: linux
// Check if forked child process resets affinity properly by restricting
// child's affinity to a subset of the parent and then checking it after
// a parallel region
#define _GNU_SOURCE
#include "libomp_test_affinity.h"
#include <om... |
DRB009-lastprivatemissing-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... |
coeff_template.c | //${_warning_in_the_generated_file_not_to_edit}
<%doc>
// Generated from Mako template: coeff_template.c
// DO NOT EDIT THIS FILE MANUALLY
</%doc>
//#include <math.h>
#include "power.c"
%if SIZE_T == 'size_t':
#include <stdlib.h> /* size_t */
%endif
// solve shifted first order coeff
// token_coeff[wy]
// we only hav... |
ompfor6.c | /*
* test #if #else #endif
* from NPB 2.3 C version LU
* #if defined(_OPENMP) is attached to the for loop,
* which will be moved under SgOmpForStatement as its body.
*
* In this case, we want to #if defined(_OPENMP) to go
* with the for loop and not be automatically kept in its original place
* by SageInterface::... |
MkBase.h | #ifndef RecoTracker_MkFitCore_src_MkBase_h
#define RecoTracker_MkFitCore_src_MkBase_h
#include "Matrix.h"
#include "PropagationMPlex.h"
namespace mkfit {
//==============================================================================
// MkBase
//===============================================================... |
vnc_fmt_plug.c | /* VNC cracker patch for JtR. Hacked together during March of 2012 by
* Dhiru Kholia <dhiru.kholia at gmail.com>
*
* On Windows, Use Ettercap to get VNC challenge-response pairs in
* JtR format. E.g. ettercap -Tq -r /home/user/sample.pcap
*
* On other platforms, vncpcap2john.cpp should be able to parse
* .pcap f... |
segmentation_algorithms.h | /*
Copyright (c) 2013, Kai Klindworth
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the followi... |
fractional_step_strategy.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
#ifndef KRATO... |
gsim_exec_functional.c | /*
*
* _GSIM_EXEC_FUNCTIONAL_C_
*
* GOBLIN-SIM FUNCTIONAL SIMULATION EXECUTION
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "goblin_sim.h"
/* -------------------------------------------------- FUNCTION PROTOTYPES */
extern int gsim_clock( struct gsim_t *sim... |
GB_unop__identity_int32_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... |
modularity_spectral.c | #include <time.h>
#include "graph_partitioning.h"
#include "utils.h"
typedef struct {
double *dist; /* stores the value */
int *vertex; /* map from the index of dist to vertex */
int *map; /* map from vertex to index of dist */
int *from; /* map from vertex to its parents in djkstra */... |
example3.c | #include "multi_fbeam.h"
#include <sys/stat.h>
#include <errno.h>
#include <png.h>
typedef struct image_data{
char dir_name[64]; // directory name to output image
int scale; // number for enlarge the output image
int m; // sampling number
double rang; // rang... |
SpatialDilatedMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "THNN/generic/SpatialDilatedMaxPooling.c"
#else
#include <THNN/generic/pooling_shape.h>
#include <algorithm>
static inline void THNN_(SpatialDilatedMaxPooling_shapeCheck)(
THTensor *input, THTensor *gradOutput, THIndexTensor *indices,
int kH, int kW, int dH, int dW, i... |
test.c |
#include <stdio.h>
#include <omp.h>
#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)
int check_results(double* A){
for (int i = 0 ; i < N ; i++){
if (A[i] != ... |
bd_omp.c | #include <stdlib.h>
#include <stdio.h>
#include <unistd.h> // access
#include <math.h>
#include <assert.h>
#include "timer.h"
#include "bd.h"
#include <omp.h>
#include <mkl.h>
#define NTHREADS 240
#define M_PI 3.14159265358979323846
#define my_EPS 0.000000001
void print_matrix(double *a, int n){
for(int i=0;i<5;... |
GB_binop__gt_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-... |
xthi.c | #define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sched.h>
#include <mpi.h>
#include <omp.h>
#include <sys/syscall.h>
/* Borrowed from util-linux-2.13-pre7/schedutils/taskset.c */
static char *cpuset_to_cstr(cpu_set_t *mask, char *str)
{
char *ptr = str;
int i, j, entry_made... |
GB_unaryop__lnot_int8_uint16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
zungqr.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> s d c
*
**/
#include "plasma.h"
#include "plasma_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include ... |
test.c | #include <stdio.h>
#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])
{
#pragma omp teams
#pragma omp distribute simd
... |
ep.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 2.3 OpenMP C versions - EP
This benchmark is an OpenMP C version of the NPB EP code.
The OpenMP C versions are developed by RWCP and derived from the serial
Fortran versions in "NPB 2.3-serial" developed by NAS.
... |
par_vector.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)
**************************************... |
familytree_par.c | #include "familytree.h"
#include <omp.h>
int par_traverse(tree *node) {
if (node == NULL) return 0;
int father_iq, mother_iq;
#pragma omp task shared(father_iq)
father_iq = par_traverse(node->father);
//#pragma omp task shared(mother_iq)
mother_iq = par_traverse(node->mother);
#pragma ... |
pt_to_pt_haloexchange.c | /*****************************************************************************
* *
* Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 *
* *
* ... |
mxEvaluateFlux1d.c | #include "mex.h"
#include "mxSWE1d.h"
#ifdef _OPENMP
#include <omp.h>
#endif
void evaluateNodalFlux(double hcrit,
double gra,
double h,
double qx,
double z,
double* Eh,
double* Eqx... |
common.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_UTILS_COMMON_FUN_H_
#define LIGHTGBM_UTILS_COMMON_FUN_H_
#include "../../../external_libs/fmt/include/fmt/format.h"
#include "../..... |
explicit_builder.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Ruben Zorrilla
//
//
#if !def... |
ncpdq.c | /* $Header$ */
/* ncpdq -- netCDF pack, re-dimension, query */
/* Purpose: Pack, re-dimension, query single netCDF file and output to a single file */
/* Copyright (C) 1995--present Charlie Zender
This file is part of NCO, the netCDF Operators. NCO is free software.
You may redistribute and/or modify NCO under... |
skel-w2e.c | #include <stdio.h>
#include <stdlib.h>
#include "ofmo-parallel.h"
#include "ofmo-def.h"
#include "skel-w2e.h"
#ifdef USE_CUDA
#include "cuda/cuda-integ.h"
#include "cuda/cudalib.h"
#endif
static double w2e[] = {
-1.0e0, -1.0e0, -1.0e0, -1.0e0, -1.0e0, -1.0e0,
-1.0e0, -1.0e0, -1.0e0, -1.0e0, -1.0e0, -... |
uagf2.c | /* Copyright 2014-2020 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
Unles... |
AffineParametric_private.h | /* Robust Estimation of Multiple Motions
*
* This motion estimation based on
* M.J.Black and P.Anandan, "The Robust Estimation of Multiple Motions: Parametric and Piecewise-Smooth Flow Fields," Computer Vision and Image Understanding, Vol.63, No.1, 1996, pp.75-104.
*/
template <class T>
std::vector<ImgVector<Ve... |
gemv_c_bsr_conj.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#include <string.h>
#endif
static alphasparse_status_t
gemv_bsr_conj_omp(const ALPHA_Number alpha,
const A... |
main.c | /*
* =======================================================================================
*
* Author: Jan Eitzinger (je), jan.eitzinger@fau.de
* Copyright (c) 2020 RRZE, University Erlangen-Nuremberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of th... |
precedence_move_generator.h | /*****************************************************************************/
// Copyright (c) 2020-2021 Yuji KOGUMA
// Released under the MIT license
// https://opensource.org/licenses/mit-license.php
/*****************************************************************************/
#ifndef PRINTEMPS_NEIGHBORHOOD_PRECE... |
convolution_5x5.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 ... |
ccl_cls.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_integration.h>
#include "ccl.h"
typedef struct{
double l;
ccl_cosmology *cosmo;
ccl_cl_tracer_collection_t *trc1;
ccl_cl_tracer_collection_t *trc2;
ccl_f2d_t *psp;
int *status;
} inte... |
column_matrix.h | /*!
* Copyright 2017 by Contributors
* Modifications Copyright 2020 by Secure XGBoost Contributors
* \file column_matrix.h
* \brief Utility for fast column-wise access
* \author Philip Cho
*/
#ifndef XGBOOST_COMMON_COLUMN_MATRIX_H_
#define XGBOOST_COMMON_COLUMN_MATRIX_H_
#include <limits>
#include <vector>
#inc... |
blas1_dispatch_vector.h | #ifndef _DG_BLAS_STD_VECTOR_
#define _DG_BLAS_STD_VECTOR_
#ifdef DG_DEBUG
#include <cassert>
#endif //DG_DEBUG
#include <vector>
#include <array>
#include "blas1_dispatch_shared.h"
#include "vector_categories.h"
#include "tensor_traits.h"
#ifdef _OPENMP
#include <omp.h>
#endif //_OPENMP
///@cond
namespace dg
{
templ... |
sum.c |
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <R.h>
#include <Rmath.h>
#include <Rinternals.h>
#if defined _OPENMP
#include <omp.h>
#endif
double sumKernel(
double * x, /* naip image */
double * W, /* pre computed spatial weights */
size_t i, /* current location in colu... |
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
//
//===---------------------------... |
trig_test.c | /*
This file is part of FFTS -- The Fastest Fourier Transform in the South
Copyright (c) 2018, Jukka Ojanen <jukka.ojanen@kolumbus.fi>
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... |
fourier.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ridgedfractalnoise.h | #pragma once
#ifndef RIDGID_FRACTAL_NOISE_H
#define RIDGID_FRACTAL_NOISE_H
#include "noisecommon.h"
#define DEFAULT_RIDGED_FREQUENCY 1.0
#define DEFAULT_RIDGED_LACUNARITY 2.0
#define DEFAULT_RIDGED_OCTAVE_COUNT 6
#define DEFAULT_RIDGED_SEED 0
#define DEFAULT_RIDGED_POSITION_X 0.0
#define DEFAULT_RIDGED_POSITION_Y 0.0... |
omp_parallel_for_if.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
int test_omp_parallel_for_if()
{
int known_sum;
int num_threads;
int sum, sum2;
int i;
int control;
control = 0;
num_threads=0;
sum = 0;
sum2 = 0;
#pragma omp parallel for private(i) if (control==1)
... |
hermv_c_bsr_u_hi_trans.c | #include<string.h>
#ifdef _OPENMP
#include<omp.h>
#endif
#include"alphasparse/opt.h"
#include "alphasparse/kernel.h"
#include "alphasparse/util.h"
alphasparse_status_t
ONAME(const ALPHA_Number alpha,
const ALPHA_SPMAT_BSR *A,
const ALPHA_Number *x,
const ALPHA_Numb... |
GB_unaryop__minv_int8_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
dci.h | #ifndef DYNAMIC_CONTINUOUS_INDEXING_H__
#define DYNAMIC_CONTINUOUS_INDEXING_H__
#ifndef FHT_HEADER_ONLY
# define FHT_HEADER_ONLY 1
#endif
#include <cstdint>
#include <cstdlib>
#include "lsh.h"
#include "sdq.h"
#include <map>
#include <cmath>
#include <set>
#include <unordered_set>
#include <queue>
#include "blaze/Math... |
3d25pt.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tar... |
gemm_kernel.h | /* Copyright (c) 2019 PaddlePaddle Authors. 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 law or... |
mkldnn_os.h | /*******************************************************************************
* Copyright 2017 NEC Labs America
*
* 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.or... |
lbfgsbsolver.h | // CppNumericalSolver
// based on:
// L-BFGS-B: A LIMITED MEMORY ALGORITHM FOR BOUND CONSTRAINED OPTIMIZATION
// Richard H. Byrd, Peihuang Lu, Jorge Nocedal and Ciyou Zhu
#include <iostream>
#include <list>
#include <Eigen/LU>
#include "isolver.h"
#include "../boundedproblem.h"
#include "../linesearch/morethuente.h"
#i... |
GB_unaryop__identity_fp32_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... |
GB_binop__second_fc32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
1.norace4.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define N 20
int main() {
int A[N][N];
#pragma omp parallel for schedule(dynamic)
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
A[i][j] = A[i][j - 1];
}
// CHECK: Region is Data Race Free.
// END
|
GB_unop__lnot_bool_bool.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
SpatialAdaptiveMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialAdaptiveMaxPooling.c"
#else
#define START_IND(a,b,c) (int)floor((float)(a * c) / b)
#define END_IND(a,b,c) (int)ceil((float)((a + 1) * c) / b)
// #define START_IND(a,b,c) a * c / b
// #define END_IND(a,b,c) (a + 1) * c / b + ((a + 1) * c % b > 0)?1:0
//... |
GB_binop__times_int16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
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... |
pair_dist.c | /* -*- mode: c; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*********************************************************************
* Clustal Omega - Multiple sequence alignment
*
* Copyright (C) 2010 University College Dublin
*
* Clustal-Omega is free software; you can redistribute it and/or
*... |
channel.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__isge_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-... |
serial_teams.c | // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: gcc
#include "callback.h"
int main() {
#pragma omp target teams num_teams(2) thread_limit(1)
#pragma omp parallel num_threads(1)
{ printf("In teams parallel\n"); }
return 0;
}
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
/... |
EwaldRef.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2019 QMCPACK developers.
//
// File developed by: Jaron T. Krogel, krogeljt@... |
generator_spgemm_csc_asparse.c | /******************************************************************************
** Copyright (c) 2015-2018, Intel Corporation **
** All rights reserved. **
** **
... |
lpnorm.c | #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <immintrin.h>
#include <omp.h>
#include <Python.h>
#include <numpy/arrayobject.h>
static PyObject *lpnorm_func(PyObject* self, PyObject* args)
{
PyObject *arr_obj = NULL;
PyObject *arr_arr = NULL;
PyArrayObject *arr = NULL;
double p;
doubl... |
libm-amdgcn.c | //===--------- libm/libm-amdgcn.c -----------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------------------... |
blackscholes.c | // Copyright (c) 2007 Intel Corp.
// Black-Scholes
// Analytical method for calculating European Options
//
//
// Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice
// Hall, John C. Hull,
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <sys/time.... |
PhysicalConstants.h | #ifndef included_PhysicalConstants
#define included_PhysicalConstants
namespace Thermo4PFM
{
#ifdef HAVE_OPENMP_OFFLOAD
#pragma omp declare target
#endif
const double gas_constant_R_JpKpmol = 8.314472; // J K-1 mol-1
#ifdef HAVE_OPENMP_OFFLOAD
#pragma omp end declare target
#endif
}
#endif
|
test_omp.c | /*
* gcc -O2 -fopenmp -o test_omp test_omp.c
*
* [pthread-w32, gcc-4.6.2-20110801]
* Hello World from thread = 0
* Number of threads = 2
* Hello World from thread = 1
*
* [Linux-2.6.32, gcc-4.4.5]
* Hello World from thread = 0
* Number of threads = 8
* Hello World from thread = 2
* Hello World from thread =... |
omp_taskwait.c | <ompts:test>
<ompts:testdescription>Test which checks the omp taskwait directive. First we generate a set of tasks, which set the elements of an array to a specific value. Then we do a taskwait and check if all tasks finished meaning all array elements contain the right value. Then we generate a second set setting the ... |
lu2_mpi.c | //#define DO_RCOMM_LAST
//#define CONCURRENT_UCOMM
// lu2_mpi.c
//
// test program for blocked LU decomposition
//
// Time-stamp: <2019-05-21 12:16:12 makino>
//#define NOBLAS
//#define TIMETEST
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <omp.h>
#include <stdio.h>... |
GB_unop__identity_fc32_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... |
cuda.h | #ifndef CXXBLAS_AUXILIARY_CUDA_H
#define CXXBLAS_AUXILIARY_CUDA_H 1
#if defined(HAVE_CUBLAS) || defined(HAVE_CUSOLVER)
#include <string> // XXX
#include <vector>
#include <thrust/execution_policy.h>
#include <thrust/device_ptr.h>
// Implement a strided range/iterator
#include <thrust/iterator/counting_iterator.h>
#... |
GB_binop__band_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-... |
SSBOStreamer.h | /*
* SSBOStreamer.h
*
* Copyright (C) 2018 by VISUS (Universitaet Stuttgart)
* Alle Rechte vorbehalten.
*/
#ifndef MEGAMOLCORE_SSBOSTREAMER_H_INCLUDED
#define MEGAMOLCORE_SSBOSTREAMER_H_INCLUDED
#if (defined(_MSC_VER) && (_MSC_VER > 1000))
#pragma once
#endif /* (defined(_MSC_VER) && (_MSC_VER > 1000)) */
#include "v... |
tomita.h | #pragma once
#ifndef BRONKERBOSCHTOMITA_H
#define BRONKERBOSCHTOMITA_H
#include "../general.h"
namespace BkTomita
{
template <class SGraph, class Set>
NodeId findPivot(const Set &cand, const Set &fini, const SGraph &graph)
{
auto vPtr = cand.begin();
auto end = cand.end();
NodeId pivot = *vPtr;
Node... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.