source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
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)... |
threading_std.h | #include <cassert>
#include <cstddef>
#include <future>
#include <type_traits>
#include <vector>
#include "thread_count.h"
#ifndef THREADING_STD_LAUNCH
#define THREADING_STD_LAUNCH async // async or deferred
#endif
namespace threading_common {
class split {};
class auto_partitioner {};
// class static_partitioner;
... |
GB_select_phase2.c | //------------------------------------------------------------------------------
// GB_select_phase2: C=select(A,thunk)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.com See GraphB... |
GB_binop__bxor_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-... |
Fig_6.10_6.11_mandelbrotSolution.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
# define NPOINTS 1000
# define MXITR 1000
struct d_complex {
double r; double i;
};
void testpoint(struct d_complex);
struct d_complex c;
int numoutside = 0;
int main ()
{
int i, j;
double area, error, eps = 1.0e-5;
#pragma o... |
MarchingCubeComponent.h | #pragma once
#include "ECS.h"
#include "glm/gtx/dual_quaternion.hpp"
#include "glm/gtx/string_cast.hpp"
#include "utils.h"
#include <array>
#include <cstdint>
#include "DrawableComponent.h"
struct Cell
{
glm::vec3 points[8];
float val[8];
};
class MarchingCubeComponent : public Component
{
public:
MarchingCubeCom... |
GB_binop__gt_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
mxnet_op.h | /*!
* Copyright (c) 2017 by Contributors
* \file mxnet_op.h
* \brief
* \author Junyuan Xie
*/
#ifndef MXNET_OPERATOR_MXNET_OP_H_
#define MXNET_OPERATOR_MXNET_OP_H_
#include <mxnet/base.h>
#include <algorithm>
namespace mxnet {
namespace op {
namespace mxnet_op {
using namespace mshadow;
#ifdef __CUDA_ARCH__
__co... |
tsne_inl.h | /*
*
* Copyright (c) 2014, Nicola Pezzotti (Delft University of Technology)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above ... |
utils.h | #ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <assert.h>
#include "pixman-private.h" /* For 'inline' definition */
#define ARRAY_LENGTH(A) ((int) (sizeof (A) / sizeof ((A) [0])))
/* A primitive pseudorandom number generator,
* taken from POSIX.1-2001 example
*/
extern uint32_t lcg_seed;
#ifdef USE_OPEN... |
ams.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)
**************************************... |
opmphm.c | /**
* @file
*
* @brief The Order Preserving Minimal Perfect Hash Map C benchmark.
*
* @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
*/
// ==== DEFINE SECTION ====
#define _GNU_SOURCE
#define KDBRAND_BENCHMARK // allows the seed injection into Elektra
// uncomment to use OPENMP and set USE... |
3d7pt_var.c | /*
* Order-1, 3D 7 point stencil with variable coefficients
* 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)
#... |
misc.h | /**
*@file misc.h
*@author Sven Fleischer
*There I've coded a function, which finds prime numbers
*/
#ifndef MISC_H
#define MISC_H
/**
* Findes every prime from 2 to a given number.
*@param The number n, and the number of availabe threats.
*@return An array wich says if the index number is a prime or not.
*
*/
size... |
wyhash.h | /* Author: Wang Yi <godspeed_china@yeah.net> */
#ifndef wyhash_version_2
#define wyhash_version_2
#include <stdint.h>
#include <string.h>
#include <math.h>
#if defined(_MSC_VER) && defined(_M_X64)
#include <intrin.h>
#pragma intrinsic(_umul128)
#endif
const uint64_t _wyp0=0xa0761d6478bd642full, _wyp1=0xe7037ed1a0b428... |
cfunction.c | #include "core/cfunction.h"
#include <stdlib.h>
#include <omp.h>
#include <math.h>
#include "util/pi.h"
#include "struct/coordlist.h"
#define OUTPUT_MAP_INITIAL_CAP 5
void _set_out_pixel(
const rgba_image *input, rgba_image *output,
size_t x, size_t y,
coord_list *clist) {
uint32_t sum_r = 0;
uint32_t sum_g... |
merge_sort_par.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <omp.h>
#include "merge_sort.h"
#include "helper.h"
void swap(int64_t **a, int64_t **b)
{
int64_t *tmp = *a;
*a = *b;
*b = tmp;
}
void merge(int64_t *a, int64_t *b, size_t begin, size_t mid, size_t end)
{
size_t l = begin, r = ... |
nco_rgr.c | /* $Header$ */
/* Purpose: NCO regridding utilities */
/* Copyright (C) 2015--present Charlie Zender
This file is part of NCO, the netCDF Operators. NCO is free software.
You may redistribute and/or modify NCO under the terms of the
3-Clause BSD License with exceptions described in the LICENSE file */
#inc... |
VolumetricDilatedMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/VolumetricDilatedMaxPooling.c"
#else
static inline void THNN_(VolumetricDilatedMaxPooling_shapeCheck)(
THNNState *state,
THTensor *input,
THTensor *gradOutput,
TH... |
core_slag2d.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_clag2z.c, mixed zc -> ds, Fri Sep 28 17:38:26 2018
*
**/
#include <plasma_core_blas.h>
#include "co... |
hello-openmp.c | #include <omp.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[])
{
#pragma omp parallel
{
int id = omp_get_thread_num();
int proc = sched_getcpu();
printf("Thread %02i running on processor %i.\n", id, proc);
if (id == 0)
{
printf("There are %i threads in ... |
taskyield_omp.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See LICENSE.txt in top-level directory.
*/
/*
* A bunch of n tasks (1st arg) are created by a single thread.
* Each task creates two tasks more and inside the second one
* a taskyield directive is called
*/
#include <assert.h>
#include <omp.... |
GB_binop__le_fp64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
single.c | /*
$ gcc -fopenmp -O2 src/single.c -o bin/single
$ ./bin/single
Introduce valor de inicialización a: 1
Single ejecutada por el thread 0
Depués de la región parallel:
b[0] = 1 b[1] = 1 b[2] = 1 b[3] = 1 b[4] = 1 b[5] = 1 b[6] = 1 b[7] = 1 b[8] = 1
*/
#include <stdio.h>
#include <omp.h>
main() {
int n = 9, i, a... |
ast-dump-openmp-target-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 parallel for
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target parallel for
for (int i ... |
spi.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
int main(int argc, char **argv) {
float x = omp_get_wtime();
//seed random number generator
// Q2b: get the number of threads to run with from agrv and
// add OpenMP API code to set number of threads here
int Nthreads = atoi(argv[1]);... |
sieve.c | /**
* @file sieve.c
* @author Austin Gill (atgill@protonmail.com)
* @brief Implementation of the Sieve of Eratosthenes.
*/
#include "sieve.h"
bool* allocate( size_t length )
{
bool* a = malloc( length * sizeof( bool ) );
if( a == NULL )
{
fprintf( stderr, "Failed to allocate %zu bytes\n", leng... |
automine_formula.h |
void automine_3motif(Graph &g, std::vector<std::vector<uint64_t>> &global_counters) {
#pragma omp parallel
{
auto &counter = global_counters.at(omp_get_thread_num());
#pragma omp for schedule(dynamic,1) nowait
for(vidType v0 = 0; v0 < g.V(); v0++) {
VertexSet y0 = g.N(v0);
uint64_t n = (uin... |
user_defined_move_generator.h | /*****************************************************************************/
// Copyright (c) 2020-2021 Yuji KOGUMA
// Released under the MIT license
// https://opensource.org/licenses/mit-license.php
/*****************************************************************************/
#ifndef PRINTEMPS_NEIGHBORHOOD_USER_... |
segment.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__lnot_uint16_uint16.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... |
stresslet_real_rc_mex.c | #include "stresslet_real_rc.h"
#define X prhs[0] // Points (Nx3)
#define NVEC prhs[1] // Points (Nx3)
#define BOX prhs[2] // Box size
#define RC prhs[3] // Cutoff radius
#define XI prhs[4] // Ewald parameter
#define AMAT plhs[0]
#define ROW plhs[1]
#define COL plhs[2]
#define VAL plhs[3]
#define PER plhs[4]
... |
ej9.c | #include <stdio.h>
#include <math.h>
#include <float.h>
#include <stdlib.h>
#include <omp.h>
#include "ctimer.h"
int * sumaVectores(int *m1, int *m2, int size1, int size2) {
static int * sol = malloc(size1+size2 * sizeof(int));
int i;
for(i=0;i < 8; i++){
sol[i] = 0;
}
int p1 = size1-1;
... |
GB_binop__second_int64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
AzureAD_fmt_plug.c | /*
* This software is Copyright (c) 2015 JimF, <jfoug at openwall.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.
*
* Azure ActiveDirectory, V1 cracker patch for JtR.
*
* Algor... |
GB_unop__identity_int16_uint8.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
eavlSourceTopologyMapOp.h | // Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information.
#ifndef EAVL_SOURCE_TOPOLOGY_MAP_OP_H
#define EAVL_SOURCE_TOPOLOGY_MAP_OP_H
#include "eavlCUDA.h"
#include "eavlCellSet.h"
#include "eavlCellSetExplicit.h"
#include "eavlCellSetAllStructured.h"
#include "eavlDataSet.h"
#include "eavlArray.... |
Mapping.h | //===--------- Mapping.h - OpenMP device runtime mapping helpers -- 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
//
//===---------------------------... |
core_zttqrt.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c d s
*
**/
#include "core_blas.h"
#include "plasma_types.h"
#include "plasma_internal.h"
#include "core_lapack.h"
#include <omp.h>
// This will be swapp... |
GB_binop__lt_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... |
hello.c | #include <stdio.h>
#include <mpi.h>
#include <omp.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int numprocs, rank, namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];
int iam = 0, np = 28;
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);... |
convolution_3x3_packn_fp16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a ... |
GB_binop__band_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... |
FDTD3D_CPU_VERSION.h | //Only use these for the PML
LOCAL_CALLOC(Vx,GET_NUMBER_ELEMS(Vx_res));
LOCAL_CALLOC(Vy,GET_NUMBER_ELEMS(Vy_res));
LOCAL_CALLOC(Vz,GET_NUMBER_ELEMS(Vz_res));
LOCAL_CALLOC(Sigma_xx,GET_NUMBER_ELEMS(Sigma_xx_res));
LOCAL_CALLOC(Sigma_yy,GET_NUMBER_ELEMS(Sigma_yy_res));
LOCAL_CALLOC(Sigma_zz,GET_NUMBER_EL... |
nt_AI.c | /***************************************************************************
*
* (C) Copyright 2007 The Board of Trustees of the
* University of Illinois
* All Rights Reserved
*
* MRI-Q: Magnetic Resonance Imaging
* Computes a matrix Q, represent... |
GB_binop__isgt_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
parallel.c | //OpenMP version. Edit and submit only this file.
/* Enter your details below
* Name :
* UCLA ID :
* Email :
*/
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#include "utils.h"
double work_it_par(long *old, long *new, long *super, long *simple, long *fibonacci) {
int i, j, k, kk, jj, ii;
int u, v... |
GB_unaryop__lnot_uint32_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... |
BaseTensor.h | /* BaseTensor
* This library is distributed WITHOUT ANY WARRANTY.
* Author: Zhao Jize <zhaojize@outlook.com>
* All copyright reserved by the author.
*/
/* 1, 5, 9, 13, 17, 21*/
/*v2.0.1*/
#if !defined __BASE_TENSOR_H
#define __BASE_TENSOR_H
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include... |
GB_unaryop__minv_fp64_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
parallel-pi.c | #include <stdio.h>
int main(int argc, char const *argv[])
{
double pi, x;
int i, N;
pi = 0.0;
N = 1000;
#pragma omp parallel for private(x) reduction(+:pi)
for(i = 0; i < N; i ++) {
x = (double)i/N;
pi += 4/(1+x*x);
}
pi = pi/N;
printf("%f\n",pi);
return 0;
} |
analyze.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% AAA N N AAA L Y Y ZZZZZ EEEEE ... |
DRB066-pointernoaliasing-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... |
gbdt.h | #ifndef LIGHTGBM_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/json11.hpp>
#include "score_updater.hpp"
#include <cstdio>
#include <vector>
#include <string>
#include <fstream>
... |
GB_binop__isge_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... |
omp-matmat-static-parallel.c |
/*****************************************************************************
Example : omp-matmat-static-parallel.c
Objective : Matrix - Matrix Multiplication using
OpenMP one PARALLEL for directive with Schedule(static) and Private Clause
Input ... |
sllg.c | #include "clib.h"
/*
* n is the spin number
* eta is the random number array
*/
void llg_rhs_dw_c(double *restrict m, double *restrict h, double *restrict dm, double *restrict T, double *restrict alpha,
double *restrict mu_s_inv, int *restrict pins, double *restrict eta, int n, double gamma, double d... |
command_dist.c | // Copyright 2019 Huiguang Yi. All Rights Reservered.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applica... |
broadcast_reduce-inl.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 ... |
test.c | #include <stdio.h>
#define N 1024
#pragma omp requires unified_shared_memory
#define TEST_UPDATE 1
#define TEST_COMPUTE_UPDATE 1
int a[N], b[N];
int main() {
int i;
int error, totError = 0;
#if TEST_UPDATE
for (i=0; i<N; i++) a[i] = b[i] = i;
#pragma omp target data map(to:b) map(alloc: a)
{
... |
postgres_fmt_plug.c | /* PostgreSQL MD5 challenge-response cracker patch for JtR. Hacked together
* during October of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* Use Ettercap to get PostgreSQL MD5 challenge-response pairs in JtR format.
* E.g. ettercap -Tq -r /home/user/sample.pcap
*
* Input format:
* $postgres$user*salt*ha... |
displacement_criteria.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
//
#if !defined(KRATOS_DISPLAC... |
shared-clause-modificado.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 shared(a,n) default(none)
for (i=0; i<n; i++) a[i] += i;
printf("Después de parallel for:\n");
for (i=0; i<n; i++)
printf("a[... |
relax.c | /*BHEADER**********************************************************************
* Copyright (c) 2006 The Regents of the University of California.
* Produced at the Lawrence Livermore National Laboratory.
* Written by the HYPRE team. UCRL-CODE-222953.
* All rights reserved.
*
* This file is part of HYPRE (see ht... |
cpl_tools.c | /*
* This file is part of the ESO Common Pipeline Library
* Copyright (C) 2001-2017 European Southern Observatory
*
* This program 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 2 of the ... |
GB_subassign_01.c | //------------------------------------------------------------------------------
// GB_subassign_01: C(I,J) = scalar ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apa... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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)... |
GB_binop__bor_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
reduction.c | /* 3.13 Многопоточная программа редукции элементов
* массива Реализовать параллельную программу выполнения
* коллективной операции редукции для заданной
* ассоциативной операции. На вход программы подаётся
* операция и случайно сформированный массив a.
* Выходные данные программы –результат выполнения редукц... |
Example_threadprivate.2.c | /*
* @@name: threadprivate.2c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
*/
int increment_counter_2()
{
static int counter = 0;
#pragma omp threadprivate(counter)
counter++;
return(counter);
}
|
target_tiny.c | #include "omp.h"
#ifdef __cplusplus
extern "C" {
#endif
extern void __kmpc_barrier_simple_spmd(kmp_Ident *, int32_t);
#ifdef __cplusplus
}
#endif
int main(int argc, char **argv) {
int i = 0;
#pragma omp target
i = 1;
return 0;
}
|
GB_unop__identity_uint64_fp64.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_unop__identity_fc64_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... |
cancel-parallel-3.c | /* { dg-do run } */
/* { dg-set-target-env-var OMP_CANCELLATION "true" } */
#include <omp.h>
#include <unistd.h>
static inline void
do_some_work (void)
{
asm volatile ("" : : : "memory");
}
int
main ()
{
omp_set_dynamic (0);
omp_set_schedule (omp_sched_static, 1);
#pragma omp parallel num_threads (16)
{
... |
SphereSampler.h | #ifndef SPHERE_SAMPLER_INCLUDED
#define SPHERE_SAMPLER_INCLUDED
#include <vector>
#include <omp.h>
#include "../Util/Geometry.h"
#include "../SignalProcessing/CubeGrid.h"
#include "../SignalProcessing/SphericalGrid.h"
#include "../SignalProcessing/Fourier.h"
template< class Real >
void SampleSpheres( const CubeGrid<... |
DRB050-functionparameter-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... |
Pragma.h | //===- Pragma.h - Pragma registration and handling --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
ast-dump-openmp-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 distribute parallel for
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp distribute parallel for
for... |
omp_for_schedule_dynamic.c | <ompts:test>
<ompts:testdescription>Test which checks the dynamic option of the omp for schedule directive</ompts:testdescription>
<ompts:ompversion>2.0</ompts:ompversion>
<ompts:directive>omp for schedule(dynamic)</ompts:directive>
<ompts:dependences>omp flush,omp for nowait,omp critical,omp single</ompts:dependences>... |
fill_nr_3c.c | /* Copyright 2014-2018 The PySCF Developers. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless requi... |
VolumetricConvolutionMM.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/VolumetricConvolutionMM.c"
#else
static void inline THNN_(VolumetricConvolutionMM_shapeCheck)(
THNNState *state,
THTensor *input,
THTensor *gradOutput,
THTensor *... |
simulation.c | #include "minray.h"
SimulationResult run_simulation(Parameters P, SimulationData SD)
{
center_print("SIMULATION", 79);
border_print();
double k_eff = 1.0;
double k_eff_total_accumulator = 0.0;
double k_eff_sum_of_squares_accumulator = 0.0;
int is_active_region = 0;
uint64_t n_total_geometric_intersect... |
FGP_dTV_core.c | /*
* This work is part of the Core Imaging Library developed by
* Visual Analytics and Imaging System Group of the Science Technology
* Facilities Council, STFC
*
* Copyright 2019 Daniil Kazantsev
* Copyright 2019 Srikanth Nagella, Edoardo Pasca
*
* Licensed under the Apache License, Version 2.0 (the "License")... |
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... |
mutex.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
#include "callback.h"
#include <omp.h>
int main()
{
omp_lock_t lock;
printf("%" PRIu64 ": &lock: %lli\n", ompt_get_thread_data()->value, &lock);
omp_init_lock(&lock);
omp_set_lock(&lock);
omp_unset_lock(&lock);
omp_destroy_lock(&lock);
om... |
3d25pt_var.c | /*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* 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) >... |
mex_pewarpcost_regularised.c | #include <math.h>
#include "mex.h"
#include "blas.h"
#include "omp.h"
/* Eelke Visser, 2009 (eelke.visser@donders.ru.nl) */
/* #include <time.h> */
/* TODO: Is Ctrl-C from Matlab handled properly? */
void getDef(
float *def,
mwSignedIndex *dims,
mwSignedIndex nbx,
float *bx,
mwSi... |
GB_unaryop__ainv_uint8_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... |
qleftright.c | /*
A simple 2D hydro code
(C) Romain Teyssier : CEA/IRFU -- original F90 code
(C) Pierre-Francois Lavallee : IDRIS -- original F90 code
(C) Guillaume Colin de Verdiere : CEA/DAM -- for the C version
*/
/*
This software is governed by the CeCILL license under French law and
abiding by the rules o... |
timer.h | // vim: set ts=2 sw=2 expandtab:
#ifndef INCLUDED_TIMER_H
#define INCLUDED_TIMER_H
#include <vector>
#include <string>
#include <algorithm>
#ifdef USE_PAPI
#include <papi.h>
#endif
#include <util/omp_wrapper.h>
#include <util/time_cps.h>
#include <util/verbose.h>
CPS_START_NAMESPACE
inline double& getStartTime() {... |
DMD5_fmt_plug.c | /*
* DMD5_fmt.c
*
* DIGEST-MD5 authentication module for Solar Designer's John the Ripper
* Uses Solar Designer's MD5 implementation.
*
* This software is Copyright 2006, regenrecht@o2.pl, and
* Copyright 2011, 2013 magnum, and it is hereby released to the general
* public under the following terms: Redistribu... |
SpatialConvolutionMap.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialConvolutionMap.c"
#else
static int nn_(SpatialConvolutionMap_updateOutput)(lua_State *L)
{
THTensor *input = luaT_checkudata(L, 2, torch_Tensor);
int kW = luaT_getfieldcheckint(L, 1, "kW");
int kH = luaT_getfieldcheckint(L, 1, "kH");
int dW = luaT_... |
1.race1.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
|
looptripcnt.c | // RUN: %libomptarget-compile-generic && env LIBOMPTARGET_DEBUG=1 %libomptarget-run-generic 2>&1 | %fcheck-generic -allow-empty -check-prefix=DEBUG
// REQUIRES: libomptarget-debug
/*
Test for looptripcount being popped from runtime stack.
*/
#include <stdio.h>
#include <omp.h>
int main()
{
int N = 128;
int NN = ... |
seq_multivector.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)
**************************************... |
stationary_cython.c | /* Generated by Cython 0.29.21 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython... |
GB_unop__one_uint32_uint32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
graph.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "base.h"
#include "graph.h"
#include "csf.h"
#include "sort.h"
#include "util.h"
#ifdef SPLATT_USE_PATOH
#include <patoh.h>
#endif
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.