source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
5468.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 <... |
GB_binop__pair_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_binop__bxor_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-... |
GB_unaryop__identity_uint8_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
omp_pi_num_integration2.c | /* vim: set ts=4 sw=4: */
/* Filename : omp_pi_num_integration2.c
* Description : calculate pi
* Author : SunYoung Kim <sunyzero@gmail.com>
* Notes : numerical integration method
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
const int num_steps=800000000; /* integration... |
wave_energy.c | /*********************************************************************************/
/* */
/* Animation of wave equation in a planar domain */
/* ... |
DeclOpenMP.h | //===- DeclOpenMP.h - Classes for representing OpenMP directives -*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------------... |
omp5.c | // RUN: mlir-clang %s --function=* -fopenmp -S | FileCheck %s
void square(double* x, int sstart, int send, int sinc) {
#pragma omp parallel for
for(int i=sstart; i < send; i++) {
x[i] = i;
}
}
// CHECK: func @square(%arg0: memref<?xf64>, %arg1: i32, %arg2: i32, %arg3: i32) attributes {llvm.linka... |
convolution_pack4_bf16s.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 ... |
Volume.h | //note: this class is header-only
#ifndef CT_VOLUME
#define CT_VOLUME
#include <atomic>
//OpenCV
#include <opencv2/core/core.hpp> //core functionality of OpenCV
//Qt
#include <QtCore/QtCore>
#include "types.h"
namespace ct {
enum class Axis {
X,
Y,
Z
};
enum class CoordinateSy... |
GB_binop__lor_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-... |
expected_output.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
//---------------------------------------------------------------------
// program LU
//---------------------------------------------------------------------
//----------
// Class S:
//----------
/*full problem size*/
/*nu... |
GB_binop__pair_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
perftest.c | /**
* Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED.
* Copyright (C) The University of Tennessee and The University
* of Tennessee Research Foundation. 2015. ALL RIGHTS RESERVED.
* Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
#... |
my_sgemm.c | #if defined(_WIN32)
#else
/*
* --------------------------------------------------------------------------
* BLISLAB
* --------------------------------------------------------------------------
* Copyright (C) 2016, The University of Texas at Austin
*
* Redistribution and use in source and binary forms, with or w... |
SPHCalcHydroForceFunctor.h | /**
* @file SPHCalcHydroForceFunctor.h
* @author seckler
* @date 22.01.18
*/
#pragma once
#include "autopas/particles/OwnershipState.h"
#include "autopas/sph/SPHKernels.h"
namespace autopas::sph {
/**
* Class that defines the hydrodynamic force functor.
* It is used to calculate the force based on the given SP... |
homog.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <mpi.h>
#include <hdf5.h>
#include "mceik_struct.h"
#include "mceik_broadcast.h"
#include "mpiutils.h"
#include "locate.h"
#include "h5io.h"
void freeStations(struct mceik_stations_struct *stations);
void freeC... |
iw_core.c | /*
// Copyright 2016-2018 Intel Corporation All Rights Reserved.
//
// The source code, information and material ("Material") contained herein is
// owned by Intel Corporation or its suppliers or licensors, and title
// to such Material remains with Intel Corporation or its suppliers or
// licensors. The Material conta... |
detector.c | #include "darknet.h"
static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90};
void train_detector(char *datacfg, cha... |
GnatNearestNeighbors.h | //
// Copyright (c) 2009, Markus Rickert
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of condit... |
axhelm.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without... |
dataset.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_DATASET_H_
#define LIGHTGBM_DATASET_H_
#include <LightGBM/config.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/meta.h>
... |
sieveMulticore.c | /*
Tempos de execução:
Versão sequencial:
real 0m3.005s
user 0m2.919s
sys 0m0.080s
real 0m3.006s
user 0m2.930s
sys 0m0.068s
real 0m3.028s
user 0m2.951s
sys 0m0.064s
real 0m3.007s
user 0m2.926s
sys 0m0.076s
real 0m3.006s
user 0m2.920s
sys 0m0.080s
Versão paralela multicore:
real 0m2.579s
user 0m9.820s
sys 0m0.0... |
ompcompress.c | #ifdef _OPENMP
/* compress 1d contiguous array in parallel */
static void
_t2(compress_omp, Scalar, 1)(zfp_stream* stream, const zfp_field* field)
{
/* array metadata */
const Scalar* data = (const Scalar*)field->data;
uint nx = field->nx;
/* number of omp threads, blocks, and chunks */
uint threads = threa... |
GB_unaryop__identity_uint64_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... |
convolution_gemm.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/** \file
* jitconv "doRef" calculation - a simplified gemm impl.
*
* This should be correct, and may even be somewhat fast "in general".
* Do not expect "fastest" performance.
*
* libvednn has a more sophisticated GEMM convolution.
*/
#include "ve... |
ccsd_grad.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... |
vision.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
hermv_c_dia_u_hi_trans.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#include <memory.h>
#include <stdlib.h>
alphasparse_status_t
ONAME(const ALPHA_Complex alpha,
const ALPHA_SPMAT_DIA *A,
const ALPHA_Complex *x,
... |
prefix_sum.c | /******************************************************************************
* Copyright (c) 1998 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
***************************************... |
ops.h | #pragma once
#ifndef OPS_H_
#define OPS_H_
#include <DataTypeUtils.h>
#include <helpers/shape.h>
#include <vector>
#include <Environment.h>
#define MIN 1e-12
#define MAX_FLOAT 1e37
#define MIN_FLOAT 1e-37
#define MAX_INT 2147483647
#define MIN_CUTFOFF -3.79297773665f
#define FLOAT_MIN_NORMAL 1.17549435e-38
#define EP... |
schedbench.c | /***************************************************************************
* *
* OpenMP MicroBenchmark Suite - Version 2.0 *
* *
* ... |
schur_eliminator_impl.h | // Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2015 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of so... |
mapper_vertex_morphing_matrix_free.h | // ==============================================================================
// KratosShapeOptimizationApplication
//
// License: BSD License
// license: ShapeOptimizationApplication/license.txt
//
// Main authors: Baumgaertner Daniel, https://github.com/dbaumgaertner
//
// ========... |
task4.c | #include <math.h>
#include <string.h>
#include "timer.h"
#define NN 1024
#define NM 1024
float A[NN][NM];
float Anew[NN][NM];
int main(int argc, char** argv)
{
const int n = NN;
const int m = NM;
const int iter_max = 1000;
const double tol = 1.0e-6;
double error = 1.0;
memset(A,... |
task_nested_lvl2_omp.c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See COPYRIGHT in top-level directory.
*/
#include <assert.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#define NUM_TASKS 50000
#define NUM_REPS 1
#define LEVELS 2
int o = 0;
void sscal(fl... |
omp_loop.h | // -*- C++ -*-
// Copyright (C) 2007-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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... |
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... |
GB_unaryop__identity_bool_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
bench.c | #include "omp.h"
#include "pmsis.h"
#define LOOP_ITER (2048)
#define NB_ITER (256)
#define NB_BARRIER_ITER (256)
#define NB_ITER_SINGLE (128)
#define CORE_ID pi_core_id()
#define PRINTF(...)
//#define PRINTF(...) printf(__VA_ARGS__)
static void test_start_timer()
{
pi_perf_cl_reset();
pi_perf_conf(1<<PI_PER... |
GB_binop__first_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-... |
hist_util.h | /*!
* Copyright 2017 by Contributors
* \file hist_util.h
* \brief Utility for fast histogram aggregation
* \author Philip Cho, Tianqi Chen
*/
#ifndef XGBOOST_COMMON_HIST_UTIL_H_
#define XGBOOST_COMMON_HIST_UTIL_H_
#include <xgboost/data.h>
#include <xgboost/generic_parameters.h>
#include <limits>
#include <vector... |
aix_ssha_fmt_plug.c | /* AIX ssha cracker patch for JtR. Hacked together during April of 2013 by Dhiru
* Kholia <dhiru at openwall.com> and magnum.
*
* Thanks to atom (of hashcat project) and philsmd for discovering and
* publishing the details of various AIX hashing algorithms.
*
* This software is Copyright (c) 2013 Dhiru Kholia <dh... |
uccsd_t.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... |
mult_impl_block_basic.h | #ifndef _MULT_IMPL_BLOCK_BASIC_H
#define _MULT_IMPL_BLOCK_BASIC_H
//Implementations for meson field contractions
template<typename mf_Policies,
template <typename> class lA2AfieldL, template <typename> class lA2AfieldR,
template <typename> class rA2AfieldL, template <typename> class rA2AfieldR
>
class _mult_i... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
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) ... |
beta_projectors_gradient.h | // Copyright (c) 2013-2017 Anton Kozhevnikov, Ilia Sivkov, Thomas Schulthess
// 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 copy... |
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... |
volumeramsubset.h | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2013-2018 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
timers.h | double start_time[64], elapsed[64];
#ifdef _OMP
#pragma omp threadprivate (start_time, elapsed)
#endif
|
Cluster.h | //
// Created by Alessandro Sestini on 08/11/17.
//
#ifndef K_MEANS_MIO_CPP_CLUSTER_H
#define K_MEANS_MIO_CPP_CLUSTER_H
#include <queue>
#include "Point.h"
#include <omp.h>
class Cluster {
public:
Cluster(double x_coord, double y_coord){
new_x_coord = 0;
new_y_coord = 0;
size = 0;
... |
AddPropertyStep.h | #ifndef ADD_PROPERTY_STEP_H
#define ADD_PROPERTY_STEP_H
#define ADD_PROPERTY_STEP 0x75
#include "step/TraversalStep.h"
#include "step/InjectStep.h"
#include "structure/Vertex.h"
#include <boost/any.hpp>
// Edge properties currently not supported.
class AddPropertyStep : public TraversalStep {
private:
Cardinality ... |
convolution_sgemm.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a ... |
tinyexr.h | /*
Copyright (c) 2014 - 2016, Syoyo Fujita
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and t... |
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... |
omp_task.c | /* OpenMP TASK Construct Example */
#include <stdio.h>
#include <omp.h>
int main () {
#pragma omp parallel
{
#pragma omp single
{
printf("A ");
#pragma omp task
{printf("race ");}
#pragma omp task
{printf("car ");}
}
} // End of parallel region
printf... |
softmax-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 ... |
coordinate_transformation_utilities.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors:
//
//
#ifndef KRATOS_COORDINATE_TRANSFORMATION_UTI... |
so_uid_map.h | // -----------------------------------------------------------------------------
//
// Copyright (C) The BioDynaMo Project.
// 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.
//
// See the LICENSE file distrib... |
omp_for_nowait.c | <ompts:test>
<ompts:description>Test which checks the omp parallel for nowait directive. It fills an array with values and operates on these in the following.</ompts:description>
<ompts:directive>omp parallel for nowait</ompts:directive>
<ompts:version>1.0</ompts:version>
<ompts:dependences>omp parallel for, omp flush<... |
__clang_openmp_device_functions.h | /*===- __clang_openmp_device_functions.h - OpenMP device function declares -===
*
* 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
*
*===----------------------------... |
DRB114-if-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... |
GB_binop__bget_int64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_binop__bclr_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... |
libperf_thread.c | /**
* Copyright (C) NVIDIA 2021. ALL RIGHTS RESERVED.
*
* See file LICENSE for terms.
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <ucs/debug/log.h>
#include <ucs/arch/bitops.h>
#include <ucs/sys/module.h>
#include <ucs/sys/string.h>
#include <tools/perf/lib/libperf_int.h>
#include <string.h>
#inc... |
eemd.c | /* Copyright 2013 Perttu Luukko
* This file is part of libeemd.
* libeemd 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 later version.
* li... |
DelayedUpdate.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2019 QMCPACK developers.
//
// File developed by: Ye Luo, yeluo@anl.gov, Arg... |
main.c | #include "header.h"
#include "FILE/nrutil.h"
#include "FILE/stat.c"
#include "cost.c"
int main(int argc, const char * argv[])
{
// Declare Variables
FILE *inp, *JIN, *HUR, *OUT, *PRT, *JYW, *ASA, *IMS, *JJW;
char buf[255], frname[255];
int stime; long ltime;
int ind, ite, a, b, i, j, k, l, v, *t, *tvec... |
ASTMatchers.h | //===- ASTMatchers.h - Structural query framework ---------------*- 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
//
//===---------------------------... |
8391.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... |
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... |
StmtOpenMP.h | //===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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
//
//===---------------------------... |
cshift.h | #ifndef _CK_CSHIFT_H
#define _CK_CSHIFT_H
CPS_START_NAMESPACE
//C-shift any 4d field with canonical ordering in the time direction
//(should be trivial to generalize!)
void TbarrelShift4D(Float* data, const int site_size, const int tshift){
if(tshift == 0) return;
const int plane_size = GJP.VolNodeSites()/GJP.Tn... |
GB_unaryop__ainv_int8_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
LAGraph_pagerankx4.c | //------------------------------------------------------------------------------
// LAGraph_pagerankx4: pagerank using a real semiring
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2020 LAGraph Contributors.
(se... |
VerletListsLinkedBase.h | /**
* @file VerletListsLinkedBase.h
* @author nguyen
* @date 17.12.18
*/
#pragma once
#include "autopas/containers/ParticleContainer.h"
#include "autopas/containers/linkedCells/LinkedCells.h"
#include "autopas/utils/ArrayMath.h"
#include "autopas/utils/ParticleCellHelpers.h"
namespace autopas {
/**
* Base clas... |
Searching.202007281116.only_gather_top_m.profile.h | //
// Created by Zhen Peng on 7/28/2020.
//
#ifndef BATCH_SEARCHING_SEARCHING_H
#define BATCH_SEARCHING_SEARCHING_H
#include <vector>
#include <boost/dynamic_bitset.hpp>
//#include <boost/sort/sort.hpp>
#include <iostream>
#include <fstream>
#include <unordered_map>
#include <immintrin.h>
#include <cstring>
#include ... |
GB_binop__eq_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-... |
parallel.h | #pragma once
#include <algorithm>
#ifdef _OPENMP
# include <omp.h>
#endif
#include "ctranslate2/types.h"
namespace ctranslate2 {
namespace cpu {
template <typename T>
inline T ceil_divide(const T& x, const T& y) {
return (x + y - 1) / y;
}
// The parallel_for construct is inspired by:
... |
schelude-clause-dynamic-mod.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=16,chunk,a[n],suma=0;
if(argc < 2) {
fprintf(stderr,"\nFalta iteraciones o chunk \n");
exit(-1);
}
//n = atoi(argv[1]);
if (n>200) n=200;
chunk = atoi(... |
openmp_utils.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ \.
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
#ifndef KRATOS_OPENMP_UTILS_H... |
trmv_c_bsr_n_lo_conj.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#include <string.h>
static alphasparse_status_t
trmv_bsr_n_lo_conj_omp(const ALPHA_Number alpha,
con... |
omp_task_firstprivate.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
int test_omp_task_firstprivate()
{
int i;
int sum = 1234;
int known_sum;
int result = 0; /* counts the wrong sums from tasks */
known_sum = 1234 + (LOOPCOUNT * (LOOPCOUNT + 1)) / 2;
#pragma omp parallel
{
... |
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... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
ex1.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define CHUNKSIZE 10
#define N 10000000
float a[N], b[N], c[N];
int main (int argc, char *argv[])
{
int nthreads, tid, i, chunk;
/* Some initializations */
for (i=0; i < N; i++)
a[i] = b[i] = i * 1.0;
chunk = CHUNKSIZE;
double t1, t2;
t1 = ... |
omp_parallel_copyin.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <stdlib.h>
#include "omp_testsuite.h"
static int sum1 = 789;
#pragma omp threadprivate(sum1)
int test_omp_parallel_copyin()
{
int sum, num_threads;
int known_sum;
sum = 0;
sum1 = 7;
num_threads = 0;
#pragma omp parallel copyin(sum1)
{
/*p... |
main.c | /* header */
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#define SIDE 2048
#define nLiveNeighbor(G, f, i, j) \
G[f][i + 1][j] + G[f][i - 1][j] + G[f][i][j + 1] + \
G[f][i][j - 1] + G[f][i + 1][j + 1] + G[f][i + 1][j - 1] + \
G[f][i - 1][j + 1] + G[f][i - 1][j - 1]
char G[2][SIDE][SIDE];
void... |
omp_dotprod_openmp.c | /*****************************************************************************
* FILE: omp_dotprod_openmp.c
* DESCRIPTION:
* This simple program is the OpenMP version of a dot product and the
* second of four codes used to show the progression from a serial program to a
* hybrid MPI/OpenMP program. The relevant... |
NoBorderFilterCpuCode.c | // Authors:
// Emanuele Del Sozzo (emanuele.delsozzo@polimi.it), Marcello Pogliani (marcello.pogliani@polimi.it)
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <unistd.h>
#include <getopt.h>
#include "Maxfiles.h"
#include "MaxSLiCInterface.h"
#include "omp.h"
... |
custom_functions.h | //
// Project Name: Kratos
// Last Modified by: $Author: G.Casas (gcasas@cimmne.upc.edu) $
// Date: $Date: 2011-6-13 08:56:42 $
// Revision: $Revision: 1.5 $
//
//
//README::::look to the key word "VERSION" if you want to find all the points where you have to change something... |
accessibility.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <assert.h>
#include <stdint.h>
#include <error.h>
#include <limits.h>
#include <time.h>
#include <pthread.h>
#include "libxml/parser.h"
#include "libxml/tree.h"
#include "libxml/HTMLparser.h"
#include "queue.c"
#include <omp.h>
in... |
long_short_term_memory_layer.h | // OpenNN: Open Neural Networks Library
// www.opennn.net
//
// L O N G S H O R T T E R M M E M O R Y L A Y E R C L A S S H E A D E R
//
// Artificial Intelligence Techniques SL
// artelnics@artelnics.com
#ifndef LONGSHORTTERMMEMORYLAYER_H
#define LONGSHORTTERMMEMORYLAYER_H
// System includes
#... |
target-teams-1.c | /* { dg-do run } */
#include <omp.h>
#include <stdlib.h>
int v = 6;
void
bar (long *x, long *y)
{
*x += 2;
*y += 3;
}
int
baz (void)
{
return 5;
}
#pragma omp declare target to (bar, baz, v)
__attribute__((noinline, noclone)) void
foo (int a, int b, long c, long d)
{
int err;
if (omp_get_num_teams () !=... |
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)... |
cvsAdvDiff_bnd_omp.c | /* -----------------------------------------------------------------
* Programmer(s): Daniel Reynolds and Ting Yan @ SMU
* Based on cvsAdvDiff_bnd.c and parallelized with OpenMP
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2020, Lawrence Li... |
C_fht_int.c | /* Hadamard Transform
Usage: w = hadamard(x)
x must be a REAL VALUED COLUMN VECTOR or MATRIX
m = size(x,1) must be a POWER OF TWO
Notes:
1) This implementation uses exactly m*log2(m) additions/subtractions.
2) This is symmetric and orthogonal. To invert, apply again and
divide by vector length... |
DRB015-outofbounds-var-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... |
GB_is_diagonal.c | //------------------------------------------------------------------------------
// GB_is_diagonal: check if A is a diagonal matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.