source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
cubemap.h | #pragma once
#include <string>
#include "locator.h"
#include "device.h"
#include "command.h"
#include "create.h"
#include "image.h"
class CubeMap : public Image {
public:
CubeMap(std::string filename) {
createImage(filename);
createImageView();
createSampler();
... |
api.c | // RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu
// RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu
#include <stdio.h>
#include <omp.h>
// -------... |
SystemMatrix.h |
/*****************************************************************************
*
* Copyright (c) 2003-2018 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development unt... |
GB_binop__bor_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
DRB093-doall2-collapse-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... |
paint.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
task_codegen.c | // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -x c -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
// RUN: %cl... |
matfuncs.c | #include "matrix.h"
/** \brief Computes addition function
*
* \param[in] x
* \param[in] y
* \return \f$ x+y \f$
*
*/
mtype __mat_addfunc(mtype x, mtype y)
{
return (x+y);
}
/** \brief Computes subtraction function
*
* \param[in] x
* \param[in] y
* \return \f$ x-y \f$
*
*/
mtype __mat_subfunc(mtype ... |
GB_binop__lxor_bool.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
DRACC_OMP_025_MxV_Partially_Missing_Enter_Data_yes.c | /*
Matrix Vector multiplication with partially Matrix missing on Accelerator. Using the target enter data construct.
*/
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#define C 512
int *a;
int *b;
int *c;
int init(){
for(int i=0; i<C; i++){
for(int j=0; j<C; j++){
b[j+i*C]=1;
... |
linear-1.c | /* { dg-do compile } */
/* { dg-options "-fopenmp" } */
int i;
#pragma omp declare simd linear (val (x) : 1) linear (y : 2)
int bar (int x, int y, int z);
void
foo (int x, int y)
{
#pragma omp simd linear (i: 3)
for (i = 0; i < 33; i += 3)
;
#pragma omp simd linear (val (i): 3) /* { dg-error "modifier sho... |
statistic.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__identity_uint64_int64.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... |
compressor_zfp.h | /**
* Copyright 2019 The Gamma Authors.
*
* This source code is licensed under the Apache License, Version 2.0 license
* found in the LICENSE file in the root directory of this source tree.
*/
#pragma once
#ifdef WITH_ZFP
#include <limits.h>
#include <math.h>
#include <omp.h>
#include "compressor.h"
#include "... |
Parallel.c | /** This Program uses Parallel construct clause variables like Private, firstprivate, shared, default, copyin and Reduction.
* Sai Suraj
* 07/09/2021
**/
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int a = 12345;
#pragma omp threadprivate(a)
int main(int argc, char* argv[])
{
omp_set_num_thr... |
Vector.h | /*
* Vector.h
*
* Created on: 12.03.2014
* Author: Michael Wegner (michael.wegner@student.kit.edu)
*/
#ifndef VECTOR_H_
#define VECTOR_H_
#include <vector>
#include "../Globals.h"
namespace NetworKit {
// forward declaration of Matrix class
class Matrix;
/**
* @ingroup algebraic
* The Vector class rep... |
segment.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
resize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
test.c |
#include <stdio.h>
#include <float.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (957*3)
#define ZERO(X) ZERO_ARRAY(N, X)
#define INIT() { \
INIT_LOOP(N, { \
Ac[i] = i % 100 == 0 ? 1 : 0; \
Bc[i] = i ... |
qutil.h | //
// Copyright 2018 The Simons Foundation, Inc. - All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... |
backward_binary_reduce_impl.h | /*!
* Copyright (c) 2019 by Contributors
* \file kernel/cuda/backward_binary_reduce_impl.h
* \brief Minigun CPU UDFs for bacward binary reduce
*/
#ifndef DGL_KERNEL_CPU_BACKWARD_BINARY_REDUCE_IMPL_H_
#define DGL_KERNEL_CPU_BACKWARD_BINARY_REDUCE_IMPL_H_
#include <minigun/minigun.h>
#include <dgl/immutable_graph.h... |
hello.c |
// OpenMP program to print Hello World
// using C language
// OpenMP header
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[])
{
// Beginning of parallel region
#pragma omp parallel
{
printf("Hello World... from thread = %d\n",
omp_get_... |
omp_taskloop_grainsize.c | // RUN: %libomp-compile-and-run
// RUN: %libomp-compile && env KMP_TASKLOOP_MIN_TASKS=1 %libomp-run
// These compilers don't support the taskloop construct
// UNSUPPORTED: gcc-4, gcc-5, icc-16
// GCC 6 has support for taskloops, but at least 6.3.0 is crashing on this test
// UNSUPPORTED: gcc-6
/*
* Test for taskloop... |
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... |
test_verify.c | #include "config.h"
#include <limits.h>
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include "kseq.h"
KSEQ_INIT(int, read)
#include "parasail.h"
#include "parasail/cpuid.h"
#include "parasail/memory.h"
#in... |
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] = 1; D[i] = i; E[i] = -i;})
#define ZERO(X) ZERO_ARRAY(N, X)
int main(void) {
check_offloading... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
dynamic_module.c | // RUN: %libomptarget-compile-aarch64-unknown-linux-gnu -DSHARED -fPIC -shared -o %t.so && %libomptarget-compile-aarch64-unknown-linux-gnu %t.so && %libomptarget-run-aarch64-unknown-linux-gnu 2>&1 | %fcheck-aarch64-unknown-linux-gnu
// RUN: %libomptarget-compile-powerpc64-ibm-linux-gnu -DSHARED -fPIC -shared -o %t.so &... |
GB_select_phase2.c | //------------------------------------------------------------------------------
// GB_select_phase2: C=select(A,thunk)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0... |
GB_unop__identity_int32_bool.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
GB_binop__bget_int8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
rose_jacobi.c | #include <stdio.h>
#include <math.h>
#include <assert.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif
// Add timing support
#include <sys/time.h>
double time_stamp()
{
struct timeval t;
double time;
gettimeofday(&t,((void *)0));
time = t . tv_sec + 1.0e-6 * t . tv_usec;
return time;
}
double ti... |
main.c | /*****************************************************************************
* This program allows the reverberation time of a venue to be determined
* blindly, using a sample of music or speech that is recorded in the venue
* C implementation of Paul Kendrick's Matlab algorithm:
*
* Kendrick, Paul, et al. "Blind est... |
polarity.c | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#include <mpi.h>
#include "parmt_polarity.h"
#ifdef PARMT_USE_INTEL
#include <mkl_cblas.h>
#else
#include <cblas.h>
#endif
#include "ttimes.h"
#include "iscl/array/array.h"
#include "iscl/geodetic/geodetic.h"
#include "isc... |
ScatterHelper.h | /*******************************************************************************
* Copyright (c) 2015-2018 Skymind, Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
* https://www.apache.org/licenses/LICENSE-2.0.
*
*... |
csr5_spmv_avx512.h | #ifndef CSR5_SPMV_AVX512_H
#define CSR5_SPMV_AVX512_H
#include "common_avx512.h"
#include "utils_avx512.h"
template<typename iT, typename vT>
void partition_fast_track(const vT *d_value_partition,
const vT *d_x,
const iT *... |
DiagonalPreconditioner.h | /*
* DiagonalPreconditioner.h
*
* Created on: Apr 23, 2016
* Author: Michael Wegner (michael.wegner@student.kit.edu)
*/
#ifndef NETWORKIT_CPP_NUMERICS_PRECONDITIONER_DIAGONALPRECONDITIONER_H_
#define NETWORKIT_CPP_NUMERICS_PRECONDITIONER_DIAGONALPRECONDITIONER_H_
#include "../../algebraic/CSRMatrix.h"
nam... |
md5.h | /*
Header untuk melakukan hashing menggunakan metode MD5.
Sumber: https://github.com/pod32g/MD5/blob/master/md5.c
Dilakukan sedikit modifikasi sehingga tidak memerlukan
header <stdint.h>
*/
#ifndef MD5
#define MD5
#include <stdlib.h>
#include "parallel_string.h"
#include <omp.h>
// Constants are the integer part of t... |
test3.c | int main() {
int x;
#pragma omp parallel
{
0;
int p;
if (1) {
2;
if (3) {
#pragma omp atomic write
x = 0;
4;
#pragma omp barrier
5;
} else {
6;
#pragma omp barrier
7;
}
8;
} else {
9;
if (10) {
11;
#pragma omp barrier
12;
} else {
13;
#pragma omp atomic ... |
map_reduce_task.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
#pragma once
#include <omp.h>
#include "pointers/pointer.h"
#include "tasks/task.h"
namespace flash {
template<class InType, class OutType>
class MapTask : public BaseTask {
typedef std::function<OutType(const InT... |
DRB070-simd1-orig-no.c | /*
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it andor
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the L... |
twoRegions.c | int N=100;
int b[100],c[100];
int j;
void foo()
{
#pragma omp parallel for shared(b) firstprivate(c)
for (j=0; j<N; j++)
{
b[j] = c[j];
}
#pragma omp parallel for shared(b) firstprivate(c)
for (j=0; j<N; j++)
{
b[j] = c[j];
}
}
|
cg.c | /*--------------------------------------------------------------------
NAS Parallel Benchmarks 2.3 OpenMP C versions - CG
This benchmark is an OpenMP C version of the NPB CG code.
The OpenMP C versions are developed by RWCP and derived from the serial
Fortran versions in "NPB 2.3-serial" developed by NAS... |
GB_binop__pow_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... |
elastic.h | #ifndef ELASTIC
#define ELASTIC
#include "mesh.h"
#include "math.h"
using namespace Eigen;
using namespace std;
typedef Eigen::Triplet<double> Trip;
class Elastic
{
protected:
double muscle_fibre_mag = 1.5e6;
double rho = 6.4;
VectorXd sW1, sW2, sW3, sW4, sW5, sW6, muscle_forces, elastic_forces;
std::vector<i... |
GB_unaryop__identity_fp64_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
monolithic_pass.c | #include <stdio.h>
#include <stdbool.h>
#include <omp.h>
int mono_main() {
setvbuf(stdout, NULL, _IONBF, 0);
// struct Point {
// int x;
// int y;
// };
//
// struct Point p1 = {0, 0};
// struct Point p2 = p1;
// printf("%d %d\n", p1.x, p2.x);
// p1.x = 29;
// printf("%d %d\n", p1.x, p2.x);
... |
Calculate_AOs_fit.c | #include "num_of_threads.h"
#include<omp.h>
#include"utils.h"
#include"structs.h"
#include"matrix_ops.h"
#include"globals.h"
void Calculate_AOs_fit(int *tlist,double *vlist,int nfac,int nvert,double *angles,AOstruct *AOs,double *offset,double *D,int dm,int dn,double *Weight,double *scale,double *FT,double *FTdv,double... |
facorialSum.c | #include <stdio.h>
#include <omp.h>
int factorial(int n){
int f = 1, i;
#pragma omp parallel for reduction(*:f)
for(i = 1; i <= n; i++){
f *= i;
}
return f;
}
int main(){
int n, i, sum = 1;
omp_set_dynamic(0);
printf("Enter the value of N = ");
... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
simplepipe.c | #include <stdlib.h>
#include <sys/time.h>
#include <stdio.h>
#include <math.h>
#if OMP == 1
#include <omp.h>
#endif
#ifndef _N_
#define _N_ 8192000
#endif
#ifndef HOST_MEM_ALIGNMENT
#define HOST_MEM_ALIGNMENT 1
#endif
#if HOST_MEM_ALIGNMENT == 1
#define AOCL_ALIGNMENT 64
#endif
int N = _N_;
double my_timer ()
{
... |
3d25pt.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tar... |
bt.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB BT code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
kmeans_h2o4gpu.h | /*!
* Copyright 2017 H2O.ai, Inc.
* License Apache License Version 2.0 (see LICENSE for details)
*/
#pragma once
#include <thrust/device_vector.h>
#include <thrust/host_vector.h>
#include <thrust/functional.h>
#include "kmeans_labels.h"
#include "kmeans_centroids.h"
template<typename T>
struct count_functor {
T... |
ttaskloop.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h> /* OpenMP */
long result=0;
void foo() {
#pragma omp parallel
#pragma omp single
{
int argum = 0;
#pragma omp task shared(result) firstprivate(argum)
for (long i = 0; i < 10; i++) {
#pragma omp atomic
result++;
}
argum++;
... |
EmbeddingBag.h | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
convolution_3x3.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
main.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
int slow_function_with_mp() {
double stuff[1000];
long i;
#pragma omp parallel for private(i) shared(stuff)
for (i=0; i<9999999; i++) {
stuff[i % 1000] = sin(i*i);
}
}
void main(int argc, char **argv) {
double start, end;
int ... |
GB_unop__expm1_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
otfft_sixstepns.h | /******************************************************************************
* OTFFT Sixstep of Normalized Square Version 6.5
*
* Copyright (c) 2015 OK Ojisan(Takuya OKAHISA)
* Released under the MIT license
* http://opensource.org/licenses/mit-license.php
********************************************************... |
GB_unop__identity_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
GB_unaryop__lnot_int16_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... |
type_conversions.h | /*
* This set of methods provides dataType conversions in all possible directions supported:
* FP8, FP16, FLOAT, DOUBLE, INT8, UINT8, UINT16,
*
* @author raver119@gmail.com
*/
#ifndef LIBND4J_TYPE_CONVERSIONS_H
#define LIBND4J_TYPE_CONVERSIONS_H
#define ND4J_FLOAT8 0
#define ND4J_INT8 1
#define ND4J_UINT8 2
#de... |
pubkeylp.h | /**
* @file pubkeylp.h -- Public key type for lattice crypto operations.
* @author TPOC: contact@palisade-crypto.org
*
* @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT)
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification,
* are permit... |
DRB007-indirectaccess3-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... |
alignment.c | /**********************************************************************************************/
/* This program is part of the Barcelona OpenMP Tasks Suite */
/* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */
/* Copyright (C) 2009 Univer... |
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
//
//===---------------------------... |
3d7pt.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tare... |
sell_kacz_bmc.c | #include "ghost/sell_kacz_bmc.h"
#define NVECS 1
#define CHUNKHEIGHT 1
#if (NVECS==1 && CHUNKHEIGHT==1)
//this is necessary since #pragma omp for doesn't understand !=
#define FORWARD_LOOP(start,end) \
for (ghost_lidx row=start; row<end; ++row){ \
... |
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... |
dgbsv.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/zgbsv.c, normal z -> d, Fri Sep 28 17:38:04 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#incl... |
844.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... |
parallel_stable_sort.h | #pragma once
/*
A Parallel Stable Sort Using C++11 for OpenMP by Arch D. Robison (Intel) from April 11, 2014
Copyright (C) 2014 Intel Corporation
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are m... |
mergerhist.c | /*
Program to extract the stellar merger history from gadget files created with trace.c
gcc -std=c99 -lm -o ~/bin/altix/mergerhist mergerhist.c -lgad-altix KdTree.o -lgsl -lgslcblas
stan:
gcc -std=c99 -lm -o ~/bin/mergerhist mergerhist.c -lgad-stan -lgsl -lgslcblas stan/KdTree.o
gcc -std=c99 -lm -o ~/bin/mergerhist ... |
Graph.h | #ifndef GRAPH_H
#define GRAPH_H
#include <time.h>
#include <malloc.h>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <fstream>
#include <util/util.h>
#include <util/log.h>
#include <util/timer.h>
#include <util/primitives.h>
using namespace std;
#define PAGE_SIZE (4096)
#de... |
rom_builder_and_solver.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
// ... |
1.c | #include<omp.h>
#include<stdio.h>
#include<stdlib.h>
int main(){
int dim, i, j, count=0, sum =0, k;
printf("\n Enter the dimensions : ");
scanf("%d",&dim);
int **arr1 = (int **)malloc(dim * sizeof(int *));
for (i=0; i<dim; i++)
arr1[i] = (int *)malloc(dim * sizeof(int));
int **arr2 = (int **)malloc(dim * si... |
convolution_winograd_transform_pack4_bf16s.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 ... |
gradient.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "gradient.h"
/******************************************************************************
* PRIVATE FUNCTIONS
*******************... |
HHD.h | /*
Copyright (c) 2015, Harsh Bhatia (bhatia4@llnl.gov)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions a... |
reduction-clause.c | #include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
main(int argc, char **argv) {
int i, n=20, a[n],suma=0;
if(argc < 2) {
fprintf(stderr,"Falta iteraciones\n");
exit(-1);
}
n = atoi(argv[1]);
if (n>20) {
n=20;
printf("n=%d",n... |
spamm_copy.c | /** @file */
#include "spamm.h"
#include "spamm_types_private.h"
#include <assert.h>
#include <math.h>
/** Copy a SpAMM chunk. \f$ A \leftarrow \beta B \f$.
*
* @param A Chunk A.
* @param beta The scalar \f$ \beta \f$.
* @param B Chunk B.
* @param flop The flop count.
* @param mop The memory operation count
*... |
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)
#... |
GB_unaryop__lnot_bool_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
general_basis_op.h | #ifndef _GENERAL_BASIS_OP_H
#define _GENERAL_BASIS_OP_H
#include <complex>
#include <limits>
#include "general_basis_core.h"
#include "numpy/ndarraytypes.h"
template<class K,class I>
K binary_search(const K N,const I A[],const I s){
K b,bmin,bmax;
bmin = 0;
bmax = N-1;
while(bmin<=bmax){
b = (bmax+bmin)/2;
I... |
DRB043-adi-parallel-no.c | /**
* adi.c: This file is part of the PolyBench/C 3.2 test suite.
*
* Alternating Direction Implicit solver:
*
* Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu>
* Web address: http://polybench.sourceforge.net
* License: /LICENSE.OSU.txt
*/
#include "omprace.h"
#include <omp.h>
#include <stdio.h>
#inc... |
GB_binop__iseq_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-... |
threading_utils.h | /*!
* Copyright 2015-2019 by Contributors
* \file common.h
* \brief Threading utilities
*/
#ifndef XGBOOST_COMMON_THREADING_UTILS_H_
#define XGBOOST_COMMON_THREADING_UTILS_H_
#include <dmlc/common.h>
#include <vector>
#include <algorithm>
#include "xgboost/logging.h"
namespace xgboost {
namespace common {
// Rep... |
GB_unop__identity_bool_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://... |
VolumetricMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/VolumetricMaxPooling.c"
#else
static void nn_(VolumetricMaxPooling_updateOutput_frame)(
real *input_p, real *output_p, real *indz_p,
long nslices, long itime, long iwidth, long iheight,
long otime, long owidth, long oheight,
int kT, int kW, int kH, int d... |
header.h | //-------------------------------------------------------------------------//
// //
// 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... |
bls.c | /* Licensed under a 3-clause BSD style license - see LICENSE.rst */
#include <math.h>
#include <float.h>
#include <stdlib.h>
#if defined(_OPENMP)
#include <omp.h>
#endif
#ifndef INFINITY
#define INFINITY (1.0 / 0.0)
#endif
void compute_objective(
double y_in,
double y_out,
double ivar_in,
double iva... |
openmp.c | /*
* Copyright (c) 2003, 2007-14 Matteo Frigo
* Copyright (c) 2003, 2007-14 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 ... |
broken.c | #define _GNU_SOURCE
#include <sys/mman.h>
#include <stdio.h>
#undef _GNU_SOURCE
#include <stdlib.h>
#include <inttypes.h>
#include <dlfcn.h>
#include <omp.h>
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <omp.h>
#include <math.h>
//
// Operations are split out to make them easier to spot with O... |
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); ... |
3d7pt.c | /*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b) ... |
SimulationTools.h | //////////////////////////////////////////////////////////////////////////////////
// COMPANY: Ruhr University Bochum, Embedded Security
// AUTHOR: Amir Moradi (for the paper: https://eprint.iacr.org/2019/1312 )
//////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2019, ... |
GB_subassign_09.c | //------------------------------------------------------------------------------
// GB_subassign_09: C(I,J)<M,repl> = scalar ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.c... |
GB_binop__bshift_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... |
sort_mat.c | /*
This file is part of HiParTI!.
HiParTI! is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
HiParTI! is distr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.