source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GB_unop__identity_fp32_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_unop__identity_fc64_uint8.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... |
mandelbrot.c |
/*=======================
M A N D E L B R O T
=======================*/
// Implementation Based on Rosetta Code Example
// 1) Draws Mandelbrot set for Fc(z)=z*z +c using
// Mandelbrot algorithm (boolean escape time).
// 2) Technique of creating ppm file is based on
// the code of Claudio Rocchini. http:... |
blake2sp.c | /*
* Copyright (c) 2015-2018 Nexenta Systems, inc.
*
* This file is part of EdgeFS Project
* (see https://github.com/Nexenta/edgefs).
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional informat... |
hmm.c | /*
* Copyright (C) 2017 by Benedict Paten (benedictpaten@gmail.com)
*
* Released under the MIT license, see LICENSE.txt
*/
#include "stRPHmm.h"
// OpenMP
#if defined(_OPENMP)
#include <omp.h>
#define CELL_BUFFER_SIZE 1000
#endif
inline double logAddP(double a, double b, bool maxNotSum) {
/*
* Local func... |
preemptive.h | #include <algorithm>
#include <vector>
#include <cstdint>
#include "fast-slic-common.h"
#include "simd-helper.hpp"
#include "parallel.h"
#include "timer.h"
struct PreemptiveTile {
int sy, sx, ey, ex;
};
class PreemptiveGrid {
private:
bool enabled;
int H;
int W;
int K;
int S;
int CW;
i... |
algebra_lineare_par.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#define NUM_BLOCCHI 156
#define K 6000
#define NUM_PRIMI 128
#define N_BITS 64
#define TYPE unsigned long
typedef TYPE word;
struct row_stats {
// bit piu a destra
long unsigned b_dx;
// num di bit a 1
long unsigned n_bit;
};
struct r... |
mxnet_op.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 ... |
libdwt.c | /**
* @file
* @author David Barina <ibarina@fit.vutbr.cz>
* @brief Fast wavelet transform implemented via lifting scheme.
*/
#include "libdwt.h"
#define MEASURE_PER_PIXEL
//#define DEBUG_VERBOSE
//#define DISABLE_MEMCPY
//#define ENABLE_LAZY_MEMCPY
//#define DISABLE_Y
//#define DISABLE_X
//#define MEASURE_FACTOR 1... |
library.h | #ifndef __INCLUDED_LIBRARY_H__
#define __INCLUDED_LIBRARY_H__
#pragma omp declare simd
double BlackBoxFunction(const double x);
double InverseDerivative(const double x);
#endif
|
mpifft.c | /* -*- mode: C; tab-width: 2; indent-tabs-mode: nil; fill-column: 79; coding: iso-latin-1-unix -*- */
/* mpifft.c
*/
#include <hpcc.h>
#include "hpccfft.h"
#include "wrapmpifftw.h"
double *HPCC_fft_timings_forward, *HPCC_fft_timings_backward;
static void
MPIFFT0(HPCC_Params *params, int doIO, FILE *outFile, MPI_Co... |
mapped_max_pool.h | #ifndef MAPPED_MAX_POOL_H_
#define MAPPED_MAX_POOL_H_
#include <math.h>
#include <omp.h>
#include <torch/extension.h>
#include <limits>
#include "common/mapped_max_pool.h"
#include "core/resample.h"
namespace spherical {
namespace cpu {
template <typename T>
void MappedMaxPool2D(const int num_kernels, torch::Tensor... |
module_bl_mynn_bl_init_driver_impl.h |
#ifndef __MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_H__
#define __MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_H__
// File granularity version.
#ifndef MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_VERSION_MAJOR
#define MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_VERSION_MAJOR 1
#endif
#ifndef MODULE_BL_MYNN_BL_INIT_DRIVER_IMPL_VERSION_MINOR
... |
convolution_sgemm_int8.h | // BUG1989 is pleased to support the open source community by supporting ncnn available.
//
// Copyright (C) 2019 BUG1989. 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 of the License at
//
//... |
cpu_utils.h | /*
* Copyright (c) Facebook, Inc. and its affiliates.
* Copyright (c) Intel Corporation.
* All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <omp.h>
#include <cstdint>
#include <utility>
... |
BallTracking.h | #pragma once
//#include <opencv2/core/core.hpp>
//#include <opencv2/core/optim.hpp>
//#include <iostream>
//#include <string>
//#include "spdlog/spdlog.h"
//#include <ConcurrentQueue.h>
//#include <omp.h>
//#include <boost/lockfree/queue.hpp>
class RotModel : public cv::MinProblemSolver::Function {
private:
cv::Mat... |
GB_binop__first_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-... |
distort.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
betweennessCentrality.c | #include "defs.h"
double betweennessCentrality(graph* G, DOUBLE_T* BC)
{
mcsim_skip_instrs_begin();
VERT_T *S; /* stack of vertices in the order of non-decreasing
distance from s. Also used to implicitly
represent the BFS queue */
plist* P; /* predecessors of a vertex v on shortest p... |
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_binop__min_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... |
semantics.c | /* Perform the semantic phase of parsing, i.e., the process of
building tree structure, checking semantic consistency, and
building RTL. These routines are used both during actual parsing
and during the instantiation of template functions.
Copyright (C) 1998-2020 Free Software Foundation, Inc.
Written ... |
builder.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef BUILDER_H_
#define BUILDER_H_
#include <algorithm>
#include <cinttypes>
#include <fstream>
#include <functional>
#include <type_traits>
#include <utility>
#include "command_line.h"
#include "ge... |
edge_vol_int.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
updater_quantile_hist.h | /*!
* Copyright 2017-2022 by XGBoost Contributors
* \file updater_quantile_hist.h
* \brief use quantized feature values to construct a tree
* \author Philip Cho, Tianqi Chen, Egor Smirnov
*/
#ifndef XGBOOST_TREE_UPDATER_QUANTILE_HIST_H_
#define XGBOOST_TREE_UPDATER_QUANTILE_HIST_H_
#include <dmlc/timer.h>
#includ... |
thread_demo.c | /* Generated by Cython 0.27.3 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
#error Cython ... |
GB_unop__identity_uint16_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... |
rng.c | /**
* @file rng.c
* @author Michael Trotter & Matt Goodrum
* @brief Uniform and Normal RNG Implemented in OpenMP
*/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
#include <omp.h>
#include <limits.h>
#define PI acos(-1)
/**
@var M value for Linear Congruential Generator (LCG... |
GB_binop__iseq_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:... |
vptree_openmp.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include <math.h>
#include <omp.h>
#include "../inc/vptree.h"
// Threshold of points to switch to sequential execution
#define POINT_THRESHOLD 10000
// Threshold of maximum live threads simultaneously for distance calculation
#define THREA... |
is.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... |
GB_binop__gt_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
primitives.h | #pragma once
#include <vector>
#include <cstdint>
#include <omp.h>
#include "local_buffer.h"
#include "../timer.h"
using namespace std;
#define CACHE_LINE_ENTRY (16)
#define LOCAL_BUDGET (8*1024*1024)
template<typename T>
void MemSetOMP(T *arr, int val, size_t size) {
size_t tid = omp_get_thread_num();
si... |
GB_AxB_dot2_nomask.c | //------------------------------------------------------------------------------
// GB_AxB_dot2_nomask: C=A'*B via dot products
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://suitesparse.com S... |
feature_group.h | /*!
* Copyright (c) 2017 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_FEATURE_GROUP_H_
#define LIGHTGBM_FEATURE_GROUP_H_
#include <LightGBM/bin.h>
#include <LightGBM/meta.h>
#include <LightGBM/utils/ra... |
GB_unop__minv_fc32_fc32.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... |
pyfr_gemm_rm.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
mk_id_list.c | /*
gcc -fopenmp -lm -lgsl -lgslcblas -lgad -L ./ mk_id_list.c -o ~/bin/mk_id_list OctTree.o
*/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include "libgad.h"
#include "OctTree.h"
#define USE 63
// #ifdef LONGIDS
// typedef unsigned long long IDtype;
// #else
//... |
fill.c |
/* Fill the nonzero term of the A matrix */
#include <petscmat.h>
#include <petscvec.h>
#include <petscsnes.h>
#include <../src/mat/impls/baij/seq/baij.h>
#include <omp.h>
#include <ktime.h>
#include <geometry.h>
#ifdef __USE_HW_COUNTER
#include <perf.h>
#include <kperf.h>
#endif
#include <phy.h>
#include <kernel.h>
... |
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 ... |
dlansy.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/zlansy.c, normal z -> d, Fri Sep 28 17:38:08 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
Contractor.h | /*
Copyright (c) 2013, Project OSRM, Dennis Luxen, others
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 ... |
ParallelCG.h | /*
This file is part of NSEssentials.
Use of this source code is granted via a BSD-style license, which can be found
in License.txt in the repository root.
@author Nico Schertler
@author Misha Kazhdan
*/
#pragma once
#ifdef HAVE_EIGEN
#include <Eigen/Dense>
// A parallel conjugate gradient solver complying to... |
dem_structures_coupling_utilities.h | /*
* Author: Miguel Angel Celigueta
*
* maceli@cimne.upc.edu
*/
#ifndef KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H
#define KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H
// /* External includes */
// System includes
// Project includes
#include "includes/variables.h"
/* System includes */
#include <limits>
#includ... |
weightedNorm1.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 limitation t... |
fig4.68-master.c | /*
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
Copyright 2009 Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the BSD License("BSD")(the "License").
You can obtain a copy of the License at: http://www.opensparc.net/pubs/t1/licenses/BSD+_Lice... |
debug_test_system.h | // ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2015, Knut Reinert, FU Berlin
// Copyright (c) 2013 NVIDIA Corporation
// All rig... |
qubo.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <getopt.h>
#include <assert.h>
#ifdef PARALLEL
#include <omp.h>
#endif
#include "normal.c"
// QUBO solver
// Solves QUBO problem:
// Minimise sum_{i,j} Q_ij x_i x_j over choices of x_i
// i,j corresponds to an edge... |
atomic_messages.c | // RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
// RUN: %clang_cc1 -verify -fopenmp-simd -ferror-limit 100 %s
int foo() {
L1:
foo();
#pragma omp atomic
// expected-error@+2 {{the statement for 'atomic' must be an expression statement of form '++x;', '--x;', 'x++;', 'x--;', 'x binop= expr;', 'x = x binop ... |
cross_entropy_loss.c | #include <cdnn/model.h>
#include <cdnn/loss.h>
extern __Model__ * m;
loss_layer * loss_layer_ = NULL;
void forward_pass_L2_LOSS(){
int number_of_examples = m->y_train_mini_batch[m->current_mini_batch]->shape[1];
// int number_of_examples = m->Y_train->shape[1];
dARRAY * loss = NULL;
dARRAY * Y = m->y_train_mi... |
factorize_gmp.c | /*****************************************************************************************************************
* Compiling: mpicc fattor.c -lgmp -fopenmp -o fattor
* Running: mpirun -n PROCNUM --bind-to none fattor NUMBER
* Note: PROCNUM is the number of processes that will be ran, and it must be >=2, NUMBER is the... |
chisquare.h | /*
This file is part of Mitsuba, a physically based rendering system.
Copyright (c) 2007-2014 by Wenzel Jakob and others.
Mitsuba is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License Version 3
as published by the Free Software Foundation.
... |
hashtable.impl.h | /*
* 'hashtable.impl.h'
* This file is part of the "trinity" project.
* (https://github.com/hobywan/trinity)
* Copyright 2016, Hoby Rakotoarivelo
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in ... |
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... |
parallel.c | #include <stdbool.h>
#include <stdio.h>
#include <math.h>
#include "mpi.h"
#include "ppp/ppp.h"
#include "ppp_pnm/ppp_pnm.h"
/**
* Computes the force body j exercises on body i.
* The acceleration is returned in *ax and *ay.
*/
static void compute(body* bodies, int i, int j,
long double* ax, lo... |
minmax.c | #include "math.h"
#include <stdio.h>
#include <stdlib.h>
#define _DISP
#define EXP 1.6
#define THRESH 1
struct number{
int num[4];
int flag;
};
struct number initarray[5040];
inline void num2p(int num,int *p){
int i;
for(i=0;i<4;i++)
*(p++)=0;
i=3;
while(num){
*(--p)=num%10;
num=num/10;
}
}
inline int... |
convolution_pack1to4_int8.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 ... |
attribute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
Matrix_Add_RowMajor.c | #include<stdio.h>
#include<stdlib.h>
#include <sys/time.h>
double rtclock()
{
struct timezone Tzp;
struct timeval Tp;
int stat;
stat = gettimeofday (&Tp, &Tzp);
if (stat != 0) printf("Error return from gettimeofday: %d",stat);
return(Tp.tv_sec + Tp.tv_usec*1.0e-6);
}
#define size 10000
#define NT 8
int A[size][size];
i... |
GB_binop__isle_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... |
GB_unaryop__abs_uint64_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_subassign_zombie.c | //------------------------------------------------------------------------------
// GB_subassign_zombie: C(I,J)<!,repl> = empty ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Iden... |
lastprivate-conditional-2.c | void
foo (int *p)
{
int a = -1, b = -1, c = -1, d = -1, e = -1, f = -1, g = -1, h = -1;
int i;
#pragma omp parallel
#pragma omp for lastprivate (conditional: a)
for (i = 0; i < 32; i++)
if (p[i])
a = i;
#pragma omp simd lastprivate (conditional: b)
for (i = 0; i < 32; i++)
if (p[i])
b ... |
test_vadd.c | #include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#ifdef __cilk
#include <cilk/cilk.h>
#endif
#ifdef _OPENMP
#include <omp.h>
#endif
#if USE_GFX
#include <gfx/gfx_rt.h>
#endif
#define RESTRICT
double vdiff(int n, const float * RESTRICT a, const float * RESTRICT b)
{
double d = 0.0;
for(int i = 0; ... |
reweighting.c | #include <math.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include "ccmpred.h"
#include "reweighting.h"
void calculate_weights(conjugrad_float_t *w, unsigned char *msa, uint64_t ncol, uint64_t nrow, conjugrad_float_t threshold) {
int idthres = (int)ceil(threshold * ncol);
mems... |
FastTree.c | /*
* FastTree -- inferring approximately-maximum-likelihood trees for large
* multiple sequence alignments.
*
* Morgan N. Price, 2008-2011
* http://www.microbesonline.org/fasttree/
*
* Thanks to Jim Hester of the Cleveland Clinic Foundation for
* providing the first parallel (OpenMP) code, Siavash Mirarab of
*... |
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 ... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
bfs_custom.c | /* Copyright (C) 2010-2011 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:... |
CBitVolume.h | ///////////////////////////////////////////////////////////////////////////////
// $Id$
//
// 3DimViewer
// Lightweight 3D DICOM viewer.
//
// Copyright 2008-2016 3Dim Laboratory s.r.o.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the Licen... |
RelativeNeighborhoodGraph.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_RNG_H_
#define _SPTAG_COMMON_RNG_H_
#include "NeighborhoodGraph.h"
namespace SPTAG
{
namespace COMMON
{
class RelativeNeighborhoodGraph: public NeighborhoodGraph
{
pub... |
matrix.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
flexProxDualDataL2.h | #ifndef flexProxDualL2_H
#define flexProxDualL2_H
#include "flexProx.h"
//! represents prox for a L2 data term
/*!
\f$ \frac{\alpha}{2}\|\cdot-f\|_2^2 \f$
*/
template<typename T>
class flexProxDualDataL2 : public flexProx<T>
{
#ifdef __CUDACC__
typedef thrust::device_vector<T> Tdata;
#else
typedef std::vector<T> ... |
GB_unop__log10_fc64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
declare_mapper_ast_print.c | // RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
// RUN: %clang_cc1 -fopenmp -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
// RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s
// RUN: %clang_cc1 -fopenmp-simd -emit-pch... |
integrator.h | #ifndef _INTEGRATOR_H
#define _INTEGRATOR_H
#include <omp.h>
#include <optional>
#include "core.h"
#include "photon_map.h"
#include "scene.h"
class Integrator {
public:
// do preliminary jobs before calling integrate
virtual void build(const Scene& scene, Sampler& sampler) = 0;
// compute radiance coming fro... |
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
//
//===---------------------------... |
TuLi_Test.h | #pragma once
namespace tinyDNN
{
void tuli_Conv_1()
{
LoadTuLi::load_Tuli();
LoadTuLi::load_Tuli_T();
std::shared_ptr<Inter_LayerQL<double>> in_01 = std::make_shared<Inter_LayerQL<double>>(128, 128);
std::shared_ptr<LayerQL<double>> pool_01 = std::make_shared<PooLayerQL<double>>(Pool_Layer, 64, 6... |
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... |
GB_binop__ne_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-... |
GB_unop__identity_int64_int64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
nodal_residualbased_elimination_builder_and_solver_for_FSI.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi, Alessandro... |
GB_unaryop__abs_int32_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
t008.c | #include<stdint.h>
#include<stdlib.h>
#include<stdio.h>
#include<omp.h>
#define n_site 4
#define n_mu 4
typedef float T_mu;
typedef struct {T_mu mu[n_mu];} T_site;
typedef T_site T_field[n_site];
int
main(int argc, char **argv)
{
const T_mu val = 1.0f;
T_field f;
f[0].mu[0] = 0.0f;
#pragma omp target map(f[0:1])
... |
grid.c | /* Copyright 2014-2015 The Regents of the University of California.
* Copyright 2015-2018 Martin Uecker.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* 2011, 2015, 2018 Martin Uecker <martin.uecker@med.uni-goettingen.de>
* 2014 Frank... |
stencil_parallel_vect.c | #include <stdio.h>
#include <omp.h>
#include <inttypes.h>
#include "matrix_utils.h"
int main(int argc, const char* argv[]){
if(argc==2){
int numThreads = strtoimax(argv[1], NULL, 0);
if(numThreads>0){
double c[5], start_time, end_time, temp;
static double g[2]... |
mixed_tentusscher_myo_epi_2004_S2_7.c | // Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S2_7.h"
GET_CELL_MODEL_DATA(init_cell_model_data)
{
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_... |
DRB067-restrictpointer1-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... |
morn_tensor.c | /*
Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com>
Licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri... |
GB_binop__plus_fc64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
vlisa_prewhitening.c | /*
** single subject lisa algorithm
** prewhitening
**
** G.Lohmann, MPI-KYB, 2018
*/
#include "viaio/Vlib.h"
#include "viaio/file.h"
#include "viaio/mu.h"
#include "viaio/option.h"
#include "viaio/os.h"
#include <viaio/VImage.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_cdf.h>
#include... |
traffic_parallel.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include <time.h>
// Fundamental simulation unit
typedef struct cars {
int x; // x position on the road
int y; // Lane number on the road
int v; // Current velocity
int v_d; ... |
debug-1.c | /* PR debug/36617 */
/* { dg-do run } */
/* { dg-options "-g -fopenmp -O0" } */
int
f1 (void)
{
int v1i, v1j, v1k, v1l = 0;
v1i = 6;
v1j = 8;
#pragma omp parallel private (v1k) firstprivate (v1j) shared (v1i) reduction (+:v1l)
{
v1k = v1i + v1j;
{
int v1m = 1;
v1l = v1m;
}
}
retur... |
demo.c | // openmp program that solves a random system of up to 64 eqs in up to 64 vars.
#include <assert.h>
#include <sys/time.h>
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <err.h>
#include <omp.h>
#include "feslite.h"
/* Try to solve a large system as fast as possible. */
int n =... |
knapsack.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... |
2763.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])... |
Searching.202006191549.nested_parallel.h | //
// Created by Zhen Peng on 6/19/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 ... |
indirectaccess1-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... |
rose_v1_firstprivate.c | #include <omp.h>
int g;
void foo()
{
int i;
int x;
int y = 1;
int a[100];
int b[100];
#pragma omp parallel for private (y,i) firstprivate (x)
for (i = 0; i <= 99; i += 1) {
y = x + 1 + g;
b[i] = x + 1 + g;
// x=...
// ... =x
}
x = g;
}
int a[100];
void foo2()
{
int i;
int tmp;
tmp = ... |
bfs_replicated_csc.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:... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.