source
stringlengths
3
92
c
stringlengths
26
2.25M
mode.h
// Copyright (c) 2022 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...
displacement_lagrangemultiplier_residual_frictional_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
star3d3r.c
#define BENCH_DIM 3 #define BENCH_FPP 37 #define BENCH_RAD 3 #include "common.h" double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop) { double start_time = sb_time(), end_time = 0.0; int dimsize = compsize + BENCH_RAD * 2; SB_TYPE (*A)[dimsize][dimsize][dimsize] = (SB_TYPE (*)[dimsize][...
convolution_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 ...
gmdmatrix.c
/********************************************************************************** ** ** Copyright (C) 1994 Narvik University College ** Contact: GMlib Online Portal at http://episteme.hin.no ** ** This file is part of the Geometric Modeling Library, GMlib. ** ** GMlib is free software: you can redistribute it ...
conv3x3s1_winograd64_pack4_neon_permute.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 ...
loss.h
/** * Copyright (c) 2015 by Contributors */ #ifndef ZDIFACTO_LOSS_H_ #define ZDIFACTO_LOSS_H_ #include <string> #include <vector> #include <cmath> #include "dmlc/data.h" #include "dmlc/omp.h" #include "zdifacto/sarray.h" #include "zdifacto/base.h" namespace zdifacto { class Loss { public: static Loss* Create...
trmm_x_sky_u_hi_row_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ...
convolution_3x3_int8.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // author:BUG1989 (https://github.com/BUG1989/) Long-term support. // author:FuGuangping (https://github.com/fu1899) Implemented the first version of INT8 quantization on ARMv7. // // Copyright (C) 2019 BUG1989. All rights reser...
convolution_5x5_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 ...
GI.h
#include "parse.h" #include <unordered_set> #define SELF_GRAVITY #define FLAG_GI #ifdef PARTICLE_SIMULATOR_TWO_DIMENSION #error #endif std::unordered_set<unsigned int> create_removal_list(const unsigned int lowest_index, const unsigned int highest_index, const unsi...
scalability.c
/** * \file * \brief libbomp test. */ /* * Copyright (c) 2007, 2008, 2009, ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich. Att...
compute_landsat_refl.c
/****************************************************************************** FILE: compute_landsat_refl.c PURPOSE: Contains functions for handling the Landsat 8/9 TOA reflectance and surface reflectance corrections. PROJECT: Land Satellites Data System Science Research and Development (LSRD) at the USGS EROS LIC...
spalart_allmaras_turbulence_model.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Jordi Cotela // ...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determineFileType ( std::vector<std::string> argv, int nextErrorCode, SgProject* project ); #else SgFile...
omp_parallel_private.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdlib.h> #include "omp_testsuite.h" //static int sum1 = 789; int test_omp_parallel_private() { int sum, num_threads,sum1; int known_sum; sum = 0; num_threads = 0; #pragma omp parallel private(sum1) { int i; sum1 = 7; /*printf("sum...
3d7pt.c
/* * Order-1, 3D 7 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) ...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
taskdep_tied_scheduling.c
// RUN: %libomp-compile && env KMP_ABT_NUM_ESS=4 %libomp-run // REQUIRES: abt #include "omp_testsuite.h" #include "bolt_scheduling_util.h" #include <stdio.h> #include <stdlib.h> #include <string.h> int calc_seq(int n) { int i, j, *buffer = (int *)malloc(sizeof(int) * n * n); for (i = 0; i < n; i++) { for (j = ...
mvm_nkn32.h
// Copyright (C) 2019. 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,...
symgs.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
Example_metadirective.2.c
/* * @@name: metadirective.2c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_5.0 */ #define N 100 #include <stdio.h> #include <omp.h> void work_on_chunk(int idev, int i); int main() //Driver { int i,idev; for (idev=0; idev<omp_get_num_devices(); idev++...
c3d.c
/***************************************************************************** * * Elmer, A Finite Element Software for Multiphysical Problems * * Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland * * This library is free software; you can redistribute it and/or * modify it under the term...
utilityNestedDisectionMetis.h
// *********************************************************************** // // Grappolo: A C++ library for graph clustering // Mahantesh Halappanavar (hala@pnnl.gov) // Pacific Northwest National Laboratory // // *************************************************************...
GB_unaryop__identity_fp64_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
pfmg_setup.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...
Matrix.h
/* Copyright (c) 2016-2019 Liav Turkia See LICENSE.md for full copyright information */ #pragma once #ifndef MACE__UTILITY_MATRIX_H #define MACE__UTILITY_MATRIX_H #include <MACE/Utility/Vector.h> namespace mc { /** Used in the `Matrix` class. Defined for clarity for when you iterate over a `Matrix.` @see Matrix ...
GB_unop__acos_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...
evolve_cc.c
/* * The Connected Components Hamiltonian split uses a connected component search * on the time step graph of the system to find isolated subsystems with fast * interactions. These subsystems are then evolved at greater accuracy compared * to the rest system. * Equation numbers in comments refer to: J\"anes, Pelup...
blas_server_omp.c
/*********************************************************************/ /* Copyright 2009, 2010 The University of Texas at Austin. */ /* All rights reserved. */ /* */ /* Redistribution and use in sou...
tree-ssa-loop-ivcanon.c
/* Induction variable canonicalization and loop peeling. Copyright (C) 2004-2015 Free Software Foundation, Inc. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, ...
gm_set.h
#ifndef GM_SET_H #define GM_SET_H #include <set> #include "gm_internal.h" #include "gm_lock.h" template<typename T> class gm_sized_set { public: gm_sized_set(size_t _max_sz) : max_sz(_max_sz), byte_map(NULL), setLock(0) { is_small = true; est_size = 0; // init(setLock); } ...
GB_binop__isne_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
DRB071-targetparallelfor-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...
ellipticSEMFEMSetup.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...
pattern_matching.c
/* * Lucas Bergmann e Ricardo Somariva * Programação Paralela 2018/2 */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <ctype.h> #include <string.h> #include <time.h> #include <omp.h> /** * Disponível em: https://www.geeksforgeeks.org/wildcard-character-matching/ */ // The main function that c...
jacobi_omp.c
/* * Copyright (c) 2008, BSC (Barcelon Supercomputing Center) * 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,...
convolution_7x7_pack1to4_bf16s.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 ...
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__bset_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-...
quebra_md5.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <omp.h> #include <openssl/md5.h> #include <locale.h> char *hash; int len; clock_t begin; float tempo; int fim = 0; char res[10]; const char charset[] = "@$#?!=+%abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; const i...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
mandelbrot.c
/* * mandelbrot.c: adaptive anti-aliasing * (c)2010-2018 Seiji Nishimura * $Id: mandelbrot.c,v 1.1.1.4 2020/07/30 00:00:00 seiji Exp seiji $ */ #include <time.h> #include <math.h> #include <stdlib.h> #include <pixmap.h> #include <palette.h> #include <stdbool.h> // for adaptive anti-aliasing #define MIN_SAMPLES (0...
GB_binop__minus_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
StereoSGM.h
// Copyright � Robert Spangenberg, 2014. // See license.txt for more details #pragma once #include <vector> #include <list> #include <string.h> class StereoSGMParams_t { public: uint16 P1; // +/-1 discontinuity penalty uint16 InvalidDispCost; // init value for invalid disparities (half of max va...
3d7pt.c
/* * Order-1, 3D 7 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) ...
sink-fold-1.c
/* { dg-do compile } */ /* { dg-options "-fopenmp -fdump-tree-omplower" } */ /* Test depend(sink) clause folding. */ int i,j,k, N; extern void bar(); void funk () { #pragma omp parallel for ordered(3) for (i=0; i < N; i++) for (j=0; j < N; ++j) for (k=0; k < N; ++k) { /* We remove the (sink:i,j-1,k...
camellia_fmt_plug.c
/* How to find the password of attacker's Poison Ivy setup? * * Based on http://hitcon.org/2013/download/APT1_technical_backstage.pdf * * - The password is used to encrypt the communication. * - The encryption algorithm is Camellia. * - The encryption is performed with 16 bytes blocks. * - Poison Ivy has an "ech...
sageInterface.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #include "OmpAttribute.h" #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determ...
elemwise_binary_op.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 ...
callback.h
#ifndef _BSD_SOURCE #define _BSD_SOURCE #endif #define _DEFAULT_SOURCE #include <stdio.h> #ifndef __STDC_FORMAT_MACROS #define __STDC_FORMAT_MACROS #endif #include <inttypes.h> #include <omp.h> #include <omp-tools.h> #include "ompt-signal.h" // Used to detect architecture #include "../../src/kmp_platform.h" static co...
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) #...
cposv.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/zposv.c, normal z -> c, Fri Sep 28 17:38:09 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
test.c
#include <stdlib.h> #include <assert.h> #include <stdio.h> #include "spectrum_common.h" #include "rgb2spec.h" // we are trying to reproduce the streamlines on the chromaticity chart as in // Fig. 7 (right): // Nonlinearities in color coding: Compensating color // appearance for the eye’s spectral sensitivity // Yoko M...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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. // //===-------------------------------------------------------...
bt_single.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - BT This benchmark is an OpenMP C version of the NPB BT code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS...
GB_binop__islt_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-...
GB_binop__lxor_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-...
life.c
/* Conway's Game of Life - OpenMP implementation Jim Teresco Williams College Mount Holyoke College Siena College OpenMP parallelization, Fall 2021 */ #include <omp.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char *argv[]) { int gridsize; double init_pct; int num_iters, it...
peano.c
#include "globals.h" #include "peano.h" #include <gsl/gsl_heapsort.h> peanoKey Peano_Key ( const double x, const double y, const double z ); static void reorder_particles(); void Print_Int_Bits128 ( const peanoKey val ) { for ( int i = 127; i >= 0; i-- ) { printf ( "%llu", ( long long ) ( ( val & ( ( pe...
dfft_host.c
#include <stdlib.h> #include <string.h> #include "dfft_host.h" #ifdef ENABLE_OPENMP #include <omp.h> #endif #include <math.h> /***************************************************************************** * Implementation of the distributed FFT **********************************************************************...
par_csr_matvec.c
/****************************************************************************** * Copyright (c) 1998 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) ***************************************...
find_ellipse.c
#include "find_ellipse.h" #include <sys/time.h> // The number of sample points per ellipse #define NPOINTS 150 // The expected radius (in pixels) of a cell #define RADIUS 10 // The range of acceptable radii #define MIN_RAD RADIUS - 2 #define MAX_RAD RADIUS * 2 // The number of different sample ellipses to try #define...
lis_matvec_ccs.c
/* Copyright (C) 2002-2012 The SSI Project. 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 condition...
GB_binop__isgt_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_extract_vector_list.c
//------------------------------------------------------------------------------ // GB_extract_vector_list: extract vector indices for all entries in a matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved....
conv_func_helper.h
/* Copyright (c) 2018 Anakin Authors, Inc. 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 app...
team.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc, icc-19 #include "callback.h" int main() { #pragma omp target teams num_teams(1) thread_limit(1) { printf("In teams\n"); } return 0; } // CHECK: 0: NULL_POINTER=[[NULL:.*$]] // CHECK-NOT: 0: parallel_data initially not null // C...
DRB005-indirectaccess1-orig-yes.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...
GB_unaryop__minv_uint32_int32.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_unop__ainv_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_binop__lt_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...
semantics.c
/* Perform the semantic phase of parsing, i.e., the process of building tree structure, checking semantic consistency, and building RTL. These routines are used both during actual parsing and during the instantiation of template functions. Copyright (C) 1998-2018 Free Software Foundation, Inc. Written ...
GB_binop__first_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:...
GB_unop__ainv_uint64_uint64.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...
gptl_papi.c
/* ** $Id: gptl_papi.c,v 1.69 2009/04/29 22:17:01 rosinski Exp $ ** ** Author: Jim Rosinski ** ** Contains routines which interface to PAPI library */ #ifdef HAVE_PAPI #include <papi.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include "private.h" #if ( defined THREADED_OMP ) #include <omp.h> #el...
barrier.c
#include<stdio.h> #include<omp.h> #define NUM_THREADS 4 int big_cal1(int id){ printf("Big cal 1, id=%d\n", id); int i = 0; while (i < (id+1)*10000) i++; return i; } int big_cal2(int id){ printf("Big cal 2, id=%d\n", id); int i = 0; while (i < (id+1)*10000) i++; return i; } int main(){ omp_set_num_thread...
target_uses_allocators.c
// Test host codegen. // RUN: %clang_cc1 -verify -fopenmp -fopenmp-version=50 -triple powerpc64le-unknown-unknown -fopenmp-targets=powerpc64le-ibm-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix CHECK --check-prefix CHECK-64 // RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -x c++ -triple powerpc64le-unknown-...
GB_bitmap_assign_A_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_A_template: traverse over A for bitmap assignment into C //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. ...
ray.h
#ifndef RAY_H_ #define RAY_H_ #include <cmath> #include <cfloat> #include <embree2/rtcore_ray.h> #include "../math/vector3.h" #include "triangle.h" #include "../utils/macros.h" #include "material.h" /*! * \struct Ray * \brief Rozšíření paprsku z Embree od další pay-load. * * \f$\mathbf{r}(t) = O + \hat{\mathbf{d}...
GB_unaryop__ainv_uint64_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
convolution_winograd_transform_bf16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
representation_layer.c
#include "representation_layer.h" #include "utils.h" #include "dark_cuda.h" #include "blas.h" #include <stdio.h> #include <assert.h> layer make_implicit_layer(int batch, int index, float mean_init, float std_init, int filters, int atoms) { fprintf(stderr,"implicit Layer: %d x %d \t mean=%.2f, std=%.2f \n", filters...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
perturbation_theory.c
static inline void map_to_triangular_index(u32 k, u32 N, u32* m, u32* n) { *m = k / N; *n = k % N; if (*m > *n) { *m = N - *m - 0; *n = N - *n - 1; } } /* * Holds all information needed to do the PT, * easy to pass around. Basicly params to * pt_rayleigh_schroedinger */ struct pt_settings { struct nlse_res...
oskar_auto_correlate_omp.c
/* * Copyright (c) 2015-2018, The University of Oxford * 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 ...
zuker_pluto.h
void zuker_pluto(){ int t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12; int lb, ub, lbp, ubp, lb2, ub2; register int lbv, ubv; /* Start of CLooG code */ if (N >= 2) { for (t2=max(-1,ceild(-N-13,16));t2<=floord(N-1,16);t2++) { lbp=max(0,t2); ubp=min(floord(N-1,16),floord(16*t2+N+13,16)); #pragma om...
target_parallel_for_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parallel for simd'}} #pragma omp target parallel for simd // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target parall...
GB_binop__lxor_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
par_mod_lr_interp.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
nt_AI.c
/*************************************************************************** * * (C) Copyright 2007 The Board of Trustees of the * University of Illinois * All Rights Reserved * * MRI-Q: Magnetic Resonance Imaging * Computes a matrix Q, represent...
pr2.c
//Write an OpenMP program to add all the elements of two arrays A & B each of size 1000 and store their sum in a variable using reduction clause. #include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int i, n; float a[1000], b[1000], sum; /* Required initializations */ n = 1...
nvptx_target_printf_codegen.c
// Test target codegen - host bc file has to be created first. // RUN: %clang_cc1 -verify -fopenmp -x c -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -verify -fopenmp -x c -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cud...
bcm-divsufsort.c
/* * divsufsort.c for libdivsufsort-lite * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including wit...
LLT_ROF_core.c
/* * This work is part of the Core Imaging Library developed by * Visual Analytics and Imaging System Group of the Science Technology * Facilities Council, STFC * * Copyright 2017 Daniil Kazantsev * Copyright 2017 Srikanth Nagella, Edoardo Pasca * * Licensed under the Apache License, Version 2.0 (the "License")...
main.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:...
zoom.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...
algo.h
#include "utils.h" #include <deque> #include <random> enum visited_state { UNVISITED, VISITED, QUEUED }; // Starting at a node, performs a BFS to identify the entire component that // the node is in std::vector<node> node_bfs(const node &start_node, const adjacency_list &adj_list) { std::deque<node> queue; s...
GB_unop__asin_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...