source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
kacz_analyze_print.c | #include "ghost/sparsemat.h"
#include "ghost/omp.h"
ghost_error kacz_analyze_print(ghost_sparsemat *mat)
{
ghost_lidx line_size = 12;
ghost_lidx n_lines = mat->context->kacz_setting.active_threads / line_size;
ghost_lidx rem_lines = mat->context->kacz_setting.active_threads % line_size;
int start=0 ;
int end=0;
... |
mpm_search_element_utility.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ \.
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Bodhinanda Chandra
//
#ifndef KRATOS_MPM... |
class_xDMRG_functor.h | //
// Created by david on 2018-10-19.
//
#ifndef DMRG_CLASS_XDMRG_FUNCTOR_H
#define DMRG_CLASS_XDMRG_FUNCTOR_H
#include <Eigen/Core>
#include <Eigen/Dense>
#include <iostream>
#include <iomanip>
#include <complex>
#include <spdlog/spdlog.h>
template<typename Scalar>
class class_xDMRG_functor {
private:
double vari... |
evolve.h | //
// Created by Giuliano Iorio on 2020-12-26.
//
#ifndef SEVN_EVOLVE_H
#define SEVN_EVOLVE_H
#include <star.h>
#include <binstar.h>
#include <IO.h>
#include <vector>
#include <omp.h>
#include <random>
#include <errhand.h>
#include <sevnlog.h>
using sevnstd::SevnLogging;
//TODO With the new functor implementation, ... |
nvptx_va_arg_delayed_diags.c | // RUN: %clang_cc1 -fopenmp -x c -triple i386-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda -emit-llvm-bc %s -o %t-x86-host.bc
// RUN: %clang_cc1 -verify -fopenmp -x c -triple nvptx-unknown-unknown -fopenmp-targets=nvptx-nvidia-cuda %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-x86-host.bc -fsyntax-only
// R... |
path.c | #include "path.h"
#include "linmath_d.h"
#include "obj_parser.h"
#include "color.h"
#include "display.h"
#include <sys/mman.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <float.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <unistd.... |
symm_c_coo_u_hi_row_conj.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#define CACHELINE 64
alphasparse_status_t
ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ldy)
{
ALPHA_INT m = mat... |
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)
#... |
ex03.c | /* Copyright (c) 2019 CSC Training */
/* Copyright (c) 2021 ENCCS */
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int main()
{
int num_devices = omp_get_num_devices();
printf("Number of available devices %d\n", num_devices);
#pragma omp target
{
if (omp_is_initial_device()) {
pri... |
GrB_UnaryOp_wait.c | //------------------------------------------------------------------------------
// GrB_UnaryOp_wait: wait for a user-defined GrB_UnaryOp to complete
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-... |
dpbtrs.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/compute/zpbtrs.c, normal z -> d, Fri Sep 28 17:38:09 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
rose_output_dep3.c | // an example of output dependence preventing parallelization
// two level loops, check carry level value
#include <stdio.h>
#include "omp.h"
void foo()
{
int i;
int j;
int x;
int y;
#pragma omp parallel for private (y,i,j)
for (i = 0; i <= 99; i += 1) {
#pragma omp parallel for private (y,j) lastp... |
DRB104-nowait-barrier-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... |
explicit_strategy.h | /*
==============================================================================
KratosStructuralApplication
A library based on:
Kratos
A General Purpose Software for Multi-Physics Finite Element Analysis
Version 1.0 (Released on march 05, 2007).
Copyright 2007
Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Felix... |
5311.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])... |
remarks_parallel_in_multiple_target_state_machines.c | // RUN: %clang_cc1 -verify=host -Rpass=openmp-opt -Rpass-analysis=openmp-opt -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
// RUN: %clang_cc1 -verify=all,safe -Rpass=openmp... |
gather.c | // create a list of 64 numbers, and only sum the even ones
#include <stdio.h>
#include <stdlib.h>
#define N 32000
int main() {
srand(time(NULL));
float *numbers = malloc(sizeof(float)*N);
int *mask = malloc(sizeof(int)*N);
// Init the numbers
for (int i = 0; i<N; i++) numbers[i] = rand() % 10... |
fci_4pdm.c | /*
*
*/
#include <stdlib.h>
#include <string.h>
#include <assert.h>
//#include <omp.h>
#include "config.h"
#include "vhf/fblas.h"
#include "fci.h"
#define MIN(X,Y) ((X)<(Y)?(X):(Y))
#define BLK 48
#define BUFBASE 96
double FCI_t1ci_sf(double *ci0, double *t1, int bcount,
int stra_id, i... |
omp_parallel_for_ordered.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
static int last_i = 0;
int i;
#pragma omp threadprivate(i)
/* Variable ii is used to avoid problems with a threadprivate variable used as a loop
* index. See test omp_threadprivate_for.
*/
static int ii;
#pragma omp threadprivate(ii)
/*... |
re_model_template.h | /*!
* This file is part of GPBoost a C++ library for combining
* boosting with Gaussian process and mixed effects models
*
* Copyright (c) 2020 Fabio Sigrist. All rights reserved.
*
* Licensed under the Apache License Version 2.0. See LICENSE file in the project root for license information.
*/
#ifndef GPB_RE_MODEL_TEM... |
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.
//
//===-------------------------------------------------------... |
txinvr.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB SP code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
GB_unaryop__lnot_fp64_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
libimagequant.c | /*
** © 2009-2016 by Kornel Lesiński.
**
** This file is part of libimagequant.
**
** libimagequant 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 option) any... |
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)
#... |
test1.c | void bar(int py) {
#pragma omp parallel
{
printf("%d", py);
}
}
void foo(void) {
#pragma omp parallel
{
int x;
x = 100000;
}
int xyp = 10;
int z;
return;
}
int main() {
foo();
bar();
int y;
#pragma omp parallel
{
// void (* fptr)();
// fptr = bar;
// fptr();
0;
if (1) {
2;
if (3) {
4;... |
chesv.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/compute/zhesv.c, normal z -> c, Fri Sep 28 17:38:07 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#incl... |
strip_fmt_plug.c | /* STRIP cracker patch for JtR. 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 in source ... |
GB_binop__lxor_int32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
fib.c | #include <stdio.h>
#define N 42
long fib(long n)
{
long i, j;
if (n < 2)
{
return n;
}
else if (n < 30)
{
return fib(n - 1) + fib(n - 2);
}
else
{
#pragma omp parallel sections
{
#pragma omp section
i = fib(n - 1); ... |
poisson2D.c | /*******************************************************************
*** poisson2D: Numerical solution of the Poisson PDE in 2D.
***
*** Solver function and iterators.
***
*** Author: Nikos Tryfonidis, December 2015
*** The MIT License (MIT)
*** Copyright (c) 2015 Nikos Tryfonidis
*** See LICENSE.txt
***... |
crypt-sha1_fmt_plug.c | /*
* This file is based on the "cryptsha512_fmt_plug.c" file.
*
* This software is Copyright (c) 2014 Dhiru Kholia, 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.
*
* Enhanced cod... |
thd_info.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "thd_info.h"
/******************************************************************************
* PRIVATE FUNCTIONS
********************... |
GB_unaryop__abs_int32_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... |
ligra.h | // This code is part of the project "Ligra: A Lightweight Graph Processing
// Framework for Shared Memory", presented at Principles and Practice of
// Parallel Programming, 2013.
// Copyright (c) 2013 Julian Shun and Guy Blelloch
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of ... |
DenseVector.h | //=================================================================================================
/*!
// \file blaze/math/smp/openmp/DenseVector.h
// \brief Header file for the OpenMP-based dense vector SMP implementation
//
// Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
//
// This file is part of th... |
prepress.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
ordered_doacross_codegen.c | // RUN: %clang_cc1 -no-opaque-pointers -verify -fopenmp -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s --check-prefixes=CHECK,CHECK-NORMAL
// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -triple x86_64-unknown-unknown -emit-pch -o %t %s
// RUN: %clang_cc1 -no-opaque-pointers -fopenmp -triple x86_64-un... |
kernels.h | void mr32_sf(
const uint32_t *__restrict__ bases,
const uint32_t *__restrict__ n32,
int *__restrict__ val,
int iter)
{
#pragma omp target teams distribute parallel for thread_limit(256)
for (int j = 0; j < iter; j++) {
int n = n32[j];
for (int cnt = 1; cnt <= BASES_CNT32; cnt++) {
#pragma omp ... |
path_congestion.h | /*
* PathCongestion.h
*
* Created on: Mar 24, 2016
* Author: Steffen Rechner <steffen.rechner@informatik.uni-halle.de>
*
* This file is part of the marathon software.
*
* Copyright (c) 2016, Steffen Rechner
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and a... |
rt.c |
/******************************************************************************
* PIHM-RT is a finite volume based, reactive transport module that operate
* on top of the hydrological processes described by PIHM. PIHM-RT track the
* transportation and reaction in a given watershed. PIHM-RT uses operator
* splittin... |
GB_unaryop__lnot_bool_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... |
delete_inf_refcount.c | // RUN: %libomptarget-compile-run-and-check-generic
// fails with error message 'Unable to generate target entries' on amdgcn
// XFAIL: amdgcn-amd-amdhsa
// XFAIL: amdgcn-amd-amdhsa-newRTL
#include <stdio.h>
#include <omp.h>
#pragma omp declare target
int isHost;
#pragma omp end declare target
int main(void) {
is... |
Example_psections.1.c | /*
* @@name: psections.1c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
*/
void XAXIS();
void YAXIS();
void ZAXIS();
void sect_example()
{
#pragma omp parallel sections
{
#pragma omp section
XAXIS();
#pragma omp section
YAXIS();
#pragma omp section
ZAXIS();
... |
field_utility.h | #ifndef KRATOS_FIELD_UTILITY_H
#define KRATOS_FIELD_UTILITY_H
// /* External includes */
// System includes
// Project includes
#include "includes/variables.h"
/* System includes */
#include <limits>
#include <iostream>
#include <iomanip>
/* External includes */
#ifdef _OPENMP
#include <omp.h>
#endif
/* Project in... |
tinyexr.h | /*
Copyright (c) 2014 - 2019, Syoyo Fujita and many contributors.
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 l... |
saxpy.c | /* Copyright 2013. The Regents of the University of California.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2013 Martin Uecker <uecker@eecs.berkeley.edu>
*/
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h... |
omp_detach_taskwait.c | // RUN: %libomp-compile -fopenmp-version=50 && env OMP_NUM_THREADS='3' %libomp-run
// RUN: %libomp-compile -fopenmp-version=50 && env OMP_NUM_THREADS='1' %libomp-run
// Checked gcc 9.2 still does not support detach clause on task construct.
// UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9
// clang supports det... |
multiply_matrix.c |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <mpi/mpi.h>
#include <omp.h>
#include "matrix.h"
#define MAXLEN 1024
#define OUT 0
//#define NO_MAT_FILE
void get_file_paths(char* A_path, char* B_path, char* C_path, char** argv);
bool is_input_matrixes_invalid(struct Matrix* A, struct Matrix* B);... |
perturbations.c | /** @file perturbations.c Documented perturbation module
*
* Julien Lesgourgues, 23.09.2010
*
* Deals with the perturbation evolution.
* This mdule has two purposes:
*
* - at the beginning, to initialize the perturbations, i.e. to
* integrate the perturbation equations, and store temporarily the terms
* contri... |
Array2D.h | //
// Array2D.h
// Copyright (c) 2016 Pixel Grammar, LLC
// author: Douglas Creel
//
#ifndef ARRAY2D_H
#define ARRAY2D_H
#include <cassert>
#include <iostream>
#include <omp.h>
template <typename T>
class Array2D
{
public:
Array2D()
{
}
~Array2D()
{
}
void init(int w, int h, T va... |
task.c | #include <stdlib.h>
#include <stdio.h>
#include "omp.h"
#pragma omp requires unified_shared_memory
#include "../utilities/check.h"
#define PRINT(_args...)
//#define PRINT(_args...) printf(_args)
#define N 64
#define TRY_TASK 1
#define TASK_COMPUTE 1
#define OFF 1
#define T1 1
#define T1 1
#define T2 1
#define... |
GB_unaryop__abs_uint16_int8.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_unop__identity_int32_int16.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... |
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
... |
convolution_pack4to1.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 ... |
coloring_barenboim.h | #ifndef COLORING_BARENBOIM_H_
#define COLORING_BARENBOIM_H_
#include "coloring_common_barenboim_elkin.h"
namespace GMS::Coloring {
template <class CGraph>
std::size_t one_shot_coloring(const CGraph &g, const VN &nodes_to_color, VC &coloring, VVC &palettes, VRS selectors,
VC &chosen_colo... |
zip_fmt_plug.c | /*
* ZIP cracker patch for JtR. Hacked together during June of 2011
* by Dhiru Kholia <dhiru.kholia at gmail.com> for GSoC.
*
* This software is Copyright (c) 2011, Dhiru Kholia <dhiru.kholia at gmail.com>,
* and it is hereby released to the general public under the following terms:
* Redistribution and use in so... |
taskloop_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -t... |
shortcut_layer.c | #include "shortcut_layer.h"
#include "convolutional_layer.h"
#include "dark_cuda.h"
#include "blas.h"
#include "utils.h"
#include "gemm.h"
#include <stdio.h>
#include <assert.h>
layer make_shortcut_layer(int batch, int n, int *input_layers, int* input_sizes, int w, int h, int c,
float **layers_output, float **laye... |
LinkedCellsReferences.h | /**
* @file LinkedCells.h
* @date 05.04.2020
* @author lunaticcoding
*/
#pragma once
#include "autopas/cells/ReferenceParticleCell.h"
#include "autopas/containers/CellBasedParticleContainer.h"
#include "autopas/containers/CellBlock3D.h"
#include "autopas/containers/CompatibleTraversals.h"
#include "autopas/contai... |
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... |
convolution_3x3_int8.h | // BUG1989 is pleased to support the open source community by supporting ncnn available.
//
// Copyright (C) 2019 BUG1989. All rights reserved.
// 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
/... |
image.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
naive_bayes.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <memory.h>
#include <sys/time.h>
#define REAL double
#define EPSILON 0.000001
#define MICRO_IN_SEC 1000000.00
__declspec(target(mic)) double begin, end;
__declspec(target(mic))
double microtime(){
int tv_sec,tv_u... |
inputOrphanedFor.c | /*************************************************
orphaned 'omp for' (in a function separated from its caller 'omp parallel')
**************************************************/
#include <stdio.h>
#ifdef _OPENMP
#include "omp.h"
#endif
void foo(void);
static long num_steps=10000000;
double step;
int main()
{
step=... |
ninvr.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB SP code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
3045.c | /* POLYBENCH/GPU-OPENMP
*
* This file is a part of the Polybench/GPU-OpenMP suite
*
* Contact:
* William Killian <killian@udel.edu>
*
* Copyright 2013, The University of Delaware
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
/* Include polybench common header. */
#include <po... |
GB_unop__ainv_int32_int32.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... |
comm.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 ... |
mypaint-tiled-surface.c | /* libmypaint - The MyPaint Brush Library
* Copyright (C) 2007-2014 Martin Renold <martinxyz@gmx.ch> et. al.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in ... |
openmp.c | /*
* Copyright (c) 2003, 2007-8 Matteo Frigo
* Copyright (c) 2003, 2007-8 Massachusetts Institute of Technology
*
* 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 Li... |
MPC_SHA256_VERIFIER.c | /*
============================================================================
Name : MPC_SHA256_VERIFIER.c
Author : Sobuno
Version : 0.1
Description : Verifies a proof for SHA-256 generated by MPC_SHA256.c
============================================================================
*/
#include... |
3d25pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted fr... |
data.c | #include "data.h"
#include "utils.h"
#include "image.h"
#include "opencl.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
#define class temp
#define new new_temp
list *get_paths(char *filename)
{
if (filename) filename[strcspn(filename, "\n\r")] = 0... |
gesummv.c | /**
* gesummv.c: This file was adapted from PolyBench/GPU 1.0 test
* suite to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardoso@students... |
compression.h | #pragma once
#include <cassert>
#include <vector>
#include <memory>
#include <unordered_map>
#include <cuda_runtime.h>
namespace compression
{
template<typename TOut, typename TIn>
void cast(TOut* dst, const TIn* src, ptrdiff_t numel)
{
#pragma omp parallel for
for (ptrdiff_t i = 0; i < numel; ++i... |
sc_demo.c | /* main.c
* Created by Mengyao Zhao on 06/23/11.
* Version 0.1.5
* Last revision by Mengyao Zhao on 06/27/14.
*/
#include <stdlib.h>
#include <stdint.h>
#include <emmintrin.h>
#include <zlib.h>
#include <stdio.h>
#include <time.h>
#include <sys/time.h>
#include <string.h>
#include <math.h>
#include <unistd.h>
#... |
private-clauseModificado3.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main()
{
int i, n = 7;
int a[n], suma;
for (i=0; i<n; i++)
a[i] = i;
#pragma omp parallel
{
suma=0;
#pragma omp for
for (i=0; i<n; i++)
{
suma = suma + a[i];
printf("thread %d suma a[%d] / ", omp_get_thread_num(),... |
motivate_matmul.c | /* gcc -std=c89 -fopenmp -Wall -O3 motivate_matmul.c -o motivate_matmul */
/* C89 to keep OpenMPC happy. */
/* To run: ./motivate_matmul $MATRIX_DIMENSION */
#include <stdlib.h>
#include <assert.h>
typedef float TYPE;
static void fill(TYPE *matrix, int size, TYPE val)
{
int loop;
for (loop = 0; loop < size; lo... |
main.c | /* Copyright (C) 2010 The Trustees of Indiana University. */
/* */
/* Use, modification and distribution is subject to the Boost Software */
/* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */
/* http:... |
openmp-ex04.c | #include <stdio.h>
#include <unistd.h>
#include <omp.h>
int main(void)
{
int num_threads, my_thread;
num_threads = omp_get_num_threads();
my_thread = omp_get_thread_num();
printf ("\"You're all individuals!\" said %d of %d.\n", my_thread, num_threads);
#pragma omp parallel
{
num_threads = omp_get_num... |
154.c | #include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#define L 200000
#define P2 199983
#define P3 49987
unsigned long p(unsigned long n, unsigned long d) {
unsigned long div = d;
unsigned long ret = 0;
while (div <= n) {
ret += n / div;
div *= d;
}
return ret;
}
unsigned lo... |
array.c | /*
* R : A Computer Language for Statistical Data Analysis
* Copyright (C) 1998-2017 The R Core Team
* Copyright (C) 2002-2015 The R Foundation
* Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of th... |
mandelbrot.c | /*
To compile:
gcc -O3 -o mandelbrot mandelbrot.c png_util.c -I. -lpng -lm -fopenmp
Or just type:
module load gcc
make
To create an image with 4096 x 4096 pixels (last argument will be used to set number of threads):
./mandelbrot 4096 4096 1
*/
#include <math.h>
#include <stdio.h>
#include <stdlib... |
3.how_many.c | #include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
/* If the OMP_NUM_THREADS variable is set to 8 with */
/* export OMP_NUM_THREADS=8 */
/* Q1: How many "Hello world ..." lines are printed on the screen? */
/* Q2: If the if(0)}... |
ten_tusscher_2004_epi_S1.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S1.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO: th... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
SingletonHolder.h | /**
* Copyright (C) 2007-2011 YU Zhi. All rights reserved.
* $Id$
* @file singleton_holder.h
*
* created on: 2008-04-16
* Author: salmon
*/
#ifndef INCLUDE_SINGLETON_HOLDER_H_
#define INCLUDE_SINGLETON_HOLDER_H_
namespace simpla {
/** @ingroup design_pattern
*
* @addtogroup singleton Singleton
* @{
*... |
jacobi.c | #include "smoothers.h"
#include <stdio.h>
#include <math.h>
//void jacobi( GRID &u, GRID &f, GRID &tmp, int nu ) {
long long int jacobi( GRID &u, GRID &f, GRID &tmp, int nu ) {
int N = u.n;
int lda = u.lda;
int lda2 = u.lda * u.lda;
double hh = u.h*u.h;
double invhh = 1.0 / hh;
double DinvXomega = hh/6.0 *... |
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)
**************************************... |
dropout-inl.h | /*!
* Copyright (c) 2015 by Contributors
* \file dropout-inl.h
* \brief
* \author Bing Xu
*/
#ifndef MXNET_OPERATOR_DROPOUT_INL_H_
#define MXNET_OPERATOR_DROPOUT_INL_H_
#include <dmlc/logging.h>
#include <dmlc/parameter.h>
#include <mxnet/operator.h>
#include <map>
#include <vector>
#include <string>
#include <uti... |
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... |
TEST_OPENMP_NEW.c | #include <omp.h>
//include <omp.h>
#include "CORAL_lulesh_2.0.3_mk.h"
void initialize_array_randomly(int *mat,int n,int max_value)
{
for (int i = 0; i < n; i++) {
mat[i] = rand() % max_value;
}
}
void initialize_array_sequentialy(int *mat,int n)
{
#pragma omp parallel default(none) shared(n,mat)
{
#pr... |
rose_true_l2.c | /*
* Outer loop: no dependence:
* Inner loop: loop-carried dependence
*
* final dependence graph:
* dep SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) + 1);
* SgExprStatement:(a[i])[j] =(((a[i])[j - 1]) + 1);
* 2*2TRUE_DEP; commonlevel = 2 +precise CarryLevel = 1
* SgPntrArrRefExp:(a[i])[j]
* SgP... |
evapfr.c | #include<stdio.h>
#include "gdal.h"
#include<omp.h>
void usage()
{
printf( "-----------------------------------------\n");
printf( "--Modis Processing chain--Serial code----\n");
printf( "-----------------------------------------\n");
printf( "./ndvi inET inPET inQA\n");
printf( "\toutEVAPFR\n");
printf( "------... |
constant_density_acoustic_time_scalar_1D_4.h | #ifndef __CDA_TIME_SCALAR_1D_4__
#define __CDA_TIME_SCALAR_1D_4__
#include <stdlib.h>
template< typename T, int ACCURACY >
void cda_time_scalar_1D_4( T* km1_u, int nr_km1_u, int nc_km1_u, // in - padded wavefield shape
T* k_Phiz, int nr_k_Phiz, int nc_k_Phiz, // in - padde... |
JointWMF.h |
/***************************************************************/
/*
* Distribution code Version 1.1 -- 09/21/2014 by Qi Zhang Copyright 2014, The Chinese University of Hong Kong.
*
* The Code is created based on the method described in the following paper
* [1] "100+ Times Faster Weighted Median Filter"... |
openmp.c | #include <omp.h>
#include <stdio.h>
#include <unistd.h>
// kompilacja: gcc -fopenmp openmp.c -o openmp_demo
// uruchomienie (4 wątki): env OMP_NUM_THREADS=4 ./openmp_demo
int main (int argc, char *argv[]) {
int ilosc_watkow = -22, numer_watka = -33;
// od tego miejsca kod będzie zrównoleglany ...
// default(none) w... |
adi.c | //-------------------------------------------------------------------------//
// //
// This benchmark is a serial C version of the NPB SP code. This C //
// version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.