source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
lin_algebra_moist.c | /*
This source file is part of GAME-DA, which is released under the MIT license.
Github repository: https://github.com/OpenNWP/GAME-DA
*/
/*
linear algebra functions for the moist assimilation process
*/
#include <stdlib.h>
#include <stdio.h>
#include "game-da.h"
int permute_lines_moist(double [][NO_OF_CHOSEN_OBSERV... |
ds800.c | #include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <math.h>
#include <string.h>
#include <omp.h>
#include "common.h"
/** pi / 2 */
#define PI_2 (3.14159 / 2.0)
/** distribution function used to smudge pixels together */
#define SKEW(X) ((PI_2 - atan(X)) / PI_2)
/** smudge pixels in a target pixel's v... |
ch_ompss.c |
#include "ch_common.h"
#include "../timing.h"
// #include "../timing_override.h"
void cholesky_mpi(const int ts, const int nt, double *A[nt][nt], double *B, double *C[nt], int *block_rank)
{
#if defined(CHAMELEON) || defined(CHAMELEON_TARGET)
#pragma omp parallel
{
chameleon_thread_init();
}
... |
affinity.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include "resources.h"
#include "affinity.h"
#include "workload.h"
#include "omplib.h"
#include "mem.h"
void init_affinity(thread_str *t, local_str *local);
void end_affinity(thread_str *t, local_str *local);
void initialise_thread(local_str *... |
ellipticBuildJacobi.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 without limitatio... |
apply_bcs_curvilinear.h |
// Declare boundary condition BC_UPDATE_OUTER macro,
// which updates a single outer boundary face
// of the 3D grid cube using quadratic polynomial
// extrapolation.
#define BC_UPDATE_OUTER(which_gf, i0,i1,i2, FACEX0,FACEX1,FACEX2) { \
const int idx3 = IDX3S(i0,i1,i2); ... |
static.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <unistd.h>
int main()
{
int n_threads, i;
/*
Schedule allows you to create the scheme with which
the threads distribute the work of an iteration of a cycle.
"static": means that iterations blocks are mapped statically to the
exe... |
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 <omp.h>
#include <math.h>
#include "../support/common.h"
#i... |
django_scrypt_fmt_plug.c | /* scrypt cracker patch for JtR. Hacked together during May 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 f... |
arraybench.c | /***************************************************************************
* *
* OpenMP MicroBenchmark Suite - Version 2.0 *
* *
* ... |
diagmv_x_csc_u.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t
diagmv_csc_u_omp(const ALPHA_Number alpha,
const ALPHA_SPMAT_CSC *A,
const... |
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... |
nn_index.h | /***********************************************************************
* Software License Agreement (BSD License)
*
* Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved.
* Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved.
*
* THE BSD LICENSE
*
* Redistribution an... |
colorspace.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
interppotential_calc_potential.c | /*
C code for calculating a potential and its forces on a grid
*/
#ifdef _WIN32
#include <Python.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#define CHUNKSIZE 1
//Potentials
#include <galpy_potentials.h>
#include <actionAngle.h>
#inclu... |
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... |
interp_kernel_arm.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... |
constCurvModel2d.c | /* Include constant curvature drivers for all dimensions here */
/* System headers */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/* Local headers */
#include "QSSLIB_config.h"
#include "qss_options.h"
#include "qss_spatial_derivatives2d.h"
#include "qss_tvd_runge_kutta2d.h"
#include "qss_data_arrays.h... |
hw2b_time(dynamic).c | #ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#define PNG_NO_SETJMP
#include <sched.h>
#include <assert.h>
#include <png.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include <mpi.h>
#include <pthread.h>
void write_png(const char* filename, int iters, int width, int height, const int... |
WaveFunctionComponent.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2020 QMCPACK developers.
//
// File developed by: Ken Esler, kpesler@gmail.c... |
loopct_r4.c | /*
* Input: ntabs nchannels padded_size
* Output: ntabs ntimes -nchannels ; ntimes < padded_size
*
* We process a finished tab directly, so no need to build up the full ntabs array
*/
void deinterleave(const char *page, char *transposed, const int ntabs, const int nchannels, const int ntimes, const int padd... |
omp_task_untied.c | <ompts:test>
<ompts:testdescription>Test which checks the untied clause of the omp task directive. The idear of the tests is to generate a set of tasks in a single region. We create more tasks than threads exist, so at least one thread should handle more than one thread. Then we send the half of the threads into a buss... |
functions.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "functions.h"
//compute a*b mod p safely
unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) {
unsigned int za = a;
unsigned int ab = 0;
while (b > 0) {
if (b%2 == 1) ab = (ab + za) % p;
za = (2 * za... |
inputSingle.c | // test case for single
//It contains private(), firstprivate(), nowait
//TODO copyprivate()
#include <stdio.h>
#ifdef _OPENMP
#include "omp.h"
#endif
int y;
int main()
{
int x;
int z=100;
#pragma omp parallel
{
#pragma omp single private(x,y) firstprivate(z) nowait
{
x = omp_get_thread_num();
y = omp_get... |
xmpp_scram_fmt_plug.c | /*
* This software is Copyright (c) 2017, 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.
*
* References,
*
* https://tools.ietf.org/html/... |
openmp1.c | #include <math.h>
#include <omp.h>
void
cholesky(double *A, double *L, int n)
{
for (int j = 0; j < n; j++) {
#pragma omp parallel for
for (int i = j; i < n; i++) {
double s = 0;
for (int k = 0; k < j; k++) {
s += L[i * n + k] * L[j * n + k];
}
L[i * n + j] = (i == j) ? sqrt(A[i * n + i] - s)
... |
1.race2.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define N 20
int main() {
int A[N][N];
#pragma omp parallel for
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
A[i][j] = A[i + 1][j - 1];
}
// CHECK: Data Race detected
// END
|
axpy_float_simdlen8.c | //axpy.c
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/timeb.h>
#include <malloc.h>
#define N_RUNS 1000
#define N 1200
// read timer in second
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.time + (double) tm.millitm / 1000.0;
}
//Create a matrix and a vect... |
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
//
//===---------------------------... |
effect.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unaryop__abs_uint16_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
convolution_3x3_pack4to1_bf16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
par_csr_matvec.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)
**************************************... |
parallel.h | // Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless requir... |
GB_subassign_05.c | //------------------------------------------------------------------------------
// GB_subassign_05: C(I,J)<M> = scalar ; no S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier: Apa... |
satisfiability.c | /**
* @file satisfiability.c
* @author Austin Gill (atgill@protonmail.com)
* @brief Implementation of satisfiability functions. Yay.
*/
#include "satisfiability.h"
bool circuit_one( const int32_t tid, const uint16_t z )
{
bool bits[16] = {0};
extract_bits( bits, z );
if( ( bits[0] || bits[1] ) && ( !b... |
par_gsmg.c | /******************************************************************************
* Copyright (c) 1998 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)
***************************************... |
GB_unaryop__lnot_int16_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
nested_thread_num.c | // RUN: %libomp-compile-and-run | FileCheck %s
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck --check-prefix=THREADS %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>
#include <unistd.h>
int main() {
int ... |
NeighborhoodGraph.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_NG_H_
#define _SPTAG_COMMON_NG_H_
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "Dataset.h"
#include "FineGrainedLock.h"
#include "QueryResultSet.h"
namespace SPTAG
{
namespace C... |
hcb_basis_core.h | #ifndef _HCB_BASIS_CORE_H
#define _HCB_BASIS_CORE_H
#include <complex>
#include <vector>
#include <iostream>
#include "general_basis_core.h"
#include "numpy/ndarraytypes.h"
#include "benes_perm.h"
#include "openmp.h"
namespace basis_general {
template<class I>
I inline hcb_map_bits(I s,const int map[],const int N){
... |
nvector_openmp.c | /*
* -----------------------------------------------------------------
* $Revision: 4869 $
* $Date: 2016-08-19 10:34:20 -0700 (Fri, 19 Aug 2016) $
* -----------------------------------------------------------------
* Programmer(s): David J. Gardner and Carol S. Woodward @ LLNL
* ---------------------------------... |
linalg.h | /* Software SPAMS v2.1 - Copyright 2009-2011 Julien Mairal
*
* This file is part of SPAMS.
*
* SPAMS 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 of the License, or
* (at your optio... |
fmm_scale_invariant.h | #ifndef fmm_scale_invariant_h
#define fmm_scale_invariant_h
#include <cstring> // std::memset
#include <fstream> // std::ofstream
#include <type_traits> // std::is_same
#include "fmm_base.h"
#include "intrinsics.h"
#include "math_wrapper.h"
namespace exafmm_t {
template <typename T>
class FmmScaleInvari... |
dz1z3.c |
// bmp.h
#include "stdio.h"
#include "stdlib.h"
typedef struct{
unsigned char B;
unsigned char G;
unsigned char R;
} RGB;
typedef struct {
unsigned int filesz;
unsigned short creator1;
unsigned short creator2;
unsigned int bmp_offset;
} bmpfile_header_t;
typedef struct {
unsigned in... |
GB_unop__identity_fp32_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... |
GB_atomics.h | //------------------------------------------------------------------------------
// GB_atomics.h: definitions for atomic operations
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier... |
parallel-inl.h | // Copyright (c) 2018 Doyub Kim
//
// I am making my contributions/submissions to this project solely in my
// personal capacity and am not conveying any rights to any intellectual
// property of any third parties.
#ifndef INCLUDE_JET_DETAIL_PARALLEL_INL_H_
#define INCLUDE_JET_DETAIL_PARALLEL_INL_H_
#include "array_u... |
IndexedFaceMesh.h | #ifndef __INDEXEDFACEMESH_H__
#define __INDEXEDFACEMESH_H__
#include <vector>
#include <array>
#include "Common/Common.h"
#include <iterator>
namespace Utilities
{
class IndexedFaceMesh
{
public:
struct Edge
{
std::array<unsigned int, 2> m_face;
std::array<unsigned int, 2> m_vert;
};
public:
typede... |
hello.c | #include <stdio.h>
#include <omp.h>
int main() {
#pragma omp parallel
{
int thread_ID = omp_get_thread_num();
printf("hello world %d\n", thread_ID);
}
}
|
comm.h | /**
* Copyright (c) 2015 by Contributors
*/
#ifndef MXNET_KVSTORE_COMM_H_
#define MXNET_KVSTORE_COMM_H_
#include <string>
#include <algorithm>
#include <utility>
#include <limits>
#include <vector>
#include "mxnet/ndarray.h"
namespace mxnet {
namespace kvstore {
/**
* \brief multiple device commmunication
*/
class ... |
ordered_dependences.c | // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7
#include "callback.h"
#include <omp.h>
int main() {
int a[10][10];
#pragma omp parallel num_threads(2)
#pragma omp for ordered(2)
for (int i = 0; i < 2; i++)
for (int j = 0; j < 2; j++) {... |
GB_binop__minus_fc64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
omp_nonmonotonic_nowait.c | // RUN: %libomp-compile-and-run
// The test checks nonmonotonic scheduling works correctly when threads
// may execute different loops concurrently.
#include <stdio.h>
#include <omp.h>
#define N 200
#define C 20
int main()
{
int i, l0 = 0, l1 = 0;
#pragma omp parallel num_threads(8)
{
#pragma omp for sched... |
GB_binop__max_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-... |
constitute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
sum.c |
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <R.h>
#include <Rmath.h>
#include <Rinternals.h>
#if defined _OPENMP
#include <omp.h>
#endif
double sumKernel(
double * x, /* naip image */
double * W, /* pre computed spatial weights */
size_t i, /* current location in colu... |
module_bl_mynn_mym_level2_impl.h |
#ifndef __MODULE_BL_MYNN_MYM_LEVEL2_IMPL_H__
#define __MODULE_BL_MYNN_MYM_LEVEL2_IMPL_H__
// File version granularity.
#ifndef MODULE_BL_MYNN_MYM_LEVEL2_IMPL_VERSION_MAJOR
#define MODULE_BL_MYNN_MYM_LEVEL2_IMPL_VERSION_MAJOR 1
#endif
#ifndef MODULE_BL_MYNN_MYM_LEVEL2_IMPL_VERSION_MINOR
#define MODULE_BL_MY... |
ode_solver.c | //
// Created by sachetto on 02/10/17.
//
#include "ode_solver.h"
#include <string.h>
#ifdef _MSC_VER
#include "../dlfcn-win32/dlfcn.h"
#else
#include <dlfcn.h>
#endif
#include <assert.h>
#include "../utils/logfile_utils.h"
#ifdef COMPILE_CUDA
#include "../gpu_utils/gpu_utils.h"
#endif
struct ode_solver* new_ode_s... |
atomic.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
main() {
float *x,*y,*work1,*work2;
float sum;
int *index;
int n,i;
n=1000;
x=(float*)malloc(n*sizeof(float));
y=(float*)malloc(n*sizeof(float));
work1=(float*)malloc(n*sizeof(float));
work2=(float*)malloc(n*sizeof(fl... |
ast-dump-openmp-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 distribute parallel for simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp distribute parallel for ... |
cg_precond_fsai.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include "nb/math_bot.h"
#include "nb/memory_bot.h"
#include "nb/container_bot.h"
#include "nb/solver_bot.h"
#include "../sparse_struct.h"
#define POW2(a) ((a)*(a))
int nb_sparse_solve_CG_precond_fsai
(const nb_sparse_t... |
mandel-omp-task-row.c | /*
* Sequential Mandelbrot program
*
* This program computes and displays all or part of the Mandelbrot
* set. By default, it examines all points in the complex plane
* that have both real and imaginary parts between -2 and 2.
* Command-line parameters allow zooming in on a specific part of
* this range.
... |
hello_mp.c | // Copyright (c) 2021 B.Roden
//
// MIT License
//
// 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, mer... |
concurrent_unordered_map.cuh.h | /*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. 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 ... |
Jacobi2D-NaiveParallel-OMP_dyn.test.c | /******************************************************************************
* Jacobi2D benchmark
* Basic parallelisation with OpenMP
*
* Usage:
* make omp
* export OMP_NUM_THREADS=8
* bin/Jacobi2D-NaiveParallel-OMP \
* `cat src/Jacobi2D-NaiveParallel-OMP.perfexecopts`
* For a run on 8 threads
********... |
convolution_winograd_transform_pack16.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
zero_omp.c | /*
* File: zero_omp.c
* Author: Philip Mucci
* mucci@cs.utk.edu
* Mods: Nils Smeds
* smeds@pdc.kth.se
* Anders Nilsson
* anni@pdc.kth.se
*/
/* This file performs the following test: start, stop and timer
functionality for 2 slave OMP threads
- It attempts to use the follo... |
omp_task_shared.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
/* Utility function do spend some time in a loop */
int test_omp_task_imp_shared()
{
int i;
int k = 0;
int result = 0;
i=0;
#pragma omp parallel
{
#pragma omp single
for (k = 0; k < NUM_TASKS; k++) {
... |
GB_unop.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... |
target-8.c | /* { dg-do run } */
void
foo (int *p)
{
int i;
#pragma omp parallel
#pragma omp single
#pragma omp target teams distribute parallel for map(p[0:24])
for (i = 0; i < 24; i++)
p[i] = p[i] + 1;
}
int
main ()
{
int p[24], i;
for (i = 0; i < 24; i++)
p[i] = i;
foo (p);
for (i = 0; i < 24; i++)
... |
GB_binop__rminus_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-... |
invertir_para.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#define num_threads 12
int main()
{
FILE *image, *outputImage, *lecturas;
image = fopen("f10.bmp", "rb"); //Imagen original a transformar
outputImage = fopen("f10para.bmp", "wb"); //Imagen transformada
long ancho;
long alto;
unsigned char a... |
openmp-ex25.c | #include <stdio.h>
#include <unistd.h>
#include <omp.h>
int main(void)
{
int num_threads;
int fib = 1;
int fib_prev = 0;
#pragma omp parallel
{
/* calculating the fibonacci number of the number of threads is trivial,
* but sometimes there is work that must be serial (typically I/O, or
* because... |
tetrahedron_method.c | /* Copyright (C) 2014 Atsushi Togo */
/* All rights reserved. */
/* This file was originally part of spglib and is part of kspclib. */
/* Redistribution and use in source and binary forms, with or without */
/* modification, are permitted provided that the following conditions */
/* are met: */
/* * Redistributions ... |
par_mod_lr_interp.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)
**************************************... |
linear_interpolators.h | #ifndef XFIELDS_LINEAR_INTERPOLATORS_H
#define XFIELDS_LINEAR_INTERPOLATORS_H
typedef struct{
int64_t ix;
int64_t iy;
int64_t iz;
int64_t nx;
int64_t ny;
int64_t nz;
double w000;
double w100;
double w010;
double w110;
double w001;
double w101;
double w011;
double... |
testocean.c | extern double fabs(double );
typedef int __int32_t;
typedef long long __int64_t;
typedef long unsigned int __darwin_size_t;
typedef long __darwin_time_t;
typedef __int64_t __darwin_off_t;
typedef __int32_t __darwin_suseconds_t;
typedef __darwin_size_t size_t;
struct timeval {
__darwin_time_t tv_sec;
__darwin_su... |
LPfold.c | /*
* local pair probabilities for RNA secondary structures
*
* Stephan Bernhart, Ivo L Hofacker
* Vienna RNA package
*/
/*
* todo: compute energy z-score for each window
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
GB_unaryop__ainv_uint32_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
stencil.h | #include "multicore.h"
#define index1D(i) (i)
#define index2D(i,j) (((j)*(core->coreArrayNeighborhoodSizes_2D[1][1][0]))+(i))
// I think this should be in terms of the size for X and Y, not X, Y, and Z!
// #define index3D(i,j,k) (((k)*core->coreArrayNeighborhoodSizes_3D[1][1][1][2]*core->coreArrayNeighborhoodSiz... |
declare_variant_messages.c | // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
#pragma omp declare // expected-error {{expected an OpenMP directive}}
int foo(void);
#pra... |
GB_unaryop__lnot_int8_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... |
GB_unaryop__lnot_uint16_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... |
GB_unop__isfinite_bool_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... |
test.c |
#include <stdio.h>
#include <omp.h>
#pragma omp requires unified_shared_memory
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (992)
#define INIT() INIT_LOOP(N, {C[i] = 0; D[i] = i; E[i] = -i;})
#define ZERO(X) ZERO_ARRAY(N, X)
#define PARALLEL_A() { \
_Pragma("o... |
ordered-2.c | /* { dg-do compile } */
void f1(void)
{
#pragma omp ordered asdf /* { dg-error "expected" } */
#pragma omp ordered /* { dg-error "region may not be closely nested inside of" } */
} /* { dg-error "expected expression" } */
|
raytracer.h | #pragma once
#include "resource.h"
#include <linalg.h>
#include <memory>
#include <omp.h>
#include <random>
#include <stdio.h>
#include <time.h>
using namespace linalg::aliases;
namespace cg::renderer
{
struct ray
{
ray(float3 position, float3 direction) : position(position) { this->direction = normalize(direct... |
constitute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
cp-tree.h | /* Definitions for C++ parsing and type checking.
Copyright (C) 1987-2016 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
... |
unified_shared_memory.c | // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu -fopenmp-version=51
// RUN: %libomptarget-run-aarch64-unknown-linux-gnu 2>&1 \
// RUN: | %fcheck-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu -fopenmp-version=51
// RUN: %libomptarget-run-powerpc64-ibm-linux-gnu 2>&1 \
// RUN: |... |
chap_fmt_plug.c | /*
* iSCSI CHAP authentication cracker. Hacked together during September of 2012
* by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>,
* and it is hereby released to the general public under the following terms:
* Redistribution and use i... |
pi_omp_private.c | /*
* Tecnologico de Costa Rica (www.tec.ac.cr)
* Course: MP-6171 High Performance Embedded Systems
* Developers Name: Verny Morales and Luis Carlos Alvarez
* Developers email: verny.morales@gmail.com and lcam03@gmail.com
* General purpose:
* Input:
* Output:
*
*/
//gcc -fopenmp pi_omp_private.c -o pi_omp_p... |
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
//
//===---------------------------... |
AsynchronousUpdate.c | #include "AsynchronousUpdate.h"
#include <stdio.h>
#include <stdlib.h>
#include "constants.h"
#include <gsl/gsl_rng.h>
#include <omp.h>
int getBool(gsl_rng* r)
{
return gsl_rng_uniform_int(r,2);
}
void singleStateUpdate(int n, int* state, int** topology, int seed, int* fixed_nodes)
{
//Perform Asynchronous Updates
... |
dct2_fft2.h | /**
* @file dct2_fft2.h
* @author Zixuan Jiang, Jiaqi Gu
* @date Aug 2019
* @brief All the transforms in this file are implemented based on 2D FFT.
* Each transfrom has three steps, 1) preprocess, 2) 2d fft or 2d ifft, 3)
* postprocess.
*/
#ifndef DREAMPLACE_DCT2_FFT2_H
#define DREAMPLACE_DCT2_FFT2_H
... |
convolutiondepthwise_3x3_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 ... |
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... |
yolov2_forward_network.c | #include "additionally.h" // some definitions from: im2col.h, blas.h, list.h, utils.h, activations.h, tree.h, layer.h, network.h
// softmax_layer.h, reorg_layer.h, route_layer.h, region_layer.h, maxpool_layer.h, convolutional_layer.h
#define GEMMCONV
/*
// from: box.h
typedef struct {
float x, y, w, h;
} box;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.