source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
imginputfileconn.h | /**
* DeepDetect
* Copyright (c) 2014 Emmanuel Benazera
* Author: Emmanuel Benazera <beniz@droidnik.fr>
*
* This file is part of deepdetect.
*
* deepdetect is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software F... |
ej5.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <unistd.h>
#define MTAM 1000
#define VTAM 1000
void rellenarMatriz(float *M){
#pragma omp parallel for schedule(guided)
for(int i=0;i<(MTAM*MTAM);++i)
*(M+i)=5.0f;
}
void rellenarVector(float *V){
#pragma omp parallel for schedule(guided)
for(int... |
omp_binding.c |
#include <omp.h>
#include <sched.h>
#include <iostream>
int main( int argc, char**argv )
{
#pragma omp parallel
{
#pragma omp critical
std::cout << "Running from thread " << omp_get_thread_num() + 1 <<
" of " << omp_get_num_threads() << " running on cpu " << sched_getcpu() << std::endl;
}
... |
conversion.h | /*
* Copyright 2008-2009 NVIDIA Corporation
*
* 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... |
GB_unop__lnot_uint16_uint16.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_unaryop__lnot_int8_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... |
adjoint_structural_static_scheme.h | // KRATOS ___| | | |
// \___ \ __| __| | | __| __| | | __| _` | |
// | | | | | ( | | | | ( | |
// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
//
// License: BSD License
// license: structural_mechanics_applic... |
mapper_vertex_morphing_matrix_free.h | // ==============================================================================
// KratosShapeOptimizationApplication
//
// License: BSD License
// license: ShapeOptimizationApplication/license.txt
//
// Main authors: Baumgaertner Daniel, https://github.com/dbaumgaertner
//
// ========... |
masked-spgemm-poly.h | #ifndef MASKEDSPGEMM_MASKED_SPGEMM_POLY_H
#define MASKEDSPGEMM_MASKED_SPGEMM_POLY_H
// TODO: add complement support
template<class IT, class NT, class MultiplyOperation, class AddOperation>
void MaskedSpGEMM1p(const CSR<IT, NT> &A, const CSR<IT, NT> &B, CSR<IT, NT> &C, const CSR<IT, NT> &M,
Multipl... |
crop_and_resize.c | #include <TH/TH.h>
#include <stdio.h>
#include <math.h>
void CropAndResizePerBox(
const float * image_data,
const int batch_size,
const int depth,
const int image_height,
const int image_width,
const float * boxes_data,
const int * box_index_data,
const int start_box,
const int li... |
fill.h | #pragma once
#include <vector>
#include <unordered_map>
#include <algorithm>
#include <omp.h>
#include "_cuda.h"
using std::vector;
using std::unordered_map;
using std::max;
// FILL
// ----
template <class T>
void fill(T *a, int N, T v) {
for (int i=0; i<N; i++)
a[i] = v;
}
template <class T>
void fill(vec... |
cfa_linedn_new.c | // CFA line denoise by DCT filtering
// copyright Emil Martinec
// all rights reserved
// 3/12/2010 and november 2010
#define TS 256 // Tile size
//modified by Jacques Desmis - december 2010
//#define CLASS
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <float.h>
#include <limits.h>
#include <math... |
reciprocal_kernels.h | #ifndef __RECIPROCAL_KERNELS_H__
#define __RECIPROCAL_KERNELS_H__
#include <math.h>
#include "aster.h"
// Pointer to function that performs kernel matrix matvec using given sets of
// points and given input vector. The kernel function must be symmetric.
// Input parameters:
// coord0 : Matrix, size 3-by-l... |
kmp_set_dispatch_buf.c | // RUN: %libomp-compile && %libomp-run 7
// RUN: %libomp-run 0 && %libomp-run -1
// RUN: %libomp-run 1 && %libomp-run 2 && %libomp-run 5
// RUN: %libomp-compile -DMY_SCHEDULE=guided && %libomp-run 7
// RUN: %libomp-run 1 && %libomp-run 2 && %libomp-run 5
// UNSUPPORTED: clang-11, clang-12
#include <stdio.h>
#include <o... |
omp_in_parallel.c | #include <stdio.h>
#include "omp.h"
#include "omp_testsuite.h"
int
check_omp_in_parallel (FILE * logFile)
{
/* checks that false is returned when called from serial region
and true is returned when called within parallel region */
int serial = 1;
int isparallel = 0;
serial = omp_in_parallel ();
#pragma om... |
main.c | //===--- Jacobi.c --------- Jacobi Iterative Method ---------------*- C -*-===//
//
// This file implements Jacobi iterative method which is an iterative method
// used to solve partial differential equations.
//
//===----------------------------------------------------------------------===//
#include <math.h>
#includ... |
version1_1.c | // Compile with:
//
//
// To specify the number of bodies in the world, the program optionally accepts
// an integer as its first command line argument.
#include <time.h>
#include <sys/times.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <X11/Xlib.h>
#include <unistd.h>
#inclu... |
ten_tusscher_2004_epi_S1_2.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S1_2.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO:... |
collatzSieve2toK_FindPatterns_reduceTo1.c | /* ******************************************
Find deltaN and count numbers to be tested for a 2^k sieve
that is to me used to find maximum number of steps to 1.
For n = A 2^k + B, A>0 must be true when using this sieve.
Compile and run via something like...
clang -O3 collatzSieve2toK_FindPatterns_reduceTo1.c -fo... |
revcomp.gcc-6.c | // The Computer Language Benchmarks Game
// http://benchmarksgame.alioth.debian.org/
//
// Contributed by Jeremy Zerfas
// This string/character array is used to convert characters into the
// complementing character.
#define COMPLEMENT_LOOKUP \
" "\
/... |
elemwise_binary_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 ... |
3.norace2.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define N 20
int main() {
int A[N][N][N];
#pragma omp parallel for
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
for (int k = 1; k < N; k++)
A[i][j][k] = A[i][j - 1][k];
}
// CHECK: Region is Data Race Free.
//... |
pr46032.c | /* { dg-do run } */
/* { dg-options "-O2 -ftree-vectorize -std=c99 -fipa-pta" } */
extern void abort (void);
#define nEvents 1000
static void __attribute__((noinline, noclone, optimize("-fno-tree-vectorize")))
init (unsigned *results, unsigned *pData)
{
unsigned int i;
for (i = 0; i < nEvents; ++i)
pData[i]... |
GB_binop__bxnor_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-... |
hmm_classify.c | /* hmm.classify.c -- ECOZ System
*/
#include "hmm.h"
#include "utl.h"
#include "list.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <float.h>
#include <assert.h>
//#undef PAR
#define PAR 1
#ifdef PAR
#include <omp.h>
#endif
#define GREEN(s) "\x1b[32m" s "\x1b[0m"
#define... |
GB_unaryop__abs_bool_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
convolution_3x3_pack4_bf16s.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 copy ... |
GB_unop__tgamma_fp32_fp32.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... |
FTSparseGrid3D.h | /* SGCT-Based-Fault-Tolerant-2D-SFI Code source file.
Copyright (c) 2015, Md Mohsin Ali. All rights reserved.
Licensed under the terms of the BSD License as described in the LICENSE_FT_CODE file.
This comment must be retained in any redistributions of this source file.
*/
// 3D (x,y,z) sparse grid data struc... |
bins_static.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: clabra
//
#if !defined(KRATOS_BINS_CONTAINER_H... |
main.c | #include <stdlib.h>
#include <omp.h>
void spin(volatile int t) {
while(--t > 0) { }
}
int main(int argc, char** argv) {
unsigned ITT = 1000000;
int s = 100;
if(argc > 1) {
ITT = atoi(argv[1]);
}
if(argc > 2) {
s = atoi(argv[2]);
}
#pragma omp parallel
{
unsigned id = omp_get_thread_num();
for(unsigned... |
GB_unaryop__lnot_int32_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... |
citrix_ns_fmt_plug.c | /*
* Description from Nicolas Ruff:
* - Salt value is hashed as an hexadecimal string, not bytes.
* - The trailing NULL byte of password string is taken into account during
* hashing.
* - The leading '1' is actually the string length
* '1' = 49 = len('1') + len(hex_salt) + len(hex_sha1)
*
* ----------------... |
p_kernel.c |
#include <petscmat.h>
#include <petscsnes.h>
#include <petscvec.h>
#include <omp.h>
#include <geometry.h>
#include <ktime.h>
#ifdef __USE_HW_COUNTER
#include <perf.h>
#include <kperf.h>
#endif
#include <kernel.h>
#include <phy.h>
/*
Evaluate Function F(x): Functional form used to convey the
nonlinear function to... |
DRB055-jacobi2d-parallel-no.c | /**
* jacobi-2d-imper.c: This file is part of the PolyBench/C 3.2 test suite.
* Jacobi with array copying, no reduction.
*
* Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu>
* Web address: http://polybench.sourceforge.net
* License: /LICENSE.OSU.txt
*/
#include "omprace.h"
#include <omp.h>
#include <st... |
naiv_conv_layer.c |
/*
Copyright (C) 2020 David Cornu
for the Convolutional Interactive Artificial
Neural Networks by/for Astrophysicists (CIANNA) Code
(https://github.com/Deyht/CIANNA)
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... |
ConstantSumWots.h | #pragma once
#include "wots/ClassicWots.h"
#include <math.h>
#include <gmpxx.h>
#include <algorithm>
#include <iostream>
template <class D, int W, int T, int S>
class ConstantSumWots : public virtual ClassicWots<D,W> {
public:
ConstantSumWots() noexcept {};
ConstantSumWots(const ByteArray& seed) noexcept : ClassicWo... |
prepress.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
cancel_worksharing.c | // RUN: %libomp-compile && env OMP_CANCELLATION=true %libomp-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// Current GOMP interface implementation does not support cancellation; icc 16 does not distinguish between sections and loops
// XFAIL: gcc-4, icc-16
#include "callback.h"
#include <unistd.h>
int main()
... |
TSDFVoxelGridImpl.h | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018-2021 www.open3d.org
//
// Perm... |
row2node_map.h | /**
* @file row2node_map.h
* @author Yibo Lin
* @date Apr 2019
*/
#ifndef _DREAMPLACE_K_REORDER_ROW2NODE_MAP_H
#define _DREAMPLACE_K_REORDER_ROW2NODE_MAP_H
DREAMPLACE_BEGIN_NAMESPACE
/// @brief distribute cells to rows
template <typename DetailedPlaceDBType>
void make_row2node_map(const DetailedPlaceDBType& ... |
8625.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[200 + 0][200 + 0][200 + 0], double B[200 + 0][200 + 0][200 + 0])... |
full-train.c | /*
============================================================================
Author : Roberto Diaz Morales
============================================================================
Copyright (c) 2016 Roberto Díaz Morales
Permission is hereby granted, free of charge, to any person obtaining a copy of ... |
saxpy.c | /* Copyright 2013. The Regents of the University of California.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2013 Martin Uecker <uecker@eecs.berkeley.edu>
*/
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h... |
GB_binop__iseq_uint8.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_var.c | /*
* Order-1, 3D 7 point stencil with variable 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) > (b) ? a : b)
#... |
convolution_7x7.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 ... |
data.h | /*!
* Copyright (c) 2015 by Contributors
* \file data.h
* \brief The input data structure of xgboost.
* \author Tianqi Chen
*/
#ifndef XGBOOST_DATA_H_
#define XGBOOST_DATA_H_
#include <dmlc/base.h>
#include <dmlc/data.h>
#include <dmlc/serializer.h>
#include <rabit/rabit.h>
#include <xgboost/base.h>
#include <xgb... |
fc_kernel_int8_arm.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... |
spherenoise.h | #pragma once
#ifndef SPHERE_NOISE_H
#define SPHERE_NOISE_H
#include "noisecommon.h"
#define DEFAULT_SPHERE_RADIUS 8.0
#define DEFAULT_SPHERE_SPHERE_ORIGIN_X 0.0
#define DEFAULT_SPHERE_SPHERE_ORIGIN_Y 0.0
#define DEFAULT_SPHERE_SPHERE_ORIGIN_Z 0.0
#define DEFAULT_SPHERE_POSITION_X 0.0
#define DEFAULT_SPHERE_POSITION_Y... |
08 - openMP.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#define SIZE_GAU 8
#define SIZE_JVL 15
int JAVA_COUNT = SIZE_JVL;
omp_lock_t table;
omp_lock_t hungry;
void replaceJAVALIS()
{
omp_set_lock(&table);
JAVA_COUNT = SIZE_JVL;
printf(" < The Cooker Made his Magic n Replace All The Java's >\n\n");
omp_uns... |
Wind_speed.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include "grb2.h"
#include "wgrib2.h"
#include "fnlist.h"
/*
* Wind speed - U then V in input file
*
* v 0.1 experimental
*
* 3/2009: Public Domain: Wesley Ebisuzaki
*
*/
extern int decode, file_append, save_transl... |
ef_error2.c | /* The warning is x86-only. */
/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
/* { dg-options "-fcilkplus -Wall" } */
__attribute__((vector (vectorlength(128))))
//#pragma omp simd simdlen (128)
int func2 (int x, int y) /* { dg-warning "unsupported simdlen" } */
{
return (x+y);
}
int main (void)
{
... |
Quadtree.h | /*
* Quadtree.h
*
* Created on: 21.05.2014
* Author: Moritz v. Looz (moritz.looz-corswarem@kit.edu)
*/
#ifndef QUADTREE_H_
#define QUADTREE_H_
#include <vector>
#include <memory>
#include <cmath>
#include <omp.h>
#include <functional>
#include "QuadNode.h"
#include "../../geometric/HyperbolicSpace.h"
#incl... |
GB_binop__land_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_binop__minus_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
DRACC_OMP_006_Counter_no_lock_simd_yes.c | /*
Concurrent access on a counter with no lock with simd. Atomicity Violation. Data Race in line 27. Inter and Intra Region.
*/
#include <stdio.h>
#include <stdbool.h>
#define N 100000
#define C 64
int countervar[C];
int init(){
for(int i=0; i<C; i++){
countervar[i]=0;
}
return 0;
}
int count(... |
BKTree.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_BKTREE_H_
#define _SPTAG_COMMON_BKTREE_H_
#include <stack>
#include <string>
#include <vector>
#include <shared_mutex>
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "QueryResultSet.h... |
taskloop_untied_scheduling.c | // RUN: %libomp-compile && env KMP_ABT_NUM_ESS=4 %libomp-run
// REQUIRES: abt && !clang
// Clang 10.0 seems ignoring the taskloop's "untied" attribute.
// We mark taskloop + untied with Clang as unsupported so far.
#include "omp_testsuite.h"
#include "bolt_scheduling_util.h"
int test_taskloop_untied_scheduling() {
... |
lcs_algorithm.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#define MAX(a, b) (a > b ? a : b)
#define MIN(a, b) (a < b ? a : b)
char* readFile(FILE *fin, char *txt, int block_size) {
fseek(fin, 0L, SEEK_END);
int sz = ftell(fin);
txt = (char*)malloc((sz+1) * sizeof(char));
fseek(fin,... |
GB_unaryop__abs_uint16_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
nr_incore.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... |
ast-dump-openmp-single.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 single
;
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-singl... |
pr66199-6.c | /* PR middle-end/66199 */
/* { dg-do run } */
/* { dg-options "-O2 -fopenmp" } */
#pragma omp declare target
int u[1024], v[1024], w[1024];
#pragma omp end declare target
__attribute__((noinline, noclone)) long
f2 (long a, long b, long c)
{
long d, e;
#pragma omp target map(from: d, e)
#pragma omp teams distrib... |
GB_unaryop__minv_int64_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
add.c | //-------------------------------------------------------------------------//
// //
// This benchmark is a serial C version of the NPB BT code. This C //
// version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
profile.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
lmfit.c | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <float.h>
#include "lmfit.h"
#define MIN(a,b) (((a)<=(b)) ? (a) : (b))
#define MAX(a,b) (((a)>=(b)) ? (a) : (b))
#define SQR(x) (x)*(x)
void lm_lmpar(const int n, double *const r, const int ldr, int *const ipvt, double *const diag,
doub... |
3d7pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 7 point stencil with variable coefficients
* Adapted from PLUTO and Po... |
partial.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
void initcond(int nx, double y0[nx], double x[nx]);
void timestep(double t, double dt, double y0);
void RuKu3(double t0, double dt, int nx, double y0[nx], double x[nx], int nghost);
void get_rhs(double t, int nx, double f[nx], double x[nx], doub... |
GB_binop__isgt_uint32.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__copysign_fp64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
FFT2D.h | /*
Copyright (c) 2021, Moscow Center for Diagnostics & Telemedicine
All rights reserved.
This file is licensed under BSD-3-Clause license. See LICENSE file for details.
*/
#ifndef FFT2D_h__
#define FFT2D_h__
/*!
* \file FFT2D.h
* \date 2017/05/26 16:07
*
* \author kulberg
*
* \brief
*
* TODO: long description
*
* ... |
icmpspt.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... |
utils.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 ... |
par_csr_matrix.c | /******************************************************************************
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
**************************************... |
parallel-left-looking.h | #ifndef __PARALLEL_LEFT_LOOKING_H__
#define __PARALLEL_LEFT_LOOKING_H__
#include <omp.h>
#include "../matrix-formats/matrix-formats.h"
#include "elimitate-variables.h"
#include "eliminate-branches.h"
#include "super-nodes.h"
namespace __core__ {
namespace __linear_algebra__ {
namespace __cholesky__ {
template <typen... |
declare_variant_messages.c | // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
#pragma omp declare // expected-error {{expected an OpenMP directive}}
int foo(void);
#pra... |
morpho_SIMD.c | #include "morpho_SIMD.h"
vbits** erosion_3x3_SIMD_naif(vbits** img_bin, int height, int width)
{
int nb_vbits_col = ceil((float)width/128);
int nb_unused_col = (128-(width%128))%128;
vbits** m = (vbits**)vui32matrix(0, height-1, 0, nb_vbits_col-1);
vbits a0, b0, c0;
vbits a1, b1, c1;
vbits a2, b2, c2;
... |
c55c7aec73df0f31d67fbe39510946453b899e1d.c | #define _POSIX_C_SOURCE 200809L
#include "stdlib.h"
#include "math.h"
#include "sys/time.h"
#include "omp.h"
struct dataobj
{
void *restrict data;
int * size;
int * npsize;
int * dsize;
int * hsize;
int * hofs;
int * oofs;
} ;
struct profiler
{
double section0;
double section1;
double section2;
} ... |
distort.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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... |
rectangle_cmap.h | #pragma omp parallel for schedule(dynamic,1) reduction(+:counter)
for (vidType v0 = 0; v0 < g.V(); v0++) {
auto tid = omp_get_thread_num();
auto &cmap = cmaps.at(tid);
for (auto v1 : g.N(v0)) {
for (auto u : g.N(v1)) {
if (u >= v0) break;
cmap[u] = 1;
}
if (v1 >= v0) break;
for (auto v... |
if-clauseModificado.c | /*
* if-clauseModificado.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, hebras = 1, n = 20, tid;
int a[n], suma = 0, sumalocal;
if (a... |
omp.h | // Copyright 2021 ETH Zurich and University of Bologna.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <stdint.h>
#include "eu.h"
#include "kmp.h"
#include "snrt.h"
//===========================================================... |
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... |
hermv_c_bsr_u_hi_trans.c | #include<string.h>
#ifdef _OPENMP
#include<omp.h>
#endif
#include"alphasparse/opt.h"
#include "alphasparse/kernel.h"
#include "alphasparse/util.h"
alphasparse_status_t
ONAME(const ALPHA_Number alpha,
const ALPHA_SPMAT_BSR *A,
const ALPHA_Number *x,
const ALPHA_Numb... |
iso3d.c | /*
* Copyright (c) 2012, NVIDIA CORPORATION. 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 co... |
private-clause.c | /*
gcc -fopenmp -O2 private-clause.c -o private-clause
export OMP_DYNAMIC=FALSE
export OMP_NUM_THREADS=2
$ ./private-clause
thread 0 suma a[0] / thread 0 suma a[1] / thread 0 suma a[2] / thread 0 suma a[3] / thread 1 suma a[4] / thread 1 suma a[5] / thread 1 suma a[6] /
* thread 0 suma= 6
* thread 1 suma= 15
*... |
mandel-omp-taskloop-point.c | /*
* Sequential Mandelbrot program
*
* This program computes and displays all or part of the Mandelbrot
* set. By default, it examines all points in the complex plane
* that have both real and imaginary parts between -2 and 2.
* Command-line parameters allow zooming in on a specific part of
* this range.
... |
dds.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__identity_int16_uint64.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... |
mortar_utilities.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Vicente Mataix Ferrandiz
//
#if !defined(KRATOS_... |
regexredux.gcc-4.c | // The Computer Language Benchmarks Game
// http://benchmarksgame.alioth.debian.org/
//
// Contributed by Jeremy Zerfas
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <pcre.h>
typedef struct {
char * data;
int capacity, size;
} string;
// Function for searching a src_String for a patter... |
3453.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... |
ksdensity2d.c | #include "mex.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#endif
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
/* inputs */
double *data;
double *grid_x;
double *grid_y;
double *bandwidth;
double *box;
double *weight;... |
MyMiscellany.h | /*
Copyright (c) 2017, Michael Kazhdan
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 the following di... |
lf_flux.c | #include "nconv2d.h"
void lf_flux(double f_M, double f_P,
double nx, double ny,
double *num_flux)
{
double E_M, G_M, E_P, G_P;
nodal_flux(f_M, &E_M, &G_M);
nodal_flux(f_P, &E_P, &G_P);
double c = max(fabs(f_M), fabs(f_P));
*num_flux = 0.5 * ((E_M + E_P) * nx + (G_M + G_P... |
ike_fmt_plug.c | /* PSK cracker patch for JtR. Hacked together during March 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 GPL
*
* The IKE Scanner (ike-scan) is Copyright (C) 2003-2007... |
Example_tasking.15.c | /*
* @@name: tasking.15c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_4.0
*/
#include <stdio.h>
int main()
{
int x = 1;
#pragma omp parallel
#pragma omp single
{
#pragma omp task shared(x) depend(out: x)
x = 2;
#pragma omp task shared(x) depend(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.