source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
truecrypt_fmt_plug.c | /* TrueCrypt volume support to John The Ripper
*
* Written by Alain Espinosa <alainesp at gmail.com> in 2012. No copyright
* is claimed, and the software is hereby placed in the public domain.
* In case this attempt to disclaim copyright and place the software in the
* public domain is deemed null and void, then ... |
openmp.c | #include <stdio.h>
#include <omp.h>
// COMPILE WIH -fopenmp flag
int main() {
int tid;
int gid = 1;
#pragma omp parallel private(tid) shared(gid)
{
tid = omp_get_thread_num();
gid = tid;
printf("Hello World %d %d\n", tid, gid);
}
} |
GB_binop__iseq_int32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
sp_single.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 2.3 OpenMP C versions - SP
This benchmark is an OpenMP C version of the NPB SP code.
The OpenMP C versions are developed by RWCP and derived from the serial
Fortran versions in "NPB 2.3-serial" developed by NAS... |
GB_binop__isle_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
j3d7pt.gold.h | #include <cstring>
using std::memcpy;
void jacobi_gold(double *fout, const double *fin, double h2inv, double a, double b, int L, int M, int N) {
double (*out)[M][N] = (double (*)[M][N]) fout;
double (*in)[M][N] = (double (*)[M][N]) fin;
auto ftemp1 = new double[L * M * N];
auto ftemp2 = new double[L * M * N];
mem... |
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_... |
Par-17-ParForLoopNoWaitBarrier.c |
int main(int argc, char **argv) {
int a[4] = {1,2,3,4};
#pragma omp parallel
{
#pragma omp for nowait
for (int i = 0; i < 4; ++i) {
a[i] = 3*a[i];
}
#pragma omp barrier
#pragma omp for nowait
for (int i = 0; i < 4; ++i) {
a[i] += a[i];
}
}
return 0;
}
|
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... |
GB_binop__lt_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-... |
example-omp.c | // PWD009: Incorrect privatization in parallel region
// https://www.appentra.com/knowledge/checks/pwd009
void example(int m, double *A, double *B, double *C) {
double temp;
// "C" should be shared
#pragma omp parallel for private(temp, C)
for (int i = 0; i < m; i++) {
temp = A[i] * B[i];
C[i] = C[i] + ... |
buggy_version.c | #include <stdio.h>
int main(){
int T[5];
int sum = 0;
// initializing array T
for (int i = 0; i < 10; i ++) {
T[i] = i;
}
// running the loop 10 times using openmp
#pragma omp parallel for shared (T,sum) reduction (+ : sum)
for ( int i = 0; i < 10; i ++) {
// assign value for elements in... |
rhs_fv_term.c | #include "mex.h"
#include "blas.h"
#include "conv2d.h"
#define DEBUG 0
void inner_fv_term(int Np, int K, double *h, double *u, double *v,
int Nedge, double *v1, double *v2,
double *nx, double *ny, double *ds,
signed char *EToR, double *rhs)
{
#ifdef _OPENMP
#pr... |
GB_binop__second_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... |
integral_reduction.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <math.h>
#include <time.h>
double integrand(double x) {
return 4 / (1 + x * x);
}
int main(int argc, char* argv[]) {
double begin, end;
int t_count = 1;
if (argc != 1) {
t_count = (int) strtol(argv[1], NULL, 10);
}
omp_set_num_threads(t... |
GB_binop__islt_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... |
QLA_F3_r1_veq_norm2_V.c | /**************** QLA_F3_r_veq_norm2_V.c ********************/
#include <stdio.h>
#include <qla_config.h>
#include <qla_types.h>
#include <qla_random.h>
#include <qla_cmath.h>
#include <qla_f3.h>
#include <math.h>
static void start_slice(){
__asm__ __volatile__ ("");
}
static void end_slice(){
__asm__ __volatile... |
GB_binop__ne_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
BFSFriends.h | /****************************************************************/
/* Parallel Combinatorial BLAS Library (for Graph Computations) */
/* version 1.4 -------------------------------------------------*/
/* date: 1/17/2014 ---------------------------------------------*/
/* authors: Aydin Buluc (abuluc@lbl.gov), Adam Lugow... |
generator_spgemm_csr_asparse.c | /******************************************************************************
** Copyright (c) 2015-2018, Intel Corporation **
** All rights reserved. **
** **
... |
omp_taskloop_num_tasks.c | // This test is known to be fragile on NetBSD kernel at the moment.
// UNSUPPORTED: netbsd
// RUN: %libomp-compile-and-run
// RUN: %libomp-compile && env KMP_TASKLOOP_MIN_TASKS=1 %libomp-run
// These compilers don't support the taskloop construct
// UNSUPPORTED: gcc-4, gcc-5, icc-16
// This test is known to be fragil... |
alloc_benchmark.c | // SPDX-License-Identifier: BSD-2-Clause
/* Copyright (C) 2016 - 2020 Intel Corporation. */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdint.h>
#include <limits.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#if defined(HBWMALLOC)
#include <hbwmalloc.h>
#de... |
GB_unaryop__ainv_uint16_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
updater_basemaker-inl.h | /*!
* Copyright 2014 by Contributors
* \file updater_basemaker-inl.h
* \brief implement a common tree constructor
* \author Tianqi Chen
*/
#ifndef XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_
#define XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_
#include <rabit/rabit.h>
#include <vector>
#include <algorithm>
#include <string>... |
radmin_fmt_plug.c | /* RAdmin v2.x cracker patch for JtR. Hacked together during
* May 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 ... |
RadixSort.h | // Copyright 2021 The Khronos Group
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <algorithm>
#include <cstddef>
#include <vector>
#include "wrap_omp.h"
namespace anari {
namespace example_device {
// Helper functions ///////////////////////////////////////////////////////////
template <typename TO... |
operators.c | // for license information, see the accompanying LICENSE file
#include "vars_nuclear.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <complex.h>
#include <assert.h>
#include <mpi.h>
void i2xyz( const int i , int * ix , int * iy , int * iz , const int ny , const int nz );
void gradient_real... |
kmp_taskwait_depend_all.c | // RUN: %libomp-compile-and-run
// The runtime currently does not get dependency information from GCC.
// UNSUPPORTED: gcc
// Tests OMP 5.x task dependence "omp_all_memory",
// emulates compiler codegen versions for new dep kind
//
// Task tree created:
// task0 - task1 (in: i1, i2)
// \
// tas... |
memory.c | /******************************************************************************
* Copyright (c) 1998 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)
***************************************... |
sl3_fmt_plug.c | /*
* SL3 unlocking. Password is always 15 digits. Run with "-mask=?d"
*
* Input format (IMEI is put in "login field"):
* IMEI:hash
*
* IMEI is 14 or 15 digits 0-9 (only 14 are used)
* hash is hex lowercase (0-9, a-f)
*
* Copyright (c) 2017 magnum.
* Redistribution and use in source and binary forms, with or... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- 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
//
//===---------------------------... |
milc_to_qphix_utilities.c | /******************* milc_to_qphix_utilities.c ************************/
/* For the QPhiX interface */
/* MIMD version 7 */
/* 11/28/15 Created by Dhiraj Khalamkar */
#include "../include/generic_qphix.h"
#include "../include/generic.h"
#include <lattice.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#... |
GB_binop__bget_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-... |
GB_unop__identity_bool_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... |
GB_unaryop__identity_int16_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... |
test_master2.c | //===-- test_master2.cc - Test the "master" construct ------=------*- C -*-===//
//
// Part of the LOMP 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
//
//===---------------------------... |
1500.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... |
cholesky.c | /*****************************************************
* Site: https://rosettacode.org/wiki/Cholesky_decomposition
*****************************************************/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <omp.h>
#include <sys/time.h>
void cholesky(double** A, int ... |
louvain_imm.h | //===------------------------------------------------------------*- C++ -*-===//
//
// Ripples: A C++ Library for Influence Maximization
// Marco Minutoli <marco.minutoli@pnnl.gov>
// Pacific Northwest National Laboratory
//
//===-------------------------------------------... |
clansy.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/zlansy.c, normal z -> c, Fri Sep 28 17:38:08 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
ast-dump-openmp-target-simd.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test_one(int x) {
#pragma omp target simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target simd
for (int i = 0; i < x; i++)... |
degeneracy_approx_csr.h | #pragma once
#include "../general.h"
#include <cstdlib>
#include <omp.h>
#include <gms/third_party/fast_statistics.h>
#include <gms/third_party/fast_range.h>
#include "boundary_function.h"
namespace PpParallel
{
template <BoundaryFunction boundary, bool useRankFormat = false, class CGraph = CSRGraph, class Output = s... |
ImageGraphUtils.h | #ifndef CAPTURE3_IMAGE_GRAPH_UTILS_H
#define CAPTURE3_IMAGE_GRAPH_UTILS_H
#include <cmath>
#include <vector>
#include <omp.h>
#include "BoundingBoxUtils.h"
#include "../engine/objects/image/ImageChannel.h"
#include "../engine/objects/image/ImageSize.h"
namespace Capture3
{
static void generateG... |
parallelizer.h | // (C) Copyright Renaud Detry 2007-2015.
// Distributed under the GNU General Public License and under the
// BSD 3-Clause License (See accompanying file LICENSE.txt).
/** @file */
#ifndef NUKLEI_PARALLELIZER_H
#define NUKLEI_PARALLELIZER_H
#include <nuklei/Random.h>
#include <nuklei/Common.h>
#include <nuklei/Boo... |
matmul_tiled.c | #include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <math.h>
#include <float.h>
#include <omp.h>
#ifdef DP
#define REAL double
#else
#define REAL float
#endif
//int NB= BSIZE;
int BSIZE;
#define HACKFOR 128
#define max(a,b)( ((a) > (b)) ? (a) : (b) )
doubl... |
stencil2d_mdev.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include <sys/time.h>
#include "homp.h"
#include "stencil2d.h"
void stencil2d_omp_mdev_launcher(omp_offloading_t * off, void *args) {
struct stencil2d_off_args * iargs = (struct stencil2d_off_args*) args;
long n = iargs->n;
long m = ... |
12_omp_correlate.c | // clang-format off
// RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | FileCheck %s
// RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | opt -O2 -S | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | FileCheck %s --check-prefix=CHECK-opt
// R... |
schur_eliminator_impl.h | // Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2015 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of so... |
conv_im2col_layer.h | //Tencent is pleased to support the open source community by making FeatherCNN available.
//Copyright (C) 2018 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 of... |
ExemplarClusteringSubmodularFunction.h | #ifndef EXEMCL_FUNCTION_CPU
#define EXEMCL_FUNCTION_CPU
#include <src/function/SubmodularFunction.h>
#include <utility>
namespace exemcl::cpu {
/**
* This class provides a CPU implementation of the submodular function of exemplar-based clustering.
*/
template<typename HostDataType = float>
class... |
GB_subassign_12_and_20.c | //------------------------------------------------------------------------------
// GB_subassign_12_and_20: C(I,J)<M or !M,repl> += A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Licens... |
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 ... |
HannWindow.h | #ifndef _H_HANN_WINDOW_
#define _H_HANN_WINDOW_
#include <cmath>
#include <cstdio>
class HannWindow {
int cnt = 0;
private:
// c standard defind
//#define M_PI (3.14159265358979323846)::
// MATLAB 'pi'
const double MATLAB_pi= 3.141592653589793;
double *hann;
int shift_size;
int frame_s... |
vect-aggressive-1.c | /* { dg-require-effective-target vect_condition } */
/* { dg-require-effective-target vect_simd_clones } */
/* { dg-additional-options "-fopenmp-simd" } */
#include "tree-vect.h"
#define N 64
int a[N];
int c[N];
__attribute__ ((noinline)) int
foo (void)
{
int i, res = 0;
#pragma omp simd safelen(8)
for (i = 0; i... |
tree-vect-data-refs.c | /* Data References Analysis and Manipulation Utilities for Vectorization.
Copyright (C) 2003-2015 Free Software Foundation, Inc.
Contributed by Dorit Naishlos <dorit@il.ibm.com>
and Ira Rosen <irar@il.ibm.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the ... |
Polygon.c | #include "Polygon.h"
#include "utils.h"
void P_init(Polygon *p){
p->_nb_vertices=0;
p->_is_closed=FALSE;
p->_is_filled=FALSE;
p->_is_convex=TRUE;
}
// initialise un polygone (0 sommets)
void P_copy(Polygon *original, Polygon *copie){
int i;
copie->_nb_vertices=original->_nb_vertices;
copie->_is_closed=origin... |
omp_test_nest_lock.c | <ompts:test>
<ompts:testdescription>Test which checks the omp_test_nest_lock function.</ompts:testdescription>
<ompts:ompversion>2.0</ompts:ompversion>
<ompts:directive>omp_test_nest_lock</ompts:directive>
<ompts:dependences>omp flush</ompts:dependences>
<ompts:testcode>
#include <stdio.h>
#include "omp_testsuite.h"
... |
pzdr_saidai.c | /* author gumboshi <gumboshi@gmail.com> */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
/* #ifdef AVX */
/* #include <immintrin.h> */
/* #include <x86intrin.h> */
/* #endif */
#ifdef _OPENMP
#include <omp.h>
#endif
#include "patterns.h"
#include "pzdr_def.h"
#incl... |
v_add.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define ARRAY_SIZE 10000000
#define REPEAT 100
void v_add_naive(double* x, double* y, double* z)
{
#pragma omp parallel
{
for (int i = 0; i < ARRAY_SIZE; i++)
z[i] = x[i] + y[i];
}
}
// Edit this function (Method 1)
void v_add_optimi... |
fourier.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
convolution_5x5.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a ... |
transfer_utility.h | /*
==============================================================================
KratosIncompressibleFluidApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi
pooyan@cimne.upc... |
cgeswp.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/zgeswp.c, normal z -> c, Fri Sep 28 17:38:06 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
GB_subassign_14.c | //------------------------------------------------------------------------------
// GB_subassign_14: C(I,J)<!M> = A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http://suitesparse.com See ... |
GB_binop__isge_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... |
jacobi-block-for.ref.c | #include <sys/time.h>
#include <time.h>
#include <stdio.h>
static unsigned long long current_time_ns() {
#ifdef __MACH__
clock_serv_t cclock;
mach_timespec_t mts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
clock_get_time(cclock, &mts);
mach_port_deallocate(mach_task_self(), c... |
noble_1962.c | #include "noble_1962.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_ode_equations = NEQ;
}
SET_ODE_INITIAL_CONDITIONS_CPU(set_model_initial_conditions_cpu) {
// Original: -87,0.01,0.8,0.01
// Mestr... |
original.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... |
11_soma_vetor.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
void inicializa(int **v, int size) {
(*v) = (int *) malloc(sizeof(int) * size);
for (int i = 0; i < size; i++) {
(*v)[i] = 1;
}
}
int main(int argc, char **argv) {
int *vetor;
int size = 1000000;
inicializa(&v... |
st_up.c | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
#include "mypng.h"
/**
* A transform finding the gradient of the steepest upwards tangent at each pixel.
* <p>
* CODER WARNING: Many of the internal methods use the square of the slope.
*/
double* inGrey ;
int fullWidth ;
int f... |
exercice3.c | #include <stdio.h>
int main(void){
int total = 0;
#pragma omp parallel for reduction(+:total)
for (int i = 0; i < 100; i++){
total += i;
}
printf("total : %d", total);
}
|
rhombus_averaging.c | /*
This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license.
Github repository: https://github.com/OpenNWP/GAME
*/
/*
In this file, remapping indices and weights to rhombi are computed.
*/
#include <stdlib.h>
#include <stdio.h>
#include <geos95.h>
#include ... |
DRACC_OMP_015_Counter_wrong_lock_yes.c | /*
Concurrent access on a counter with the wrong lock, by utilising OpenMP Lock Routines. Atomicity Violation.
Two locks are used to ensure that addition and substraction cannot be interrupted by themselfes on other teams.
Although they are able to interrupt eachother leading to a wrong result. Intra and Inter Region.... |
spgsolver.h | /*
Algorithm for Steiner Problem in Graphs
Copyright (c) Microsoft Corporation
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, in... |
MzXMLHandler.h | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
filtering_openmesh.h | #pragma once
#include <omp.h>
#include <queue>
#include "../common/openmesh_report.h"
#include "../common/openmesh_trimesh.h"
#include "rxmesh/rxmesh_attribute.h"
/**
*computeSigma_s()
*/
double computeSigma_s(
const std::vector<TriMesh::VertexHandle>& vertex_neighbour,
const TriMesh& ... |
CALPHADFreeEnergyFunctionsBinaryThreePhase.h | #ifndef included_CALPHADFreeEnergyFunctionsBinaryThreePhase
#define included_CALPHADFreeEnergyFunctionsBinaryThreePhase
#include "CALPHADSpeciesPhaseGibbsEnergy.h"
#include "InterpolationType.h"
#include "Phases.h"
#include "datatypes.h"
#include "functions.h"
#include <boost/property_tree/ptree.hpp>
#include <casse... |
task_codegen.c | // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fopenmp-version=50 -x c -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -x c -triple x86_64-apple-darwin10 -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -x c -triple x86_64-apple-darwin10 -include-p... |
dropout-inl.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
perftest.c | /**
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
* Copyright (C) The University of Tennessee and The University
* of Tennessee Research Foundation. 2015. ALL RIGHTS RESERVED.
* Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
#... |
DRB002-antidep1-var-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... |
par_gsmg.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)
**************************************... |
common.h | #ifndef LIGHTGBM_UTILS_COMMON_FUN_H_
#define LIGHTGBM_UTILS_COMMON_FUN_H_
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <cstdio>
#include <string>
#include <vector>
#include <sstream>
#include <cstdint>
#include <algorithm>
#include <cmath>
#include <functional>
#include <memory>... |
polygonalsurface_texcoordparameterization_accel_ops.h | #ifdef _MSC_VER
#define PSTCPAOPS_INLINE __inline
#include <float.h>
#define PSTCPAOPS_ISNAN _isnan
#define PSTCPAOPS_ALLOCA _alloca
#else
#define PSTCPAOPS_INLINE inline
#define PSTCPAOPS_ISNAN isnan
#define PSTCPAOPS_ALLOCA alloca
#endif
static PSTCPAOPS_INLINE size_t enclosed_or_intersecting_polygons_2d_c(int32_t... |
GB_binop__isgt_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
convolution_3x3_pack1to4_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 ... |
ch_ompss.c |
#include "ch_common.h"
#include "../timing.h"
#include "../timing_override.h"
void cholesky_mpi(const int ts, const int nt, double * SPEC_RESTRICT A[nt][nt], double * SPEC_RESTRICT B, double * SPEC_RESTRICT C[nt], int *block_rank)
{
#if defined(CHAMELEON) || defined(CHAMELEON_TARGET)
#pragma omp parallel
{
... |
kmeans_impl.h | /*!
* Modifications Copyright 2017 H2O.ai, Inc.
*/
// original code from https://github.com/NVIDIA/kmeans (Apache V2.0 License)
#pragma once
#include <atomic>
#include <signal.h>
#include <string>
#include <sstream>
#include <thrust/device_vector.h>
#include <thrust/reduce.h>
#include <thrust/inner_product.h>
#includ... |
main-single-mailbox-wavefront.c | #include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <shmem.h>
#include <shmemx.h>
#include <time.h>
#include <sys/time.h>
#include <stdlib.h>
#include <omp.h>
#include <signal.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <limits.h>... |
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... |
geckoDataTypeGenerator.h | //
// Created by millad on 7/23/18.
//
#ifndef GECKO_GECKODATATYPEGENERATOR_H
#define GECKO_GECKODATATYPEGENERATOR_H
#include <vector>
#include <stdlib.h>
//#define CUDA_ENABLED
#ifdef CUDA_ENABLED
#include <cuda_runtime.h>
#endif
#include <openacc.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#inclu... |
master-worker-omp.c | # include <stdio.h>
# include <stdlib.h>
# include <omp.h>
struct {
int maxtask;
int task;
} taskinfo = { 0, 0 };
void work(void);
void get_task(int *nexttask);
int main(int argc, char *argv[])
{
taskinfo.maxtask = 40;
#pragma omp parallel
work();
return 0;
}
void get_task(int *nexttask)
{... |
TailLenSoftMax.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/TailLenSoftMax.c"
#else
void THLENN_(TailLenSoftMax_updateOutput)(
THLENNState *state,
THTensor *input,
THTensor *output,
THIndexTensor *len)
{
if ((input->nDimension != 2) && (len->nDimension != 1))
{
THArgCheck(0... |
base_ptr_ref_count.c | // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu && env LIBOMPTARGET_DEBUG=1 %libomptarget-run-aarch64-unknown-linux-gnu 2>&1 | %fcheck-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu && env LIBOMPTARGET_DEBUG=1 %libomptarget-run-powerpc64-ibm-linux-gnu 2>&1 | %fcheck-powerpc64-ib... |
pdplgsy.c | /**
*
* @file pdplgsy.c
*
* PLASMA auxiliary routines
* PLASMA is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 2.6.0
* @author Mathieu Faverge
* @date 2010-11-15
* @generated d Tue Jan 7 11:45:12 2014
*
**/
#include "common.... |
_kdtree_core.c | /*
pykdtree, Fast kd-tree implementation with OpenMP-enabled queries
Copyright (C) 2013 - present Esben S. Nielsen
This program 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 Foundation, either version 3 of the Lic... |
GB_binop__islt_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-... |
multi_matrices.c | #include<stdio.h>
#include<omp.h>
#define RA 4
#define CA 2
#define RB 2
#define CB 3
void init_matrix(int *M, int init, int reng, int col){
int i;
#pragma omp parallel for
for (i=0; i<reng*col; i++){
if (init == 0){
*(M+i) = 0;
} else {
*(M+i) = i+1;
}
}
}
void print_matrix(int *M, int reng, int col)... |
effect.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__identity_bool_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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.