source
stringlengths
3
92
c
stringlengths
26
2.25M
triad.c
/* * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of th...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
copy.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define ELEMENT double ELEMENT *copy(ELEMENT *vect, int size) { ELEMENT *vect_new = malloc(sizeof(ELEMENT) * size); for (int i = 0; i < size; i++) { vect_new[i] = vect[i]; } return vect_new; } ELEMENT *copy_parallel(ELEMENT *vect, int si...
neuralClasses.h
#pragma once #include <iostream> #include <fstream> #include <algorithm> #include <cassert> #include <cmath> #include <vector> #include <boost/unordered_map.hpp> #include <Eigen/Dense> #include "maybe_omp.h" #include "util.h" #include "graphClasses.h" #include "USCMatrix.h" // classes for various kinds of layers #i...
pe_handler.h
/** * Author: Kun Sun (sunkun@szbl.ac.cn) * Date: Mar, 2021 * This program is part of the Ktrim package **/ #include <fstream> #include <sstream> #include <algorithm> #include <thread> #include <ctime> #include <stdlib.h> #include <memory.h> #include <omp.h> #include "common.h" using namespace std; void inline CPE...
opencl_dmg_fmt_plug.c
/* * DMG cracker patch for JtR. Hacked together during August of 2012 * by Dhiru Kholia <dhiru.kholia at gmail.com> * * This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> * Copyright (c) 2015, magnum * and it is hereby released to the general public under the following terms: * Redistribution...
ConvolutionRules.h
// Copyright 2016-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #ifndef CONVOLUTIONRULES_H #define CONVOLUTIONRULES_H #include <cuda_runtime_api.h> #include <cuda.h> #include "Recta...
GB_binop__pow_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
thread_local_buffer_pool.h
/* * Buffer which provides concurrent access to its underlying container, without the need of synchronization for * every insert. Each thread stores data to its own, smaller buffer, which is later copied to the shared thread_safe_buffer. */ #ifndef MAXFLOW_THREAD_LOCAL_BUFFER_POOL_H #define MAXFLOW_THREAD_LOCAL_BUF...
GB_subassign_02.c
//------------------------------------------------------------------------------ // GB_subassign_02: C(I,J) = A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com See Grap...
vorticities.c
/* This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME */ /* Here, vorticities are calculated. The word "vorticity" hereby refers to both vertical and tangential components. */ #include <stdi...
fixed_version.c
#include<stdio.h> int main(){ int sum = 1; int i =1; // increase sum by one each iteratiob using openmp #pragma omp parallel for firstprivate(i) reduction( + : sum ) for (i = i; i < 10; i++) { sum +=1; } }
sparse_create_mex.c
/* Copyright (c) 2012 by Marcin Krotkiewski, University of Oslo See ../License.txt for License Agreement. */ #include <libutils/config.h> #include "sparse_opts.h" #include <libutils/mtypes.h> #include <libutils/utils.h> #include <libutils/sorted_list.h> #include <libutils/memutils.h> #include <libutils/tictoc.h...
PReLU.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/PReLU.c" #else void THNN_(PReLU_updateOutput)( THNNState *state, THTensor *input, THTensor *output, THTensor *weight, THIndex_t nOutputPlane) { THTensor_(resizeAs)(output, input); if (nOutputPlane == 0) { ...
trsm_cmpt.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include "mkl.h" #include "sys/time.h" #include "math.h" #define min(X,Y) (((X) < (Y)) ? (X) : (Y)) #define TRSM_BATCH cblas_dtrsm_batch #define TRSM_COMPUTE_BATCH cblas_dtrsm_compute_batch #define fabst fabs #define FPTYPE double #define VECTO...
CImg.h
/* # # File : CImg.h # ( C++ header file ) # # Description : The C++ Template Image Processing Toolkit. # This file is the main component of the CImg Library project. # ( http://cimg.sourceforge.net ) # # Project manager : David Tschump...
DRACC_OMP_039_Vector_add_Mult_nowait_yes.c
/* Vector addition then scalar multiplication with no implicit barrier in between. */ #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #define N 100 #define C 512 int a; int b[C]; int c[C]; int temp[C]; int init(){ for(int i=0; i<C; i++){ b[i]=0; c[i]=2; temp[i]=0; } a...
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) #...
ExampleReservoirs_Shared.h
/** * grove: ExampleReservoirs_Shared.h * Copyright (c) Torr Vision Group, University of Oxford, 2017. All rights reserved. */ #ifndef H_GROVE_EXAMPLERESERVOIRS_SHARED #define H_GROVE_EXAMPLERESERVOIRS_SHARED #include <ORUtils/PlatformIndependence.h> #define ALWAYS_ADD_EXAMPLES 0 namespace grove { /** * \brief...
heap_mult_generic.h
#ifndef MASKED_SPGEMM_HEAP_MULT_GENERIC_H #define MASKED_SPGEMM_HEAP_MULT_GENERIC_H #include <algorithm> #include "CSR.h" // TODO: move to a separate file namespace tmp { /** ** Count flop of SpGEMM between A and B in CSR format **/ template<typename IT, typename NT> long long int getFlop(const CSR<IT, NT> &A, co...
ParallelHashMap.h
/** * @file ParallelHashMap.h * @brief A thread-safe hash map supporting insertion and lookup operations * @details The parallel hash map is built on top of a fixed-sized hash map * object and features OpenMP concurrency structures. The underlying * fixed-sized hash map handles collisions with chaining. * @...
GB_binop__eq_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
DRB056-jacobi2d-tile-no.c
/** * jacobi-2d-imper.c: This file is part of the PolyBench/C 3.2 test suite. * Jacobi with array copying, no reduction. with tiling and nested SIMD. * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net * License: /LICENSE.OSU.txt */ #include <stdio.h> #inc...
cmontecarlo.c
#include <inttypes.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #ifdef WITHOPENMP #include <omp.h> #endif #include "io.h" #include "abbrev.h" #include "status.h" #include "rpacket.h" #include "cmontecarlo.h" /** Look for a place to insert a value in an inversely sorted float array. * * @param x an i...
estimate_time_step.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // // Main authors: Kazem Kamran // Jordi Rubio // #if !defined(KRATOS_ESTIMATE_TIME_ST...
deconvolution_pack1ton_fp16s.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 ...
ex2-parallel.c
#include <stdio.h> void primeNumbers(int n); int main(){ int n = 100000; primeNumbers(n); } void primeNumbers(int number){ int j, i = 0; int primes[number+1]; //populating array with naturals numbers for(i = 0; i<=number; i++) primes[i] = i; #pragma omp parallel { #p...
dfa8.c
#include <stdio.h> #include <stdint.h> #include <string.h> #include "dfa.h" #ifdef _OPENMP #include "omp.h" #endif void r8_get_diffMC(const int col8, const word32 diff_col, const int col9, word32 diffMC_list[DIFF_MC_MAX], int *len) { int i, c1, c2, diff; int fault_list[255]; int fault_list_le...
modifier_reverse.h
// ========================================================================== // SeqAn - The Library for Sequence Analysis // ========================================================================== // Copyright (c) 2006-2010, Knut Reinert, FU Berlin // All rights reserved. // // Redistribution and us...
nvptx_target_printf_codegen.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_[0-9a-z]+_[0-9a-z]+" "reduction_size[.].+[.]" "pl_cond[.].+[.|,]" --prefix-filecheck-ir-name _ // Test target codegen - host bc file has to be cr...
PeptideIndexing.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
nt2_fmt_plug.c
/* * NT-ng format, using intrinsics. * * This software is Copyright 2011, 2012 magnum, 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. * * Losely based on rawSHA1, by bartavelle * and ...
par_mod_lr_interp.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) ***************************************...
flexProxDualHuber.h
#ifndef flexProxDualHuber_H #define flexProxDualHuber_H #include "flexProx.h" //! represents prox for a Huber term /*! \f$ \alpha \|\cdot\|_{H_\epsilon} \f$ */ template<typename T> class flexProxDualHuber : public flexProx<T> { #ifdef __CUDACC__ typedef thrust::device_vector<T> Tdata; #else typedef std::vector<T>...
teams_notarget_get_num_teams.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> #define N 10000 int main() { int n = N; int team_id, cur_teams; int teams_sizes[10] = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512}; int *a = (int *)malloc(n*sizeof(int)); int err = 0; for (int j = 0; j < 10; j++) { cur_teams = 0; #pragma omp t...
GB_unop__bnot_uint8_uint8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
reorder.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "base.h" #include "reorder.h" #include "sptensor.h" #include "ftensor.h" #include "io.h" #include "sort.h" #include "timer.h" #include "...
fourier.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
alloc_benchmark.c
// SPDX-License-Identifier: BSD-2-Clause /* Copyright (C) 2016 - 2020 Intel Corporation. */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/time.h> #include <unistd.h> #include <stdint.h> #include <limits.h> #ifdef _OPENMP #include <omp.h> #endif #if defined(HBWMALLOC) #include <hbwmalloc.h> #de...
GB_unaryop__one_int64_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
zlacpy.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
DRB097-target-teams-distribute-orig-no.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
matrix_multiplication.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<omp.h> void* init_matriz (int rows, int cols) { return malloc (sizeof (float[rows][cols])); } void* read_matriz (FILE *fr, int *n_row, int *n_col) { fscanf(fr, "%d", n_row); fscanf(fr, "%d", n_col); int rows = *n_row; int cols = *n_col; flo...
vecadd_opt3.c
#include <stdio.h> #include <time.h> #include "timer.h" #include "omp.h" #include "place_report_omp.h" // large enough to force into main memory #define ARRAY_SIZE 80000000 static double a[ARRAY_SIZE], b[ARRAY_SIZE], c[ARRAY_SIZE]; void vector_add(double *c, double *a, double *b, int n); int main(int argc, char *arg...
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)...
stagger.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "grb2.h" #include "wgrib2.h" #include "fnlist.h" /* * stagger.c Public domain 1/2014 Wesley Ebisuzaki * * * usually x[0] = y[0] = 0.0 * * usually x[] and y[] are integers (except when grids are shiffed +/- 1/2) * * normal...
contact.c
#include <stdio.h> #include <math.h> inline double sqeuclidean3(const double a[], const double b[]) { //Calculate the dot product between length-three vectors b and c return (a[0] - b[0])*(a[0] - b[0]) + (a[1] - b[1])*(a[1] - b[1]) + (a[2] - b[2])*(a[2] - b[2]) ; } void atomic_contact(const double *xyzlist, cons...
vec_avx.h
/* Copyright (c) 2018 Mozilla 2012-2017 Jean-Marc Valin */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list...
wavelet.c
/* Copyright 2014. The Regents of the University of California. * Copyright 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 Frank Ong <uecker@eecs.berkeley.edu> * 2013-2017 Martin Uecker <martin.u...
Example1.c
#include <stdio.h> int main(){ int T[5]; int sum = 0; // initializing array T for (int i = 0; i < 10; i ++) { T[i] = i; } // running the loop 10 times using openmp #pragma omp parallel for shared (T,sum) reduction (+ : sum) for ( int i = 0; i < 100; i ++) { // assign value for elements i...
GB_unaryop__lnot_uint64_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
soxr.c
/* SoX Resampler Library Copyright (c) 2007-13 robs@users.sourceforge.net * Licence for this file: LGPL v2.1 See LICENCE for details. */ #include <math.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "soxr.h" #include "data-io.h" #include "internal.h" char const * soxr_...
memory_ops_dm.c
#include <stdio.h> #include <stdlib.h> #include "memory_ops_dm.h" #include "utility.h" #include <time.h> #include <limits.h> #ifdef _OPENMP #include <omp.h> #endif CTYPE* dm_allocate_quantum_state(ITYPE dim) { CTYPE* state = (CTYPE*)malloc((size_t)(sizeof(CTYPE)*dim*dim)); if (!state){ fprintf(stderr,"...
ops.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
GB_unop__ainv_fp64_fp64.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...
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 ...
convolutiondepthwise_3x3.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 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_unop__trunc_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...
bicubic_interpolation.h
// This program is free software: you can use, modify and/or redistribute it // under the terms of the simplified BSD License. You should have received a // copy of this license along this program. If not, see // <http://www.opensource.org/licenses/bsd-license.html>. // // Copyright (C) 2012, Javier Sánchez Pérez <jsan...
LA2.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define N 500 long long int a[N][N], b[N][N], c[N][N],c1[N][N],c2[N][N],c3[N][N],c4[N][N],c5[N][N]; int main (int argc, char *argv[]) { omp_set_num_threads(4); int tid, nthreads, i, j, k; double start,end,start1,end1,start2,end2,start3,end3,start4,end4,...
ops.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
spgemm_utils.h
#ifndef UTILS_H_ #define UTILS_H_ #include <algorithm> #include <numeric> #include <unordered_map> #include <iostream> #include <chrono> #include <map> #include <sys/stat.h> #include <omp.h> #include "asserter.h" #include "hooks.h" #include "csr_matrix.h" #include "spgemm_defs.h" #include "helper_classes.h" #include...
threading.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for * license information. */ #ifndef LIGHTGBM_UTILS_THREADING_H_ #define LIGHTGBM_UTILS_THREADING_H_ #include <algorithm> #include <functional> #include <vector> #include <L...
rose_Stress-1.c
//#include <float.h> //#include <math.h> #define MIN(a, b) ( (a < b) ? a : b) #define MAX(a, b) ( (a > b) ? a : b) #include "omp.h" typedef double real8; void StressCheckEpsFail(real8 *newSxx,real8 *newSyy,real8 *newSzz,real8 *newTxy,real8 *newTxz,real8 *newTyz,real8 *eps,real8 eps_failure_model,const int *zoneset,in...
offload_table.h
/* Copyright (c) 2014-2016 Intel Corporation. All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this...
schedule-claused.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(int argc, char **argv) { int i, n = 16,chunk, a[n],suma=0; 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...
calculate_embedded_nodal_variable_from_skin_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Ruben Zorrilla // // #if !def...
cryptocontext.h
/** * @file cryptocontext.h -- Control for encryption operations. * @author TPOC: palisade@njit.edu * * @section LICENSE * * Copyright (c) 2017, New Jersey Institute of Technology (NJIT) * All rights reserved. * Redistribution and use in source and binary forms, with or without modification, * are permitted ...
DRB008-indirectaccess4-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_unop__identity_fp32_int64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
schedule.c
#include <stdio.h> #include <omp.h> int main() { omp_set_num_threads(4); #pragma omp parallel for schedule(static, 2) for (int i = 0; i < 10; i++) { printf("%d %d\n", i, omp_get_thread_num()); // The extra 2 iteration is assigned to thread 0 } printf("\n\n"); #pragma omp parallel for schedu...
FastTree-2.1.10.c
/* * FastTree -- inferring approximately-maximum-likelihood trees for large * multiple sequence alignments. * * Morgan N. Price * http://www.microbesonline.org/fasttree/ * * Thanks to Jim Hester of the Cleveland Clinic Foundation for * providing the first parallel (OpenMP) code, Siavash Mirarab of * UT Austin ...
serial_tree_learner.h
#ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_ #include <LightGBM/utils/random.h> #include <LightGBM/utils/array_args.h> #include <LightGBM/tree_learner.h> #include <LightGBM/dataset.h> #include <LightGBM/tree.h> #include "feature_histogram.hpp" #include "spli...
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 // //===---------------------------...
convolution_3x3_pack1ton_fp16s.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 ...
rose_v1_outer_only.c
/* Only the outmost loop can be parallelized */ #include <omp.h> void foo() { int n = 100; int m = 100; double b[n][m]; int i; int j; #pragma omp parallel for private (i,j) firstprivate (n,m) for (i = 0; i <= n - 1; i += 1) { for (j = 1; j <= m - 1; j += 1) { b[i][j] = b[i][j - 1]; } }...
refinePoses.h
#ifndef SP_SEGMENTER_REFINE_POSES #define SP_SEGMENTER_REFINE_POSES std::vector<poseT> RefinePoses(const pcl::PointCloud<myPointXYZ>::Ptr scene, const std::vector<ModelT> &mesh_set, const std::vector<poseT> &all_poses) { int pose_num = all_poses.size(); std::vector<ModelT> est_models(pose_num); pcl::PointCl...
XSHA_fmt_plug.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 2008,2011 by Solar Designer * * Intrinsics support added by magnum 2011. */ #if FMT_EXTERNS_H extern struct fmt_main fmt_XSHA; #elif FMT_REGISTERS_H john_register_one(&fmt_XSHA); #else #include <string.h> #include "arch.h" #ifdef MMX_C...
rose_v1_scalar_output.c
/* * Scalar-to-scalar output dependencies * */ #include <omp.h> int a[100]; // A private case void foo2() { int i; int tmp; #pragma omp parallel for private (tmp,i) for (i = 0; i <= 99; i += 1) { tmp = a[i] + i; } } // A lastprivate case void foo() { int i; int tmp; #pragma omp parallel for ...
mult_impl_gsl.h
#ifndef _MULT_IMPL_GSL_H #define _MULT_IMPL_GSL_H CPS_END_NAMESPACE #include<alg/a2a/gsl_wrapper.h> CPS_START_NAMESPACE //Implementations for meson field contractions template<typename mf_Policies, template <typename> class lA2AfieldL, template <typename> class lA2AfieldR, template <typename> class rA2AfieldL, ...
GB_subref_phase0.c
//------------------------------------------------------------------------------ // GB_subref_phase0: find vectors of C = A(I,J) and determine I,J properties //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. ...
GB_binop__band_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
mandelbrot.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <complex.h> #include "types.h" static double in_mandelbrot_set(double complex c, long iterations, long escape_radius) { long i; double complex z = 0; for (i = 0; i < iterations; i++) { doub...
brilliantrussian.c
/******************************************************************* * * M4RI: Linear Algebra over GF(2) * * Copyright (C) 2007, 2008 Gregory Bard <bard@fordham.edu> * Copyright (C) 2008-2010 Martin Albrecht <M.R.Albrecht@rhul.ac.uk> * * Distributed under the terms of the GNU General Public Licen...
batchnormp.c
#include <TH/TH.h> #include "batchnormp.h" #define THNN_CHECK_SHAPE(I1, I2) \ if (I1 != NULL && I2 != NULL && !THFloatTensor_isSameSizeAs(I1, I2)) \ { \ THDescBuff s1 = THFloatTensor_sizeDesc(I1); \ THDescBuff s2 = THFloatTensor_sizeDesc(I2); \ THError(#I1 " and " #I2 " shapes do n...
ellipticFusedResidualAndNorm.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 wi...
GB_unop__identity_uint8_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...
convolution_3x3_fp16.c
/* * Copyright (C) 2016-2022 T-Head Semiconductor Co., Ltd. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * 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 * * www.apache....
HDF5Dumper_MPI.h
/* * HDF5Dumper_MPI.h * Cubism * * Created by Babak Hejazialhosseini on 5/24/09. * Copyright 2009 CSE Lab, ETH Zurich. All rights reserved. * */ #pragma once #include <cassert> #include <cstdio> #include <iostream> #include <vector> #include <string> #include <sstream> #include <mpi.h> #include "HDF5Dumpe...
two.c
#include "two.h" #pragma omp declare target //static int state = 2; int two(void) { return state; } #pragma omp end declare target
GB_unop__trunc_fp32_fp32.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...
sptensor.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "sptensor.h" #include "matrix.h" #include "sort.h" #include "io.h" #include "timer.h" #include "util.h" #include <math.h> /***********...
GB_binop__bshift_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
axmyzManyPfloat.c
// This kernel is needed as it used for mixed-precision Jacobi preconditioning extern "C" void FUNC(axmyzManyPfloat)(const dlong & N, const dlong & Nfields, const dlong & offset, const dfloat & alpha, const dfloat * __restrict__ x, ...
pca_yinyang.c
#include "pca_yinyang.h" #include "kmeans_utils.h" #include "../../utils/matrix/csr_matrix/csr_to_vector_list.h" #include "../../utils/matrix/vector_list/vector_list_math.h" #include "../../utils/matrix/csr_matrix/csr_math.h" #include "../../utils/vector/common/common_vector_math.h" #include "../../utils/vector/sparse...
threading.h
#ifndef LIGHTGBM_UTILS_THREADING_H_ #define LIGHTGBM_UTILS_THREADING_H_ #include <LightGBM/utils/openmp_wrapper.h> #include <vector> #include <functional> namespace LightGBM { class Threading { public: template<typename INDEX_T> static inline void For(INDEX_T start, INDEX_T end, const std::function<void(int, I...
convolution_3x3.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 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 ...
wpapsk.h
/* * This software is Copyright (c) 2012 Lukas Odzioba <lukas dot odzioba at gmail dot com> * and Copyright (c) 2012-2014 magnum * 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. * * hccap ...
ScalarWave_RHSs.h
const REAL invdx0 = 1.0/dxx[0]; const REAL invdx1 = 1.0/dxx[1]; const REAL invdx2 = 1.0/dxx[2]; #pragma omp parallel for for(int i2=NGHOSTS; i2<NGHOSTS+Nxx[2]; i2++) { for(int i1=NGHOSTS; i1<NGHOSTS+Nxx[1]; i1++) { for(int i0=NGHOSTS; i0<NGHOSTS+Nxx[0]; i0++) { { /* ...