source
stringlengths
3
92
c
stringlengths
26
2.25M
e1.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> double multiply(double a[], double b[], int n); //Execute as: ./e1 6 (here 6 is command line param for the size of the vectors to be multiplied) int main (int argc, const char * argv[]) { double sum; if (argc!=2) { printf("Please hand te vector si...
5-4.c
#include <omp.h> #include <stdio.h> int main() { int w = 10; #pragma omp parallel num_threads(2) #pragma omp for reduction(+ : w) for (int i = 0; i < 100; i++) { int id = omp_get_thread_num(); printf("T%d:ai%d w=%d\n", id, i, w++); } printf("W=%d\n", w); }
loop_construct.c
#include<stdio.h> #include<omp.h> //#define ENE 10 int do_it(int id){ printf("%d\t", id); } int main(){ #pragma omp parallel { int i, id, ENE=10; id = omp_get_thread_num(); #pragma omp for for (i=0; i<ENE ; i++){ do_it(id); } } printf("\n"); return 0; }
GB_unaryop__minv_uint64_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
loop_p.c
#include<stdio.h> #include<stdlib.h> #include<omp.h> #define TAM 64*127*5 #define ITERACOES_TESTE 100000 int main(){ int i; long soma; int *vetor = calloc(TAM,sizeof(int)); if(vetor == NULL){ printf("Falha ao alocar memória"); return -1; } /*for(int contador=0; contador < ITERACOES_TESTE; contador++){ f...
agent_uid_map.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...
column_matrix.h
/*! * Copyright 2017 by Contributors * \file column_matrix.h * \brief Utility for fast column-wise access * \author Philip Cho */ #ifndef XGBOOST_COMMON_COLUMN_MATRIX_H_ #define XGBOOST_COMMON_COLUMN_MATRIX_H_ #include <dmlc/timer.h> #include <limits> #include <vector> #include "hist_util.h" namespace xgboost {...
vision.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
core_zhemm.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c * **/ #include <plasma_core_blas.h> #include "plasma_types.h" #include "core_lapack.h" /****************************************************************...
GB_unaryop__identity_uint16_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...
aomp_mappings.c
#include <stdio.h> #include <omp.h> #include <string.h> //Shared Variables int THREAD_LIMIT = 4; int MAX_TEAMS = 128; int GENERIC = 0; int SPMD = 1; int MAX_THREADS_PER_TEAM = 256; int WARP_SIZE = 64; /* * Function: recordError * Description: Updates error number and prints error messages */ void recordError(int* ...
8020.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
target_teams_distribute_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target teams distribute'}} #pragma omp target teams distribute // expected-error@+1 {{unexpected OpenMP direct...
lapden.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <complex.h> #include <math.h> #include <fftw3.h> #ifdef _OPENMP #include <omp.h> #endif #include "precision.h" #include "util.h" /* Print the usage. */ void usage (char *name) { fprintf (stderr, "USAGE: %s [-h] <-d d> [-r r] [input [output]]\n", n...
DRB009-lastprivatemissing-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...
splitting.h
#ifndef _SPLITTING_H_ #define _SPLITTING_H_ #include <algorithm> #include <iterator> #include <cmath> #include <valarray> #include <sstream> #include <complex> #include <tuple> #include <numeric> #include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/io.hpp> #include <boost/math/constants/constants.h...
GB_unop__asinh_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_binop__pair_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...
ten_tusscher_2004_epi_S1_1.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S1_1.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:...
GB_binop__land_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
scale_channels_layer.c
#include "scale_channels_layer.h" #include "dark_cuda.h" #include "blas.h" #include <stdio.h> #include <assert.h> layer make_scale_channels_layer(int batch, int index, int w, int h, int c, int w2, int h2, int c2) { fprintf(stderr,"scale Layer: %d\n", index); layer l = { (LAYER_TYPE)0 }; l.type = SCALE_CHAN...
GB_binop__max_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
haval_fmt_plug.c
/* HAVAL cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and * it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary ...
Moments.h
#ifndef MOMENTS_H #define MOMENTS_H #include "../ImageChannel.h" #include "../../geo/Point2.h" #include "../../geo/Size2.h" namespace K { class Moments { public: template <int p, int q> static float get(const ImageChannel& img, const Point2i center, const Size2i window) { const int x1 = - halfL(window.w); ...
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 ...
residual_based_implicit_time_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS...
make_general_basis.h
#ifndef _MAKE_GENERAL_BASIS_H #define _MAKE_GENERAL_BASIS_H #include <iostream> #include "general_basis_core.h" #include "numpy/ndarraytypes.h" #include "openmp.h" #include "misc.h" #include <cmath> #include <cfloat> #include <vector> #include <utility> #include <algorithm> #include <functional> namespace basis_gen...
dist.h
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
Sqrt.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/Sqrt.c" #else void THNN_(Sqrt_updateOutput)( THNNState *state, THTensor *input, THTensor *output, accreal eps_) { real eps = TH_CONVERT_ACCREAL_TO_REAL(eps_); THTensor_(resizeAs)(output, input); THTensor_(sqrt)(outpu...
GB_unop__cimag_fp32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_unop__identity_int32_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...
GB_binop__bor_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
spneulayer.h
//-------------------------------------------------------------------------------- // Copyright (c) 2017-2020, sanko-shoko. All rights reserved. //-------------------------------------------------------------------------------- #ifndef __SP_NEUBLOCK_H__ #define __SP_NEUBLOCK_H__ #include "spcore/spcore.h" #include "...
test7.c
struct student { int a; int *b; }; void foo(int * arrP, int a, int b) { arrP[0] = a + b; } int bar(int a, int b, struct student *st) { #pragma omp parallel private(a) { a += b; a = st->a; } if (a > b) { return a + st.a; } else { return b; } } void bar2(int a[], int b) { #pragma omp parallel { a[0] +...
main.c
#include "../comms.h" #include "../mesh.h" #include "../params.h" #include "../shared_data.h" #include "flow_data.h" #include "flow_interface.h" #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char** argv) { if (argc != 2) { TERMINATE("usage: ./flow <parameter_filenam...
convolution_omp.c
#include <stdio.h> #include <omp.h> #include <time.h> #include "util.h" void normalize_output(int **img, int normalize_amount, int num_rows, int num_cols, int **output_img, double *parallel_time) { double itime, ftime; itime = omp_get_wtime(); #pragma omp parallel { #pragma omp for for (int i = 0...
par_gsmg.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...
image-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % IIIII M M AAA GGGG EEEEE ...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_AxB_saxpy3_slice_balanced.c
//------------------------------------------------------------------------------ // GB_AxB_saxpy3_slice_balanced: construct balanced tasks for GB_AxB_saxpy3 //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. /...
mm_p_parallel_for.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> int main(int argc, char* argv[]) { printf("entered main function!"); int size = 1024; int (*matrix_A)[size] = malloc(sizeof(int[size][size])); int (*matrix_B)[size] = malloc(sizeof(int[size][size])); int (*result)[size] = ma...
matvec_float_avx2.c
//matvec.c //Multiplies a matrix by a vector #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 1000 #define N 1200 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 100...
constitute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
Fig_7.15_parPiDivCon.c
#include <omp.h> static long num_steps = 1024 * 1024 * 1024; #define MIN_BLK 1024 * 256 double pi_comp(int Nstart, int Nfinish, double step) { int i, iblk; double x, sum = 0.0, sum1, sum2; if (Nfinish - Nstart < MIN_BLK) { for (i = Nstart; i < Nfinish; i++) { x = (i + 0.5) * step; ...
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 // //===---------------------------...
par_csr_matrix.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) **************************************...
lockTest1.c
typedef int omp_lock_t; omp_lock_t my_lock; void omp_set_lock(omp_lock_t *); void omp_unset_lock(omp_lock_t *); int main() { omp_init_lock(&my_lock); #pragma omp parallel num_threads(4) { int tid = omp_get_thread_num( ); int i, j; for (i = 0; i < 5; ++i) { omp_set_lock(&my_lock); ...
no_option.c
// RUN: %clang_cc1 -verify -o - %s // RUN: %clang_cc1 -verify -o - %s // SIMD-ONLY0-NOT: {{__kmpc|__tgt}} // expected-no-diagnostics int a; #pragma omp threadprivate(a, b) #pragma omp parallel
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...
ignored.c
// RUN: %compile-run-and-check #include <omp.h> #include <stdio.h> const int MaxThreads = 1024; int main(int argc, char *argv[]) { int cancellation = -1, dynamic = -1, nested = -1, maxActiveLevels = -1; #pragma omp target map(cancellation, dynamic, nested, maxActiveLevels) { // libomptarget-nvptx doesn't ...
gemv_thread.c
/*********************************************************************/ /* Copyright 2009, 2010 The University of Texas at Austin. */ /* All rights reserved. */ /* */ /* Redistribution and use in sou...
orphaning.c
#include <stdio.h> #include <omp.h> int a[1000000]; int b[100]; int c[10]; int N = 1000000; int M = 100; int P = 10; int v1 =0; int v2 =0; void alpha() { for (int i = 0; i < P; ++i) { c[i] += 99; } } void fred() { #pragma omp for reduction(+: v1,v2) for (int i = 0; i < N; ++i) { a...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
DataGen.h
// Copyright (C) 2019-2020 Zilliz. 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 required by applicable l...
GB_binop__eq_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-...
micmat.c
// Copyright (c) 2014, Oren Rippel and Ryan P. Adams // All rights reserved. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: // 1. Redistributions of source code must retain the above copyright notice, this list of condit...
GB_unop__identity_fp64_uint8.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...
SphereSampler.h
#ifndef SPHERE_SAMPLER_INCLUDED #define SPHERE_SAMPLER_INCLUDED #include <vector> #include <omp.h> #include "../Util/Geometry.h" #include "../SignalProcessing/CubeGrid.h" #include "../SignalProcessing/SphericalGrid.h" #include "../SignalProcessing/Fourier.h" template< class Real > void SampleSpheres( const CubeGrid<...
equation_batchnorm.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
fac_amr_fcoarsen.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...
matriz.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #ifndef SIZE #define SIZE 1000 /* Max Size of matrices */ #endif int A[SIZE][SIZE], B[SIZE][SIZE], C[SIZE][SIZE]; double inicio, fim; void fill_matrix(int m[SIZE][SIZE]) { static int n = 0; for (int i = 0; i < SIZE; i++) for (int j = 0; j < SIZE; j++) ...
pooling_3x3_pack4.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...
main.c
#include "rsbench.h" int main(int argc, char * argv[]) { // ===================================================================== // Initialization & Command Line Read-In // ===================================================================== int version = 9; #ifdef OPENMP int max_procs = omp_get_num_procs(); ...
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 // //...
PosTransformer.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: // // Fil...
GB_binop__band_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-...
clock.c
/* EXAMPLE SOURCE : https://forums.developer.nvidia.com/t/reading-globaltimer-register-or-calling-clock-clock64-in-loop-prevent-concurrent-kernel-execution/48600/8 https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#special-registers-clock64 https://docs.nvidia.com/cuda/inline-ptx-assembly/index.html htt...
dataset.h
#ifndef LIGHTGBM_DATASET_H_ #define LIGHTGBM_DATASET_H_ #include <LightGBM/utils/random.h> #include <LightGBM/utils/text_reader.h> #include <LightGBM/utils/openmp_wrapper.h> #include <LightGBM/meta.h> #include <LightGBM/config.h> #include <LightGBM/feature_group.h> #include <vector> #include <utility> #include <func...
test.c
#include <stdio.h> #include <omp.h> int main() { #pragma omp parallel num_threads(4) { int currentThread = omp_get_thread_num(); if(currentThread == 0) { printf("Master!\n"); } else { printf("Slave!\n"); } } return 0; }
cheby.gold.h
#include "common/common.hpp" void cheby_step (double *out_def, double* Ac_def, double* Ap_def, double* RHS_def, double* Dinv_def, double h2inv, double c1, double c2, int N) { double (*Ap)[N][N] = (double (*)[N][N])Ap_def; double (*Ac)[N][N] = (double (*)[N][N])Ac_def; double (*out)[N][N] = (double (*)[N][N])out_def...
compatibility.h
// -*- C++ -*- // Copyright (C) 2007-2013 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3...
pclantr.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/pzlantr.c, normal z -> c, Fri Sep 28 17:38:13 2018 * **/ #include "plasma_async.h" #include "plasma_contex...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
task_reduction3.c
// RUN: %libomp-compile-and-run // XFAIL: icc // UNSUPPORTED: clang-4, clang-5, clang-6, clang-7, clang-8, clang-9, clang-10 // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 #include <stdio.h> #include <stdlib.h> int a = 0, b = 1; int main(int argc, char **argv) { #pragma omp parallel { #pragma omp sectio...
net_ah_fmt_plug.c
/* Cracker for IPsec Authentication Header (AH) hashes. * * This software is Copyright (c) 2017, Dhiru Kholia <dhiru [at] openwall.com>, * 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, are permitted...
opencl_tc_fmt_plug.c
/* * TrueCrypt volume OpenCL support to John The Ripper (RIPEMD-160 only) * * Based on CPU format originally written by Alain Espinosa <alainesp at * gmail.com> in 2012. * Copyright (c) 2015, magnum * Redistribution and use in source and binary forms, with or without * modification, are permitted. */ #if HAVE_...
spa_mult.h
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include <algorithm> #include "utility.h" #include "CSR.h" #include "SPA.h" template <typename IT, typename NT, typename MultiplyOperation, typename AddOperation> void MaskedSPASpGEMM(const CSR<IT, NT> & A, const CSR<IT, NT> & B, CSR<IT, NT> & C, const CSR<IT, ...
ZQ_CNN_MTCNN.h
#ifndef _ZQ_CNN_MTCNN_H_ #define _ZQ_CNN_MTCNN_H_ #pragma once #include "ZQ_CNN_Net.h" #include "ZQ_CNN_BBoxUtils.h" #include <omp.h> namespace ZQ { class ZQ_CNN_MTCNN { public: using string = std::string; ZQ_CNN_MTCNN() { min_size = 60; thresh[0] = 0.6; thresh[1] = 0.7; thresh[2] = 0.7; nms_thr...
dpotrf_blasfeo.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from compute/zpotrf.c, normal z -> d, Thu Aug 8 17:08:15 2019 * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descript...
csr_matop.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...
lagrangian_pfem2_utilities.h
/* ============================================================================== KratosTestApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2010 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc.edu rrossi@cim...
cpu_ctc.h
#pragma once #include <tuple> #include <cmath> #include <limits> #include <algorithm> #include <numeric> #if !defined(CTC_DISABLE_OMP) && !defined(APPLE) #include <omp.h> #endif #include "ctc_helper.h" template<typename ProbT> class CpuCTC { public: // Noncopyable CpuCTC(int alphabet_size, int minibatch, v...
convolution_pack8to1_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 ...
gimple-pretty-print.c
/* Pretty formatting of GIMPLE statements and expressions. Copyright (C) 2001-2018 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com> and Diego Novillo <dnovillo@google.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms o...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
PAddOP.h
#ifndef PAddOP #define PAddOP /* * PAddOP.h: * (pointwise) add * * Created on: June 13, 2017 * Author: mszhang */ #include "Eigen/Dense" #include "MyLib.h" #include "Node.h" #include "Graph.h" class PAddNode : public Node { public: vector<PNode> ins; ~PAddNode() { ins.clear(); } publ...
bml_normalize_csr_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_normalize.h" #include "../bml_parallel.h" #include "../bml_types.h" #include "bml_add_csr.h" #include "bml_allocate_csr.h" #include "bml_normalize_csr.h" #include "bml_scale_csr.h" #include "bml_types_csr.h" #include <comp...
DemBones.h
/////////////////////////////////////////////////////////////////////////////// // Dem Bones - Skinning Decomposition Library // // Copyright (c) 2019, Electronic Arts. All rights reserved. // /////////////////////////////////////////////////////////////////////////////// ...
sum_B1.c
#include "sum_struct.h" #include "sum_B1.h" #include "get_bit_u64.h" int sum_B1( const uint64_t * restrict in, uint64_t nR, SUM_I_ARGS *ptr_args, uint64_t idx ) { int status = 0; uint32_t nT = sysconf(_SC_NPROCESSORS_ONLN); // Convert number of elements (nR) to number of 64 ...
tensor.h
#ifndef TENSOR_H #define TENSOR_H #include "common.h" #include "dim.h" namespace tpm { class Tensor { public: enum DataType { Float32, Int32, }; enum TensorType { Input, Weight, Invalid, NotCounted, }; // TODO: is more compute state needed? ...
GB_unop__identity_uint64_bool.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...
problem.c
/** * Radiation forces * * This example provides an implementation of the * Poynting-Robertson effect. The code is using the IAS15 integrator * which is ideally suited for this velocity dependent force. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <math.h> #include "rebound.h" void rad...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
GB_unop__identity_int64_bool.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...
Parallel.c
#include <stdio.h> #include <omp.h> #include <unistd.h> #include <time.h> //This is the code using OpenMP to parallelise the code on all (4) cores of the CPU then appending the time it took to the txt file //uncomment the comments below to also have it print the result to the console int main(){ int n ...
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...
DRB048-firstprivate-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...
gather_ref.c
/* * 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 ma...
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...