source
stringlengths
3
92
c
stringlengths
26
2.25M
gemm.h
/* +---------------------------------------------------------------------------+ | Juzhen: C++ library for linear algebra | +---------------------------------------------------------------------------+ | | | Co...
activate.c
#include "lib.h" #include <math.h> #include <stdint.h> #include <stdlib.h> void NEURALOPS_SYMBOL(rect_fwd)( size_t batch_sz, size_t dim, const float *in_buf, float *out_buf) { #pragma omp parallel for for (size_t p = 0; p < batch_sz * dim; p += 1) { float x = in_buf[p]; out_buf[p] = x * (x ...
cpu.c
#include "additionally.h" // some definitions from: im2col.h, blas.h, list.h, utils.h, activations.h, tree.h, layer.h, network.h // softmax_layer.h, reorg_layer.h, route_layer.h, region_layer.h, maxpool_layer.h, convolutional_layer.h #define GEMMCONV /* // from: box.h typedef struct { float x, y, w, h; } box; ...
update_ops_matrix_dense_multi.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif //void multi_qubit_dense_matrix_gate_old_single(const UINT* t...
build.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <assert.h> #include <stdbool.h> #include <sys/time.h> #include <unistd.h> #include "mkl.h" #include <immintrin.h> #include "omp.h" void build(char* build_file, char* data_folder, char* dest_folder, char* eval_mode, int rank); void p...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #include "OmpAttribute.h" #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determ...
uniform_grid_environment.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & Newcastle University for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
gemm_symm_int8.h
// chgemm is pleased to support the open source community by supporting ncnn available. // // author:tpoisonooo (https://github.com/tpoisonooo/chgemm) implement symmetric int8 GEMM on aarch64. // // Copyright (C) 2019 tpoisonooo. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you ma...
GB_unop__identity_bool_uint8.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_unaryop__identity_fp32_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...
mMatOpen.c
#include <omp.h> #include <time.h> #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include "readFiles.h" #include "mMatOpen.h" #include "MatrixIO.h" char *fileName_mat1, *fileName_mat2, *fileName_mat3; long int *mat1, *mat2, *mat3, *matFinal; struct timeval ini_ler_mtz1, end_ler_mtz1, ini_ler_mtz2, end_l...
GB_unop__identity_int16_int32.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...
GB_unop__lnot_int32_int32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
mxv_omp_mpi.c
#include "mpi.h" #include <stdio.h> #include <stdlib.h> #include <time.h> #define min(x, y) ((x)<(y)?(x):(y)) /** Program to multiply a matrix times a vector using both mpi to distribute the computation among nodes and omp to distribute the computation among threads. */ int main(int argc, cha...
Pstd.h
#pragma once #include "Constants.h" #include "FieldSolver.h" #include "Grid.h" #include "Vectors.h" #include "PmlPstd.h" namespace pfc { class PSTD : public SpectralFieldSolver<PSTDGridType> { public: PSTD(PSTDGrid * grid, double dt); void updateFields(); void updateHalfB(); ...
test-new-conv.c
/* Test and timing harness program for developing a multichannel multikernel convolution (as used in deep learning networks) Note there are some simplifications around this implementation, in particular with respect to computing the convolution at edge pixels of the image. Author: David Gregg Date: ...
GB_kroner.c
//------------------------------------------------------------------------------ // GB_kroner: Kronecker product, C = kron (A,B) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com S...
pi-v15.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #endif int main(int argc, char *argv[]) { do...
task-taskwait-nested.c
/* Copyright (c) 2015-2019, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Simone Atzeni (simone@cs.utah.edu), Joachim Protze (joachim.protze@tu-dresden.de), Jonas Hahnfeld (hahnfeld@itc.rwth-aachen.de), Ganesh Gopalakrishnan, Zvonimir Rakamaric, Dong H. A...
GB_binop__isle_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-...
base.c
/* * `Pattern detection in large temporal graphs using algebraic fingerprints` * * This experimental source code is supplied to accompany the * aforementioned paper. * * The source code is configured for a gcc build to a native * microarchitecture that must support the AVX2 and PCLMULQDQ * instruction set exten...
convolutiondepthwise_5x5_pack4.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 ...
GB_subassign_07.c
//------------------------------------------------------------------------------ // GB_subassign_07: C(I,J)<M> += scalar ; no S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifier: Ap...
laplace2d-04s.c
/* * Copyright 2012 NVIDIA Corporation * * 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 required by applicable law ...
clang-262701.c
#include <stdio.h> #include <string.h> #include <omp.h> #define THREADS 2 #define TEAMS 2 int main(){ int gpu_results[THREADS]; int correct_results[THREADS] = {2,2}; #pragma omp target teams thread_limit(THREADS) num_teams(TEAMS) map(from:gpu_results) { int dist[THREADS]; // Uncomment line below to tri...
declare-variant-4.c
double f1 (int, long, float); double f2 (int, long, float); double f3 (int, long, float); double f4 (int, long, float); double f5 (int, long, float); #pragma omp declare variant (f1) match (user={condition(1)}) #pragma omp declare variant (f2) match (user={condition(score(1):1)}) #pragma omp declare variant (f3) match...
sample_shared_private.c
/* Andre Augusto Giannotti Scota (https://sites.google.com/view/a2gs/) */ #include <stdio.h> #include <stdlib.h> #include <omp.h> #include "openmp_util.h" int main(int argc, char *argv[]) { int factor, i, resultSum; long resultMul; factor = i = resultSum = 0; resultMul = 1; #pragma omp parallel shared(resultS...
NLmean_propag2dirs_sspacing4_tspacing4_sim12_acc12_neighbor5_tau0100.c
/* * compile: gcc -O3 -std=c99 -o [filename_out] -fopenmp [filename].c -lm -I/usr/include/netcdf-3/ -L/usr/lib64/ -lnetcdf -lnetcdf_c++ * in the terminal: export OMP_NUM_THREADS=3 */ #include<stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <netcdf.h> #include <omp.h> /* This is the name ...
agent_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...
absorb.h
#ifndef ABSORB_H #define ABSORB_H #include <math.h> #include <float.h> #include <stdio.h> #include <stdlib.h> #include <complex.h> #include <stdlib.h> #include <string.h> #define PI 3.1415926535897 #define MIN(x,y) ((x)<(y)?(x):(y)) /** * Ported from ModelingQuasiPeriodic2D 2017.09.19 * Log decay of Q from qInteri...
SpatialConvolutionMM.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialConvolutionMM.c" #else static inline void THNN_(SpatialConvolutionMM_shapeCheck)( THTensor *input, THTensor *gradOutput, THTensor *weight, THTensor *bias, int kH, int kW, int dH, int dW, int padH, int padW) { THArgCheck(kW > 0 && kH > 0, 9, ...
GB_unop__identity_fp32_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...
GB_binop__gt_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-...
fft-cuda.c
/* Copyright 2013, 2015. The Regents of the University of California. * Copyright 2019. Uecker Lab, University Medical Center Göttingen. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2012-2019 Martin Uecker <martin.uecker...
GB_binop__rdiv_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-...
psimci.c
/********************************************************************* * Program: psimci.c * Author: Mauricio Caceres Bravo <caceres@nber.org> * Created: Sun Feb 12 19:28:43 EST 2017 * Updated: Tue May 30 18:11:50 EDT 2017 * Purpose: Stata plugin to simulate a CI under H0: b = 0 for a * treatment effect...
multind.c
/* Copyright 2013-2015 The Regents of the University of California. * Copyright 2016-2020. Uecker Lab. University Medical Center Göttingen. * Copyright 2017. Intel Corporation. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: ...
acoustics.c
/* * Student: Trascau Mihai * Grupa: 344C4 * * Lucrare: Ecuatia undelor pentru acustica 2D * Fisier: acoustics.c * Descriere: Fisier sursa in care este implementat tot programul folosind functiile descrise in celelalte fisiere sursa. */ #include "acoustics.h" int main(int argc, char *argv[]) { int i,j; in...
par_multi_interp.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
r_direct_o1.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...
yoloDection.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2018 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 ...
MSCHAPv2_bs_fmt_plug.c
/* * MSCHAPv2_fmt.c -- Microsoft PPP CHAP Extensions, Version 2 * * Written by JoMo-Kun <jmk at foofus.net> in 2010 * and placed in the public domain. * * Modified for performance, OMP and utf-8 support * by magnum 2010-2011, no rights reserved * * Modified for using Bitsliced DES by Deepika Dutta Mishra * <d...
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) #...
colorspace.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__lnot_uint32_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...
GB_binop__gt_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-...
denseParallelJacobi.h
// // Created by mbarb on 24/01/2018. // #ifndef PARALLELITERATIVE_DENSEPARALLELJACOBI_H #define PARALLELITERATIVE_DENSEPARALLELJACOBI_H #include <omp.h> namespace Iterative { template <typename Scalar, long long SIZE> class denseParallelJacobi { public: /** * * @param A linea...
hvs_multi_moments.c
// // Copyright (C) 2010-2011, Vitalii Ostrovskyi <vitalii@ostrovskyi.org.ua> // Author: Vitalii Ostrovskyi <vitalii@ostrovskyi.org.ua> // #include <omp.h> #if HVS_DEBUG>2 #include <stdio.h> #endif #ifdef HVS_PROFILE #include <time.h> #endif int init_ode_data(hvs_ode_data *data, hvs_state *input) { data->ncenters = ...
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 // //===---------------------------...
validate.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:...
DRB050-functionparameter-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...
sse.h
/* SPDX-License-Identifier: MIT * * 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 the rights to use, copy, * modify, merge, publish, ...
NQueensParallel.c
/** * Author: https://www.dreamincode.net/forums/topic/336580-recursive-algorithm-for-n-queens-problem/ */ #include <stdio.h> #include <stdlib.h> #include <omp.h> unsigned int solutions; void setQueen(int queens[], int row, int col, int size) { //check all previously placed rows for attacks for(int i = 0; ...
RaghavanVorpMaterial.c
/* This file is part of redbKIT. * Copyright (c) 2016, Ecole Polytechnique Federale de Lausanne (EPFL) * Author: Federico Negri <federico.negri@epfl.ch> */ #include "RaghavanVorpMaterial.h" /*************************************************************************/ void RaghavanVorpMaterial_forces(mxArray* p...
transform.h
/*! * Copyright 2018 XGBoost contributors */ #ifndef XGBOOST_COMMON_TRANSFORM_H_ #define XGBOOST_COMMON_TRANSFORM_H_ #include <dmlc/omp.h> #include <dmlc/common.h> #include <xgboost/data.h> #include <utility> #include <vector> #include <type_traits> // enable_if #include "xgboost/host_device_vector.h" #include "x...
bit_vector_functions.h
#ifndef BIT_VECTOR_FUNCTIONS_H #define BIT_VECTOR_FUNCTIONS_H #include <vector> #include <bitset> #include "helper/confusion.h" #include "config.h" #include "io_and_allocation.h" #include "updates_and_measures.h" using std::vector; template<typename bit_vector_t, typename index_t> size_t computeHammingDistanceCPU(...
divsufsort.c
/* * divsufsort.c for libdivsufsort-lite * 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 wit...
global.c
#include <stdio.h> #include <unistd.h> /* sleep, usleep */ #include "../gptl.h" #ifdef HAVE_MPI #include <mpi.h> #endif #ifdef THREADED_OMP #include <omp.h> #endif int main (int argc, char **argv) { int iam = 0; int nranks = 1; /* number of MPI tasks (default 1) */ int nthreads = 1; /* number of threads (...
hermv_c_bsr_n_hi_trans.c
#include<string.h> #ifdef _OPENMP #include<omp.h> #endif #include"alphasparse/opt.h" #include "alphasparse/kernel.h" #include "alphasparse/util.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *A, const ALPHA_Number *x, const ALPHA_Numb...
schelude-clause-modificado.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,x; if(argc < 2) { fprintf(stderr,"\nFalta chunk \n"); exit(-1); } chunk = atoi(argv[1]); for (i=0; i<n; i++) a[i] = i; #pragma omp...
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 // //===---------------------------...
GB_unop__abs_uint16_uint16.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...
cnn_pool.h
#ifndef __CNN_POOL_H__ #define __CNN_POOL_H__ #include <string.h> #include "cnn_types.h" #ifdef CNN_WITH_CUDA #include <cuda_runtime.h> void cnn_pool_2d_max_gpu(float* dst, int* indexMat, int dstWidth, int dstHeight, int poolSize, float* src, int srcWidth, int srcHeight, ...
for_simple.c
/* PMSIS includes */ #include "pmsis.h" #include "omp.h" #define NB_CORES (8) static int32_t core_iterations[NB_CORES] = { 0 }; static uint32_t errors = 0; /* Cluster main entry, executed by core 0. */ void cluster_delegate(void *arg) { printf("Cluster master core entry\n"); #pragma omp parallel num_threads...
krb5_tgs_fmt_plug.c
/* * Based on the work by Tim Medin * Port from his Pythonscript to John by Michael Kramer (SySS GmbH) * * This software is * Copyright (c) 2015 Michael Kramer <michael.kramer@uni-konstanz.de>, * Copyright (c) 2015 magnum * Copyright (c) 2016 Fist0urs <eddy.maaalou@gmail.com> * * Modified by Fist0urs to improv...
utils.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 ...
DRB082-declared-in-func-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...
util_test.c
/* * This file is part of ABCDK. * * MIT License * */ #include <stdio.h> #include <assert.h> #include <unistd.h> #include <string.h> #include <linux/serial.h> #include "abcdk-util/general.h" #include "abcdk-util/getargs.h" #include "abcdk-util/geometry.h" #include "abcdk-util/ffmpeg.h" #include "abcdk-util/bmp.h...
c-smallpt.c
//----------------------------------------------------------------------------- // Includes //----------------------------------------------------------------------------- #pragma region #include "imageio.h" #include "sampling.h" #include "specular.h" #include "sphere.h" #pragma endregion //-------------...
csr_matvec_oomp.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) **************************************...
ast-dump-openmp-target-enter-data.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test(int x) { #pragma omp target enter data map(to \ : x) } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> ...
GB_unaryop__abs_int16_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...
BoWBuilder.h
// // BoWBuilder.h // BoVW // // Created by willard on 15/7/21. // Copyright (c) 2015年 wilard. All rights reserved. // #ifndef __BOW_BUILDER__ #define __BOW_BUILDER__ #include <iostream> #include <vector> #include <string> #include <set> #include <utility> #include "opencv2/core/core.hpp" #include "opencv2/highgu...
performance.c
#include "performance.h" // from GNU.org int compare_doubles (const void *a, const void *b) { const double *da = (const double *) a; const double *db = (const double *) b; return (*da > *db) - (*da < *db); } void performance_test(Parameters * p){ int i; int tests_remain; double t_start, t_end, t=0.0; do...
DRB102-copyprivate-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
fm_loss.h
/** * Copyright (c) 2015 by Contributors */ #ifndef ZDIFACTO_LOSS_FM_LOSS_H_ #define ZDIFACTO_LOSS_FM_LOSS_H_ #include <vector> #include <cmath> #include "zdifacto/base.h" #include "dmlc/data.h" #include "dmlc/io.h" #include "zdifacto/loss.h" #include "common/spmv.h" #include "common/spmm.h" #include "logit_loss.h" ...
csr_matrix.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
gradient.c
/********************************************************************[libaroma]* * Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.com/) * * 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 Lic...
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)...
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...
macc.h
#ifndef _MACC_H #define _MACC_H 1 #include <omp.h> #include <openacc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> // Including stdbool.h may cause conflicting. #define bool int #define true 1 #define false 0 #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b...
turbocompression.h
#ifndef TURBOCOMPRESSION_H_ #define TURBOCOMPRESSION_H_ #include "turbopacking32.h" #include "turbopacking64.h" #include "util.h" /** * "turbo" FOR packing uses an optimization to bit packing due to * TurboPFor: we use 64-bit words as much as possible. * */ /** * Compresses "length" values from "in" to "out" and ...
convolution_1x1_pack8_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 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 ...
opencl_sxc_fmt_plug.c
/* * Modified by Dhiru Kholia <dhiru at openwall.com> for Keychain format. * * This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, ar...
owl_ndarray_pool_impl.h
/* * OWL - OCaml Scientific and Engineering Computing * Copyright (c) 2016-2018 Liang Wang <liang.wang@cl.cam.ac.uk> */ #ifdef OWL_ENABLE_TEMPLATE CAMLprim value FUN_NATIVE (spatial) ( value vInput_ptr, value vOutput_ptr, value vBatches, value vInput_cols, value vInput_rows, value vIn_channel, value vKernel...
mass_sum.c
#include "mass_sum.h" #define REAL_CELL 1 double mass_sum(int ncells, int* restrict celltype, double* restrict H, double* restrict dx, double* restrict dy){ double summer = 0.0; #pragma omp target teams distribute parallel for simd reduction(+:summer) for (int ic=0; ic<ncells ; ic++) { if (...
ej3reductionmejora.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #define N 1024 int main () { int memsize = N*sizeof(float); float *a = (float *) malloc (memsize); float *b = (float *) malloc (memsize); for (int i=0;i<N; ++i){ a[i]=b[i]=1.0f; } int numthreads=4; omp_set_num_threads(numthreads); float *mem = (f...
GB_unaryop__abs_uint32_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...
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...
DenseTile.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
mcrat.c
/* # Program to run a Monte Carlo radiation transfer through the 2D # simulations of GRB jets. # # Python code written by D. Lazzati at Oregonstate, C code written by Tyler Parsotan @ Oregon State # ver 0.1 July 8, 2015 # ver 1.1 July 20, 2015: added record of number of scatterings, included # all terms in weight. Sh...
fib.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #include <stdint.h> #include <omp.h> #include <sys/time.h> static uint64_t par_res, seq_res; int cutoff_value; #define FIB_NUM_PRECOMP 50 uint64_t fib_results[FIB_NUM_PRECOMP] = { /*{{{*/ 0, 1, 1, 2, 3, 5, 8, ...
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__bclr_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
streaming_find_most_influential.h
//===------------------------------------------------------------*- C++ -*-===// // // Ripples: A C++ Library for Influence Maximization // Marco Minutoli <marco.minutoli@pnnl.gov> // Pacific Northwest National Laboratory // //===-------------------------------------------...
Evaluate.h
/* Copyright (c) 2005-2016, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Aboria. Redistribution and use in source and binary forms...
correlation.origin.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...
pi-omp.c
/* ==================================== *\ || OpenMP calculate Pi || \* ==================================== */ #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <limits.h> #include <string.h> #include <signal.h> #include <time.h> #include <omp.h> #include <mpfr.h> //#define func(x, size) (sqrt((si...
iFDMEX.c
#include "mex.h" #ifdef __GNU__ #include <omp.h> #endif #ifndef MAXCORES #define MAXCORES 1 #endif void mexFunction(int nlhs, mxArray *left[], int nrhs, const mxArray *right[]) { /* Declare variables */ mwSize nD, NP=1, NV=1, NS=1, NT=1, RT=1; const mwSize *sz; mxClassID precision; mxArray *I;...
GB_unop__acosh_fp64_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...