source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
pseudoprojector.c | #include "pseudoprojector.h"
#include "utils.h"
#include <complex.h>
#include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void vc_pseudoprojection(pswf_t *wf_ref, pswf_t *wf_proj, int BAND_NUM,
double *results) {
clock_t start = clock();
kpoint_t **k... |
SpatialConvolutionMM.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialConvolutionMM.c"
#else
#include <ATen/div_rtn.h>
static inline void THNN_(SpatialConvolutionMM_shapeCheck)(
THTensor *input, THTensor *gradOutput,
THTensor *weight, THTensor *bias,
int kH, int kW, int dH, int dW, int padH, int padW, int weight_nullabl... |
dynamic.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <unistd.h>
int main()
{
int n_threads, i;
/*
Schedule allows you to create the scheme with which
the threads distribute the work of an iteration of a cycle.
"dynamic": scheduling works on a "first come, first served" basis. In this w... |
DRB006-indirectaccess2-orig-yes.c | /*
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it andor
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the L... |
sse.h | /* SPDX-License-Identifier: MIT
*
* 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 use, copy,
* modify, merge, publish, ... |
GB_unaryop__ainv_int32_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... |
pi-v1.c | /*
* Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x)
* between 0 and 1.
*
* parallel version using OpenMP
*/
#include <stdio.h>
#include <stdlib.h>
#include <omp.h> /* OpenMP */
#if _DEBUG_
#define _DEBUG_ 1
#else
#define _DEBUG_ 0
#include "extrae_user_events.h"
#define PROG... |
dgtog_redist_ror.h |
//to be included with proper ifdefs and inside a namespace
using namespace CTF_int;
#ifdef PUT_NOTIFY
typedef foMPI_Request CTF_Request;
#define MPI_Waitany(...) foMPI_Waitany(__VA_ARGS__)
#else
typedef MPI_Request CTF_Request;
#endif
template <int idim>
void isendrecv(int * const * pe_offset,
i... |
GB_unop__identity_uint64_uint64.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... |
convolution_3x3_pack1to8_fp16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
GB_unaryop__identity_fp32_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
blackscholes.c | // Copyright (c) 2007 Intel Corp.
// Black-Scholes
// Analytical method for calculating European Options
//
//
// Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice
// Hall, John C. Hull,
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#ifdef ENABLE_PARSEC... |
Fig_6.10_mandelbrotSolutionPart1.c | // combine Fig_6.10_mandelbrotSolutionPart1.c and Fig_6.11_mandelbrotSolutionPart2.c into one file, and name it as mandel_par.c
// sample compile command: gcc -fopenmp -o mandel_par mandel_par.c
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
# define NPOINTS 1000
# define MXITR 1000
stru... |
matrixPuzzle.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main()
{
int i,j;
const int row = 6;
const int col = 5;
char *matrix[6][5]={{"X", "O", "X","X", "X"},
{"X", "O", "X","O", "X"},
{"O", "X", "O","O", "X"},
{"X", "X",... |
pubkeylp.h | /**
* @file pubkeylp.h -- Public key type for lattice crypto operations.
* @author TPOC: palisade@njit.edu
*
* @copyright Copyright (c) 2017, New Jersey Institute of Technology (NJIT)
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provi... |
core_clacpy_band.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/core_blas/core_zlacpy_band.c, normal z -> c, Fri Sep 28 17:38:19 2018
*
**/
#include <plasma_core_blas.h>
#include... |
test-double-libmvec-sincos-main.c | /* Test for vector sincos ABI.
Copyright (C) 2016-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library 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... |
gridsys.c | /* Copyright (C) 2021 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... |
GB_unop__identity_fp32_uint16.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
displacement_lagrangemultiplier_mixed_contact_criteria.h | // KRATOS ___| | | |
// \___ \ __| __| | | __| __| | | __| _` | |
// | | | | | ( | | | | ( | |
// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
//
// License: BSD License
// ... |
GB_unop__identity_int8_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
DRB113-default-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... |
direct_nbody_reciprocal.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <omp.h>
#include "reciprocal_kernels.h"
void test_direct_nbody(
const int n_src, const double *src_coord, double *src_val,
const int n_trg, const double *trg_coord, double *trg_val,
kernel_matvec_fptr krnl_ma... |
member_function_wrapper.h | #ifndef UTIL_MEMBER_FUNCTION_WRAPPER_H
#define UTIL_MEMBER_FUNCTION_WRAPPER_H
#include "check_member.h"
template<typename T>
std::common_type_t<T, double> at(const double function,
const arma::Col<T> & position) {
return std::common_type_t<T, double>{function};
}
template<typename ... |
GeneralMatrixMatrix.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You c... |
maxpool_layer.c | #include "maxpool_layer.h"
#include "dark_cuda.h"
#include "gemm.h"
#include <stdio.h>
image get_maxpool_image(maxpool_layer l)
{
int h = l.out_h;
int w = l.out_w;
int c = l.c;
return float_to_image(w,h,c,l.output);
}
image get_maxpool_delta(maxpool_layer l)
{
int h = l.out_h;
int w = l.out_w;... |
callback.h | #ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
#define _DEFAULT_SOURCE
#include <stdio.h>
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h>
#include <omp.h>
#include <ompt.h>
#include "ompt-signal.h"
// Used to detect architecture
#include "../../src/kmp_platform.h"
static const c... |
GB_binop__remainder_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-... |
pscamax.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/pdzamax.c, normal z -> c, Fri Sep 28 17:38:10 2018
*
**/
#include "plasma_async.h"
#include "plasma_contex... |
GB_binop__isgt_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... |
bml_add_ellblock_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_add.h"
#include "../bml_allocate.h"
#include "../bml_parallel.h"
#include "../bml_types.h"
#include "bml_add_ellblock.h"
#include "bml_allocate_ellblock.h"
#include "bml_types_ellblock.h"
#include "bml_utilities_ellblock.h"
#include "bml_scale_ellblock... |
csr_matop.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)
**************************************... |
GspanTask.h | //########################################################################
//## Copyright 2019 Da Yan http://www.cs.uab.edu/yanda
//##
//## 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... |
fracstep_GLS_strategy.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Author Julio Marti.
//
#if !defined(KRATOS_GLS_S... |
no_intrin_wrapper.h | /* ================================================================================
Fall-back implementation of vector wrapper functions, simulated by for loop
References:
1. Fast inverse square root : https://en.wikipedia.org/wiki/Fast_inverse_square_root
2. Fast inverse square root : https://github.com/dmalhotra/... |
attribute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_apply_op.c | //------------------------------------------------------------------------------
// GB_apply_op: typecast and apply a unary/binary/idxunop operator to an array
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved... |
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(xxx={}, yyy={ccc})
#pr... |
uint_vector.c | #include <stdlib.h>
#include <math.h>
#include "cvec.h"
cvec_uint *cvec_uint_linspace(cvec_uint from, cvec_uint to, cvec_uint len)
{
cvec_uint *rv = malloc(len*sizeof(cvec_uint));
cvec_uint step = (to - from) / ((cvec_uint)(len - 1));
#pragma omp parallel for
for (cvec_uint i = 0; i < len; i++) {
rv[i] ... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- 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
//
//===---------------------------... |
data.h | /*!
* Copyright (c) 2015-2021 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 <xgboost/base.h>
#include <xgboost/span.h>
#includ... |
QMC_Main.h | /***************************************************************************
* Copyright (C) 2009-2013 by Florian Goth *
* fgoth@wthp095 *
* *
* All rights reserved. *
* ... |
GB_unaryop__ainv_bool_int32.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__ge_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-... |
Scalar3DUpdater1.h | /*
###################################################################################
#
# BCMTools
#
# Copyright (c) 2011-2014 Institute of Industrial Science, The University of Tokyo.
# All rights reserved.
#
# Copyright (c) 2012-2016 Advanced Institute for Computational Science (AICS), RIKEN.
# All rights reserved.
... |
GeneralMatrixMatrix.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// Eigen 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... |
mixed_tentusscher_myo_epi_2004_S2_18.c | // Scenario 2 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt + Rc)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S2_18.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_o... |
3DConvolution.c | /**
* 3DConvolution.c: This file was adapted from PolyBench/GPU 1.0 test suite
* to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardoso@st... |
IndexedFaceMesh.h | #ifndef __INDEXEDFACEMESH_H__
#define __INDEXEDFACEMESH_H__
#include <vector>
#include "Common/Common.h"
#include <iterator>
namespace PBD
{
class IndexedFaceMesh
{
public:
struct Edge
{
unsigned int m_face[2];
unsigned int m_vert[2];
};
struct Face
{
unsigned int *m_edges;
};
// Stores th... |
6.datarace.c | #include <stdio.h>
#include <omp.h>
#define N 1 << 10
#define NUM_THREADS 8
/* Execute several times before answering the questions */
/* Q1: Is the program always executing correctly? Add two */
/* alternative directives to make it correct. */
int main()
{
int i, x=0;
omp_set_num_threads(NUM_... |
distort.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_builder.c | //------------------------------------------------------------------------------
// GB_builder: build a matrix from tuples
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http://suitesparse.com See Gra... |
composite.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__exp2_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... |
stats.c | //-----------------------------------------------------------------------------
// stats.c
//
// Project: EPA SWMM5
// Version: 5.1
// Date: 03/20/14 (Build 5.1.001)
// 09/15/14 (Build 5.1.007)
// 03/19/15 (Build 5.1.008)
// 08/01/16 (Build 5.1.011)
// ... |
critical.c | /* Copyright (C) 2005, 2009 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
This file is part of the GNU OpenMP Library (libgomp).
Libgomp is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the F... |
convolution_sgemm.h | // BUG1989 is pleased to support the open source community by supporting ncnn available.
//
// Copyright (C) 2019 BUG1989. 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 the License at
//
//... |
DRB013-nowait-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_fc64_uint32.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... |
GrB_getVersion.c | //------------------------------------------------------------------------------
// GrB_getVersion: get the version number of the GraphBLAS C API standard
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// ... |
GB_unaryop__ainv_bool_uint16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
pi-omp-v1.c | /********************************************************
* Calculating Pi with using midpoint rectangle method: *
* integral 4.0/(1+x^2) dx = pi *
* or *
* summation (for i=0 to n) 4.0/(1+x_i^2) *
* where x_i = (i + 1/2) * delta x *
* OpenMP Version 1 *
********... |
task4.c | #include <stdio.h>
#include <time.h>
#include <omp.h>
int main()
{
int m=4, n =16384;
int i,j;
double a[m][n];
double s[m];
double secs = 0;
clock_t begin = clock();
#pragma omp parallel num_threads (8)
{
#pragma omp for schedule(static, 3)
for (i=0; i<m; i++) // ... |
GB_binop__lor_int64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
Example_task_priority.1.c | /*
* @@name: task_priority.1c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_4.5
*/
void compute_array (float *node, int M);
void compute_matrix (float *array, int N, int M)
{
int i;
#pragma omp parallel private(i)
#pragma omp single
{
for (... |
omp_csyr2k_batch.c | /**
* @file omp_csyr2k_batch.c
*
* @brief BBLAS omp_csyr2k_batch float _Complex routine.
*
* BBLAS is a software package provided by Univ. of Manchester,
* Univ. of Tennessee.
*
* @version 1.0.0
* @author Samuel D. Relton
* @author Pedro V. Lara
* @author Mawussi Zounon
* @date 2016-02-20
*
**/... |
GB_binop__isne_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... |
GB_unaryop__ainv_uint64_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
prepress.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
c-tree.h | /* Definitions for C parsing and type checking.
Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU Gener... |
fft3d.h | /*
* fft3d.h
*
* Copyright (C) 2014 Diamond Light Source
*
* Author: Richard Gildea
*
* This code is distributed under the BSD license, a copy of which is
* included in the root directory of this package.
*/
#ifndef DIALS_ALGORITHMS_INTEGRATION_FFT3D_H
#define DIALS_ALGORITHMS_INTEGRATION_FFT3D_H
#include ... |
pragmaScope2.c | // This example shows the multiple pragmas in the same scope with a following statement without brackets.
int main(){
int i,j;
int n=10, m=10;
int a[n][m];
for(i=0;i<n; i++)
for(j=0;j<n; j++)
a[i][j]= 0;
for (i=0;i<n-1;i++)
#pragma omp parallel
#pragma omp for
for (j=0;j<m-1;j++)
... |
kclisting_original_nodeParallel.h | // --------------------------------------------------------------------------
// Information:
// -----------
// This is a modified copy of Danisch et al.'s node-parallel k-clique listing code.
//
// It is used for verification of our implementation.
//
// Sources:
// -------
// Repository: https://github.com/maxdan94/k... |
alipfold.c | /*
* partiton function and base pair probabilities
* for RNA secvondary structures
* of a set of aligned sequences
*
* Ivo L Hofacker
* Vienna RNA package
*/
/**
*** \file alipfold.c
**/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
... |
GB_assign_zombie2.c | //------------------------------------------------------------------------------
// GB_assign_zombie2: delete all entries in C(i,:) for GB_assign
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Lice... |
GB_unop__identity_uint32_uint64.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_transpose_bucket.c | //------------------------------------------------------------------------------
// GB_transpose_bucket: transpose and optionally typecast and/or apply operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserve... |
convolution_pack8.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 ... |
task.c | /* This program display sum of n numbers using task construct in Parallel region.
* Sai Suraj
* 20/09/2021
* */
#include <stdio.h>
#include <omp.h>
int sumn(int n)
{
int i, j;
if (n<2)
return n;
else
{
#pragma omp task shared(i) firstprivate(n) // sumn is in parallel region. It's... |
Example_loop.1.c | /*
* @@name: loop.2c
* @@type: C
* @@compilable: yes
* @@linkable: yes
* @@expect: success
* @@version: omp_5.0
*/
#include <stdio.h>
#define N 100
int main()
{
float x[N], y[N];
float a = 2.0;
for(int i=0;i<N;i++){ x[i]=i; y[i]=0;} // initialize
#pragma omp parallel
{
#pragma omp loop
for(int... |
bt.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - BT
This benchmark is an OpenMP C version of the NPB BT code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by N... |
main.c | // # ifdef __cplusplus
// extern "C" {
// # endif
//========================================================================================================================================================================================================200
//==============================================================... |
GB_builder.c | //------------------------------------------------------------------------------
// GB_builder: build a matrix from tuples
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.com See Gra... |
gr3_mc.c | /*!\file gr3_mc.c
*
* Optimized OpenMP implementation of the marching cubes algorithm.
*
* This code is based on Paul Bourke's Marching Cubes implementation
* (http://paulbourke.net/geometry/polygonise/)
*
* Creates an indexed mesh to reduce the number of vertices to calculate.
* This is done by caching generat... |
declare_variant_ast_print.c | // RUN: %clang_cc1 -verify -fopenmp -x c -std=c99 -ast-print %s -o - | FileCheck %s
// RUN: %clang_cc1 -verify -fopenmp-simd -x c -std=c99 -ast-print %s -o - | FileCheck %s
// expected-no-diagnostics
int foo(void);
#pragma omp declare variant(foo) match(xxx={}, yyy={ccc})
#pragma omp declare variant(foo) match(xxx=... |
banded_source.c | void X(destroy_banded)(X(banded) * A) {
free(A->data);
free(A);
}
void X(destroy_triangular_banded)(X(triangular_banded) * A) {
free(A->data);
free(A);
}
void X(destroy_tb_eigen_FMM)(X(tb_eigen_FMM) * F) {
if (F->n < TB_EIGEN_BLOCKSIZE) {
free(F->V);
free(F->lambda);
}
else... |
static.c | static int bork;
void bar(void);
void foobar (void)
{
#pragma omp parallel
{
#pragma omp for lastprivate(bork)
for (bork = 0; bork < 100; bork++) {
bar();
}
}
}
|
DRB028-privatemissing-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... |
workload.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include "resources.h"
#include "workload.h"
void runloop(int loopid)
{
int lo = 0;
int hi = N;
execute_work(loopid, lo, hi);
}
void init1(void){
int i,j;
for (i=0; i<N; i++){
for (j=0; j<N; j++){
a[i][j] = 0.0... |
GB_binop__plus_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
symv_x_coo_u_hi.c | #include "alphasparse/kernel.h"
#include "alphasparse/kernel_plain.h"
#include "alphasparse/opt.h"
#include "alphasparse/util.h"
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t
symv_coo_u_hi_omp(const ALPHA_Number alpha,
const ALPHA_SPMAT_COO *A,
const ALPHA_Number *... |
GB_binop__times_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-... |
GB_binop__plus_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... |
r_direct_o1.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... |
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... |
GB_unop__creal_fp32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
a0.c | #include "omp.h"
int main(int argc, char **argv) {
float X[100], Y[100], a=2.0;
int i,N=100;
for (i = 0; i < 100; i++) {
X[i] = 0.0;
}
#pragma omp target map(to:X[0:N]) map(tofrom:Y[0:N])
#pragma omp parallel for
for (i = 0; i < N; ++i)
Y[i] += a * X[i];
retur... |
3d7pt.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tare... |
core_csyrk.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/core_blas/core_zsyrk.c, normal z -> c, Fri Sep 28 17:38:23 2018
*
**/
#include <plasma_core_blas.h>
#include "plas... |
proj_EM_step.c | /*
NAME:
proj_EM_step
PURPOSE:
one proj_EM step
CALLING SEQUENCE:
proj_EM_step(struct datapoint * data, int N, struct gaussian * gaussians,
int K,bool * fixamp, bool * fixmean, bool * fixcovar,
double * avgloglikedata, bool likeonly, double w, bool noproj,
bool diagerrs, bool nowei... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.