source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
data_to_png.c | #include "data_to_png.h"
#include <omp.h>
#define MAXIMUM(A,B) (A>B?A:B)
void data_to_png(char* data_fn, char* png_fn){
#pragma omp parallel
{
FILE* fp;
fp = fopen(data_fn, "r");
if (fp==NULL){
printf("File %s does not exist\n", data_fn);
exit(-1);
}
int buffer_length=4096;
int width, heigh... |
Visualization.h | #ifndef _ecc_visualization_hxx
#define _ecc_visualization_hxx
#include <algorithm>
#include <GetSet/GetSetObjects.h>
#include <LibEpipolarConsistency/EpipolarConsistencyRadonIntermediate.h>
#include <LibUtilsQt/Figure.hxx>
#include <LibUtilsQt/Plot.hxx>
#include <LibUtilsQt/QGLPlot3D.h>
#include <LibOpterix/Opterix... |
converter_to_region.h | #ifndef CONVERTER_TO_REGION_H_
#define CONVERTER_TO_REGION_H_
#include <opencv2/core/core.hpp>
#include <array>
#include "disparity_toolkit/disparity_range.h"
template<typename calculator>
void calculate_region_generic(single_stereo_task& task, const cv::Mat& base, const cv::Mat& match, std::vector<disparity_region>&... |
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... |
bitshuffle_core.c | /*
* Bitshuffle - Filter for improving compression of typed binary data.
*
* Author: Kiyoshi Masui <kiyo@physics.ubc.ca>
* Website: http://www.github.com/kiyo-masui/bitshuffle
* Created: 2014
*
* See LICENSE file for details about copyright and rights to use.
*
*/
#include "bitshuffle_core.h"
#include "bitshu... |
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-... |
hsrun.c | #include <limits.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdbool.h>
#include <omp.h>
#include "hs.h"
#include "hs_compile_mnrl.h"
#include "ht.h"
#include "read_input.h"
typedef struct run_ctx_t {
r_map *report_map;
hs_database_t *database;
hs_scratch_t *scratch;
char *in... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
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.
*
*... |
gravity.c | /**
* @file gravity.c
* @brief Direct gravity calculation, O(N^2).
* @author Hanno Rein <hanno@hanno-rein.de>
*
* @details This is the crudest implementation of an N-body code
* which sums up every pair of particles. It is only useful very small
* particle numbers (N<~100) as it scales as O(N^2). Note that ... |
GB_binop__gt_bool.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
mpi_omp_functions.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <limits.h>
#include <mpi.h>
#include <omp.h>
#include "mpi_omp_functions.h"
/* Read command line arguments from user and store them to a struct */
void ParseInput(int argc, char **argv, inputArguments *input) {
int i;
if ... |
GB_binop__div_fc64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
GB_unaryop__identity_fp32_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
schedule-clause.c | /*
* shedule-clause.c
*
* Created on: 28/04/2014
* Author: Carlos de la Torre
*/
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(int argc, char **argv) {
int i, n = 16, chunk, hebras = 1, a[n], suma = 0;
if (argc < 4) {
if (ar... |
matrix.h | #ifndef MATRIX_H
#define MATRIX_H
#include <fstream>
#ifdef WINDOWS
#include <string>
#else
#include <cstring>
#endif
#include "../declare_structures.h"
/// Class Matrix
template<typename floating_type> class Matrix {
friend class SpMatrix<floating_type>;
public:
typedef floating_type value_type;
typed... |
MergeCombinedOtherStartIndexWorklet.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... |
omp-axpy.c | //
// omp-axpy.c
//
//
// Created by Yaying Shi on 10/2/19.
//
#include "omp-axpy.h"
void axpy(int N, float *Y, float *X, float a) {
int i,j;
//#pragma omp target map(to:X[0:N]) map(tofrom:Y[0:N])
#pragma omp parallel for
for (i = 0; i < N; ++i){
Y[i] += a * X[i];
}
}
int ... |
feature.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
3d25pt.c | /*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b)... |
matrix.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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... |
6.c | /* Написать программу, в которой объявить и присвоить начальные значения целочисленным
массивам a[10] и b[10]. Используя конструкцию parallel for и reduction вычислить средние
арифметические значения элементов массивов a и b, сравнить полученные значения,
результат выдать на экран. */
#include <stdio.h>
#include <omp.... |
GB_unaryop__ainv_int32_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... |
omp_copyin.c |
// Skip testing on 64 bit systems for now!
#ifndef __LP64__
#include "omp_testsuite.h"
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
/*
static int sum0 = 0;
#pragma omp threadprivate(sum0)
static int myvalue = 0;
#pragma omp threadprivate(myvalue)
*/
static int sum1 = 789;
#pragma omp threadprivate(sum1)
... |
q_helper.h | /*!
* Copyright (c) 2017 by Contributors
* \file q_helper.h
* \brief Quantization helper function
* \author HPI-DeepLearning
*/
#ifndef MXNET_Q_HELPER_H
#define MXNET_Q_HELPER_H
#include "../../src/operator/mshadow_op.h"
#include <mshadow/tensor.h>
#include <mshadow/expression.h>
namespace mxnet {
namespace op {... |
bond_ops.c | /// \file bond_ops.c
/// \brief Auxiliary data structures and functions concerning virtual bonds (taking quantum numbers into account)
#include "bond_ops.h"
#include "linalg.h"
#include "util.h"
#include "profiler.h"
#include "dupio.h"
#include <math.h>
#include <memory.h>
//_________________________________________... |
ddd_in_h.h | //****************************************************************************************
//
// Copyright (c) 2015-2020, Yoshifumi Nakamura <nakamura@riken.jp>
// Copyright (c) 2015-2020, Yuta Mukai <mukai.yuta@fujitsu.com>
// Copyright (c) 2018-2020, Ken-Ichi Ishikawa <ishikawa@theo.phys.sci.hirosima-u.ac... |
morn_image.c | /*
Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com>
Licensed under the Apache License, Version 2.0; 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 agreed to in wri... |
gptl.c | /*
** gptl.c
** Author: Jim Rosinski
**
** Main file contains most user-accessible GPTL functions
*/
#ifdef HAVE_MPI
#include <mpi.h>
#endif
#include <stdlib.h> /* malloc */
#include <sys/time.h> /* gettimeofday */
#include <sys/times.h> /* times */
#include <unistd.h> /* gettimeofday, syscall ... |
close_manual.c | // RUN: %libomptarget-compile-run-and-check-generic
// REQUIRES: unified_shared_memory
#include <omp.h>
#include <stdio.h>
// ---------------------------------------------------------------------------
// Various definitions copied from OpenMP RTL
extern void __tgt_register_requires(int64_t);
extern void __tgt_tar... |
mkl_util.h | /* Copyright 2017 The TensorFlow 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 a... |
KDTree.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_KDTREE_H_
#define _SPTAG_COMMON_KDTREE_H_
#include <iostream>
#include <vector>
#include <string>
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "QueryResultSet.h"
#include "WorkSpace... |
GB_binop__band_int8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
5384.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_unop__identity_bool_uint8.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... |
5961.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... |
morphology.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unaryop__lnot_bool_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... |
oddRow.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <time.h>
int main()
{
int *A, *R, i, j, p=4, N=9, sumRow=0, rows=(N/2), countRow;
double t0, t1, t_tot;
A=(int *)malloc((N*N)*sizeof(int));
R=(int *)malloc(rows*sizeof(int));
srand(time(NULL));
printf("The matrix is: \n");
f... |
GB_binop__min_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
generated-funcs-regex.c | // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck %s
void __test_offloading_42_abcdef_bar_l123(void);
void use(int);
void foo(int a)
{
#pragma omp target
use(a);
__test_offloading_42_abcdef_bar_l123();
int somevar_abc123_;
}
|
GB_binop__eq_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... |
bml_getters_ellpack_typed.c | #include "bml_getters_ellpack.h"
#include "../bml_introspection.h"
#include "../bml_logger.h"
#include "bml_types_ellpack.h"
#include "../../macros.h"
#include "../../typed.h"
#include <complex.h>
#include <stdlib.h>
/** Return a single matrix element.
*
* \param A The bml matrix
* \param i The row index
* \param... |
ClusterCreator.h |
//class for running clustering algorithm on Charts
struct ClusterCreator
{
//takes a chart id map that was created by grid/octree clusters, and creates a list of Chart objects
static uint32_t
create_chart_clusters_from_grid_clusters(Polyhedron &P,
const double cost_threshold ,
... |
DRB011-minusminus-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... |
fsm3d_bfsm_openmp_v1.c | #include "openst/eikonal/fsm.h"
#define M_FSM3D_IMP_NAME "BFSMv1"
const char OPENST_FSM3D_COMPUTEPARTIAL_IMP_NAME[] = M_FSM3D_IMP_NAME;
const size_t OPENST_FSM3D_COMPUTEPARTIAL_IMP_NAME_LENGTH = sizeof(M_FSM3D_IMP_NAME);
int OpenST_FSM3D_ComputePartial(OPENST_FLOAT *U, OPENST_FLOAT *V,
... |
collision.c | #include <stdio.h>
#include <omp.h>
int main()
{
int n;
#pragma omp parallel private(n)
{
n = omp_get_thread_num();
printf("Before critical %i \n", n);
#pragma omp critical
{
printf("Thread %i is working \n", n);
};
printf("After critical %i \n", n);
}
... |
serial-omp.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include <omp.h>
struct timeval startwtime, endwtime;
double seq_time;
double **minDist;
double **minLabels;
void knnSearch(int outerchunk, int innercunk, double **prev, double **next, int blocksize,int LINESIZE, int ... |
image-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% IIIII M M AAA GGGG EEEEE ... |
GB_unaryop__abs_uint16_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
GB_binop__minus_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:... |
GB_binop__minus_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
depth-metrics.h | // License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2017 Intel Corporation. All Rights Reserved.
//
// Plane Fit implementation follows http://www.ilikebigbits.com/blog/2015/3/2/plane-from-points algorithm
#pragma once
#include <vector>
#include <mutex>
#include <array>
#include <imgui.h>
#incl... |
GB_unop__atanh_fp32_fp32.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... |
yolov2.h | #ifndef YOLOV2_H
#define YOLOV2_H
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <fcntl.h>
#include <string.h>
#include <assert.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#include "cn... |
Interp1PrimFifthOrderCompactUpwindChar.c | /*! @file Interp1PrimFifthOrderCompactUpwindChar.c
@author Debojyoti Ghosh
@brief Characteristic-based 5th order Compact Upwind Scheme
*/
#include <stdio.h>
#include <basic.h>
#include <arrayfunctions.h>
#include <mathfunctions.h>
#include <interpolation.h>
#include <tridiagLU.h>
#include <mpivars.h>
#include ... |
concat_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... |
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... |
Types.h | //===---------- Types.h - OpenMP types ---------------------------- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
GB_binop__rdiv_int16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
ICP.h | ///////////////////////////////////////////////////////////////////////////////
/// "Sparse Iterative Closest Point"
/// by Sofien Bouaziz, Andrea Tagliasacchi, Mark Pauly
/// Copyright (C) 2013 LGG, EPFL
///////////////////////////////////////////////////////////////////////////////
/// 1) This file contains ... |
kernels.c | #include <math.h>
/* This routine computes the 2-norm of a vector */
double norm2(int n, double *x){
int i;
double res;
res = 0.0;
/* CC: reduction is necessary to have a correct result */
#pragma omp parallel for reduction(+:res)
for(i=0; i<n; i++)
res += x[i]*x[i];
res = sqrt(res);
return res;... |
spgemm_utils.h | #ifndef UTILS_H_
#define UTILS_H_
#include <algorithm>
#include <numeric>
#include <unordered_map>
#include <iostream>
#include <chrono>
#include <map>
#include <sys/stat.h>
#include <omp.h>
#include "asserter.h"
#include "hooks.h"
#include "csr_matrix.h"
#include "spgemm_defs.h"
#include "helper_classes.h"
#include... |
kriging.h | /*
Copyright 2009 HPGL Team
This file is part of HPGL (High Perfomance Geostatistics Library).
HPGL is free software: you can redistribute it and/or modify it under the terms of the BSD License.
You should have received a copy of the BSD License along with HPGL.
*/
#ifndef __KRIGING_H__69012DAB_... |
gesummv.c | /**
* gesummv.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... |
analyze.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% AAA N N AAA L Y Y ZZZZZ EEEEE ... |
Sqrt.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/Sqrt.c"
#else
static int nn_(Sqrt_updateOutput)(lua_State *L)
{
THTensor *input = luaT_checkudata(L, 2, torch_Tensor);
real bias = luaT_getfieldchecknumber(L,1,"eps");
THTensor *output = luaT_getfieldcheckudata(L, 1, "output", torch_Tensor);
THTensor_(r... |
2018-parallel-for-simd-orig-no.c | // parallel + for + simd
void foo(int ni, int nj, int nk, double E[128][128], double A[128][128], double B[128][128])
{
int c5;
int c10;
int c2;
int c1;
int c6;
int c7;
#pragma omp parallel for private(c7, c6, c2, c10, c5)
for (c1 = 0; c1 <= ni; c1++) {
for (c2 = 0; c2 <= nj; c2++) {
for (c5 = ... |
Parallel_sieve.c | #include<stdio.h>
#include<math.h>
#include<omp.h>
char isPrime[1000000010]; //10^9
// odd-only sieve
int eratosthenesOdd(int N, int useOpenMP)
{
/* enable/disable OpenMP */
omp_set_num_threads(useOpenMP ? omp_get_num_procs() : 1);
/* instead of i*i <= N we write i <= sqr(N) to help OpenMP */
const int NSqrt = (... |
omp_crit.c | // note not doing O0 below as to ensure we get tbaa
// RUN: if [ %llvmver -ge 9 ]; then %clang -fopenmp -std=c11 -fno-vectorize -fno-unroll-loops -O1 -disable-llvm-optzns %s -S -emit-llvm -o - | %opt - %loadEnzyme -enzyme -S | %clang -fopenmp -x ir - -o %s.out && %s.out; fi
// RUN: if [ %llvmver -ge 9 ]; then %clang ... |
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... |
GB_binop__first_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_unop__trunc_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... |
test.c | #include <stdio.h>
#define N 1024
#pragma omp requires unified_shared_memory
#define TEST_UPDATE 1
#define TEST_COMPUTE_UPDATE 1
int a[N], b[N];
int main() {
int i;
int error, totError = 0;
#if TEST_UPDATE
for (i=0; i<N; i++) a[i] = b[i] = i;
#pragma omp target data map(to:b) map(alloc: a)
{
... |
GB_unop__identity_int64_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... |
nvidia_flex_pre_utilities.h | #ifndef NVIDIA_FLEX_PRE_UTILITES_H
#define NVIDIA_FLEX_PRE_UTILITES_H
/* System includes */
#include <limits>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <stdlib.h>
#include <time.h>
#include <string>
/* External includes */
#ifdef _OPENMP
#include <omp.h>
#endif
/* Project i... |
multiway_merge.h | /***************************************************************************
* include/stxxl/bits/parallel/multiway_merge.h
*
* Implementation of sequential and parallel multiway merge.
* Extracted from MCSTL - http://algo2.iti.uni-karlsruhe.de/singler/mcstl/
*
* Part of the STXXL. See http://stxxl.sourceforg... |
mxnet_op.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
pgpwde_fmt_plug.c | /*
* Format for brute-forcing PGP WDE encrypted drives.
*
* This software is Copyright (c) 2017, Dhiru Kholia <dhiru.kholia at gmail.com>,
* and it is hereby released to the general public under the following terms:
*
* Redistribution and use in source and binary forms, with or without modification,
* are permit... |
7969.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
*/
#define EXTRALARGE_DATASET
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
/* Include polybench co... |
transport.c | /*
* transport.c
* fixedgrid_serial
*
* Created by John Linford on 6/23/08.
* Copyright 2008 Transatlantic Giraffe. All rights reserved.
*
*/
#include "transport.h"
#include "discretize.h"
/**
* Discretize rows
*/
void discretize_all_x(fixedgrid_t* G, real_t dt)
{
#if DO_X_DISCRET == 1
int32_t x... |
GB_unop__expm1_fc32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
spectral-norm_gcc5.c | /* The Computer Language Benchmarks Game
* http://benchmarksgame.alioth.debian.org/
*
* contributed by Ledrug
* algorithm is a straight copy from Steve Decker et al's Fortran code
* with GCC SSE2 intrinsics
*/
/*
$(GCC) -pipe -Wall -O3 -fomit-frame-pointer -march=native -fopenmp -mfpmath=sse -msse2 $< -o $@ -lm
... |
c-omp.c | /* This file contains routines to construct OpenACC and OpenMP constructs,
called from parsing in the C and C++ front ends.
Copyright (C) 2005-2018 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... |
compute_independent_rows.h | /**
* @file compute_independent_rows.h
* @author Yibo Lin
* @date Apr 2019
*/
#ifndef _DREAMPLACE_K_REORDER_COMPUTE_INDEPENDENT_ROWS_H
#define _DREAMPLACE_K_REORDER_COMPUTE_INDEPENDENT_ROWS_H
DREAMPLACE_BEGIN_NAMESPACE
template <typename DetailedPlaceDBType>
void compute_row_conflict_graph(const DetailedPlace... |
matmul_par.c | /*
** PROGRAM: Parallel Matrix Multiply (using OpenMP)
**
** PURPOSE: This is a simple matrix multiply program.
** It will compute the product
**
** C = A * B
**
** A and B are set to constant matrices so we
** can make a quick test of the multiplication.
**
*... |
jacobi.c | #include <stdio.h>
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#endif
// Add timing support
#include <sys/time.h>
double time_stamp()
{
struct timeval t;
double time;
gettimeofday(&t, NULL);
time = t.tv_sec + 1.0e-6*t.tv_usec;
return time;
}
double time1, time2;
void driver(void);
void initialize(voi... |
pbkdf2_hmac_sha256_fmt_plug.c | /* This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net>
* 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.
*
* Based on hmac-sha512 by magnum
*
* Minor fixes, format uni... |
8.race3.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define M 200
#define N 200
int main() {
double A[M], B[M][N], C[N], sum = 0.0;
#pragma omp parallel for // firstprivate(sum)
for (int i = 0; i < M; i++) {
for (int j = 0; j < N; j++) {
sum += B[i][j] * C[j];
}
A[i] = su... |
5258.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_unaryop__lnot_fp64_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... |
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.
*
*... |
Example_target_ptr_map.1.c | /*
* @@name: target_ptr_map.1
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_5.0
*/
#include <stdio.h>
#include <stdlib.h>
#define N 100
int main()
{
int *ptr1;
int *ptr2;
int *ptr3;
int aray[N];
ptr1 = (int *)malloc(sizeof(int)*N);
ptr2 = (int *)m... |
rkb_screen.c | /* Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requi... |
CFrameRGBD.h | /*
* Photoconsistency-Visual-Odometry
* Multiscale Photoconsistency Visual Odometry from RGBD Images
* Copyright (c) 2012, Miguel Algaba Borrego
*
* http://code.google.com/p/photoconsistency-visual-odometry/
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
... |
GB_unop__isnan_bool_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... |
kmp_csupport.c | /*
* kmp_csupport.c -- kfront linkage support for OpenMP.
*/
//===----------------------------------------------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.... |
GB_binop__pow_int64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
displacement_lagrangemultiplier_residual_frictional_contact_criteria.h | // KRATOS ___| | | |
// \___ \ __| __| | | __| __| | | __| _` | |
// | | | | | ( | | | | ( | |
// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
//
// License: BSD License
// ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.