source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GB_unaryop__one_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
util.h | #ifndef _C_UTIL_
#define _C_UTIL_
#include <math.h>
#include <iostream>
//-------------------------------------------------------------------
//--initialize array with maximum limit
//-------------------------------------------------------------------
template<typename datatype>
void fill(datatype *A, const int n, con... |
optimizer.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... |
main.c | #include "main.h"
#include "helpers/helpers.h"
#define TOTAL_CORPOS 10
CORPO *generate_mock_bodies(int body_count){
CORPO *bodies = (CORPO *)malloc(sizeof(CORPO)*body_count);
for(int i = 0; i < body_count; i++){
bodies[i].p = get_vector_cartesian(i, i, i);
bodies[i].m = i;
bodies[i].f... |
GB_unop__identity_int16_fp64.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... |
MS_Hybrid_dynamic.c | /*
MPI Dynamic Mandelbort sort
*/
#include <stdlib.h>
#include <mpi.h>
#include <X11/Xlib.h>
#include <stdio.h>
#include <omp.h>
#define data_tag 100
#define result_tag 101
#define terminate_tag 110
struct timeval tv1, tv2;
double t = 0;
typedef struct complextype
{
double real, imag;
} Compl;
int main(int ar... |
tree-parloops.c | /* Loop autoparallelization.
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
Contributed by Sebastian Pop <pop@cri.ensmp.fr> and
Zdenek Dvorak <dvorakz@suse.cz>.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License ... |
morphology.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
index.h | #ifndef GBWTGRAPH_CONSTRUCTION_H
#define GBWTGRAPH_CONSTRUCTION_H
#include <cstdlib>
#include <functional>
#include <omp.h>
#include <gbwtgraph/gbwtgraph.h>
#include <gbwtgraph/minimizer.h>
/*
index.h: Minimizer index construction from GBWTGraph.
*/
namespace gbwtgraph
{
//--------------------------------------... |
csr_block_matvec.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)
***************************************... |
knn_utils.h | /*
*
* Copyright (c) 2019, BIOVAULT (Leiden University Medical Center, Delft University of Technology)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code mu... |
move.h | #pragma once
#include "core.h"
#include "energy.h"
#include "average.h"
//#include "analysis.h"
#include "potentials.h"
#include "mpi.h"
namespace Faunus {
namespace Move {
class Movebase {
private:
virtual void _move(Change&)=0; //!< Perform move and modify change object
... |
mixed_tentusscher_myo_epi_2004_S1_20.c | // Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S1_20.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... |
FullyDistSpVec.h | /****************************************************************/
/* Parallel Combinatorial BLAS Library (for Graph Computations) */
/* version 1.2 -------------------------------------------------*/
/* date: 10/06/2011 --------------------------------------------*/
/* authors: Aydin Buluc (abuluc@lbl.gov), Adam Lugow... |
Parallelizer.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// Eigen 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 Soft... |
sparse_tsne_user_def_probabilities_inl.h | /*
*
* Copyright (c) 2014, Nicola Pezzotti (Delft University of Technology)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above ... |
mpi_bloom.c | #define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#define _FILE_OFFSET_BITS 64
#include <math.h>
#include <time.h>
#include <errno.h>
#include <stdio.h>
#include <zlib.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/mman.h... |
target_teams_distribute_parallel_for_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}}
#pragma omp target teams distribute parallel for
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute parallel for'}}
#pragma ... |
convolution_winograd_transform_pack4.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 ... |
advectionMain.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 limitatio... |
ten_tusscher_2004_epi_S2_11.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S2_11.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO... |
prev_version.c | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <assert.h>
#include <unistd.h>
#include <stdint.h>
#include <sys/time.h>
#include <string.h>
#include <inttypes.h>
// Include SSE intrinsics
#if defined(_MSC_VER)
#include <intrin.h>
#elif defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__))
... |
GB_binop__iseq_fc32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
nv_gray_cpu.c | #include "nv_core.h"
#include "nv_ip_gray.h"
void nv_gray_cpu(nv_matrix_t *gray, const nv_matrix_t *bgr)
{
int m;
assert(bgr->n == 3 && gray->n == 1 && gray->m == bgr->m);
#ifdef _OPENMP
#pragma omp parallel for
#endif
for (m = 0; m < gray->m; ++m) {
// bgr->v 0-255
float g = NV_GRAY_B_RATE *... |
__clang_cuda_complex_builtins.h | /*===-- __clang_cuda_complex_builtins - CUDA impls of runtime complex fns ---===
*
* 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
*
*===---------------------------... |
omp_lock.c | <ompts:test>
<ompts:testdescription>Test which checks the omp_set_lock and the omp_unset_lock function by counting the threads entering and exiting a single region with locks.</ompts:testdescription>
<ompts:ompversion>2.0</ompts:ompversion>
<ompts:directive>omp_lock</ompts:directive>
<ompts:dependences>omp flush</ompt... |
functions.h | #ifndef __FUNCTIONS_H__
#define __FUNCTIONS_H__
#include "../scaling/scaling.h"
#include "../summation/summation.h"
#include "../contraction/contraction.h"
namespace CTF {
/**
* @defgroup CTF_func CTF functions
* \brief user-defined function interface
* @addtogroup CTF_func
* @{
*/
class Idx_Tensor;
/**
... |
expected_output.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
//---------------------------------------------------------------------
// program MG
//---------------------------------------------------------------------
//----------
// Class S:
//----------
//----------
// Class W:
... |
mctravelling.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include <omp.h>
#include <unistd.h>
#include <math.h>
double initial_time;
double clearcache [30000000];
float** matrix_distances;
int * path;
int cities;
void clearCache () {
int i;
for (i = 0; i < 30000000;... |
mixed_tentusscher_myo_epi_2004_S3_3.c | // Scenario 3 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt + Rc)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S3_3.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... |
trap_omp1.c | #include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
int N = atoi( argv[1] );
double dx = 2./(N-1);
double integral = 0.0;
const double pi = 3.141592653589793;
double x, f;
#pragma omp parallel for private (x,f)
for (int i=0;i<N;++i) {
x = -1. + dx*i;
// compute x_i
f = 1. / (1. + x*x);
// compu... |
convolution_1x1_pack8.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
acoustics_alg.c | /*
* Student: Trascau Mihai
* Grupa: 344C4
*
* Lucrare: Ecuatia undelor pentru acustica 2D
* Fisier: acoustics_alg.h
* Descriere: Fisier sursa care contine implementarile pentru algoritmul utilizat (in cazul nostru MDF pentru ecuatia propagarii undei)
*/
#include "acoustics.h"
int on_edge(int rank, int numtas... |
ellpack.c | #include <errno.h>
#include <stdio.h>
#include "ellpack.h"
void print_ellpack_matrix(ellpack_matrix_t ellpack, int num_rows, int width)
{
printf("\nELLPACK matrix\n");
printf("data\n");
for (int i = 0; i < num_rows; i++) {
for (int j = 0; j < width; j++) {
if (ellpack.data[i*width+j] =... |
GB_unop__identity_int8_uint32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
par_relax.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)
***************************************... |
GB_unop__identity_int8_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... |
kmp_sch_simd_runtime_guided.c | // RUN: %libomp-compile
// RUN: env OMP_SCHEDULE=guided %libomp-run
// RUN: env OMP_SCHEDULE=guided,1 %libomp-run 1
// RUN: env OMP_SCHEDULE=guided,2 %libomp-run 2
// RUN: env OMP_SCHEDULE=dynamic %libomp-run
// RUN: env OMP_SCHEDULE=dynamic,1 %libomp-run 1
// RUN: env OMP_SCHEDULE=dynamic,2 %libomp-run 2
// RUN... |
core_zlag2c.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions mixed zc -> ds
*
**/
#include <plasma_core_blas.h>
#include "core_lapack.h"
#include "plasma_types.h"
/***************************************************************... |
fibonacci.c | #include <stdio.h>
#include <omp.h> //openmp library
long fib(long n)
{
long i, j;
if (n < 2)
return n;
else if (n < z)
{
return fib(n-1) + fib (n-2);
}
else
{
#pragma omp parallel sections
{
#pragma omp section
i = fib(n-1);
#pragma omp section
j = fib(n-2);
... |
correlation.split.pluto.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) (((n)<0) ? -((-(n))/(d)) : ((n)+(d)-1)/(d))
#define floord(n,d) (((n)<0) ? -((-(n)+(d)-1)/(d)) : (n)/(d))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/**
* This version is stamped on May 10, 2016
*
* Contact:
* Louis... |
zz2960ver1.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#define MAX_BIN_NUM 50
#define MAX_THREAD_NUM 100
void print_help(char *executable);
int main(int argc, char *argv[])
{
// Command line arguments processing
char *executable = argv[0];
if (argc != 4)
{
printf("Error: in... |
GB_binop__bshift_int64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
divsufsort.c | /*
* divsufsort.c for libdivsufsort
* Copyright (c) 2003-2008 Yuta Mori All Rights Reserved.
*
* 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 ... |
BF_std.c | /*
* This file is part of John the Ripper password cracker,
* Copyright (c) 1996-2001,2008,2010,2011,2013,2015 by Solar Designer
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* There's ABSOLUTELY NO WARRANTY, express or implied.
*
* A public domain vers... |
Builder.h | /**********************************************************************************
Copyright (c) 2020 Tobias Zündorf
MIT License
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 rest... |
mxEvaluateStrongFormEdgeCentralRHS.c | #ifdef _OPENMP
#include <omp.h>
#endif
#include "mex.h"
#include "blas.h"
// #if !defined(_WIN32)
// #define dgemm dgemm_
// #endif
#define DEBUG 0
#define NRHS 9
#define NLHS 1
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
/* check input & output */
if (nrhs != NRHS) {
mex... |
scheme.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
#if !def... |
Clique.h | // This code is part of the project "Theoretically Efficient Parallel Graph
// Algorithms Can Be Fast and Scalable", presented at Symposium on Parallelism
// in Algorithms and Architectures, 2018.
// Copyright (c) 2018 Laxman Dhulipala, Guy Blelloch, and Julian Shun
//
// Permission is hereby granted, free of charge, t... |
GB_unop__identity_int16_uint32.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... |
streaming.c | #include "streaming.h"
#include "helper.h"
#include "LBDefinitions.h"
#include "computeCellValues.h"
#include <omp.h>
/* doStremingCell: performs the streaming operation for one cell, in fact each cell receives all the streaming from the neighbor cells */
void doStremingCell(float * collideField, float * streamField, ... |
dft_omp.c | #include "dft.h"
#include <omp.h>
void dft(complex_t* __restrict__ in, complex_t* __restrict__ out, const int_t len)
{
const real_t c = 2 * (real_t)M_PI / len;
#pragma omp parallel for simd default(none) shared(in, out)
for(int_t k = 0; k < len; ++k)
{
real_t rr = (real_t) 0.0;
real_t ii =... |
kendalltau.c | /*KENDALLTAU Internal code for homogeneous region detection
** Please refer to file kendalltau.m
** License
** -------
** This work is protected by the CeCILL-C Licence, see
** - Licence_CeCILL_V2.1-en.txt
** - Licence_CeCILL_V2.1-fr.txt
**
** Copyright 2015 Charles Deledalle
*/
/*#ifdef MATLAB_MEX_FILE... |
sph.c | #include "globals.h"
#include "sph.h"
#include "tree.h"
#include "kernel.h"
#ifdef TWO_DIM
#define HSML_FACTOR 1.15
#else
#define HSML_FACTOR 1.24
#endif
extern void Find_sph_quantities()
{
Sort_Particles_By_Peano_Key();
Build_Tree();
#pragma omp parallel for shared(SphP, P) \
schedule(dynamic, Para... |
GeometryFunctions.h | /*
* File: GeometryFunctions.h
* Author: msantasusana, Chun Feng
*
* Created on 21 de mayo de 2012, 19:40
*/
#ifndef _GEOMETRYFUNCTIONS_H
#define _GEOMETRYFUNCTIONS_H
#include <cmath>
#include "utilities/openmp_utils.h"
#include "utilities/quaternion.h"
#include "includes/model_part.h"
#include "DEM_applicatio... |
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.
*/
#... |
ch_ompss.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include "ch_common.h"
#include "../timing.h"
void cholesky_mpi(const int ts, const int nt, double *A[nt][nt], double *B, double *C[nt], int *block_rank)
{
#pragma omp parallel
{
#pragma omp single
{... |
progress-new.c | /*
* Copyright (c) 2009, 2010, 2011, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
*/
#include <assert.h>... |
optimize.c | /* Copyright 2014. The Regents of the University of California.
* Copyright 2016-2017. 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.
*
* Authors:
* 2013-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de>
*
*
* O... |
sharing-3.c | /* { dg-do compile } */
#define N 50
#define CHUNKSIZE 5
int
main ()
{
int i, chunk;
float c[N];
chunk = CHUNKSIZE;
#pragma omp parallel for shared (c, chunk) schedule (dynamic, chunk)
for (i = 0; i < N; i++)
c[i] = i;
return 0;
}
|
omp_bucket.c | /* Code originally from The Crazy Programmer https://www.thecrazyprogrammer.com/2017/02/bucket-sort-in-c.html
*
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include "timer.h"
struct bucket
{
int count;
int* value;
};
int compareIntegers(const void* first, const void* second)
{
int x =... |
Example_target_unstructured_data.1.c | #include <stdlib.h>
typedef struct {
double *A;
int N;
} Matrix;
void init_matrix(Matrix *mat, int n)
{
mat->A = (double *)malloc(n*sizeof(double));
mat->N = n;
#pragma omp target enter data map(alloc:mat->A[:n])
}
void free_matrix(Matrix *mat)
{
#pragma omp target exit data map(delete:mat->A[:mat->N])
... |
GB_unaryop__minv_fp32_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
targc-273739.c | #include <omp.h>
#include <stdio.h>
int main (){
omp_set_default_device(0);
double *x_d, *y_d;
//allocate memory on the device
size_t N = 1024*1024*10;
int use_device = 1;
int chunk = 1;
x_d = (double*) omp_target_alloc(N*sizeof(double), omp_get_initial_device() );
y_d = (double*) omp_target_alloc(N... |
Undistorter.h | // GSLAM - A general SLAM framework and benchmark
// Copyright 2018 PILAB Inc. All rights reserved.
// https://github.com/zdzhaoyong/GSLAM
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of so... |
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)
#... |
a1p.c | #define N 200000000
int a[N],b[N];
long long s=0;
main()
{
int i,j;
/* inicialitzacio, no en paral.lel */
#pragma omp parallel
{
#pragma omp for
for(i=0;i<N;i++)
{
a[i]=1;
b[i]=2;
}
#pragma omp for
for (i=0;i<N;i++)
b[i] += a[i];
printf("Valor i %d, de b[i] %d \n",i-1,b[i-1]);
}
for (i=0;i<N;i++)
s+=b[i... |
PReLU.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/PReLU.c"
#else
static int nn_(PReLU_updateOutput)(lua_State *L)
{
THTensor *input = luaT_checkudata(L, 2, torch_Tensor);
THTensor *weight = luaT_getfieldcheckudata(L, 1, "weight", torch_Tensor);
THTensor *output = luaT_getfieldcheckudata(L, 1, "output", t... |
csr_matvec.c | /******************************************************************************
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
**************************************... |
atomic_ops.h | /**
* @file atomic_ops.h
* @author Yibo Lin (DREAMPlace)
* @date Apr 2020
*/
#include <type_traits>
#include "utility/src/utils.h"
DREAMPLACE_BEGIN_NAMESPACE
/// @brief A class generalized scaled atomic addition for floating point number
/// and integers. For integer, we use it as a fixed point number with th... |
GB_binop__bget_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-... |
configurator.c | /* Simple tool to create config.h.
* Would be much easier with ccan modules, but deliberately standalone.
*
* Copyright 2011 Rusty Russell <rusty@rustcorp.com.au>. MIT license.
*
* c12r_err, c12r_errx functions copied from ccan/err/err.c
* Copyright Rusty Russell <rusty@rustcorp.com.au>. CC0 (Public domain) Lice... |
CrossValidationMMD.h | /*
* Copyright (c) The Shogun Machine Learning Toolbox
* Written (w) 2016 - 2017 Soumyajit De
* 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 ret... |
captcha3d.c | #include <string.h>
#include <math.h>
#include "captcha3d.h"
#include "zbuffer.h"
#include "data.h"
#include "font.h"
#include "illumination.h"
#include "file.h"
static void initialize_transform(float *z, int *marge, float *e, float *offset, int height, int width, int lettersNumber)
{
// Letter depth
... |
flexFullMatrix.h | #ifndef flexFullMatrix_H
#define flexFullMatrix_H
#include "flexLinearOperator.h"
#include <vector>
//! represents a full (non-CUDA) matrix
template<typename T>
class flexFullMatrix : public flexLinearOperator<T>
{
#ifdef __CUDACC__
typedef thrust::device_vector<T> Tdata;
#else
typedef std::vector<T> Tdata;
#endi... |
3d25pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted fr... |
jacobi-ompacc-opt2.c | // Liao, 7/9/2014, add collapse() inside jacobi()
#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,(struct timezone*)NUL... |
profile.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
rose_jacobi_seq.c | /* An example code
*
* */
#include <stdio.h>
#include <math.h>
#include <omp.h>
void driver();
void initialize();
void jacobi();
void error_check();
#define MSIZE 200
int n;
int m;
int mits;
double tol;
double relax = 1.0;
double alpha = 0.0543;
double u[200][200];
double f[200][200];
double uold[200][200];
double ... |
GB_unaryop__lnot_int8_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... |
general_basis_get_vec.h | #ifndef _GENERAL_BASIS_GET_VEC_H
#define _GENERAL_BASIS_GET_VEC_H
#include "general_basis_core.h"
#include "numpy/ndarraytypes.h"
template<class T>
bool inline update_out_dense(std::complex<double> c, int sign, npy_intp n_vec,const std::complex<T> *in, std::complex<T> *out){
for(npy_intp i=0;i<n_vec;i++){
out[i... |
ellke.c | #include<Python.h>
#include<numpy/arrayobject.h>
#include<math.h>
#include<omp.h>
#define IND(a,i) *((double *)(a->data+i*a->strides[0]))
static PyObject *ellke(PyObject *self, PyObject *args);
static PyObject *ellke(PyObject *self, PyObject *args)
{
PyArrayObject *k, *ek, *kk;
int i;
double a0,a1,a2,a3,a4,b0,... |
print.c | // RUN: %libomp-tool -DFIRST_TOOL -o %t.first.tool.so %s && \
// RUN: %libomp-tool -DSECOND_TOOL -o %t.second.tool.so %s && \
// RUN: %libomp-compile && \
// RUN: env OMP_TOOL_LIBRARIES=%t.first.tool.so \
// RUN: PRINT_TOOL_LIBRARIES=%t.second.tool.so \
// RUN: %libomp-run | %sort-threads | FileCheck %s
// For GCC we ... |
GB_unop__conj_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... |
engine.h | #pragma once
#ifndef ENGINE_H
#define ENGINE_H
// Node API includes
#include <napi.h>
// STL includes
#include <memory>
#include <unordered_map>
#include <any>
// Eigen includes
#include <Eigen/Core>
// Optimization lib includes
#include <libs/optimization_lib/include/core/core.h>
#include <libs/op... |
GB_unaryop__abs_int64_int32.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_unaryop__identity_int8_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... |
benchmark.c | /**
* @file benchmark.c
* @brief benchmark the amount of time saved by parallel program
* @note compile with '--std=c99'
* @author Lumin <cdluminate@gmail.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <omp.h>
#include <sys/time.h> // high precision timer, gettime... |
test.c | #include <stdlib.h>
#include <stdio.h>
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define N 100
#define TEST_BROKEN 0 /* disable tests reardless of value below */
#define TEST1 1
#define TEST1 1
#define TEST2 1
#define TEST3 1
#define TEST4 1
#define TEST5 1
#define TEST6 1
#define T... |
fishes.h | //
// fishes.h
// funambulus
//
// Created by Benjamin Petit on 27/03/2017.
//
//
#ifndef fishes_h
#define fishes_h
#include "particles.h"
#include <valarray>
#include "ofxMovieClip.h"
#include "perlin.h"
#define SCALE 0.5
#define ALPHASMOOTH 0.02
#define DIRSMOOTH 0.96
#define FISH1 "poisson1"
#define FISH2 ... |
AI_model2_ab.c | #include"AI.h"
#include <omp.h>
#define MAXSTEP 4
//#define CHECK_SCORE
//This is for model2 Alpha-Beta Pruning
//the simulation function for the branches in the searching tree
int ai_model2_AB_simulate(GameState *gameState, Player *player,
int alpha, int beta, int depth)
{
int score_of_state=ai_sum_scores(ga... |
blackscholes.c | #include "BullMoose_4.h"
// Copyright (c) 2007 Intel Corp.
// Black-Scholes
// Analytical method for calculating European Options
//
//
// Reference Source: Options, Futures, and Other Derivatives, 3rd Edition,
// Prentice
// Hall, John C. Hull,
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <strin... |
sparse_block_matrix_ccs.h | // g2o - General Graph Optimization
// Copyright (C) 2011 R. Kuemmerle, G. Grisetti, W. Burgard
// 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 r... |
visual-effects.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
parallel_for_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
//... |
PeptideIndexing.h | // --------------------------------------------------------------------------
// OpenMS -- Open-Source Mass Spectrometry
// --------------------------------------------------------------------------
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
// ETH Zurich, and Freie Universit... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
Fig_13.1_taskBug.c | // sample compile command: "gcc -fopenmp -c Fig_13.1_taskBug.c" to generate *.o object file
void work()
{
#pragma omp task //task 1
{
#pragma omp task //task 2
{
#pragma omp critical // Critical region 1
{/* do work here */}
}
#pragma... |
diagmm_x_sky_n_col.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "memory.h"
#include "alphasparse/opt.h"
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.