source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
2875.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... |
amdgcn_openmp_device_math.c | // RUN: %clang_cc1 -internal-isystem %S/Inputs/include -x c -fopenmp -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-host.bc
// RUN: %clang_cc1 -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem %S/../../lib/Header... |
1.c | #include<omp.h>
#include<stdio.h>
#include<stdlib.h>
int main(){
int dim, i, j, count=0, sum =0, k;
printf("\n Enter the dimensions : ");
scanf("%d",&dim);
int **arr1 = (int **)malloc(dim * sizeof(int *));
for (i=0; i<dim; i++)
arr1[i] = (int *)malloc(dim * sizeof(int));
int **arr2 = (int **)malloc(dim * si... |
phonopy.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_assign_zombie5.c | //------------------------------------------------------------------------------
// GB_assign_zombie5: delete entries in C for C_replace_phase
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License... |
raytracing.c | #include "raytracing.h"
void *custom_malloc(size_t size)
{
void *tmp = get_or_free_memory(size, 0, 0);
return tmp;
}
void *custom_calloc(size_t num, size_t size)
{
void *tmp = custom_malloc(num * size);
memset(tmp, 0, num * size);
return tmp;
}
void custom_free(void *ptr)
{
... |
3d25pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted fr... |
loop-10.c | extern void abort (void);
int i = 8;
int main (void)
{
int j = 7, k = 0;
#pragma omp for
for (i = 0; i < 10; i++)
;
#pragma omp for
for (j = 0; j < 10; j++)
;
/* OpenMP 3.0 newly guarantees that the original list items can't
be shared with the privatized omp for iterators, even when
the ... |
q_rhashmap_mk_hash.tmpl.c | #include "q_rhashmap_common.h"
#include "_q_rhashmap_mk_hash___K__.h"
//------------------------------------------------------
int
q_rhashmap_mk_hash___K__(
__KEYTYPE__ *keys, // input [nkeys]
uint32_t nkeys, // input
uint64_t hmap_hashkey, // input
uint32_t *hashes// output
)
{
int status ... |
desc.h | #include "assert.h"
#include "omp.h"
#define DESC_DEBUG 0
int desc_counter = 0;
void my_print(const char *s) {
if (DESC_DEBUG) {
int ret;
#pragma omp atomic capture
{
ret = desc_counter;
desc_counter += 1;
}
printf("%d: desc debug: %s\n", ret, s);
}
}
void my_print_label(const c... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
reduction.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main(int argc, char **argv) {
int i, n=20, a[n],suma=10;
if(argc < 2) {
fprintf(stderr,"Falta iteraciones\n");
exit(-1);
}
n = atoi(argv[1]);
if (n>20) {n=20; printf("n=%d",n);}
for (i=0; i<n; ... |
vector.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... |
finalClean.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <omp.h>
// maximum value of n
#define NMAX 133500000
//#define NMAX 200
#define CHUNKSIZE 20
static double N[NMAX];
static int lt[NMAX];
static int gt[NMAX];
stat... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
pwsafe_fmt_plug.c | /* Password Safe and Password Gorilla cracker patch for JtR. Hacked together
* during May of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* Optimization patch during January of 2013 by Brian Wallace <brian.wallace9809 at gmail.com>.
*
* This software is Copyright (c) 2012-2013
* Dhiru Kholia <dhiru.kholia ... |
IJVector_parcsr.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)
**************************************... |
thbasic.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <limits.h>
#include "thnets.h"
#ifndef USEBLAS
#include "sgemm.h"
#endif
#ifdef ACCELERATE
#include <Accelerate/Accelerate.h>
#endif
#define THAtomicIncrement(a) __sync_fetch_and_add(a, 1);
#define THAtomicDecrement(a... |
GB_unop__identity_int64_int16.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
MzXMLHandler.h | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
bitset.h | /*
* Copyright (c) 2016 drali. All rights reserved.
*
* This software is provided 'as-is', without any express or implied warranty.
* In no event will the author be held liable for any damages arising from the use of this software.
* Permission is granted to anyone to use this software for any purpose, including c... |
backprop.c | /*
******************************************************************
* HISTORY
* 15-Oct-94 Jeff Shufelt (js), Carnegie Mellon University
* Prepared for 15-681, Fall 1994.
* Modified by Shuai Che
******************************************************************
*/
#ifdef _OPENMP
#include <omp.h>
#e... |
bml_transpose_ellsort_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_allocate.h"
#include "../bml_parallel.h"
#include "../bml_transpose.h"
#include "../bml_types.h"
#include "bml_allocate_ellsort.h"
#include "bml_transpose_ellsort.h"
#include "bml_types_ellsort.h"
#include <complex.h>
#include <math.h>
#include <stdli... |
QMigrate.c |
#include <stdint.h>
#ifndef _OPENMP
#define STRING2(x) #x
#define STRING(x) STRING2(x)
#pragma message (__FILE__ "(" STRING(__LINE__) "): error: This module should be compiled with /openmp on the command line")
/* Generate a compiler error to stop the build */
mustLinkOpenMP
#endif
#if defined(_... |
utils.c | #include <cdnn/utils.h>
float cache;
int return_cache;
int nn_threads;
/**!
* Creates a matrix filled with zeros.
* @param dims An array of matrix dimensions (int)[rows,columns]
* @result A pointer to the created matrix.
* @return A pointer to the created matrix.
*/
dARRAY * zeros(int * dims){
dARRAY * matr... |
DRACC_OMP_038_Vector_add_Mult_no_Barrier_simd_yes.c | /*
Vector addition then scalar multiplication with no implicit barrier in between.
Teams distribute for implements no implicit barrier at the end of a structured block. Similar to nowait with simd.
*/
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#define N 100
#define C 512
int a;
int b[C];
int c[C];
... |
deprecate.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
attribute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
mypdec.c | /**
* @ingroup PMGC
* @author Tucker Beck [fortran ->c translation], Michael Holst [original]
* @brief
* @version $Id:
*
* @attention
* @verbatim
*
* APBS -- Adaptive Poisson-Boltzmann Solver
*
* Nathan A. Baker (nathan.baker@pnl.gov)
* Pacific Northwest National Laboratory
*
* Additional contribut... |
raytracer.h | #pragma once
#include "resource.h"
#include <iostream>
#include <linalg.h>
#include <memory>
#include <omp.h>
#include <random>
using namespace linalg::aliases;
namespace cg::renderer
{
struct ray
{
ray(float3 position, float3 direction) : position(position)
{
this->direction = normalize(direction);
}
... |
mg.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - MG
This benchmark is an OpenMP C version of the NPB MG code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by N... |
dynwave.c | //-----------------------------------------------------------------------------
// dynwave.c
//
// Project: EPA SWMM5
// Version: 5.1
// Date: 03/20/14 (5.1.001)
// 03/28/14 (5.1.002)
// 09/15/14 (5.1.007)
// 03/19/15 (5.1.008)
// 08/01/16 (5.1.011... |
p_c1.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <omp.h>
#include <time.h>
#define maxQueSize 1000
#define maxQueNum 10
#define randLimit (1 << 16)
struct message {
int number, sender;
};
struct messQue {
int head, tail;
struct message que[maxQueSize];
omp_lock_t headLock;
omp_... |
c-typeck.c | /* Build expressions with type checking for C compiler.
Copyright (C) 1987-2015 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 General Public License as published by the Free
Software Foundation; either version 3, o... |
ast-dump-openmp-single.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test() {
#pragma omp single
;
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-singl... |
DRB050-functionparameter-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... |
zeroslike_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... |
GB_binop__ge_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... |
KadabraBetweenness.h | /*
* KadabraBetweenness.h
*
* Created on: 18.07.2018
* Author: Eugenio Angriman, Alexander van der Grinten
*/
#ifndef KADABRA_H_
#define KADABRA_H_
#include <atomic>
#include "../auxiliary/SortedList.h"
#include "../base/Algorithm.h"
#include "../components/ConnectedComponents.h"
#include "../graph/Graph.h"
... |
oskar_imager_rotate_vis.c | /*
* Copyright (c) 2016-2021, The OSKAR Developers.
* See the LICENSE file at the top-level directory of this distribution.
*/
#include "math/oskar_cmath.h"
#include "imager/private_imager.h"
#include "imager/oskar_imager.h"
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
void oskar_imager_rotate_vis(... |
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-2020, All Rights Reserved.
// http://... |
IBKMKC_sparse_matrix.c | /* IBK Math Kernel Library
Copyright (c) 2001-today, Institut fuer Bauklimatik, TU Dresden, Germany
Written by A. Nicolai, A. Paepcke, H. Fechner, St. Vogelsang
All rights reserved.
This file is part of the IBKMK Library.
Redistribution and use in source and binary forms, with or without modification,
are perm... |
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... |
hog.parallel.dyn.c | #include <stdio.h>
#include <math.h>
#include "hog.h"
/* ---------------------------------------------------------------- */
/** @brief Create a new HOG object
** @param variant HOG descriptor variant.
** @param numOrientations number of distinguished orientations.
** @param transposed wether images are transposed ... |
rhs-brisbane.c | //-------------------------------------------------------------------------//
// //
// This benchmark is a serial C version of the NPB BT code. This C //
// version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
GB_unop__identity_int64_bool.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
GB_binop__rminus_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
ast-dump-openmp-target-teams-distribute-parallel-for-simd.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test_one(int x) {
#pragma omp target teams distribute parallel for simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target team... |
shared_array.h | #ifndef OPENMC_SHARED_ARRAY_H
#define OPENMC_SHARED_ARRAY_H
//! \file shared_array.h
//! \brief Shared array data structure
#include <memory>
namespace openmc {
//==============================================================================
// Class declarations
//=================================================... |
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-... |
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... |
convolution_7x7.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
mxnet_op.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
GB_binop__minus_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-... |
GB_binop__band_int8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
ast-dump-openmp-teams-distribute-parallel-for.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test_one(int x) {
#pragma omp target
#pragma omp teams distribute parallel for
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp targ... |
StmtOpenMP.h | //===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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
//
//===---------------------------... |
createWarmupPts.c | /* --------------------------------------------------------------------------
* File: createWarmupPts.c
* Version 1.0
* --------------------------------------------------------------------------
* Licence CC BY 4.0 : Free to share and modify
* Author : Marouen BEN GUEBILA - marouen.benguebila@uni.lu
* ----... |
3d25pt.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-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tar... |
openmp-ex12.c | #include <stdio.h>
#include <omp.h>
int main(void)
{
int N = 10;
int i;
/* We can even concatenate directives for a very succinct syntax */
#pragma omp parallel for
for (i = 0; i < N; i++) {
/* `i` was declared out of scope, so you my worry that `i` is the same
* variable for all threads and there is... |
residualbased_elimination_builder_and_solver_with_constraints.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Vicente Mataix Ferrandiz
//
... |
ZQ_CNN_MTCNN_NCHWC.h | #ifndef _ZQ_CNN_MTCNN_NCHWC_H_
#define _ZQ_CNN_MTCNN_NCHWC_H_
#pragma once
#include "ZQ_CNN_Net_NCHWC.h"
#include "ZQ_CNN_BBoxUtils.h"
#include <omp.h>
namespace ZQ
{
class ZQ_CNN_MTCNN_NCHWC
{
public:
using string = std::string;
ZQ_CNN_MTCNN_NCHWC()
{
min_size = 60;
thresh[0] = 0.6;
thresh[1] = 0.7;
... |
tinyMatrixMul.c | #include <sys/mman.h>
#include <tinyMatrixMul.h>
#include <arm_neon.h>
#include <string.h>
#include <arm_neon.h>
#include <sys/time.h>
#include "asmNeonApi.h"
//#define TIME_PROFILE_ENABLE
//#define NTCOPY_PRT_ENABLE
//#define USE_MALLOC
static inline void* tinyMalloc(uint32_t size)
{
#ifdef USE_MALLOC
return malloc... |
_hypre_utilities.h |
/*** DO NOT EDIT THIS FILE DIRECTLY (use 'headers' to generate) ***/
#ifndef hypre_UTILITIES_HEADER
#define hypre_UTILITIES_HEADER
#include "HYPRE_utilities.h"
#ifdef HYPRE_USING_OPENMP
#include <omp.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/****************************************************************... |
if-clauseModificado.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv)
{
int i, n=20, tid, x;
int a[n],suma=0,sumalocal;
if(argc < 3) {
fprintf(stderr,"[ERROR]-Falta iteraciones\n, \
[ERROR]-Falta n hebras");
exit(-1);
}
n = atoi(argv[1]); if (n>20) n=20;
x = atoi(argv[2]); if (x>50) x=... |
2.c | #include<stdio.h>
#include<omp.h>
#include<stdlib.h>
int main(){
for(int d=250;d<=1400;d+=250){
printf("\n Matrix of size %d \n",d);
for(int nt=1;nt<=8;nt*=2){
printf("\n Threads %d\n",nt);
int **a = (int**) malloc(d*sizeof(int**));
for(int j=0;j<d;j++)
a[j] = (int*) malloc(d*s... |
diff.c | /*
The MIT License (MIT)
Copyright (c) 2015 chenqi
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... |
veccopy-ompt-target-emi-map.c | #include <stdio.h>
#include <assert.h>
#include <omp.h>
#include "callbacks.h"
int main()
{
int N = 100000;
int a[N];
int b[N];
int i;
for (i=0; i<N; i++)
a[i]=0;
for (i=0; i<N; i++)
b[i]=i;
#pragma omp target parallel for
{
for (int j = 0; j< N; j++)
a[j]=b[j];
}
#pragma omp t... |
lock-unrelated.c | /*
* lock-unrelated.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-exception
//... |
Lab_2.1.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#define N 100
#define t 10e-6
#define e 10e-9
int main(int argc, char **argv) {
if (argc != 2) {
printf("invalid number of arguments\n");
return 0;
}
int number_of_processes = atoi(argv[1]);
omp_set_num_threads... |
core_dtsmqr.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_ztsmqr.c, normal z -> d, Fri Sep 28 17:38:24 2018
*
**/
#include <plasma_core_blas.h>
#include "pla... |
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_binop__isgt_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... |
lis_precon_iluc.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... |
scan-1.c | int a, b;
void
f1 (void)
{
#pragma omp scan inclusive (a) /* { dg-error "'#pragma omp scan' may only be used in a loop construct with 'inscan' 'reduction' clause" } */
#pragma omp scan exclusive (b) /* { dg-error "'#pragma omp scan' may only be used in a loop construct with 'inscan' 'reduction' clause" } */
}
voi... |
4-32t.c | #include <stdio.h>
#include <omp.h>
int main()
{
int i;
omp_set_num_threads(32);
#pragma omp parallel for
for (i=0; i<16; i++)
{
printf("Hello from thread number: %d Iteration: %d \n",
omp_get_thread_num(), i);
}
printf("\n GoodBye – Team Destroyed – Exiting Program \... |
VolumetricDilatedMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "THNN/generic/VolumetricDilatedMaxPooling.c"
#else
#include <THNN/generic/pooling_shape.h>
#include <algorithm>
static inline void THNN_(VolumetricDilatedMaxPooling_shapeCheck)(
THNNState *state,
THTensor *input,
... |
3d7pt.c | /*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b) ... |
GB_unaryop__ainv_bool_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... |
exp3_omp_v0.c | #include <stdio.h>
#include <omp.h>
int main()
{
int ii;
#pragma omp parallel
{
for(ii=0;ii<10;ii++) {
printf("Iteration: %d\n",ii);
}
}
printf("\n");
return 0;
}
|
reduction-clauseModificado.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(int argc, char **argv) {
int i, n=20, a[n],suma=10;
if(argc < 2) {
fprintf(stderr,"Falta iteraciones\n");
exit(-1);
}
n = atoi(argv[1]); if (n>20) {n=20; printf("n=%d",n);}
... |
loops.c | #include <stdio.h>
#include <math.h>
#define N 729
#define reps 1000
#include <omp.h>
double a[N][N], b[N][N], c[N];
int jmax[N];
void init1(void);
void init2(void);
void runloop(int);
void loop1chunk(int, int, int*);
void loop2chunk(int, int,int*);
void valid1(void);
void valid2(void);
int main(int argc, c... |
for_variable.c | /* PMSIS includes */
#include "pmsis.h"
#include "omp.h"
static uint32_t errors = 0;
/* Cluster main entry, executed by core 0. */
void cluster_delegate(void *arg)
{
printf("Cluster master core entry\n");
uint32_t a[64] = {0};
int32_t sum = 0;
int32_t max = 0;
#pragma omp parallel num_threads(4)... |
papi.c | #include "SimpleMOC-kernel_header.h"
#ifdef PAPI
// initialize papi with one thread first
void papi_serial_init(void)
{
if ( PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT){
fprintf(stderr, "PAPI library init error!\n");
exit(1);
}
if (( PAPI_thread_init((long unsigned int (*)(void))
pthread_self... |
task.c | #include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main(int argc, char** argv)
{
int num_of_threads = atoi(argv[1]), counter = 0;
omp_set_num_threads(num_of_threads);
#pragma omp parallel shared(counter)
{
int index = omp_get_thread_num();
while (1)
if (index == counter)
{
printf(... |
aggregate_ops.h | //
// @author raver119@gmail.com
//
#ifndef LIBND4J_AGGREGATE_OPS_H
#define LIBND4J_AGGREGATE_OPS_H
#include <ops/ops.h>
#include <templatemath.h>
#define HS_MAX_EXP 6.0f
#ifdef __CUDACC__
#define aggregate_def __device__ inline static
#else
#include <ops/gemm.h>
#define aggregate_def inline static
#endif
/*
*
*
... |
fused_rowwise_nbitfake_conversion_ops.h | #pragma once
#ifdef _OPENMP
#include <omp.h>
#endif
#include "caffe2/core/context.h"
#include "caffe2/core/logging.h"
#include "caffe2/core/operator.h"
#include "caffe2/operators/reducer_functors.h"
#include "caffe2/utils/math.h"
namespace caffe2 {
namespace internal {
inline bool is_little_endian() {
constexpr s... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- 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
//
//===---------------------------... |
Parallelizer.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 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 can ob... |
transform.h | /*!
* Copyright 2018 XGBoost contributors
*/
#ifndef XGBOOST_COMMON_TRANSFORM_H_
#define XGBOOST_COMMON_TRANSFORM_H_
#include <dmlc/omp.h>
#include <xgboost/data.h>
#include <utility>
#include <vector>
#include <type_traits> // enable_if
#include "xgboost/host_device_vector.h"
#include "xgboost/span.h"
#include "... |
GB_reduce_panel.c | //------------------------------------------------------------------------------
// GB_reduce_panel: s=reduce(A), reduce a matrix to a scalar
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suites... |
GB_unaryop__identity_fp32_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... |
data.h | /*!
* Copyright (c) 2015 by Contributors
* \file data.h
* \brief The input data structure of xgboost.
* \author Tianqi Chen
*/
#ifndef XGBOOST_DATA_H_
#define XGBOOST_DATA_H_
#include <arrow/api.h>
#include <dmlc/base.h>
#include <dmlc/data.h>
#include <rabit/rabit.h>
#include <xgboost/base.h>
#include <xgboost/s... |
c-parser.c | /* Parser for C and Objective-C.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
Free Software Foundation, Inc.
Parser actions based on the old Bison parser; structure somewhat
influenced by and fragments based on the C++ par... |
residualbased_newton_raphson_strategy.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ \.
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
#if !defined(KRATOS_RESIDUALB... |
arraybench.c | /****************************************************************************
* *
* OpenMP MicroBenchmark Suite - Version 3.0 *
* *
* ... |
smg_residual_unrolled.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... |
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... |
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... |
GB_binop__land_uint64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.