source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
vla_crash.c | // RUN: %clang_cc1 -verify -triple powerpc64le-unknown-linux-gnu -fopenmp -x c -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -verify -triple powerpc64le-unknown-linux-gnu -fopenmp-simd -x c -emit-llvm %s -o - | FileCheck --check-prefix SIMD-ONLY0 %s
// SIMD-ONLY0-NOT: {{__kmpc|__tgt}}
int a;
// CHECK-LABEL: f... |
parallelsections.c | #include <omp.h>
#include <assert.h>
int main()
{
int sum=7;
int known_sum;
int i;
#pragma omp parallel sections reduction(+:sum) private(i) if(1)
{
#pragma omp section
{
for (i=1;i<400;i++){
sum += i;
}
}
#pragma omp section
{
for(i=400;i<700;i++)
sum += i;
}
#... |
semi_setup_rap.c | /*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute... |
eavlSceneRendererSimpleVR.h | // Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information.
#ifndef EAVL_SCENE_RENDERER_SIMPLE_VR_H
#define EAVL_SCENE_RENDERER_SIMPLE_VR_H
#include "eavlDataSet.h"
#include "eavlCellSet.h"
#include "eavlColor.h"
#include "eavlColorTable.h"
#include "eavlSceneRenderer.h"
#include "eavlTimer.h"
// ... |
GB_binop__times_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... |
bucket.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef BUCKET_H_
#define BUCKET_H_
#include <algorithm>
#include <cinttypes>
#include <iterator>
#include <vector>
/*
GAP Benchmark Suite
Class: Bucket
Author: Scott Beamer
Parallel container desig... |
DRB060-matrixmultiply-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... |
helper.h |
// =================================================================================================
// This file is part of the CodeVault project. The project is licensed under Apache Version 2.0.
// CodeVault is part of the EU-project PRACE-4IP (WP7.3.C).
//
// Author(s):
// Valeriu Codreanu <valeriu.codreanu@surf... |
GB_unop__sin_fc64_fc64.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... |
branch.c | /*
Copyright (c) 2013, 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 conditions and the following disclaimer... |
Vector.h | #pragma once
#include <debug.h>
#include <random>
#include <vector>
namespace freeaml
{
/**
* @brief @c Vector<T> is an extension of @c std::vector<T> for mathematical
* applications.
*
* This class stores a sequence of elements of type @c T. It overloads the
* addition (+), subtraction (-), multiplication (*) a... |
GB_binop__eq_fc64.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__div_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:... |
statistic.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
colorspace.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__plus_int16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
histogram(parallel).c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
int find_bin(float data,float bin_maxes[],int bin_count ,float min_meas );
void printHistogram(float bin_maxes[],int bin_counts[],int bin_count ,float min_meas);
int main(int argc, char* argv[]) {
clock_t begin, end;
double runtime;
int d... |
ROF_TV_core.c | /*
* This work is part of the Core Imaging Library developed by
* Visual Analytics and Imaging System Group of the Science Technology
* Facilities Council, STFC
*
* Copyright 2017 Daniil Kazantsev
* Copyright 2017 Srikanth Nagella, Edoardo Pasca
*
* Licensed under the Apache License, Version 2.0 (the "License")... |
blocking-omp.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include <omp.h>
#include "mpi.h"
struct timeval startwtime, endwtime1, endwtime2;
double seq_time1, seq_time2;
double **minDist;
double **minLabels;
double* packer(double **received, int blocksize, int LINESIZE);
do... |
DRB095-doall2-taskloop-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_unaryop__ainv_uint32_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... |
alignments_fast.c | /*-----------------------------------------------------------------------------
alignments_fast \
author: jose lezama/rafael grompone von gioi \
version: 8.1 (2014.08.12) ... |
GB_unop__identity_fp64_uint16.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.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/image.c"
#else
#undef MAX
#define MAX(a,b) ( ((a)>(b)) ? (a) : (b) )
#undef MIN
#define MIN(a,b) ( ((a)<(b)) ? (a) : (b) )
#undef TAPI
#define TAPI __declspec(dllimport)
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#undef temp_t
#if defined(TH_... |
GB_unop__identity_uint16_fc64.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... |
nevpt_contract.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... |
smg_residual.c | /*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute... |
GB_unop__identity_uint32_uint8.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
test.c | int main(){
int i = 0;
#pragma omp atomic
i++;
}
|
GB_unop__lnot_bool_bool.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... |
rwalk.c | #include "rwalk.h"
#include <omp.h>
#include <stdlib.h>
void random_walk(int const* ptr, int const* neighs, int n, int num_walks,
int num_steps, int seed, int nthread, int* walks) {
if (nthread > 0) {
omp_set_num_threads(nthread);
}
#pragma omp parallel
{
int thread_num = omp_get_thread_... |
GB_binop__gt_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... |
8499.c | // this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose
void kernel_heat_3d(int tsteps, int n, double A[120 + 0][120 + 0][120 + 0], double B[120 + 0][120 + 0][120 + 0])... |
convolution_sgemm_packn.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 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 ... |
sparse_to_mat.c | #include "main.h"
mat_rv coo_to_mat_nothreading(coo matrix)
{
mat_rv rv;
struct timespec start, end;
get_utc_time(&start);
rv.error = ERR_NONE;
rv.rows = matrix.rows;
rv.cols = matrix.cols;
rv.type = matrix.type;
rv.isval = false;
if(matrix.type == MAT_INT){
if(!(rv.vals.i = (int*)calloc((rv.rows * rv.cols)... |
row_wise_v2.c |
/****
Author: Rayhan Shikder,
email: shikderr@myumanitoba.ca
MSc Student,
Department of Computer Science,
University of Manitoba, Winnipeg, MB, Canada
****/
#include<stdio.h>
#include<string.h>
#include <stdlib.h>
#include<mpi.h>
#include<omp.h>
#include<time.h>
//macros
#define ALPHABET_LENGTH 4... |
database_chunk.h | /*
* database_chunk.h
*
* Created on: 2012/11/08
* Author: shu
*/
#ifndef DATABASE_CHUNK_H_
#define DATABASE_CHUNK_H_
#include <fstream>
#include <string>
#include <stdint.h>
#include <tr1/memory>
#include "alphabet_coder.h"
#include "seed_searcher.h"
class DatabaseChunk {
public:
DatabaseChunk();
Datab... |
spinless_fermion_basis_core.h | #ifndef _SPINLESS_FERMION_BASIS_OP_H
#define _SPINLESS_FERMION_BASIS_OP_H
#include <complex>
#include "hcb_basis_core.h"
#include "numpy/ndarraytypes.h"
#include "openmp.h"
namespace basis_general {
template<class I>
void mergeSort(I nums[],I work[],const I left,const I mid,const I right, bool &f_count){
I left... |
parallel_for_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}}
#pragma omp parallel for simd
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}}
#pragma omp parallel for simd foo
void test_no_clause() {
int ... |
data_gen.c | /*
* Copyright (C) 2014-2015, 2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*/
#define _XOPEN_SOURCE
#define _BSD_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#include <ia32intrin.h>
#include "euro_opt.h"
tfloat RandRange( tfloat a, tfloat b, struct drand48_data *seed ) {
double ... |
taskdep1-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... |
multiply.h | #pragma once
#include "intgemm/intgemm_config.h"
#include "interleave.h"
#include "intrinsics.h"
#include "vec_traits.h"
#include "callbacks.h"
namespace intgemm {
INTGEMM_SSE2 static inline dvector_t<CPUType::SSE2, int> PermuteSummer(__m128i pack0123, __m128i pack4567) {
// No op for 128 bits: already reduced ful... |
mongodb_scram_fmt_plug.c | /*
* This software is Copyright (c) 2016, Dhiru Kholia <dhiru.kholia at gmail.com>,
* and it is hereby released to the general public under the following terms:
* Redistribution and use in source and binary forms, with or without modification,
* are permitted.
*
*/
#if FMT_EXTERNS_H
extern struct fmt_main fmt_mo... |
GB_binop__lxor_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-... |
atom_symmetry_class.h | // Copyright (c) 2013-2016 Anton Kozhevnikov, Thomas Schulthess
// 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 notic... |
omp_loop3.c | /* vim: set ts=4 sw=4: */
/* Filename : omp_loop3.c
* Description : simple OpenMP model
* Author : SunYoung Kim <sunyzero@gmail.com>
* Notes : omp_get_thread_num
*/
#include <stdio.h>
#include <omp.h>
int main()
{
int i;
/* combine two clauses */
#pragma omp parallel for
for (i=0; i<8; i++) {
pr... |
GB_unaryop__ainv_int64_int8.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_unop__identity_int16_int8.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... |
tree.h | #ifndef LIGHTGBM_TREE_H_
#define LIGHTGBM_TREE_H_
#include <LightGBM/meta.h>
#include <LightGBM/dataset.h>
#include <string>
#include <vector>
#include <memory>
namespace LightGBM {
/*!
* \brief Tree model
*/
class Tree {
public:
/*!
* \brief Constructor
* \param max_leaves The number of max leaves
*/
ex... |
RCCE.h | //
// Copyright 2010 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica... |
tilted.h | #ifndef batoid_tilted_h
#define batoid_tilted_h
#include "surface.h"
namespace batoid {
#if defined(BATOID_GPU)
#pragma omp declare target
#endif
class Tilted : public Surface {
public:
Tilted(double tanx, double tany);
~Tilted();
virtual const Surface* getDevPtr() c... |
hillclimb.c | #define _POSIX_C_SOURCE 200112L
#define WIN32_LEAN_AND_MEAN
#include <math.h>
#include <ctype.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#define HASHN 3 // number of multiplies in hash
#define SHIFT_RANGE 1 // radius of shift search
#define CONST_RANGE 2 // radius ... |
convolution_sgemm_pack1ton.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 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 ... |
GB_unop__ainv_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... |
fast_gaussian_blur_template.h | // Copyright (C) 2017-2022 Basile Fraboni
// Copyright (C) 2014 Ivan Kutskir (for the original fast blur implmentation)
// All Rights Reserved
// You may use, distribute and modify this code under the
// terms of the MIT license. For further details please refer
// to : https://mit-license.org/
//
//#pragma once
#incl... |
tree.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_TREE_H_
#define LIGHTGBM_TREE_H_
#include <LightGBM/dataset.h>
#include <LightGBM/meta.h>
#include <string>
#include <map>
#includ... |
omp_bug1fix.c | /******************************************************************************
* FILE: omp_bug1fix.c
* DESCRIPTION:
* This is a corrected version of the omp_bug1.c example. Corrections
* include removing all statements between the parallel for construct and
* the actual for loop, and introducing logic to preserv... |
GB_unop__carg_fp64_fc64.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... |
deconvolution_pack1ton_fp16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 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_binop__isge_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:... |
sections.c | #include <stdio.h>
#include <omp.h>
void funcA() {
printf("En funcA: esta sección la ejecuta el thread
%d\n",
omp_get_thread_num());
}
void funcB() {
printf("En funcB: esta sección la ejecuta el thread
%d\n",
omp_get_thread_num());
}
main() {
#pragma omp parallel sections
{
#pragma omp section
(void) funcA();
#pragma o... |
colormap.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__lgamma_fp32_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... |
hsrp_fmt_plug.c | /*
* Cracker for MD5 authentication in HSRP, HSRPv2, VRRP, and GLBP.
* http://www.rfc-editor.org/rfc/rfc1828.txt
*
* This is dedicated to Darya. You inspire me.
*
* This software is Copyright (c) 2014, Dhiru Kholia <dhiru [at] openwall.com>,
* and it is hereby released to the general public under the following t... |
DRB005-indirectaccess1-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... |
FBGemmFPTest.h | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <random>
#include <gtest/gtest.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include ... |
pzlanhe.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c
*
**/
#include "plasma_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include "plasma_types.h"
#includ... |
GB_unop__acos_fc32_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... |
GoL_p.c | /******************************************************
************* Conway's game of life ******************
******************************************************
Usage: ./exec ArraySize TimeSteps
Compile with -DOUTPUT to print output in output.gif
(You will need ImageMagick for that - Install with
sudo apt... |
vdtactivelist.h | #ifndef _VDT_ACTIVE_LIST_
#define _VDT_ACTIVE_LIST_
#define FALSE 0
#define TRUE 1
#ifndef NULL
#define NULL 0
#endif
#include <stdio.h>
#include <stdlib.h>
// ptrDataType should be a pointer.
template <class ptrDataType>
class CActiveList
{
public :
ptrDataType m_pStart, m_pEnd;
int m_Size;
// itera... |
GB_compiler.h | //------------------------------------------------------------------------------
// GB_compiler.h: handle compiler variations
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apac... |
knn_utils.h | /*
*
* Copyright (c) 2019, BIOVAULT (Leiden University Medical Center, Delft University of Technology)
* 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 mu... |
distribute_PEs.c | #define N 1000
#define NB_CLUSTERS 4
#define NB_PES 16
#define MIN(x, y) ((x) < (y) ? x : y)
#include <stdio.h>
/* Initialize an array between 2 given lines */
void init_array(int a[N][N], int begin, int end) {
for (int i = begin; i < end; i++)
for (int j = 0; j < N; j++)
a[i][j] = 2*i + 3*j;
}
int main(... |
compute_deltat.c | /*
A simple 2D hydro code
(C) Romain Teyssier : CEA/IRFU -- original F90 code
(C) Pierre-Francois Lavallee : IDRIS -- original F90 code
(C) Guillaume Colin de Verdiere : CEA/DAM -- for the C version
*/
/*
This software is governed by the CeCILL license under French law and
abiding by the rules o... |
ellipticBlockUpdatePCG.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
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 wi... |
GB_binop__lxor_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-... |
residualbased_elimination_builder_and_solver.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
//
... |
supervised.c | /*
Copyright (C) <2009-2011> <Alexandre Xavier Falcão and João Paulo Papa>
Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the fol... |
matrix_s.h | //
// matrix.cpp
// Define Class for Vector & Matrix
//
// Created by Yoshi Miyazaki on 2015/04/11.
//
#include "matrix.h"
/*----------------------------------------
Vector Types Constructers
---------------------------------------*/
template<class T>
Vector1d<T>::Vector1d(){
n = 0;
v = 0;
}
template<clas... |
gravity_hard.h | #pragma once
#define CALCFORCEFROMALLMEMBERS
#include "cutfunc.h"
template <class Tpsys>
void velKick(Tpsys & pp){
const PS::S32 n = pp.getNumberOfParticleLocal();
#pragma omp parallel for
for(PS::S32 i=0; i<n; i++){
pp[i].velKick();
}
}
#ifdef CORRECT_NEIGHBOR
template <class Tpsys>
void velKick... |
Act3A01283525.c | //Ian De La Garza González A01283525
//Este programa calcula el integral de la funcion de f(x)=3*sin(2x)+4
//De 1 a 4
#include <stdio.h>
#include <omp.h>
#include <math.h>
#include <stdlib.h>
double function(double x) {
return 3*sin(2*x)+4;
}
int main(int argc, char* argv[]){
//limites
double l = ato... |
simde-sse2.h | /* AUTOMATICALLY GENERATED FILE, DO NOT MODIFY */
/* 3f186a0f35bb73f01ffda73fa9bf060a444bb46b */
/* :: Begin x86/sse2.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 ... |
dcraw.c | #ifndef IGNOREALL
/*
dcraw.c -- Dave Coffin's raw photo decoder
Copyright 1997-2015 by Dave Coffin, dcoffin a cybercom o net
This is a command-line ANSI C program to convert raw photos from
any digital camera on any computer running any operating system.
No license is required to download and use dcraw... |
control_tool.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
#define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN
#include "callback.h"
#include <omp.h>
int main()
{
#pragma omp parallel num_threads(1)
{
print_frame_from_outlined_fn(1);
print_frame(0);
omp_contr... |
GB_binop__rminus_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... |
GB_unaryop__minv_int8_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
section1.c | #include <stdio.h>
#include <omp.h>
int fun1()
{
return 2;
}
int fun2()
{
return 3;
}
int main()
{
omp_set_num_threads(4);
int a, b; // Declared as shared variable because if declared private then
// suppose thread 0 assigned a to 1. No other thread will have access to this value
#pragma omp par... |
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... |
interpolate_op.h | /* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable... |
Argument.h | /*************************************************************************
> File Name: Argument.h
> Author: ShiShupeng
> Mail: shishupeng@mail.nsccwx.cn
> Created Time: 2018年08月01日 星期三 14时33分00秒
> Program Infomation:
>
************************************************************************/
#include <stdio.... |
hello_omp.c | /* Hello World OpenMP
*
* Compile on Triton as:
* gcc -fopenmp hello_omp.c -o hello_omp
*
* degtyai1, Wed, 28 May 2014 12:47:47 +0300
* tuomiss1, Mon, 08 Jun 2020
*
*/
#include <stdio.h>
#if defined(_OPENMP)
#include <omp.h>
#endif
int main(void) {
#if defined(_OPENMP)
#pragma omp parallel
printf("Hell... |
parallel_for.h | /*
Copyright (c) 2013, Taiga Nomi and the respective contributors
All rights reserved.
Use of this source code is governed by a BSD-style license that can be found
in the LICENSE file.
*/
#pragma once
#include <cassert>
#include <cstdio>
#include <limits>
#include <string>
#include <type_traits>
#incl... |
omp-for-decrement.c | #include <stdio.h>
int main() {
int i,j;
printf("loop 1: stride of -1, 10 - 0\n");
#pragma omp parallel for
for(i = 10; i > 0; i--)
{
printf("Hello world %d\n",i);
}
printf("loop 2: stride of -1, 10 - -1\n");
#pragma omp parallel for
for(i = 10; i > -1; i--)
{
prin... |
critical.c | #include <omp.h>
#include <stdio.h>
main()
{
int x;
x = 0;
#pragma omp parallel shared(x)
{
#pragma omp critical
x = x + 1;
} /* end of parallel section */
printf("out of the parallel region : X = %d\n",x);
}
|
gemv_x_coo.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
gemv_coo_omp(const ALPHA_Number alpha,
const ALPHA_SPMAT_COO *A,
const ALPHA_Number *x,
co... |
GB_unop__bnot_int64_int64.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... |
omp_matvec.c | /******************************************************************************
* OpenMP Example - Matrix-vector multiplication - C/C++ Version
* FILE: omp_matvec.c
* DESCRIPTION:
* This example multiplies all row i elements of matrix A with vector
* element b(i) and stores the summed products in vector c(i). A to... |
graph.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef GRAPH_H_
#define GRAPH_H_
#include <algorithm>
#include <cinttypes>
#include <cstddef>
#include <iostream>
#include <type_traits>
#include "pvector.h"
#include "util.h"
/*
GAP Benchmark Suite... |
merge-sort-parallel.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#define SIZE 1000000
void merge(int *x,int p,int q,int r){
int i,j,k,n1=q-p+1, n2=r-q, L[n1], R[n2];
for(i=0;i<n1;i++)
L[i]=x[p+i];
for(j=0;j<n2;j++)
R[j]=x[q+j+1];
L[n1]=R[n2]=SIZE;
i=j=0;
for(k=p;k<r;k++){
if(L[i]<=R[j])
x[k]=L[i++];
else... |
FeatureFinderAlgorithmPicked.h | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.