source
stringlengths
3
92
c
stringlengths
26
2.25M
fvmpor.h
#ifndef FVMPOR_H #define FVMPOR_H //#define USE_PRINT #ifdef USE_PRINT #define PRINT(fid,v) fid << #v << std::endl; \ for(int kkkk=0; kkkk<v.dim(); kkkk++ )\ fid << v[kkkk] << " ";\ fid << std::endl; #else #define PRINT(fid,v) ; #endif #include "definitions.h" #include "shape.h" #include <cublas.h> ...
Layers.h
/* * Layers.h * * Created by Guido Novati on 29.10.18. * Copyright 2018 ETH Zurich. All rights reserved. * */ #pragma once #include "Activations.h" #include "Params.h" #ifndef __STDC_VERSION__ //it should never be defined with g++ #define __STDC_VERSION__ 0 #endif #include "cblas.h" struct Layer { const ...
fc_kernel_arm.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...
ctl_scroll.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...
csr_matvec.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
horizontal_generation.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 */ /* In this file, the horizontal grid generation procedure is stored. */ #include <stdlib.h> #include <stdio.h> #include <netcdf.h> #include <g...
gd.c
#include "completion.h" #include "gradient.h" #include "../csf.h" #include <math.h> #include "../thd_info.h" /****************************************************************************** * PRIVATE FUNCTIONS *****************************************************************************/ /*******************...
post_utilities.h
#ifndef POST_UTILITIES_H #define POST_UTILITIES_H #include "utilities/timer.h" #include "includes/define.h" #include "includes/variables.h" #include "custom_utilities/create_and_destroy.h" #include "custom_utilities/GeometryFunctions.h" #include "custom_elements/Particle_Contact_Element.h" #ifdef _OPENMP #include <om...
omp_bug6.c
/****************************************************************************** * FILE: omp_bug6.c * DESCRIPTION: * Fails compilation in most cases. * Compare to omp_orphan.c. * AUTHOR: Blaise Barney 6/05 * LAST REVISED: 06/30/05 ******************************************************************************...
sol1.c
/** * \file * \brief [Problem 22](https://projecteuler.net/problem=22) solution * \author [Krishna Vedala](https://github.com/kvedala) */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #ifdef _OPENMP #include <omp.h> #endif #define MAX_NAMES 6000 /**< Maximum number of names to store...
GB_unaryop__lnot_uint16_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_binop__iseq_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
parallel_utils_openmp.h
#pragma once #include <omp.h> #include <array> #include <vector> #include <type_traits> #include <atomic> #include <memory> class ParallelUtilsOpenMP { public: template<typename Int> static Int ceilDivision(Int a, Int b) { return (a + b - 1) / b; } class StaticScheduler { size_t m_NumElements; int m_NumT...
GB_unaryop__abs_fp64_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_unop__sin_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...
sections.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> int main() { #pragma omp parallel sections num_threads(2) { #pragma omp section { printf("%uld: section 1\n", ompt_get_thread_data()->value); } #pragma omp section { printf("%uld:...
GB_binop__bxnor_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-...
GraphTraversal.h
#ifndef GRAPH_TRAVERSAL_H #define GRAPH_TRAVERSAL_H #include <stdlib.h> #include <string.h> #include <string> #include <vector> #include <list> #include <functional> #include <algorithm> #include <iostream> #include "structure/Direction.h" #include "traversal/P.h" #include "structure/Direction.h" #in...
Stmt.h
//===--- Stmt.h - Classes for representing statements -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
main.c
// 2D lid-driven Cavity flow with explicit, central-difference projection method // See Ferziger Computational Methods for Fluid Dynamics, section 7.3.2 // Travis Burrows #include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> // Simulation Parameters #define N 25 // Number of po...
lin_algebra_dry.c
/* This source file is part of GAME-DA, which is released under the MIT license. Github repository: https://github.com/OpenNWP/GAME-DA */ /* linear algebra functions for the dry assimilation process */ #include <stdlib.h> #include <stdio.h> #include "game-da.h" int permute_lines_dry(double [][NO_OF_CHOSEN_OBSERVATIO...
query-btree.h
/* * Copyright 2018-2021 Kyle Berney, Ben Karsin * * 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 o...
main.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> #include <mpi.h> unsigned char * readFile(char* inFile[], unsigned char * image); void save(char* inFile[], unsigned char* image, long fileLength); unsigned char normalize(double value); double convolution(int i, int j, unsigned char...
GB_AxB_rowscale_meta.c
//------------------------------------------------------------------------------ // GB_AxB_rowscale_meta: C=D*B where D is a square diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
recombine.c
#include "recombine.h" #include "grid.h" #include <stdlib.h> #include <assert.h> #include <math.h> #include <time.h> #include <omp.h> #include <sys/stat.h> double *generate_Fb(int yN_size, int yB_size, double *pswf) { double *Fb = (double *)malloc(sizeof(double) * yB_size); int i; for (i = 0; i <= yB_siz...
ewald.h
#ifndef ewald_h #define ewald_h #include "logger.h" #include "types.h" namespace exafmm_laplace { class Ewald { //! Wave structure for Ewald summation struct Wave { vec3 K; //!< 3-D wave number vector real_t REAL; ...
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <dmlc/serializer.h> #include <xgboost/base.h> #include <xgboost/span.h> #include <xg...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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 // //===---------------------------...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
dz1z5.c
#include <omp.h> #include "common.h" // args.h #ifndef __ARGS_H__ #define __ARGS_H__ typedef struct _options_ { char *data_name; char *random_name; int random_count; int npoints; char *output_name; } options; void usage(char *name); void parse_args(int argc, char **argv, options* args); #endif...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
backprop.c
/* ****************************************************************** * HISTORY * 15-Oct-94 Jeff Shufelt (js), Carnegie Mellon University * Prepared for 15-681, Fall 1994. * Modified by Shuai Che ****************************************************************** */ #include <omp.h> #include <stdio.h>...
redcrit.c
/* associated with http://stackoverflow.com/q/35175957/2189128 */ #include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char* argv[]) { int iter = (argc>1) ? atoi(argv[1]) : 50000; int r=0, c=0, a=0; printf("OpenMP threads = %d\n", omp_get_max_threads() ); #pragma omp parallel r...
activation_arm_func.h
/* Copyright (c) 2018 PaddlePaddle Authors. 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 law or...
constant_density_acoustic_time_scalar_2D_4.h
#ifndef __CDA_TIME_SCALAR_2D_4__ #define __CDA_TIME_SCALAR_2D_4__ #include <stdlib.h> template< typename T, int ACCURACY > void cda_time_scalar_2D_4( T* km1_u, int nr_km1_u, int nc_km1_u, // in - padded wavefield shape T* k_Phix, int nr_k_Phix, int nc_k_Phix, // in - pad...
GB_convert_bitmap_worker.c
//------------------------------------------------------------------------------ // GB_convert_bitmap_worker: construct triplets or CSC/CSR from bitmap //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPD...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable 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) >...
DRB104-nowait-barrier-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...
r32x16b_avx2.c
/* * AVX2 edition using 32 RANS states. This uses a shared pointer for the * compressed buffer. * * TODO: implement SIMD version of the order-1 encoder (decoder is done). */ #ifdef _MSC_VER #include <intrin.h> #pragma warning(push) #pragma warning(disable: 4752) #if _MSC_VER < 1910 inline __forceinline __int64 _mm25...
NETLMv2_fmt_plug.c
/* * NETLMv2_fmt.c -- LMv2 Challenge/Response * * Written by JoMo-Kun <jmk at foofus.net> in 2008 * and placed in the public domain. * * Performance fixes, OMP and utf-8 support by magnum 2010-2011 * * This algorithm is designed for performing brute-force cracking of the LMv2 * challenge/response sets exchange...
3d25pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
idasFoodWeb_kry_omp.c
/* * ----------------------------------------------------------------- * Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2021, Lawrence Livermore National Security * and Southern Methodist Univ...
genzipf.c
//==================================================== file = genzipf.c ===== //= Program to generate Zipf (power law) distributed random variables = //=========================================================================== //= Notes: 1) Writes to a user specified output file = //= ...
main.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> #include <string.h> #include <math.h> // COMPILACAO: gcc -fopenmp main.c -lm #define QTD_GIS 5 #define NELEMS(x) (sizeof(x) / sizeof((x)[0])) struct CELL { int isUrban; // Estado da celula int isAvailable; // pode mudar de estado? ...
mozilla_ng_fmt_plug.c
/* * Cracker for Mozilla's key3.db's master password. * * All the real logic here is borrowed from Milen Rangelov's Hashkill project * and from Deque's article. * * Thanks to Jim Fougeron for all the help! * * This software is Copyright (c) 2014, Sanju Kholia <sanju.kholia [at] * gmail.com> and Dhiru Kholia <d...
main.c
// C Compiler flag: -fopenmp #include <stdio.h> #include <omp.h> #include <stdlib.h> #include <time.h> #define N 20 int main(int argc, char *argv[]) { srand(time(NULL)); omp_set_dynamic(0); // запретить библиотеке openmp менять число потоков во время исполнения //omp_set_num_threads(2); // установить число поток...
integrate.h
/* * n-dim Gaussian quadrature for general functions with vector output * using OpenMP for parallelization * * Hung Dang (May 12, 2011) */ #ifndef __INTEGRATE_H__ #define __INTEGRATE_H__ #include <cstring> namespace md_int { // // N : dim of space for integrating // M : size of the integrand vector // L : si...
HW3.c
/* * Write a serial program to check if a given number is prime or not. * Report the required time. * * Convert it to a OpenMP code. * Add best scheduling algorithm */ #include <stdio.h> #include <omp.h> #include <time.h> #define THREADS 4 int main(int argc,char *argv[]) { clock_t start,stop; long int n,i,c...
ASTMatchers.h
//===- ASTMatchers.h - Structural query framework ---------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
9586.c
// this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/fdtd-2d/kernel.c' as parsed by frontend compiler rose void kernel_fdtd_2d(int tmax, int nx, int ny, double ex[2000 + 0][2600 + 0], double ey[2000 + 0][2600 + 0], doub...
integral.c
/*3456789012345678901234567890123456789012345678901234567890123456789012345678*/ #define GAE 114474615732576576.000000 /******************************************************************* 2015-02-10 intcurve Calculate an approximation of the integral of x^8-x^6+x^4-x^2+1 from min to max This is a single file...
mixed_tentusscher_myo_epi_2004_S2_17.c
// Scenario 2 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt + Rc) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S2_17.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_o...
permutation_gen.c
/* Copyright (C) 2010 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
adjarraybqm.h
// Copyright 2020 D-Wave Systems Inc. // // 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 applicab...
pragmaScope.c
// This example exposes the problem of have a pragma and a following statement in the same scope without brackets. int main(){ int i,j; int n=10, m=10; int a[n][m]; for(i=0;i<n; i++) for(j=0;j<n; j++) a[i][j]= 0; for (i=0;i<n-1;i++) #pragma omp parallel for for (j=0;j<m-1;j++) a[i][j...
cam_conversion.c
/* Generated by Cython 0.29.10 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "name": "Depth_Displayer.cam_conversion", "sources": [ "cam_conversion.pyx" ] }, "module_name": "Depth_Displayer.cam_conversion" } END: Cython Metadata */ #define PY_SSIZ...
owl_matrix_swap_impl_omp.h
/* * OWL - OCaml Scientific and Engineering Computing * Copyright (c) 2016-2018 Liang Wang <liang.wang@cl.cam.ac.uk> */ #ifdef OWL_ENABLE_TEMPLATE // swap row i and row j in x(m,n) void FUNCTION (c, swap_rows) (TYPE *x, int m, int n, int i, int j) { if (i != j) { TYPE * src = x + n * i; TYPE * dst = x +...
util.h
// // Created by Shiina Miyuki on 2019/1/8. // #ifndef MIYUKI_UTIL_HPP #define MIYUKI_UTIL_HPP #include <string> #include <vector> #include <set> #include <fstream> #include <cstdio> #include <cmath> #include <thread> #include <chrono> #include <ctime> #include <xmmintrin.h> #include <immintrin.h> #include <algorithm...
CGOpenMPRuntime.h
//===----- CGOpenMPRuntime.h - Interface to OpenMP Runtimes -----*- 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_binop__band_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:...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- 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 // //===---------------------------...
nr_ao2mo.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...
no_option_no_warn.c
// RUN: %clang_cc1 -verify -Wno-source-uses-openmp -o - %s // expected-no-diagnostics int a; #pragma omp threadprivate(a, b) #pragma omp parallel
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) **************************************...
rgb2mom.c
// this is the coefficient cube optimiser from the paper: // // Wenzel Jakob and Johannes Hanika. A low-dimensional function space for // efficient spectral upsampling. Computer Graphics Forum (Proceedings of // Eurographics), 38(2), March 2019. // // run like // make && ./rgb2mom 256 lut.pfm XYZ && eu lut.pfm -w 140...
rose_foo.c
#if 1 #include <omp.h> void foo1(double o1[],double c[],int len) { int i; #pragma omp parallel for private (i) firstprivate (len) for (i = 0; i <= len - 1; i += 1) { double volnew_o8 = 0.5 * c[i]; o1[i] = volnew_o8; } } #endif #if 1 void goo(double *o1,double *o2,double *a,double *b,double *c,int **...
math_utils_inl.h
/* * * Copyright (c) 2014, Nicola Pezzotti (Delft University of Technology) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above ...
zlook_ahead_update.c
/************************************************************************/ /*! @file * \brief Look-ahead update of the Schur complement. * * <pre> * -- Distributed SuperLU routine (version 4.0) -- * Lawrence Berkeley National Lab, Univ. of California Berkeley. * October 1, 2014 * */ #ifdef ISORT while (j < nu...
parallel_string_radix_sort.h
// Copyright 2011, Takuya Akiba // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions...
softmax-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
GetEnvironInfo.c
/****************************************************************************** * FILE: omp_getEnvInfo.c * DESCRIPTION: * OpenMP Example - Get Environment Information - C/C++ Version * The master thread queries and prints selected environment information. * AUTHOR: Blaise Barney 7/06 * LAST REVISED: 05/18/16 ****...
target_teams_distribute_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized //...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
serial_steps.c
#include <stdio.h> #include <errno.h> // for errno #include <math.h> #include <limits.h> // for INT_MAX #include <stdlib.h> // for strtol #include <time.h> #include <omp.h> long max_number_of_char = 10; long number_of_types_char = 10; long number_of_results = 5; long number_of_queues = 2; typedef struct Client { ...
morn_image_resize.c
/* Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com> Licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
GB_binop__bshift_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_unaryop__abs_int16_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...
convolutiondepthwise_3x3_int8.h
// SenseNets is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2018 SenseNets Technology Ltd. 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 t...
round_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...
convolution_3x3_pack1to8.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 ...
test_nest_lock_parallel.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 #include "callback.h" #include <omp.h> int main() { omp_nest_lock_t nest_lock; omp_init_nest_lock(&nest_lock); #pragma omp parallel num_threads(2) { #pragma omp master { om...
functions.c
f64 gaussian(f64 x, f64 mu, f64 sigma) { return 1.0/(sigma*sqrt(2.0*M_PI)) * exp(-(x-mu)*(x-mu)/(2*sigma*sigma)); } void f64_normalize(f64* out, f64* data, u32 size) { f64 sum = 0.0; #pragma omp parallel for shared(data) reduction(+: sum) for (u32 i = 0; i < size; ++i) { f64 absval = fabs(data[i]); sum += absv...
GB_unaryop__ainv_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...
DynamicConvolutionAttentionInternalLayers.h
// Copyright (C) 2022. Huawei Technologies Co., Ltd. All rights reserved. // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation the rights to use,...
util.h
/* Copyright (c) 2013, Taiga Nomi All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditi...
GB_unaryop__abs_int8_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...
convolution_1x1_pack8to1_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 ...
Example_nesting_restrict.6.c
/* * @@name: nesting_restrict.6c * @@type: C * @@compilable: no * @@linkable: no * @@expect: failure */ void work(int i, int j) {} void wrong6(int n) { #pragma omp parallel { #pragma omp single { work(n, 0); /* incorrect nesting of barrier region in a single region */ #pragma omp barrier w...
error.h
#pragma once #include <vector> #include <unordered_map> #include <algorithm> #include <cmath> #include "_cuda.h" #include "ceilDiv.h" #include "sum.h" using std::vector; using std::unordered_map; using std::abs; using std::max; // ABS-ERROR // --------- template <class T> auto absError(T *x, T *y, int N) { T a ...
softmax-inl.h
/*! * Copyright (c) 2017 by Contributors * \file softmax-inl.h * \brief */ #ifndef MXNET_OPERATOR_NN_SOFTMAX_INL_H_ #define MXNET_OPERATOR_NN_SOFTMAX_INL_H_ #include <vector> #include "../mxnet_op.h" #include "../operator_common.h" namespace mxnet { namespace op { namespace mxnet_op { struct softmax_fwd { temp...
my_arrays.c
#include "my_arrays.h" #include <stdlib.h> #include <math.h> #include <malloc.h> #include <stdio.h> #include <time.h> #include <limits.h> #include <omp.h> // ----------------------------------------------------------------__ float *float_array_allocate_memory(int size) { float *array = (float*) malloc(size * sizeo...
NETNTLM_bs_fmt_plug.c
/* * NETNTLM_fmt.c -- NTLM Challenge/Response * * Written by JoMo-Kun <jmk at foofus.net> in 2007 * and placed in the public domain. * * Modified for performance, support for Extended Session Security, OMP * and UTF-8, by magnum 2010-2011. * Modified for using Bitsliced DES by Deepika Dutta Mishra * <dipikadu...
CGOpenMPRuntime.h
//===----- CGOpenMPRuntime.h - Interface to OpenMP Runtimes -----*- 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 // //===---------------------------...
task_late_fulfill.c
// RUN: %libomp-compile -fopenmp-version=50 && env OMP_NUM_THREADS='3' \ // RUN: %libomp-run | %sort-threads | FileCheck %s // Checked gcc 10.1 still does not support detach clause on task construct. // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8, gcc-9, gcc-10 // clang supports detach clause since version 11. /...
pr58392.c
/* PR tree-optimization/58392 */ /* { dg-do run } */ /* { dg-additional-options "-msse2" { target sse2_runtime } } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ extern void abort (void); int d[32 * 32]; __attribute__((noinline, noclone)) int foo (int a, int b) { int j, c = 0; #pragma omp paral...
firstprivate-mappings-1.c
/* Verify OpenACC 'firstprivate' mappings. */ /* This file is also sourced from '../../../../libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-mappings-1.c' as an execution test. 'long double' tests are compiled/used unless DO_LONG_DOUBLE is set to 0. */ /* See also '../../g++.dg/goacc/firstprivate...
firstprivate3.c
#include <stdio.h> #include <math.h> void driver (void); void initialize (void); void jacobi (void); void error_check (void); #define MSIZE 200 int n, m, mits; double tol, relax = 1.0, alpha = 0.0543; double u[MSIZE][MSIZE], f[MSIZE][MSIZE], uold[MSIZE][MSIZE]; double dx, dy; void error_check () { int i, j; dou...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...