source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GB_unaryop__abs_int64_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
2654.c | // this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose
void kernel_heat_3d(int tsteps, int n, double A[120 + 0][120 + 0][120 + 0], double B[120 + 0][120 + 0][120 + 0])... |
rose_endif3.c | /* various cases of #if ...#endif
* */
#include<stdio.h>
#include "libxomp.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
if (XOMP_single()) {
#if defined(MANUAL_CUTOFF) || defined(IF_CUTOFF)
#else
par_re... |
GB_binop__isne_fp32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
gm_map.h | #ifndef GM_MAP_H_
#define GM_MAP_H_
#include <map>
#include "gm_internal.h"
#include "gm_limits.h"
#include "gm_lock.h"
using namespace std;
//map-interface
template<class Key, class Value>
class gm_map
{
public:
virtual ~gm_map() {
}
;
virtual bool hasKey_seq(const Key key) = 0;
virtual bool... |
SparseLinear.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "src/SparseLinear.c"
#else
#ifdef _OPENMP
#include <omp.h>
#endif
#define ROW_PTR2(t, r) (THTensor_(data)(t) + (r) * (t)->stride[0])
#define COL_PTR2(t, c) (THTensor_(data)(t) + (c) * (t)->stride[1])
static int nn_(checkInput)(THTensor* t) {
return t->nDimension == 3... |
GB_unop__identity_int16_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
main.c | // C Compiler flag: -fopenmp
#include <stdio.h>
#include <omp.h>
#define N 20
int main(int argc, char *argv[])
{
int i, myid;
omp_set_dynamic(0); // запретить библиотеке openmp менять число потоков во время исполнения
omp_set_num_threads(8); // установить число потоков в 2
#pragma omp parallel private(myid)
{... |
FFDBase.h | /** \file FFDBase.h
\brief Base class for FreeFormDeformation package
FreeFormDeformation (FFD) is a general purpose scatter interpolation algorithm. It is widely used in numerical applications,
such as image registration, data inteprolation and geometric modelling etc.
... |
fs_strategy_for_chimera.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Authors: Aditya Ghantasala, https://g... |
StreamTriad.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <mpi.h>
#include <omp.h>
#include "timer.h"
#include "place_report_mpi_omp.h"
#define NTIMES 50
// large enough to force into main memory
#define STREAM_ARRAY_SIZE 20000000
int main(int argc, char *argv[]){
int provided;
MPI_Init_thread(&argc, &... |
round_robin_clusters.c | #define N 10
#define NB_CLUSTERS 4
#define NB_PES 16
#define MIN(x, y) ((x) < (y) ? x : y)
#include <stdio.h>
int get_ticket() {
static int t = 0;
int ticket;
// In case this is called from several threads. Avoid a flush, anyway
#pragma omp atomic capture
ticket = t++;
return ticket;
}
int get_data(t) {
... |
SparseDenseProduct.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2014 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You c... |
DRB048-firstprivate-orig-no.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
oyranos_cmm_lcms.c | /** @file oyranos_cmm_lcms.c
*
* Oyranos is an open source Color Management System
*
* @par Copyright:
* 2007-2016 (C) Kai-Uwe Behrmann
*
* @brief littleCMS CMM module for Oyranos
* @author Kai-Uwe Behrmann <ku.b@gmx.de>
* @par License:
* new BSD <http://www.opensource.org/lic... |
main.c | #include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <math.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_timer.h>
#ifdef _OPENMP
#include <omp.h>
#else
#ifndef _ESCAPE_OPENMP
#define omp_get_num_threads() 1
#define omp_get_thread_num() 0
#define omp_get_m... |
Grad.h | #ifndef GRAD_H_INCLUDED
#define GRAD_H_INCLUDED
int WIDTH=1280;
int HEIGHT=720;
double HWIDTH=640.0;
double HHEIGHT=360.0;
int pb[21],pg[21],pr[21],dpr[20]= {0},dpg[20]= {0},dpb[20]= {0},point=0,preset=0,dpr1[20]= {0},dpg1[20]= {0},dpb1[20]= {0},dpr2[20]= {0},dpg2[20]= {0},dpb2[20]= {0};
char polator=0;
unsigne... |
GB_emult_02_template.c | //------------------------------------------------------------------------------
// GB_emult_02_template: C = A.*B when A is sparse/hyper and B is bitmap/full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.... |
Data.h |
/*****************************************************************************
*
* Copyright (c) 2003-2020 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development unt... |
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.
//
// And has the following additional copyright:
//
// (C) Cop... |
profile.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unaryop__minv_fp32_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
hdiffsa.h | #ifndef HDIFFSA_H
#define HDIFFSA_H
void hdiffsa(Storage3D& out, const Storage3D& in, const Storage3D& mask, const Storage1D& crlato,
const Storage1D& crlatu, Storage3D& lap, Storage3D& flx, Storage3D& fly) {
for (int64_t k = 0; k < domain_height; ++k) {
for (int64_t i = -1; i < domain_size + 1; ++i... |
DRB008-indirectaccess4-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... |
kernel_sin.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... |
GB_unop__identity_fc64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
convolution_pack8.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2022 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 ... |
coordinate_common.h | /*!
* Copyright 2018 by Contributors
* \author Rory Mitchell
*/
#pragma once
#include <algorithm>
#include <string>
#include <utility>
#include <vector>
#include <limits>
#include "xgboost/data.h"
#include "xgboost/parameter.h"
#include "./param.h"
#include "../gbm/gblinear_model.h"
#include "../common/random.h"
#i... |
divsufsort.c | #ifndef USE_EXTERNAL_ZSTD
/*
* divsufsort.c for libdivsufsort-lite
* Copyright (c) 2003-2008 Yuta Mori All Rights Reserved.
*
* 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
* ... |
zgeinv.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 ... |
omp_thread.h | /* Copyright (c) 2018 NoobsHPC 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 applic... |
Layers.h | /*
* Layers.h
*
* Created by Guido Novati on 29.10.18.
* Copyright 2018 ETH Zurich. All rights reserved.
*
*/
#pragma once
#include "Activations.h"
#include "Params.h"
#ifndef __STDC_VERSION__ //it should never be defined with g++
#define __STDC_VERSION__ 0
#endif
#include "cblas.h"
struct Layer
{
const ... |
bicubic.h | /// @file bicubic.h
/// @brief bicubic interp
/// @author Jeff Perry <jeffsp@gmail.com>
/// @version 1.0
/// @date 2013-01-14
///
/// This came straight out of http://en.wikipedia.org/wiki/Bicubic_interpolation
#ifndef BICUBIC_H
#define BICUBIC_H
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iostre... |
SEMMTMaterial.c | /* This file is part of redbKIT.
* Copyright (c) 2016, Ecole Polytechnique Federale de Lausanne (EPFL)
* Author: Federico Negri <federico.negri@epfl.ch>
*/
#include "SEMMTMaterial.h"
/*************************************************************************/
void SEMMTMaterial_forces(mxArray* plhs[], const m... |
bml_trace_dense_typed.c | #ifdef BML_USE_MAGMA
#include "magma_v2.h"
#endif
#include "../../macros.h"
#include "../../typed.h"
#include "../blas.h"
#include "../bml_logger.h"
#include "../bml_parallel.h"
#include "../bml_trace.h"
#include "../bml_types.h"
#include "bml_trace_dense.h"
#include "bml_types_dense.h"
#include <complex.h>
#include ... |
GB_matlab_helper.c | //------------------------------------------------------------------------------
// GB_matlab_helper.c: helper functions for MATLAB interface
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-... |
pcg.h | /*
* PCG Random Number Generation for C.
*
* Copyright 2014 Melissa O'Neill <oneill@pcg-random.org>
*
* 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/lice... |
ast-dump-openmp-taskwait.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test() {
#pragma omp taskwait
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-taskwai... |
symv_c_coo_u_lo_conj.c | #include "alphasparse/kernel.h"
#include "alphasparse/kernel_plain.h"
#include "alphasparse/opt.h"
#include "alphasparse/util.h"
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t
symv_coo_u_lo_omp(const ALPHA_Number alpha,
const ALPHA_SPMAT_COO *A,
const ALPHA_Number *... |
GB_unaryop__identity_uint64_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... |
taskdep1-orig-no.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
dataset.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_DATASET_H_
#define LIGHTGBM_DATASET_H_
#include <LightGBM/config.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/meta.h>
... |
GB_binop__div_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
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) ... |
idasFoodWeb_kry_omp.c | /*
* -----------------------------------------------------------------
* Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2022, Lawrence Livermore National Security
* and Southern Methodist Univ... |
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... |
convolution_1x1.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 ... |
yescrypt-simd_c.h | /*-
* Copyright 2009 Colin Percival
* Copyright 2012-2014 Alexander Peslyak
* 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 copy... |
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... |
SpatialConvolutionMM.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialConvolutionMM.c"
#else
/* note: due to write issues, this one cannot be parallelized as well as unfolded_copy */
static void nn_(unfolded_acc)(THTensor *finput, THTensor *input,
int kW, int kH,
... |
linalg.h | /* Software SPAMS v2.1 - Copyright 2009-2011 Julien Mairal
*
* This file is part of SPAMS.
*
* SPAMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your optio... |
GB_unop__bnot_uint16_uint16.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
pr24455-1.c | /* { dg-do compile } */
/* { dg-require-effective-target tls } */
extern int i;
#pragma omp threadprivate (i)
int i;
|
sphmap.h | #ifndef SPHMAP_H
#define SPHMAP_H
#include <omp.h>
#include <vector>
#include <map>
#include <unordered_map>
#include <cmath>
#include <algorithm>
#include <glm/vec3.hpp>
#include <glm/mat3x3.hpp>
#include <glm/geometric.hpp>
#include <glm/gtx/scalar_multiplication.hpp>
#include "sphparticle.h"
#define LOG 0
using ... |
zero_length_array_section.c | // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu -fopenmp-version=51
// RUN: %libomptarget-run-fail-aarch64-unknown-linux-gnu 2>&1 \
// RUN: | %fcheck-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu -fopenmp-version=51
// RUN: %libomptarget-run-fail-powerpc64-ibm-linux-gnu 2>&1 \... |
nestedfn-1.c | /* This testcase violates the OpenMP requirements, as nested functions
access the original variables.
We test it just to make sure we don't ICE on it. */
/* { dg-do compile } */
/* APPLE LOCAL testsuite nested functions */
/* { dg-options "-O2 -fopenmp -fnested-functions" } */
extern void abort (void);
extern i... |
salted_sha1_fmt_plug.c | /*
* generic salted-sha1 support for LDAP style password storage
*
* Copyright (c) 2003 Simon Marechal, salt length fixes (c) 2012 magnum
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*/
#if FMT_EXTERNS_H
extern struct fmt_main fmt_saltedsha;
#elif FMT_REG... |
GB_binop__bxnor_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:... |
GB_unop__asin_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
Rasterizer.h | #ifndef RASTERIZER_INCLUDED
#define RASTERIZER_INCLUDED
#include <vector>
#include <omp.h>
#include "Util/Geometry.h"
#include "SignalProcessing/CubeGrid.h"
template< class Real >
void Rasterize( Point3D< Real > v1 , CubeGrid< char >& grid , Real scale=Real(1.) );
template< ... |
c_jacobi02.c | /* ***********************************************************************
This program is part of the
OpenMP Source Code Repository
http://www.pcg.ull.es/ompscr/
e-mail: ompscr@etsii.ull.es
Copyright (c) 2004, OmpSCR Group
All rights reserved.
Redistribution and use in source and ... |
dropout-inl.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 ... |
ops.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.
*
*... |
d3q15.c | /* 3 dimensional, 15 velocity Lattice Boltzmann code.
*/
#include <stdlib.h>
#include <math.h>
#include "d3q15.h"
#include "omp.h"
/************************************************************/
/* static const int q = DQ_q; */
/* static const int d = DQ_d; */
/* identity matrix */
static double DQ_delta[DQ_d][DQ_d]... |
decorate.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
cameraFast.h | #pragma once
#include "accelerationStructure/fastNodeManager.h"
#include "camera.h"
#include "glmInclude.h"
#include "timing.h"
#include "cacheSimulator.h"
#include "timing.h"
#include "util.h"
#include "fastRay.h"
#include <iostream>// writing on a text file
#include <fstream>
#include <algorithm>
#include <vector>... |
ex5-norm-mean-stddev-openmp.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <omp.h>
#define VALIDATE 0
#if VALIDATE
#include "validate.h"
#endif
double *normrnd(const size_t, const size_t, const double, const double);
double mean(const size_t, const size_t, const double * restrict);
double std(const size_t... |
main.c | /**
* @file main.c
* @author Oswaldo Hernandez
* @brief Calculates trapezoidal AUC using OPENMP
* @version 0.1
* @date 2021-12-01
*/
#include <stdio.h>
#include <omp.h>
#include <math.h>
#define f(x) 1/(1+pow(x,2))
int main(){
/* Variables */
float k;
int i;
int lower = 0;
int upper = 1;
... |
graph.c | /*!
* \file
*
* \brief Various routines with dealing with sparse graphs
*
* \author George Karypis
* \version\verbatim $Id: graph.c 22415 2019-09-05 16:55:00Z karypis $ \endverbatim
*/
#include <GKlib.h>
#define OMPMINOPS 50000
/*************************************************************************... |
owl_ndarray_conv_impl.h | /*
* OWL - OCaml Scientific and Engineering Computing
* Copyright (c) 2016-2022 Liang Wang <liang@ocaml.xyz>
*/
#ifndef OWL_CORE_CONV_IMPL
#define OWL_CORE_CONV_IMPL
/*
* Calculate the block sizes for convolution operations.
* Code heavily inspired by Eigen (http://eigen.tuxfamily.org/).
*/
#define IM2COL_THRE... |
GB_binop__bor_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
task_wait2.c | /* input: result
* Based on A.13.4c, p182 of OMP 3.0 spec.
* Liao, 9/15/2008
*/
#include <stdio.h>
#include <assert.h>
unsigned long int input = 40;
unsigned long int fib(unsigned long int n) {
unsigned long int i, j;
if (n<2)
return n;
else
{
#pragma omp task shared(i)
i=fib(n-1);
#pragm... |
remapping_example.c | #include <stdlib.h>
#include "example_helper.h"
// Problem size
enum { WIDTH = 500, HEIGHT = 200, LINE_SIZE = 100 };
/* Apply some pixel value inversion in a 1D array
*/
void
invert_vector(int line_size,
int input_line[line_size],
int output_line[line_size]) {
for(int i = 0; i < line_size; i++)
o... |
rgb_matrix.h | #ifndef RGB_MATRIX_H
#define RGB_MATRIX_H
#include <stdio.h>
#include <cmath>
#ifndef PIX_MAX_NORM
#define PIX_MAX_NORM 1
#endif
#ifndef PIX_MIN_NORM
#define PIX_MIN_NORM 0
#endif
/*
* Represents symetric 2x2 matrix that contains RGB values of the given pixel.
* Top left element represents R value, bottom left B ... |
omp-simd-clone.c | /* OMP constructs' SIMD clone supporting code.
Copyright (C) 2005-2018 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your ... |
GB_binop__bshift_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
DRB045-doall1-orig-no.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
DistanceMapImageFilter.h | /*
* MIT License
*
* Copyright (c) 2018-2019 Benjamin Köhler
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, c... |
7004.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__isne_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
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... |
ConverterOSG.h | /* -*-c++-*- IfcQuery www.ifcquery.com
*
MIT License
Copyright (c) 2017 Fabian Gerold
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 ... |
DRB031-truedepfirstdimension-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... |
test_nvector_performance_openmp.c | /* -----------------------------------------------------------------
* Programmer(s): David J. Gardner @ LLNL
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2022, Lawrence Livermore National Security
* and Southern Methodist University.
* All ri... |
GB_unop__cimag_fp64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
GB_unop__acosh_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... |
worklist.c | // -----------------------------------------------------------------------------
//
// "00_AccelGraph"
//
// -----------------------------------------------------------------------------
// Copyright (c) 2014-2019 All rights reserved
// -----------------------------------------------------------------------------
... |
OpenMP1.c | /*
OpenMP1.c
This file contains a parallel implementation of the recursive bitonic sort,
using OpenMP tasks for parallel recursive calls.
*/
/*
------- ----------------------
Brouzos Rafael rnm1816@gmail.com www.github.com/bronzeRaf
-----------------------------
*/#include <omp.h>
#in... |
dynamic.c | #include <stdio.h>
#include <omp.h>
int main()
{
int i;
#pragma omp parallel private(i)
{
#pragma omp for schedule (static)
// #pragma omp for schedule (static, 1)
// #pragma omp for schedule (static, 5)
// #pragma omp for schedule (dynamic)
// #pragma omp for schedule (dynamic, 1)
// #pragma omp for schedule ... |
hpgmg.c | //------------------------------------------------------------------------------------------------------------------------------
// Copyright Notice
//------------------------------------------------------------------------------------------------------------------------------
// HPGMG, Copyright (c) 2014, The Regents... |
ast-dump-openmp-for-simd.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test_one(int x) {
#pragma omp for simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp for simd
for (int i = 0; i < x; i++)
f... |
pi02.c | #include <omp.h>
static long num_steps = 100000;
double step;
#define NUM_THREADS 4
void main ()
{ int i;
double x, pi, sum[NUM_THREADS];
step = 1.0/(double) num_steps;
omp_set_num_threads(NUM_THREADS);
#pragma omp parallel private(i)
{
double x;
int id;
id = omp_get_thread_num... |
mhpTest3.c | int foo() {
int x;
x = 10;
#pragma omp barrier
int y;
y = 10;
}
int func1() {
int f11;
foo();
int f12;
}
int func2() {
int f21;
foo();
int f22;
}
int main() {
#pragma omp parallel
{
int a = 10;
if(a > 12)
func1();
else
func2();
}
}
|
third.c | #include <stdio.h>
#include <omp.h>
int main(){
int A[10] = {1,2,3,4,5,6,7,8,9,10}, i, m, k;
omp_set_dynamic(0);
m = omp_get_num_procs();
omp_set_num_threads(m);
printf("Parallel\n------------");
#pragma omp parallel for shared(A) private(i)
for(i = 0; i < 10; i++){
p... |
main.c | //
// Created by Ramirez, Roger on 17/09/20.
//%cflags: fopenmp
#include <stdio.h>
#include <omp.h>
void main() {
#pragma omp parallel num_threads(8)
{
int id = omp_get_thread_num();
printf("hello (%d)", id);
printf("world (%d) \n", id);
}
} |
StmtOpenMP.h | //===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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
//
//===---------------------------... |
generator_gemm_common.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
common.c | #include "common.h"
bool IS_EDGE(const int e){
return (e >= 0)? true : false;
}
static void BE_EDGE(int *e)
{
*e = ((*e) + 1) * (-1);
}
static void BE_NOEDGE(int *e)
{
*e = -1 * (*e) - 1;
}
void REVERSE(int *e)
{
if(IS_EDGE(*e)) BE_NOEDGE(e);
else BE_EDGE(e);
}
void printb(const uint64_t v)
{
... |
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 ... |
GB_unaryop__ainv_fp32_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.