source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
AlloyDenseSolve.h | /*
* Copyright(C) 2015, Blake C. Lucas, Ph.D. (img.science@gmail.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to... |
mm.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <sys/time.h>
#include <gsl/gsl_cblas.h>
#define N 5000;
void mm_bruteforce_ijk(double *a, double *b, double *c, int I, int K, int J) {
for(int i = 0; i < I; i++) {
for(int j = 0; j < J; j++) {
for(int k = 0; k < K; k++) {
... |
Kernel_3d_DGZ.h | #ifndef KRIPKE_KERNEL_3D_DGZ_H__
#define KRIPKE_KERNEL_3D_DGZ_H__
#include<Kripke/Kernel.h>
#include<Grid.h>
class Kernel_3d_DGZ : public Kernel {
public:
typedef std::vector<std::vector<double>> result_type;
// Grid is needed to access metadata (e.g. gd_sets) stored on it.
Grid_Data* grid_data;
int group_se... |
DRB018-plusplus-orig-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
GB_AxB_rowscale_meta.c | //------------------------------------------------------------------------------
// GB_AxB_rowscale_meta: C=D*B where D is a square diagonal matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http://... |
threshold.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
sample_task_single_producer.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See LICENSE.txt in top-level directory.
*/
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
int main(int argc, char *argv[]) {
int i, num = (argc > 1) ? atoi(argv[1]) : 100;
int nthreads;
struct timeval t_star... |
real_self_energy.c | /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */
/* This file is part of phonopy. */
/* 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 abo... |
coin_flip_omp.c | /*
* This program is the first of threes exercise in the OnRamp to
* Parallel Computing - Monte Carlo Module. We will flip a coin,
* simulated using rand_r(), many times and evaluate the randomness of
* the results using a chi-squared test. This exercise is derived from
* Libby Shoop's CS in Parallel Monte Ca... |
compare.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__bxor_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
libperf.c | /**
* Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED.
* Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED.
* Copyright (C) The University of Tennessee and The University
* of Tennessee Research Foundation. 2015-2016. ALL RIGHTS RESERVED.
* Copyright (C) ARM Ltd. 2017. AL... |
7619.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... |
QuadtreeCartesianEuclid.h | /*
* Quadtree.h
*
* Created on: 21.05.2014
* Author: Moritz v. Looz (moritz.looz-corswarem@kit.edu)
*/
#ifndef QUADTREECARTESIANEUCLID_H_
#define QUADTREECARTESIANEUCLID_H_
#include <vector>
#include <memory>
#include <cmath>
#include <omp.h>
#include <functional>
#include "QuadNodeCartesianEuclid.h"
name... |
GB_binop__ne_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... |
vdi_fmt_plug.c | /* VirtualBox (VDI) volume support to John The Ripper
*
* Written by JimF <jfoug at openwall.net> in 2015. 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 the... |
rose_regression01.c | /*
* Contributed by Jeff Keasler
*
* Liao 2/10/2010
* */
#include "omp.h"
typedef double real8;
void foo(real8 *a,real8 *b,real8 *c,real8 *d,int len)
{
int icol;
int jrow;
int l;
for (l = 0; l <= len - 1; l += 1) {
int l8 = l * 8;
real8 e = d[l * 3 + 0];
real8 f = d[l * 3 + 1];
real8 g = d... |
udr-1.c | /* { dg-do compile } */
/* { dg-options "-fopenmp" } */
struct S {};
void foo (void *, void *);
void bar (void *, void *);
void baz (void *);
#pragma omp declare reduction(+:struct S:foo (&omp_out, &omp_in))initializer(bar(&omp_priv, &omp_orig))
void
test (void)
{
struct S a, b[10];
#pragma omp parallel reduction... |
oldoffice_fmt_plug.c | /*
* MS Office 97-2003 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>
* Copyright (c) 2014, magnum
* Copyright (c) 2009, David Leblanc (http://offcrypto.codeplex.com/)
*
* ... |
sparsemat.c | #include "ghost/config.h"
#include "ghost/types.h"
#include "ghost/sparsemat.h"
#include "ghost/context.h"
#include "ghost/util.h"
#include "ghost/locality.h"
#include "ghost/log.h"
#include "ghost/machine.h"
#include "ghost/bincrs.h"
#include "ghost/matrixmarket.h"
#include "ghost/instr.h"
#include "ghost/constants.h"... |
single.c | #include <stdio.h>
#include <omp.h>
void work1()
{
printf("%s","Work1.\n");
}
void work2()
{
printf("%s","Work2.\n");
}
int main(int argc, char const *argv[])
{
/* code */
#pragma omp parallel
{
#pragma omp single
printf("%s","Beginning work1.\n");
work1();
#pragma omp single
pr... |
kthread_test.c | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <pthread.h>
#if HAVE_CILK
#include <cilk/cilk.h>
#include <cilk/cilk_api.h>
#endif
typedef struct {
int max_iter, w, h;
double xmin, xmax, ymin, ymax;
int *k;
} global_t;
static void compute(void *_g, int i, int tid)
{
global_t *... |
distort.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
integrate_cython.c | /* Generated by Cython 0.14.1+ on Fri Jul 15 21:59:40 2011 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#else
#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, me... |
GB_unaryop__abs_bool_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... |
EppsteinSubGraphAdaptive.h | #pragma once
#include "../general.h"
#include <gms/algorithms/preprocessing/preprocessing.h>
namespace BkEppsteinSubGraphAdaptive
{
template <int Boundary, class SGraph, class Set = typename SGraph::Set>
std::vector<Set> mceBench(const SGraph &rgraph, const pvector<NodeId> &ordering)
{
#ifdef BK_COUNT
... |
TaskDispatcher.h |
#include "nvtt.h"
// OpenMP
// http://en.wikipedia.org/wiki/OpenMP
#if defined(HAVE_OPENMP)
#include <omp.h>
#endif
// Gran Central Dispatch (GCD/libdispatch)
// http://developer.apple.com/mac/library/documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html
#if NV_OS_DARWIN && defined(HAVE_DI... |
nstream-ua-target.c | ///
/// Copyright (c) 2019, Intel Corporation
/// Copyright (c) 2021, NVIDIA
///
/// 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
/// n... |
GB_unop__isinf_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... |
GB_binop__isle_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... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- 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
//
//===---------------------------... |
otbSampleAugmentation.h | /*
* Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of ... |
ZQ_CNN_MTCNN_AspectRatio.h | #ifndef _ZQ_CNN_MTCNN_ASPECT_RATIO_H_
#define _ZQ_CNN_MTCNN_ASPECT_RATIO_H_
#pragma once
#include "ZQ_CNN_Net.h"
#include "ZQ_CNN_BBoxUtils.h"
#include <omp.h>
namespace ZQ
{
class ZQ_CNN_MTCNN_AspectRatio
{
public:
using string = std::string;
ZQ_CNN_MTCNN_AspectRatio()
{
min_size = 60;
thresh[0] = 0.6;... |
MD5_fmt.c | /*
* This file is part of John the Ripper password cracker,
* Copyright (c) 1996-2001,2008,2010-2012 by Solar Designer
*
* ...with changes in the jumbo patch, by bartavelle and magnum.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* There's ABSOLUTELY N... |
convolution_gemm.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/** \file
* jitconv "doRef" calculation - a simplified gemm impl.
*
* This should be correct, and may even be somewhat fast "in general".
* Do not expect "fastest" performance.
*
* libvednn has a more sophisticated GEMM convolution.
*/
#include "ve... |
for_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 -verify %s -Wuninitia... |
backward_binary_reduce_impl.h | /*!
* Copyright (c) 2019 by Contributors
* \file kernel/cuda/backward_binary_reduce_impl.h
* \brief Minigun CPU UDFs for bacward binary reduce
*/
#ifndef DGL_KERNEL_CPU_BACKWARD_BINARY_REDUCE_IMPL_H_
#define DGL_KERNEL_CPU_BACKWARD_BINARY_REDUCE_IMPL_H_
#include <minigun/minigun.h>
#include "../binary_reduce_imp... |
jacobi-avx.c | #include <immintrin.h>
inline
void kernel(double* v1, double * v2, int m)
{
__m256d alpha = _mm256_set1_pd(0.25);
//
__m256d phi_e = _mm256_loadu_pd (v1 + 1 );
__m256d phi_w = _mm256_loadu_pd (v1 - 1 );
__m256d phi_n = _mm256_loadu_pd (v1 + m);
__m256d phi_s = _mm256_loadu_pd (v1 - m);
//
phi_e = _mm256_add_pd... |
rose_jacobi_seq.c | /* An example code
*
* */
#include <stdio.h>
#include <math.h>
#include "omp.h"
void driver();
void initialize();
void jacobi();
void error_check();
#define MSIZE 200
int n;
int m;
int mits;
double tol;
double relax = 1.0;
double alpha = 0.0543;
double u[200][200];
double f[200][200];
double uold[200][200];
double ... |
sudoku_solver_parallel.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#define EMPTY 0
#define MAX_SIZE 25
int findEmptyLocation(int matrix[MAX_SIZE][MAX_SIZE], int *row, int *col, int box_size);
int canBeFilled(int matrix[MAX_SIZE][MAX_SIZE], int row, int col, int num, int box_size,... |
convolution_winograd_transform_pack4_bf16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
GB_unop__sin_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
DRACC_OMP_035_SAXPY_without_Task_Barrier_yes.c | /*
SAXPY without a barrier at the end of execution to wait for the tasks to finish.
*/
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#define C 4096
float a;
float x[C];
float y[C];
int init(){
for(int i=0; i<C; i++){
a=5;
x[i]=0;
y[i]=3;
}
return 0;
}
int sax... |
GB_binop__lt_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-... |
_sphere.c | /* Generated by Cython 0.20.1 on Fri Jun 6 16:03:35 2014 */
#define PY_SSIZE_T_CLEAN
#ifndef CYTHON_USE_PYLONG_INTERNALS
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 0
#else
#include "pyconfig.h"
#ifdef PYLONG_BITS_IN_DIGIT
#define CYTHON_USE_PYLONG_INTERNALS 1
#else
#define CYTHON_USE_PYLONG_INTER... |
example-omp.c | // PWR004: Declare OpenMP scoping for all variables
// https://www.appentra.com/knowledge/checks/pwr004
void example(int* result, unsigned size) {
int factor = 42;
// No data scoping is specified
#pragma omp parallel for
for (int i = 0; i < size; i++) {
result[i] = factor * i;
}
}
|
task_tied_threadid.c | // RUN: %libomp-compile-and-run
// REQUIRES: abt
#include "omp_testsuite.h"
#include <string.h>
#include <stdio.h>
int test_task_tied_threadid(int num_threads) {
int i, vals[NUM_TASKS];
memset(vals, 0, sizeof(vals));
#pragma omp parallel num_threads(num_threads)
{
#pragma omp master
{
for (i = 0... |
openmp_error.c | #include <stdio.h>
#include <omp.h>
#define N 10000
int main (int argc, char **argv)
{
int a[N];
int j = N;
// [...] initialisiere array
#pragma omp parallel for
for (int i = 0; i < N - 2; i++) {
#pragma omp critical
a[i] = a[i] + a[j];
j--;
}
}
|
c_qsort.c | /* ***********************************************************************
This program is part of the
OpenMP Source Code Repository
http://www.pcg.ull.es/ompscr/
e-mail: ompscr@etsii.ull.es
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public Lice... |
gimple.h | /* Modula-3: modified */
/* Gimple IR definitions.
Copyright 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@redhat.com>
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 publ... |
plot.h | #ifndef OPENMC_PLOT_H
#define OPENMC_PLOT_H
#include <sstream>
#include <unordered_map>
#include "pugixml.hpp"
#include "xtensor/xarray.hpp"
#include "hdf5.h"
#include "openmc/cell.h"
#include "openmc/constants.h"
#include "openmc/error.h"
#include "openmc/geometry.h"
#include "openmc/particle.h"
#include "openmc/po... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
kwallet_fmt_plug.c | /* KDE KWallet cracker patch for JtR. Written by Narendra Kangralkar
* <narendrakangralkar at gmail.com> and Dhiru Kholia <dhiru at openwall.com>.
*
* Also see https://github.com/gaganpreet/kwallet-dump ;)
*
* This software is Copyright (c) 2013 by above authors and it is hereby
* released to the general public u... |
statistic.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
nonneg_frob.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "../admm.h"
/******************************************************************************
* PUBLIC FUNCTIONS
******************... |
lis_matrix_diag.c | /* Copyright (C) 2002-2012 The SSI Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of condition... |
normal_gap_process.h | // KRATOS ___| | | |
// \___ \ __| __| | | __| __| | | __| _` | |
// | | | | | ( | | | | ( | |
// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
//
// License: BSD License
// license: StructuralMechanicsApplicat... |
private-clauseModificado3.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main()
{
int i, n = 7;
int a[n], suma;
for (i=0; i<n; i++)
a[i] = i;
suma=0;
#pragma omp parallel
{
#pragma omp for
for (i=0; i<n; i++)
{
suma = suma + a[i];
printf("thread %d suma a[%d] / ", omp_get... |
GB_unaryop__identity_bool_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
ft.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - FT
This benchmark is an OpenMP C version of the NPB FT code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by N... |
BruteForceNnL1K2.h | #ifndef BRUTEFORCENNL1K2_H
#define BRUTEFORCENNL1K2_H
#include "EigenDefinitions.h"
#include <cstdint>
#include <emmintrin.h>
#include <vector>
/*
* specialized brute-force computation of L1 norm with K=2 neighbours, designed
* to work with SSE instructions *
*/
namespace spectavi {
namespace filter {
struct I... |
GB_unop__abs_fp32_fc32.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... |
geopm_sched.c | /*
* Copyright (c) 2015 - 2022, Intel Corporation
*
* 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 condition... |
enhance.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__pow_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-... |
a.24.1.c | /* { dg-do compile } */
/* { dg-require-effective-target tls } */
extern int omp_get_num_threads (void);
int x, y, t, z[1000];
#pragma omp threadprivate(x)
void
a24 (int a)
{
const int c = 1;
int i = 0;
int l = 0;
#pragma omp parallel default(none) private(a) shared(z)
{
int j = omp_get_num_threads ();
... |
GB_unop__lnot_int8_int8.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... |
syrk.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... |
mbpush3.c | /* C Library for Skeleton 3D Electromagnetic OpenMP PIC Code */
/* written by Viktor K. Decyk, UCLA */
#include <stdlib.h>
#include <stdio.h>
#include <complex.h>
#include <math.h>
#include "mbpush3.h"
/*--------------------------------------------------------------------*/
double ranorm() {
/* this program calculate... |
math.h | /*===---- openmp_wrapper/math.h -------- OpenMP math.h intercept ------ 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
*
*===---------------------------... |
omp_device_managed_memory.c | // RUN: %libomptarget-compile-run-and-check-nvptx64-nvidia-cuda
// REQUIRES: nvptx64-nvidia-cuda
#include <omp.h>
#include <stdio.h>
void *llvm_omp_target_alloc_shared(size_t, int);
int main() {
const int N = 64;
const int device = omp_get_default_device();
int *shared_ptr = llvm_omp_target_alloc_shared(N * s... |
fft.c | /* Copyright 2013-2014. The Regents of the University of California.
* Copyright 2016-2018. Martin Uecker.
* Copyright 2018. Massachusetts Institute of Technology.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2011-2018 ... |
DRB058-jacobikernel-orig-no.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
learn.c | /**************************************************************/
/*! \File learn.c
\brief This is the file containing the fundamental functions
to learn the model, used by GLSLIM and GLSLIMr0.
\author Evangelia Christakopoulou
\version 1.0
\date 2016
*/
/*********************************... |
normalize_ref.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
DRB052-indirectaccesssharebase-orig-no.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
spectralnorm.gcc-4.c | /*
* The Computer Language Benchmarks Game
* http://shootout.alioth.debian.org/
*
* Original C contributed by Sebastien Loisel
* Conversion to C++ by Jon Harrop
* OpenMP parallelize by The Anh Tran
* Add SSE by The Anh Tran
* Reconversion into C by Dan Farina
*/
#define _GNU_SOURCE
#include <omp.h>
#include <... |
GB_unop__identity_fc64_int32.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__abs_int32_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_binop__lor_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... |
2018-collapsemissing-orig-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
GB_unop__identity_uint32_int16.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... |
image.h |
#ifndef SEGM_SEGMIMAGE_H
#define SEGM_SEGMIMAGE_H
#include <stdexcept>
#include <limits>
#include "utils/color.h"
namespace segm {
template<typename T>
class Image {
public:
struct Pixel {
int x;
int y;
Pixel(int _x, int _y) : x(_x), y(_y) { }
};
... |
GB_dense_subassign_06d_template.c | //------------------------------------------------------------------------------
// GB_dense_subassign_06d_template: C<A> = A where C is dense or bitmap
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SP... |
GB_binop__second_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-... |
deconv_2d.h | // Copyright 2018 The MACE Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by appl... |
MicroMlpAffine.h | // --------------------------------------------------------------------------
// Binary Brain -- binary neural net framework
//
// Copyright (C) 2018 by Ryuji Fuchikami
// https://github.com/ryuz
// ryuji.fuch... |
declare-simd-fix.h | #ifndef LLVM_CLANG_TEST_OPENMP_INPUTS_DECLARE_SIMD_FIX_H
#define LLVM_CLANG_TEST_OPENMP_INPUTS_DECLARE_SIMD_FIX_H
#pragma omp declare simd
float foo(float a, float b, int c);
float bar(float a, float b, int c);
#endif
|
qsort_arg_mt.c | /*
* Imported from PostgreSQL sources by Teodor Sigaev <teodor@sigaev.ru>, <sigaev@corp.mail.ru>
*/
/*
* qsort_arg.c: qsort with a passthrough "void *" argument
*
* Modifications from vanilla NetBSD source:
* Add do ... while() macro fix
* Remove __inline, _DIAGASSERTs, __P
* Remove ill-considered "swap_... |
GB_binop__band_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-... |
laplace_acc.c | #include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
#include <openacc.h>
#include <omp.h>
// grid size
#define GRIDY 8192
#define GRIDX 8192
// smallest permitted change in temperature
#define MAX_TEMP_ERROR 0.02
double T_new[GRIDX+2][GRIDY+2]; // temperature grid
double T[GRIDX+2][... |
getStartLists.c | #include "defs.h"
double getStartLists(graph* G, edge** maxIntWtListPtr,
INT_T* maxIntWtListSizePtr) {
LONG_T *local_max, maxWeight;
edge *maxIntWtList;
LONG_T maxIntWtListSize;
LONG_T *p_start, *p_end;
double elapsed_time;
elapsed_time = get_seconds();
#ifdef _OPENMP
o... |
task-taskwait-nested.c | /*
* task-taskwait-nested.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-except... |
declare_variant_ast_print.c | // RUN: %clang_cc1 -verify -fopenmp -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s
// RUN: %clang_cc1 -verify -fopenmp-simd -x c -std=c99 -ast-print %s -o - -Wno-openmp-clauses | FileCheck %s
// expected-no-diagnostics
int foo(void);
#pragma omp declare variant(foo) match(construct={target})
#p... |
multisort-omp-tree-opcional.c | #include <malloc.h>
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <sys/time.h>
double getusec_() {
struct timeval time;
gettimeofday(&time, NULL);
return ((double)time.tv_sec * (double)1e6 + (double)time.tv_usec);
}
#define START_COUNT_TIME stamp = getusec_();
#define STOP_C... |
zero_length_array_section_exit.c | // RUN: %libomptarget-compile-generic -fopenmp-version=51
// RUN: %libomptarget-run-fail-generic 2>&1 \
// RUN: | %fcheck-generic
#include <stdio.h>
int main() {
int arr[5];
// CHECK: addr=0x[[#%x,HOST_ADDR:]]
fprintf(stderr, "addr=%p\n", arr);
// CHECK-NOT: Libomptarget
#pragma omp target enter data map(a... |
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
#include <stdio.h>
#include <omp.h>
#include <stdlib.h>
#include ... |
nbody_brute_force.c | /*
** nbody_brute_force.c - nbody simulation using the brute-force algorithm (O(n*n))
**
**/
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <math.h>
#include <sys/time.h>
#include <assert.h>
#include <unistd.h>
#include <mpi.h>
#include <omp.h>
#ifdef DISPLAY
#include <X11/Xlib.h... |
preGraphConstruction.c | /*
Copyright 2007, 2008 Daniel Zerbino (zerbino@ebi.ac.uk)
This file is part of Velvet.
Velvet 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 2 of the License, or
(at your opt... |
dftcommon.c | // Copyright Naoki Shibata 2010 - 2017.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.