source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
flog.c | /*
Support for logging to file. Logging is made to a file called
matilda_YYMMDD_XXXXXX.log where YYMMDD is the date and XXXXXX is a random
string. When logging a mask of log categories specifies the types of messages to
be written to file. Having a very high degree of detail in very fast matches
actively hurts the perf... |
pzgetrf.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> s d c
*
**/
#include "plasma_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include "plasma_types.h"
#in... |
9268.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])... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
csr_matmultivec.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... |
convolution_2x2_pack8.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2019 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 ... |
3d25pt.c | /*
* Order-2, 3D 25 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)... |
nested_serial.c | // RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true %libomp-run | %python %S/check.py -c 'CHECK' %s
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char** argv) {
omp_set_affinity_format("TESTER: tl:%L at:%a tn:%n nt:%N");
omp_set_nested(1);
#pragma omp parallel num_threads(1)
... |
NAL.c | /*
* The MIT License
*
* Copyright 2020 The OpenNARS authors.
*
* 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,... |
GB_unaryop__ainv_fp64_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... |
residualbased_predictorcorrector_velocity_bossak_scheme_turbulent.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
#if !defined... |
GB_binop__gt_uint8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
life.c | //===-- life.c - Parallel region printing a message ---------------*- C -*-===//
//
// Part of the LOMP Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
colorspace.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
cell_distance.c | #include <omp.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#define DEBUG 0
#define NBR_POSSIBLE_DISTANCES 3465 // maximum distance given that all points are within [-10, 10]. Calculated by ceil(sqrt(20^2 + 20^2 + 20^2) * 100)
#define CHARACTERS_IN_LINE 24 // example "+01.330 -09.035... |
nativetests.c | #include <stdio.h>
#include <assert.h>
#define POPC_VALUE 0xff00ff00ff000000
// host API
int __nv_popcll(long long a) {
int i = 0;
int count = 0;
while(i<64) {
if (a & (1ull<<i)) count++;
i++;
}
return count;
}
int test1() {
int result;
#pragma omp target map(tofrom:result)
{
result = __nv... |
update.c | /*
* =======================================================================================
*
* Author: Jan Eitzinger (je), jan.eitzinger@fau.de
* Copyright (c) 2020 RRZE, University Erlangen-Nuremberg
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of th... |
snmg_test_utils.h | /*
* Copyright (c) 2019, NVIDIA 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 applicable law ... |
random.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include<math.h>
//Functions
int backsubstitution_p(double *A, double *b, double *x, int n);
int backsubstitution_s(double *A, double *b, double *x, int n);
int conjugategradient_p(double *A, double *b, double *x, int n);
int conjugategradient... |
convolution_sgemm.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 ... |
poisson_omp.c | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
#include <sys/time.h>
#include "parameters.h"
#ifndef max
#define max( a, b ) ( ((a) > (b)) ? (a) : (b) )
#endif
#ifndef min
#define min( a, b ) ( ((a) < (b)) ? (a) : (b) )
#endif
static int write_to_bmp(int n, float **t... |
setiv.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB LU code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
GB_binop__le_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... |
GB_unaryop__identity_uint32_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
regul.h | #ifndef REGUL_H
#define REGUL_H
#include "linalg.h"
Timer timer_global, timer_global2, timer_global3;
enum regul_t { L2, L1, ELASTICNET, L1BALL, L2BALL, FUSEDLASSO, L1L2, L1LINF, NONE, L1L2_L1, INCORRECT_REG };
static bool is_regul_for_matrices(const regul_t& reg) {
return reg==L1L2 || reg==L1LINF;
}
template <... |
saxpy-omp3.c | /**
* @file saxpy.c
*
* @brief saxpy performs the \c axpy computation in single-precision on both
* host and accelerator. The performance (in MFLOPS) on host and accelerator is
* compared and the numerical results are also verified for consistency.
*
* The \c axpy computation is defined as:
*
* y := a * x + y
... |
GB_unop__creal_fp32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
test.c | #define N 1024
#define _GNU_SOURCE
#include <link.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
// If one of the libomptarget plugins has been loaded, it means we are running
// w/ith libomptarget. libomptarget.so is also used by LOMP, so we need to check
// for libomptarget.rtl.*.
/*
static int isLib... |
for_ordered.c | #include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
static int last_i = 0;
/* Utility function to check that i is increasing monotonically
with each call */
static int
check_i_islarger (int i)
{
int islarger;
islarger = (i > last_i);
last_i = i;
return (islarger);
}
int
check_for_ordered (FILE... |
ex03.c | #include "stats.h"
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
void ce( int *a, int *b ) {
int t;
if( *a > *b ) {
t = *a; *a = *b; *b = t;
}
}
void CountNumbers( int a[], int n ) {
int sum = 0;
#pragma omp parallel default(none ) reduction(+:sum) shared(a,n)
{
int *count = ( int* ) callo... |
GB_unop__ceil_fc64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
x86_utils.h | /* Copyright (c) 2018 Anakin Authors, Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or... |
dyn_mc.h | #ifndef DYN_MC_H_
#define DYN_MC_H_
#include <algorithm>
#include "traversal.h"
#include "../common/timer.h"
#include "sliding_queue_dynamic.h"
#include "../common/pvector.h"
/* Algorithm: Incremental Max computation and Max Computation starting from scratch */
#include <fstream>
extern std::ofstream algF;
templat... |
TBBHashmap.h | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018-2021 www.open3d.org
//
// Perm... |
terrain.c | #include "blocko.h"
float hmap[TILESW][TILESD];
float hmap2[TILESW][TILESD];
int tscootx, tscootz, tchunk_scootx, tchunk_scootz;
void gen_hmap(int x0, int x2, int z0, int z2)
{
unsigned seed = SEED4(x0, x2, z0, z2);
// pick corners if they aren't set
if (hmap[x0][z0] == 0) hmap[x0][z0] = RAN... |
tinyexr.h | /*
Copyright (c) 2014 - 2017, Syoyo Fujita
All rights reserved.
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 t... |
tiger_fmt_plug.c | /* Tiger cracker patch for JtR. Hacked together during April of 2013 by Dhiru
* Kholia <dhiru at openwall.com>.
*
* This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and
* it is hereby released to the general public under the following terms:
*
* Redistribution and use in source and binary ... |
distribute_parallel_for_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify=expected,omp50 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fs... |
GB_binop__eq_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
tensor_base_class_functions.h | #pragma once
template <typename Type>
tensor<Type>::tensor(tensor<Type> const& other) :
shape_(other.shape_),
default_element_(other.default_element_)
{
data_ = std::make_unique<Type[]>(other.shape_.first * other.shape_.second);
#pragma omp parallel for
for (int64_t i = 0; i < other.shape_.first; ++i)
for (size... |
log.h | /**
* Copyright (c) 2017 rxi
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the MIT license. See `log.c` for details.
*/
#pragma once
#ifdef USE_LOG
#include <cstdio>
#include <cstdarg>
#include <cstring>
#include <string>
#define LOG_VERSION "0.1.0"
typedef v... |
GB_unaryop__identity_int32_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... |
GB_unop__sinh_fc32_fc32.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... |
sageInterface.h | #ifndef ROSE_SAGE_INTERFACE
#define ROSE_SAGE_INTERFACE
#include "sage3basic.hhh"
#include <stdint.h>
#include <utility>
#include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT
#include "OmpAttribute.h"
#if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference
SgFile* determ... |
taskloop_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp taskloop'}}
#pragma omp taskloop
// expected-err... |
loop-14.c | /* { dg-do run } */
volatile int ji = 100, ki = 2;
volatile unsigned int ju = 100, ku = 2;
volatile long long int jll = 100, kll = 2;
volatile unsigned long long int jull = 100, kull = 2;
unsigned long long l;
void
f0 (void)
{
int i, j, k;
unsigned int j2, k2;
#pragma omp for reduction(+: l) schedule(static, 2)... |
HaloExchangeNeighborTwo.h | #include "mpi.h"
#include <memory>
using std::shared_ptr;
#define U_OUT(i,j) U_OUT[(i)*(n+4)+(j)]
#define U_IN(i,j) U_IN[(i)*n+(j)]
#define GRAD_U_OUT(i,j) GRAD_U_OUT[(i)*(n+4)+(j)]
#define GRAD_U_IN(i,j) GRAD_U_IN[(i)*n+(j)]
#define RANK(I,J) ((I-1)*N+(J-1))
void HaloExchangeNeighborTwo_forward(double *U_OUT, const ... |
argo_dsm.h | /*
* Copyright (c) 2019-2020, I. Anevlavis & K. Palaiodimos
* All rights reserved.
*/
#include <mpi.h>
#include "error.h"
#include "argo.hpp"
#define SYS ARGO_Sys
void Sys::Init(const std::size_t& nnodes)
{
std::size_t init_glmem = sizeof(double) * nnodes ... |
ast-dump-openmp-atomic.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(int i) {
#pragma omp atomic
++i;
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-open... |
sp2Loop.c | /// \file
/// SP2 loop.
#include "sp2Loop.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "sparseMatrix.h"
#include "sparseMath.h"
#include "haloExchange.h"
#include "performance.h"
#include "parallel.h"
#include "matrixio.h"
#include "constants.h"
#if _CD1
#include "cd.h"
#include "cd_cosp2.h"
... |
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
//
//===---------------------------... |
wdp.c | #include "wdp.h"
#include "dnormb.h"
#include "dnorme.h"
#include "dnormf.h"
#include "dnorms.h"
#include "d8sort.h"
double dnb(const fnat n, const double x[static restrict 1])
{
const fint incx = 1;
return dnormb_((const fint*)&n, x, &incx);
}
#ifndef USE_MKL
extern double BLAS_D(dot)(const fint n[static 1], con... |
SpatialFractionalMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialFractionalMaxPooling.c"
#else
static int64_t* THNN_(SpatialFractionalMaxPooling_generateIntervals)(
real sample,
int64_t inputSize,
int64_t outputSize,
int poolSize) {
real alpha = (real) (inputSize - poolSize) / (real) (outputSize - 1);
int64... |
omptests.c | #include <stdlib.h>
#include <stdio.h>
/// Two methods store in different compilation units, results in a compile-time
// error. Duplicate .omp_offloading.entry
void test_comp_unit_1(const int niters, double* a);
void test_comp_unit_2(const int niters, double* a);
int main()
{
const int niters = 10;
double* a = ... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ee36_so8_advfsg.c | #define _POSIX_C_SOURCE 200809L
#include "stdlib.h"
#include "math.h"
#include "sys/time.h"
#include "xmmintrin.h"
#include "pmmintrin.h"
#include "omp.h"
#include <stdio.h>
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
struct dataobj
{
void *restrict data;
int *size;
i... |
offloading_success.c | // RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu
// RUN: %libomptarget-compile-run-and-check-nvpt... |
GB_binop__isle_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:... |
update_local_ranks_parallel.c | #include <omp.h>
#include "utils.h"
#include "algorithm.h"
#include <limits.h>
int update_local_ranks_parallel (char * rank_dir, char * temp_dir, int total_chunks, int chunk_id, int h){
int size_order = 0;
while((WORKING_CHUNK_SIZE >> size_order) > 1) {size_order++;}
int next_chunk_dist = h > size_order ? 1<<(h-si... |
GB_binop__lxor_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_unop__minv_uint32_uint32.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... |
systolic_array.h | /* Copyright (c) 2020 Computing Systems Group
*
* 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... |
hello_omp.c | #include <stdio.h>
#include <omp.h>
int main(int argc, char **argv)
{
int omp_n, omp_i;
#pragma omp parallel private(omp_n, omp_i)
{
omp_n = omp_get_num_threads();
omp_i = omp_get_thread_num();
printf("Hello World from OMP %d/%d\n",
omp_i, omp_n);
}
return 0... |
GraphBuilder.h | /*
* GraphBuilder.h
*
* Created on: 15.07.2014
* Author: Marvin Ritter (marvin.ritter@gmail.com)
*/
#ifndef GRAPH_BUILDER_H
#define GRAPH_BUILDER_H
#include <vector>
#include "../Globals.h"
#include "Graph.h"
namespace NetworKit {
/*
* The GraphBuilder helps to speed up graph generation by minimizing t... |
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... |
declare_target-3.c | /* { dg-do run } */
#include <stdlib.h>
#define EPS 0.000001
#define N 100000
#pragma omp declare target
float p1[N], p2[N], v1[N], v2[N];
#pragma omp end declare target
void init ()
{
int i, s = -1;
for (i = 0; i < N; i++)
{
v1[i] = s * 0.01;
v2[i] = i;
s = -s;
}
}
void check ()
{
... |
Tanh.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "THNN/generic/Tanh.c"
#else
void THNN_(Tanh_updateOutput)(
THNNState *state,
THTensor *input,
THTensor *output)
{
THTensor_(tanh)(output, input);
}
void THNN_(Tanh_updateGradInput)(
THNNState *state,
THTensor *gradOutp... |
interloc.h | /*
* @Author: Philippe Dales
* @Date: 2018-07-26 14:26:23
* @Last Modified by: Philippe Dales
* @Last Modified time: 2018-07-26 14:26:23
*/
#ifndef INTERLOC_H
#define INTERLOC_H
#include <cstring>
#include <omp.h>
#include <fftw3.h>
#include <cstddef>
#include "xseis/structures.h"
#include "xseis/process.h"
#incl... |
shared-clauseModificado.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int main() {
int i, n = 7;
int a[n];
for (i=0; i<n; i++)
a[i] = i+1;
#pragma omp parallel for default(none) shared(a,n)
for (i=0; i<n; i++) a[i] += i;
printf("Después de parallel for:\n");
for (i=0; i<n; i++)
printf("a[%d] = %d\n... |
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... |
pooling_3x3.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 ... |
GB_unaryop__one_uint8_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... |
SpecificityMeasurer.h | #ifndef __SPECIFICITY_MEASURER_H__
#define __SPECIFICITY_MEASURER_H__
#include <vector>
#include "mesh/Mesh.h"
#include "model/Model.h"
#include "model/ModelBuilder.h"
#include "Subset.h"
#include "ErrorDatabase.h"
class SpecificityMeasurer{
public:
/*-----------------------------------------------------------... |
test_syscall.c | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <sched.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#if 1
void foo(void)
{
#pragma omp target
#pragma omp parallel for
for (int i=0; i<1; i++)
sched_yield();
}
#endif
#if 0
void foo(void)
{
#pragma omp target
#pragma omp parall... |
mat-sum_gpu.c | /*
This program performs matrix sum on the GPU with
dynamically allocated matrices.
Author: Gleison Souza Diniz Mendonça
Date: 04-01-2015
version 2.0
Run:
ipmacc mat-sum_gpu.c -o mat
./mat matrix-size
*/
#include "BenchmarksUtil.h"
#include <assert.h>
#include <math.h>
#include <stdio.h... |
GB_unop__asin_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
test_sign_verify.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 may not use ... |
GB_unop__identity_fc32_uint64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
openmp_sample.c | /*
* Copyright (C) 2009-2013 Intel Corporation. All Rights Reserved.
*
* The source code contained or described herein and all
* documents related to the source code ("Material") are owned by
* Intel Corporation or its suppliers or licensors. Title to the
* Material remains with Intel Corporation or its supplier... |
HSetMaintainer.h | #ifndef HSET_MAINTAINER_H
#define HSET_MAINTAINER_H
/*************************************************************
* Author : Markus Schordan *
*************************************************************/
#include <boost/unordered_set.hpp>
//#define HSET_MAINTAINER_DEBUG_MODE
/*!... |
convolutiondepthwise_3x3.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 ... |
ex8-poisson-openmp.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
struct Opts
{
double a,b,ua,ub,dx,its,tol;
size_t n;
};
void init_rho(double * restrict, const struct Opts);
void jacobi(double * restrict, const double * restrict, const struct Opts);
double residual(const double * restrict, const double... |
conv_2d.h | // Copyright 2018 Xiaomi, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... |
test6.c | int g1;
void foo () {
0;
#pragma omp barrier
1;
}
int main() {
#pragma omp parallel
{
int p;
2;
if (3) {
4;
g1 = 10;
foo ();
5;
} else {
6;
//#pragma omp atomic read
// p = g1;
#pragma omp barrier
7;
}
if (8) {
9;
foo();
10;
} else {
11;
#pragma omp barrier
12;
}
... |
sp.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 3.0 structured OpenMP C versions - SP
This benchmark is an OpenMP C version of the NPB SP code.
The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions
in "NPB 2.3-serial" developed by N... |
scheduler-clause.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=0;
if(argc < 2) {
fprintf(stderr,"\nFalta iteraciones \n");
exit(-1);
}
n = atoi(argv[1]); if (n>20) n=20;
for (i=0; i<n; i++)... |
hermm_c_dia_u_hi_col_trans.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#include <memory.h>
#include <stdlib.h>
alphasparse_status_t ONAME(const ALPHA_Complex alpha, const ALPHA_SPMAT_DIA *mat, const ALPHA_Complex *x, const ALPHA_INT columns, const ALPHA_INT ld... |
mandelbrot.c | /*
* mandelbrot.c
* (c)2010-2018 Seiji Nishimura
* $Id: mandelbrot.c,v 1.1.1.3 2018/09/11 00:00:00 seiji Exp seiji $
*/
#include <pixmap.h>
#include <palette.h>
#define MIN(x,y) (((x)<(y))?(x):(y))
// prototype
void colormap_init(pixel_t *, int);
void draw_image (pixmap_t *, pixel_t *, int, double, double, dou... |
api.c | // RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu
#include <stdio.h>
#include <omp.h>
// -------... |
memory_ops.c | #include <stdio.h>
#include <stdlib.h>
#include "memory_ops.h"
#include "utility.h"
#include <time.h>
#include <limits.h>
#ifdef _OPENMP
#include <omp.h>
#endif
// state functions
// allocate quantum state
CTYPE* allocate_quantum_state(ITYPE dim) {
CTYPE* state = (CTYPE*)malloc((size_t)(sizeof(CTYPE)*dim));
i... |
map.c | #include <stdio.h>
#include <omp.h>
int main()
{
int i;
#pragma omp parallel num_threads(2) // seta o número de threads em 2
{
int tid = omp_get_thread_num(); // lê o identificador da thread
#pragma omp for ordered
for(i = 1; i <= 3; i++)
{
#pragma omp ordered
... |
app.c | /**
* Christina Giannoula
* cgiannoula: christina.giann@gmail.com
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <dpu.h>
#include <dpu_log.h>
#include <unistd.h>
#include <getopt.h>
#include <assert.h>
#include <math.h>
#include <omp.h>
#include "../support/common.h"
#i... |
big_wkld.c |
/*
* Code to simulate a "big"-core workload for lab assignment in [A2] Task Mapping on Soft Heterogeneous Systems.
* Workload consists of a parallel implementation of quicksort.
* Implementation not optimized! Only meant to be used in conjunction with lab assignment.
* The performance of the workload increases... |
shear.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
critical-3.c | // { dg-do compile }
// { dg-options "-fopenmp -fdump-tree-ompexp" }
void bar(void);
void foo(void)
{
#pragma omp critical (xyzzy)
bar();
}
// { dg-final { scan-tree-dump-times "\\&\\.gomp_critical_user_xyzzy" 2 "ompexp" } }
|
implementation.h | #ifndef MIGRATION_ON_C_IMPLEMENTATION_H
#define MIGRATION_ON_C_IMPLEMENTATION_H
#include <vector>
#include <iostream>
#include <omp.h>
#include <cstddef>
template < typename T,typename T1>
void calculate_sumAmp_node(T *ptr, T1 *ptr1, double *ptr2, std::ptrdiff_t n_traces, std::ptrdiff_t n_samples,
... |
evaluation.c | #include "common.h"
static void clear_buffers(uint64_t* restrict A, uint64_t* restrict B, const int s)
{
#ifdef _OPENMP
#pragma omp parallel for
#endif
for(int i=0;i<s;i++)
A[i] = B[i] = 0;
}
#ifdef _OPENMP
static int top_down_step(const int level, const int nodes, const int num_frontier,
... |
program_evaluator.h | // Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2015 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of so... |
GB_binop__second_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... |
dragon.c | /*
* dragon.c
*
* Created on: 2011-06-26
* Authors: Francis Giraldeau
* Pier-Luc St-Onge
*
* http://en.wikipedia.org/wiki/Dragon_curve
*/
#define _GNU_SOURCE
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include "dragon.h"
#include "color.h"
xy_t compute_position(int64_t i)
{
xy_t position;
po... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.