source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
test.c | #include <stdio.h>
#include <omp.h>
#define N 10
int main(int argc, char *argv[])
{
int i, a[N];
omp_set_num_threads(5);
#pragma omp parallel for
for (i=0; i < N; i++) {
//a[i] = 2 * i;
a[i] = omp_get_thread_num();
}
#pragma omp barrier
for (i=0; i< N; i++) {
prin... |
convolutiondepthwise_5x5_pack8_fp16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 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 ... |
core_zhessq.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c
*
**/
#include "core_blas.h"
#include "plasma_types.h"
#include "core_lapack.h"
#include <math.h>
/****************************************************... |
test.c |
#include <stdio.h>
#include <omp.h>
#pragma omp requires unified_shared_memory
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (1024*3)
#define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i+1;})
#define ZERO(X) ZERO_ARRAY(N, X)
#define DUMP_SUCCESS9() { \
... |
parallel-if.c | // Test if clause handling
// number of threads should be set to 1 if the if-clause's expression evaluates to be false
#include <assert.h>
#include <stdio.h>
int main(void)
{
int i=0;
#pragma omp parallel if(i == 0)
{
printf("Mutual exclusive output 1.\n");
}
#pragma omp parallel if(i != 0)
{
#pragma omp ... |
private.c | #include "private.h"
#define CG_BEST_TOL 1e-9
#define CG_MIN_TOL 1e-1
#define PRINT_INTERVAL 100
static idxint totCgIts;
static timer linsysTimer;
static pfloat totalSolveTime;
char * getLinSysMethod(Data * d, Priv * p) {
char * str = scs_malloc(sizeof(char) * 128);
sprintf(str, "sparse-indirect, nnz in A = %li, C... |
fio.c | /*
Author: Mohammed Ahmed Al Farhan
Email: mohammed.farhan@kaust.edu.sa
NOTE: walkfbuf is a recursive implementation to extract the data
parallelism using OpenMP
*/
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <byteswap.h>
#include <omp.h>
#include "inc/msh/fio.h"
#include "in... |
cpd.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "base.h"
#include "cpd.h"
#include "matrix.h"
#include "mttkrp.h"
#include "timer.h"
#include "thd_info.h"
#include "util.h"
#include <m... |
bezier_classical_post_utility.h | //
// Project Name: Kratos
// Last Modified by: $Author: hbui $
// Date: $Date: 2013-10-12 $
// Revision: $Revision: 1.0 $
//
//
#if !defined(KRATOS_BEZIER_CLASSICAL_POST_UTILITY_H_INCLUDED )
#define KRATOS_BEZIER_CLASSICAL_POST_UTILITY_H_INCLUDED
// System includes
#inclu... |
sxc_fmt_plug.c | /* SXC cracker patch for JtR. Hacked together during Summer of 2012 by
* Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* This software is Copyright (c) 2012, 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 b... |
taskgroup.c | #include <omp.h>
#include <stdio.h>
#include <unistd.h>
int main()
{
#pragma omp parallel
#pragma omp single
{
#pragma omp taskgroup
{
{
#pragma omp critical
printf ("Task 1\n");
{
sleep(1);
#pragma omp critical
printf ("Task 2\n");
}
... |
hello.c | #include "omp.h"
#include <stdio.h>
int main(int argc, char* argv[])
{
int nthreads, tid;
int nprocs;
char buf[32];
/* Fork a team of threads */
#pragma omp parallel private(nthreads, tid)
{
/* Obtain and print thread id */
tid = omp_get_thread_num();
prin... |
transpose.h |
#ifndef PARLAY_TRANSPOSE_H_
#define PARLAY_TRANSPOSE_H_
#include "../utilities.h"
namespace parlay {
namespace internal {
#ifdef PAR_GRANULARITY
constexpr const size_t TRANS_THRESHHOLD = PAR_GRANULARITY / 4;
#else
constexpr const size_t TRANS_THRESHHOLD = 500;
#endif
#ifdef DEBUG
constexpr const size_t NON_CACHE_O... |
3d7pt.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tare... |
fast_sum.c | #include "fast_sum.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
static const double dunavant_x[4][6] = {
{0.333333333333333, 0, 0, 0, 0, 0},
{0.666666666666667, 0.166666666666667, 0.166666666666667, 0, 0, 0},
{0.333333333333333, 0.600000000000000, 0.200000000000000, 0.20... |
main.c | #include<stdio.h>
#include "gdal.h"
#include<omp.h>
void usage()
{
printf( "-----------------------------------------\n");
printf( "--Modis Processing chain--Serial code----\n");
printf( "-----------------------------------------\n");
printf( "./coh inCOH inCOH_QA\n");
printf( "\toutCOH\n");
printf( "-----------... |
BlockDiagonalMatrix.h | //=======================================================================
// Copyright 2014-2015 David Simmons-Duffin.
// Distributed under the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//=======================================================================
#i... |
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>
... |
sync.c | /**
* \file
* \brief BOMP barrier synchronization microbenchmark
*/
/*
* Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, H... |
GB_binop__ge_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-... |
GB_unop__bnot_uint8_uint8.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... |
mpncbo.c | /* $Header$ */
/* mpncbo -- netCDF binary operator */
/* Purpose: Compute sum, difference, product, or ratio of specified hyperslabs of specfied variables
from two input netCDF files and output them to a single file. */
/* Copyright (C) 1995--present Charlie Zender
This file is part of NCO, the netCDF Operator... |
sort.h | /*
// Copyright (c) 2000-2009, Texas Engineering Experiment Station (TEES), a
// component of the Texas A&M University System.
// All rights reserved.
// The information and source code contained herein is the exclusive
// property of TEES and may not be disclosed, examined or reproduced
// in whole or in part withou... |
zscatter.c | /*! \file
Copyright (c) 2003, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from U.S. Dept. of Energy)
All rights reserved.
The source code is distributed under BSD license, see the file License.txt
at the top-level directory.
... |
QMigrate.c |
#include <stdint.h>
#ifndef _OPENMP
#define STRING2(x) #x
#define STRING(x) STRING2(x)
#pragma message (__FILE__ "(" STRING(__LINE__) "): error: This module should be compiled with /openmp on the command line")
/* Generate a compiler error to stop the build */
mustLinkOpenMP
#endif
#if defined(_... |
matmul-parallel.c |
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <omp.h>
// Initialize matrices
void initialize_matrices(float *a, float *b, float *c, unsigned size,
unsigned seed) {
srand(seed);
for (int i = 0; i < size; ++i) {
for (int j = 0... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
1.race3.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(static)
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
A[i][j] = A[i - 1][j - 1];
}
// CHECK: Data Race detected
// END
|
aho.c | /*
* author: alessandro bitocchi
*/
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#ifdef _OPENMP
# include <omp.h>
#endif
#include "../lib/include/ahocorasick.h"
#include "../lib/include/reader.h"
void callback_match_total(void *arg, struct aho_match_t* m){
long long int* match_... |
GB_unaryop__abs_int64_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
single_helper_thread.c | // RUN: %libomp-compile && env LIBOMP_NUM_HIDDEN_HELPER_THREADS=1 %libomp-run
// The test checks that "devide-by-0" bug fixed in runtime.
// The fix is to increment number of threads by 1 if positive,
// so that operation
// (gtid) % (__kmp_hidden_helper_threads_num - 1)
// does not cause crash.
#include <stdio.h>
... |
GB_binop__isle_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-... |
metricize_dgemm.c | #include "genmul.h"
#if defined __FAST_MATH__
void metricize_pure(double* d, double* d2, int n, int limit)
#else
void metricize(double* d, double* d2, int n, int limit)
#endif
{
int i, count = 1;
double error = 1.0;
while (error > 10e-12)
{
error = 0;
// shortest paths to d2
#if defined... |
GB_unaryop__lnot_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... |
a3.c | #define N 10000000
int a[N],b[N];
long long s=0;
int jo,nthr,porcio;
main()
{
int i,ini,fi;
/* inicialitzacio, no en paral.lel */
for(i=0;i<N;i++)
{
a[i]=1;
b[i]=2;
}
#pragma omp parallel shared(a,b) private(i,jo,nthr,porcio,ini,fi)
{
jo = omp_get_thread_num();
nthr = omp_get_num_threads();
porcio= N/nthr;
... |
GB_unaryop__minv_bool_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... |
Cmfd.h | /**
* @file Cmfd.h
* @brief The Cmfd class.
* @date October 14, 2013
* @author Sam Shaner, MIT, Course 22 (shaner@mit.edu)
*/
#ifndef CMFD_H_
#define CMFD_H_
#ifdef __cplusplus
#define _USE_MATH_DEFINES
#ifdef SWIG
#include "Python.h"
#endif
#include "log.h"
#include "constants.h"
#include "Universe.h"
#include ... |
residualbased_predictorcorrector_velocity_bossak_scheme_turbulent.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
#if !defined... |
nestedfn-3.c | /* { dg-do run } */
#include <omp.h>
extern void abort (void);
int
main (void)
{
int i = 5, l = 0;
int foo (void) { return i == 6; }
int bar (void) { return i - 3; }
omp_set_dynamic (0);
#pragma omp parallel if (foo ()) num_threads (bar ()) reduction (|:l)
if (omp_get_num_threads () != 1)
l = 1;
i... |
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... |
word_search.c | #include<stdio.h>
#include<omp.h>
#include<stdlib.h>
#include<error.h>
#include<string.h>
#define file_size 3 // Should be 30 but for simplicity 3 is used
int main() {
FILE *fptr;
char filename[] = "word_list.txt";
fptr = fopen(filename, "r");
char array[file_size*8][6];
char temp[5];
int count = 0;
int word_c... |
pr29965-2.c | /* PR middle-end/29965 */
/* Test that OpenMP construct bodies which never return don't cause ICEs. */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp" } */
extern void baz (void) __attribute__ ((noreturn));
void
foo1 (void)
{
#pragma omp sections
{
for (;;)
;
}
}
void
bar1 (void)
{
#pragma omp ... |
nufft.c | /* Copyright 2014-2015. The Regents of the University of California.
* Copyright 2016-2021. Uecker Lab. University Medical Center Göttingen.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2014-2017 Frank Ong
* 2014-2020 M... |
hello_world.c | #include <limits.h>
#include <omp.h>
#include <stdio.h>
#include <unistd.h>
int main() {
printf("Hello world!\n");
int n_printed = 0;
#pragma omp parallel shared(n_printed)
{
int tid = omp_get_thread_num();
int n_threads = omp_get_num_threads();
while (n_threads > (tid + 1 + n_printed)) {
... |
CImg.h | /*
#
# File : CImg.h
# ( C++ header file )
#
# Description : The C++ Template Image Processing Toolkit.
# This file is the main component of the CImg Library project.
# ( http://cimg.sourceforge.net )
#
# Project manager : David Tschump... |
main.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#define NUM_THREADS 4
void mergesort(int a[],int i,int j);
void merge(int a[],int i1,int j1,int i2,int j2);
int main() {
clock_t tStart, tStop;
int *a, num=25, i, id, nt, potencia=1000, j;
srand(time(NULL));
a = (int *)malloc(s... |
GB_sparse_add_template.c | //------------------------------------------------------------------------------
// GB_sparse_add_template: C=A+B, C<M>=A+B when C is sparse/hypersparse
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// S... |
3d25pt_var.c | /*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* 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) >... |
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... |
pdgstrf.c | /*! \file
Copyright (c) 2003, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from U.S. Dept. of Energy)
All rights reserved.
The source code is distributed under BSD license, see the file License.txt
at the top-level director... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
task4_4096_solution.c | #include <math.h>
#include <string.h>
#include "timer.h"
#define NN 4096
#define NM 4096
float A[NN][NM];
float Anew[NN][NM];
int main(int argc, char** argv)
{
const int n = NN;
const int m = NM;
const int iter_max = 1000;
const double tol = 1.0e-6;
double error = 1.0;
memset(A,... |
app.c | /**
* Christina Giannoula
* cgiannoula: christina.giann@gmail.com
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <dpu.h>
#include <dpu_log.h>
#include <unistd.h>
#include <getopt.h>
#include <assert.h>
#include <omp.h>
#include "../support/common.h"
#include "../support/... |
GridInit.c | #include "XSbench_header.h"
#ifdef MPI
#include<mpi.h>
#endif
GridPoint * generate_hash_table( NuclideGridPoint ** nuclide_grids,
long n_isotopes, long n_gridpoints, long hash_bins )
{
printf("Generating Hash Grid...\n");
GridPoint * energy_grid = (GridPoint *)malloc( hash_bins * sizeof( ... |
GB_unop__identity_fp64_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... |
lotus5_fmt_plug.c | //original work by Jeff Fay
//some optimisations by bartavelle at bandecon.com
/* OpenMP support and further optimizations (including some code rewrites)
* by Solar Designer */
#if FMT_EXTERNS_H
extern struct fmt_main fmt_lotus5;
#elif FMT_REGISTERS_H
john_register_one(&fmt_lotus5);
#else
#include <stdio.h>
#include... |
nusPerfect.cpp.pluto.c | #include <omp.h>
#pragma warning(disable : 4996)
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define _CRT_SECURE_NO_WARNINGS
#define min(x,y) ((x) < (y) ? (x) : (y))
#define max(x,y) ((x) > (y) ? (x) : (y))
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) (((n)<0) ? -((-(n)+(... |
Parallelizer.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 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 can ob... |
GB_binop__bshift_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-... |
HorizontalConvolution.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/HorizontalConvolution.c"
#else
static int nnconv1d_(HorizontalConvolution_updateOutput)(lua_State *L)
{
THTensor *input = luaT_checkudata(L, 2, torch_Tensor);
int nInputPlane = luaT_getfieldcheckint(L, 1, "nInputPlane");
int nOutputPlane = luaT_getfie... |
_implicit.c | /* Generated by Cython 0.24.1 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [],
"extra_compile_args": [
"-Wno-unused-function",
"-O3",
"-fopenmp",
"-ffast-math",
"-march=native"
],
"extra_link_args": [
... |
computeStats_c.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <xmmintrin.h>
#include <assert.h>
#include <math.h>
#include <sys/time.h>
#include <mex.h>
int sort(const void *x, const void *y) {
if (*(int*)x > *(int*)y) return 1;
else if (*(int*)x < *(int*)y) return -1;
else return 0;
}
void mexFun... |
residualbased_elimination_builder_and_solver_with_constraints.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Vicente Mataix Ferrandiz
//
... |
NavierStokesSolver_impl.h | // Copyright (c) 2004-2022 Tomáš Oberhuber et al.
//
// This file is part of TNL - Template Numerical Library (https://tnl-project.org/)
//
// SPDX-License-Identifier: MIT
#pragma once
#include <TNL/Solvers/cfd/navier-stokes/NavierStokesSolver.h>
namespace TNL {
template< typename AdvectionScheme, typename Diffusio... |
spmm.h | /**
* @file spmm.h
* @brief sparse matrix dense matrix multiplication
*/
#pragma once
#include <cstring>
#include "dmlc/data.h"
#include "dmlc/omp.h"
#include "base/spmv.h" // for Range
namespace dmlc {
/**
* \brief multi-thread sparse matrix dense matrix multiplication
*/
class SpMM {
public:
static cons... |
streaming_rrr_generator.h | //===------------------------------------------------------------*- C++ -*-===//
//
// Ripples: A C++ Library for Influence Maximization
// Marco Minutoli <marco.minutoli@pnnl.gov>
// Pacific Northwest National Laboratory
//
//===-------------------------------------------... |
sensitivity_mapper.h | #pragma once
#if _OPENMP
#include <omp.h>
#endif
#include "util/random.h"
#include "3d/geometry/voxel_set.h"
#include "3d/geometry/event_generator.h"
namespace PET3D {
namespace Hybrid {
/// Creates a map of 3D scanner sensitivity
template <class ScannerClass> class SensitivityMapper {
public:
using Scanner = Sc... |
hecmw_partition.c | /*****************************************************************************
* Copyright (c) 2019 FrontISTR Commons
* This software is released under the MIT License, see LICENSE.txt
*****************************************************************************/
#define INAGAKI_PARTITIONER
#include <stdio.h>
#inc... |
resource_manager.h | // -----------------------------------------------------------------------------
//
// Copyright (C) 2021 CERN & Newcastle University for the benefit of the
// BioDynaMo collaboration. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compl... |
GB_unaryop__identity_fp32_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... |
threshold.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
quadric.h | #ifndef batoid_quadric_h
#define batoid_quadric_h
#include "surface.h"
namespace batoid {
#if defined(BATOID_GPU)
#pragma omp declare target
#endif
class Quadric : public Surface {
public:
Quadric(double R, double conic);
~Quadric();
virtual const Surface* getDevPtr(... |
test.c | #include <stdio.h>
#define N 1024
#define TEST_SIMPLE_NW 1
#define TEST_LOOP 1
#define TEST_LOOP_NW 1
int a[N], b[N];
int aa[N], bb[N];
int main() {
int i;
int error, totError = 0;
#if TEST_SIMPLE_NW
for (i=0; i<N; i++) a[i] = b[i] = i;
// alloc, move to
#pragma omp target enter data ... |
GB_binop__plus_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-... |
modifier_view.h | // ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2013, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and us... |
main.c | // this creates an input device transform (idt) lookup table for a given camera
// based on spectral sensitivity functions (ssf). works best with a high-res
// high-quality spectral upsampling table, create via
// `mkspectra 1024 /dev/null XYZ`. (note the lack of `-b`)
// #define USE_LEVMAR
#include "core/inpaint.h"
#i... |
CRegionColoring.h | ///////////////////////////////////////////////////////////////////////////////
// $Id$
//
// 3DimViewer
// Lightweight 3D DICOM viewer.
//
// Copyright 2008-2016 3Dim Laboratory s.r.o.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with ... |
tinyexr.h | /*
Copyright (c) 2014 - 2016, Syoyo Fujita
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and t... |
epollex_test.c | /*
* This file is part of ABCDK.
*
* MIT License
*
*/
#include <stdio.h>
#include <assert.h>
#include <unistd.h>
#include <string.h>
#include <sys/sendfile.h>
#include "abcdk-util/general.h"
#include "abcdk-util/getargs.h"
#include "abcdk-util/clock.h"
#include "abcdk-util/thread.h"
#include "abcdk-util/signal.h... |
ASTMatchers.h | //===- ASTMatchers.h - Structural query framework ---------------*- 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__bget_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_binop__ge_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-... |
omptarget.c | //0 OMP parallel for
#pragma omp parallel for
{
for (int y = 0; y < height; y++)
{
#pragma omp parallel for
for (int x = 0; x < width; x++)
{
const uint32_t iters = mandelbrot (x, y, width, height, max_iter);
image[y * width + x] = palette[iters % palette_size];
... |
ScatterHelper.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.
*
*... |
alloc_benchmark.c | // SPDX-License-Identifier: BSD-2-Clause
/* Copyright (C) 2016 - 2021 Intel Corporation. */
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
#include <unistd.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#if defined(HBWMALLOC)
#include <hbwmalloc.h>
#de... |
ch-placement-decluster-check.c | /*
* Copyright (C) 2013 University of Chicago.
* See COPYRIGHT notice in top-level directory.
*
*/
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <limits.h>
#include <sys... |
rastercompare.h | #pragma once
namespace gdx {
namespace internal {
template <
template <typename> typename BinaryPredicate,
template <typename> typename RasterType,
typename T1,
typename T2,
typename std::enable_if_t<std::is_arithmetic_v<typename RasterType<T1>::mask_value_type>, int>* = nullptr>
RasterType<uint8... |
pack_tril.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... |
softmax.h | // Copyright 2018 Xiaomi, Inc. 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 applicab... |
image_bw.c | #include <stdlib.h>
#include "private/core_private.h"
#include "private/imcore_private.h"
return_t imerode(matrix_t *in, matrix_t *element, matrix_t *out) {
check_image(in , ERROR_NOT_IMAGE);
check_image(out, ERROR_NOT_IMAGE);
// check_numeric(element, ERROR_TYPE_MISMATCH);
int cond1 = is_image(in) &... |
main2.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <complex.h>
#include "ppm.h"
#include "fractal.h"
#define UNKNOWN_MODE 0
#define JULIA_MODE 1
#define MANDELBROT_MODE 2
int main(int argc, char **argv) {
if (argc < 2) {
fprintf(stderr, "Usage: %s [J/M] [options]\n", argv[0]);
re... |
GB_binop__lxor_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... |
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... |
shortcut_layer.c | #include "shortcut_layer.h"
#include "convolutional_layer.h"
#include "dark_cuda.h"
#include "blas.h"
#include "utils.h"
#include "gemm.h"
#include <stdio.h>
#include <assert.h>
layer make_shortcut_layer(int batch, int n, int *input_layers, int* input_sizes, int w, int h, int c,
float **layers_output, float **laye... |
main.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "omp.h"
#include "aux.h"
#define NIT 1000000
#define NE 10000
void sequential(int *data);
void parallel_critical(int *data);
void parallel_atomic(int *data);
void parallel_locks(int *data);
int main(int argc, char **argv){
int n, i, j, k, nth, th... |
sp.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB SP code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
resample.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
affinity-1.c | /* Affinity tests.
Copyright (C) 2013-2017 Free Software Foundation, Inc.
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 option) any later
version.
GCC is dis... |
target_teams_distribute_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute'}}
#pragma omp target teams distribute
// expected-error@+1 {{unexpected OpenMP direct... |
c-decl.c | /* Process declarations and variables for C compiler.
Copyright (C) 1988-2015 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.