source
stringlengths
3
92
c
stringlengths
26
2.25M
MOD_weightvgproximity.c
/* * $Id: MOD_weightvgproximity.c 40449 2011-09-22 11:52:42Z mont29 $ * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program 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 2 * of the ...
O8ind.c
#include <mpi.h> extern int *cn_c; extern int *ce_c; extern int *ec_c; extern int *cn_crem; extern int *ce_crem; extern int *ec_crem; extern int *neighbor_map; extern int *cedge_map; extern int *ecell_map; extern int *neighbor_maprem; extern int *cedge_maprem; extern int *ecell_maprem; extern GVAL **neighbor_2Dbuf; ex...
GB_binop__min_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-...
ParallelJobsOpenMP.h
/** * Appcelerator Titanium License * This source code and all modifications done by Appcelerator * are licensed under the Apache Public License (version 2) and * are Copyright (c) 2009-2012 by Appcelerator, Inc. */ /* * Copyright (C) 2011 University of Szeged * Copyright (C) 2011 Gabor Loki <loki@webkit.org> ...
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) ...
GB_unop__identity_bool_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...
GB_binop__pow_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
irbuilder_nested_openmp_parallel_empty.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py // RUN: %clang_cc1 -no-opaque-pointers -verify -fopenmp -fopenmp-enable-irbuilder -x c++ -emit-llvm %s -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -o - | FileCheck %s --check-prefixes=ALL,IRBUILDER // %clang_cc1 -no-opaque-p...
main.c
#include<stdlib.h> #include<stdio.h> #include<time.h> #include<assert.h> #include<omp.h> #define NUM_REP 100 void heap_sort_serial(int *vet, int N); void cria_heap_serial(int *vetor, int i, int f); void heap_sort_paralelo(int *vet, int N, int NUM_THREADS); void cria_heap_paralelo(int *vetor, int i, int f); int main...
RecordTable.h
/* * Souffle - A Datalog Compiler * Copyright (c) 2020, The Souffle Developers. All rights reserved. * Licensed under the Universal Permissive License v 1.0 as shown at: * - https://opensource.org/licenses/UPL * - <souffle root>/licenses/SOUFFLE-UPL.txt */ /*******************************************************...
Efficient_RANSAC.h
// Copyright (c) 2015 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL$ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : Sven Oesau, Yannick Verdie, Clément Jamin, Pierre Alliez // #ifndef CGAL_SHAP...
omp_task_private.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" /* Utility function do spend some time in a loop */ int test_omp_task_private() { int i; int known_sum; int sum = 0; int result = 0; /* counts the wrong sums from tasks */ known_sum = (LOOPCOUNT * (LOOPCOUNT + 1)...
net_sha1_fmt_plug.c
/* Cracker for "Keyed SHA1" network authentication hashes. * * This software is Copyright (c) 2013, Dhiru Kholia <dhiru [at] openwall.com>, * and it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary forms, with or without * modification, are permit...
GB_binop__max_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-...
BallTracking.h
#pragma once //#include <opencv2/core/core.hpp> //#include <opencv2/core/optim.hpp> //#include <iostream> //#include <string> //#include "spdlog/spdlog.h" //#include <ConcurrentQueue.h> //#include <omp.h> //#include <boost/lockfree/queue.hpp> class RotModel : public cv::MinProblemSolver::Function { private: cv::Mat...
par_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) **************************************...
tinyexr.h
/* Copyright (c) 2014 - 2018, Syoyo Fujita 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 and t...
GB_binop__bshift_uint64.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_unop__trunc_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...
BarnesHut_OpenMP_V2.c
/* * gcc BarnesHut_OpenMP.c -o barnes_openmp -lm -fopenmp * ./barnes_openmp filename number_of_threads */ #include <stdio.h> #include <stdlib.h> #include <malloc.h> #include <string.h> #include <time.h> #include <sys/time.h> #include <math.h> #include <omp.h> #define THRESHOLD 0.2 #define NUMTHREAD...
VolumetricFractionalMaxPooling.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/VolumetricFractionalMaxPooling.c" #else static int64_t* THNN_(VolumetricFractionalMaxPooling_generateIntervals)( real sample, int64_t inputSize, int64_t outputSize, int poolSize) { real alpha = (real) (inputSize - poolSize) / (real) (outputSize - 1); ...
poollayer.h
#ifndef POOLLAYER_H #define POOLLAYER_H #include "vol.h" #include "layer.h" #include "utils.h" #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <boost/serialization/vector.hpp> #include <boost/serialization/map.hpp> #include <boost/serialization/utility.hpp> #include <ios...
implicit_blender.c
/* * This program 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 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be use...
Q2_Solution_Batch.h
#pragma once #include <queue> #include <algorithm> #include <cassert> #include <numeric> #include <memory> #include <set> #include "utils.h" #include "load.h" #include "Q2_Solution.h" class Q2_Solution_Batch : public Q2_Solution { protected: static std::vector<uint64_t> convert_score_type_to_comment_id(const ...
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) ...
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) >...
DRB004-antidep2-var-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...
teams-affinity.c
// RUN: %libomp-compile && env OMP_PLACES=cores OMP_TEAMS_THREAD_LIMIT=1 KMP_TEAMS_THREAD_LIMIT=256 %libomp-run // RUN: %libomp-compile && env OMP_PLACES=cores OMP_TEAMS_THREAD_LIMIT=1 KMP_TEAMS_THREAD_LIMIT=256 KMP_HOT_TEAMS_MAX_LEVEL=2 %libomp-run // RUN: %libomp-compile && env OMP_PLACES=cores OMP_TEAMS_THREAD_LIMIT...
txinvr.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB SP code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
pr83977-2.c
/* PR middle-end/83977 */ /* { dg-do compile } */ void bar (void); #pragma omp declare simd uniform (b) linear(a:b) int foo (int a, int b) { a = a + 1; /* This function can't be called from simd loops, because it violates declare simd restrictions. We shouldn't ICE on it though, nor attempt to generate sim...
SpinTemperatureBox.c
// Re-write of find_HII_bubbles.c for being accessible within the MCMC // Grids/arrays that only need to be initialised once (i.e. the lowest redshift density cube to be sampled) double ***fcoll_R_grid, ***dfcoll_dz_grid; double **grid_dens, **density_gridpoints; double *Sigma_Tmin_grid, *ST_over_PS_arg_grid, *dstarl...
mpi_approach.c
#ifdef __include_mpi #include <stdlib.h> #include <stdio.h> #include <mpi.h> #include <omp.h> #include "problem.h" #include "bignumbers.h" #include "mpi_approach.h" #include "log.h" struct ProblemSolution run_mpi_omp_iterative_brute_force ( const struct ProblemInstance instance, unsigned int iteration_size ...
GB_unaryop__identity_fp64_fp64.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_Matrix_diag.c
//------------------------------------------------------------------------------ // GB_Matrix_diag: construct a diagonal matrix from a vector //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-...
aggregate_ops.h
// // @author raver119@gmail.com // #ifndef LIBND4J_AGGREGATE_OPS_H #define LIBND4J_AGGREGATE_OPS_H #include <ops/ops.h> #include <templatemath.h> #define HS_MAX_EXP 6.0f #ifdef __CUDACC__ #define aggregate_def __device__ inline static #else #include <ops/gemm.h> #define aggregate_def inline static #endif /* * * ...
EDT.h
#ifndef EDT_INCLUDED #define EDT_INCLUDED #include <omp.h> #include "../SignalProcessing/CubeGrid.h" template< class Real > void SquaredEDT( const CubeGrid< char >& rasterization , CubeGrid< Real >& edt , int threads=1 ); void SquaredEDT( const CubeGrid< char >& rasterization , CubeGrid< int >& edt , int threads=1 ...
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)...
ex.c
#include <omp.h> #include <stdlib.h> //include header file #include "Accessor_c.h" int main(){ int * x = (int *)malloc(sizeof(int)*10); int * y = (int *)malloc(sizeof(int)*10); int * z = (int *)malloc(sizeof(int)*10); // declare a struct on the format accessor_<ACCESS_MODE>_<TYPE> accessor_r...
EmbeddingBag.h
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
irbuilder_unroll_partial_heuristic_constant_for.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics // RE...
pi.c
#include <err.h> #include <stdio.h> #include <stdlib.h> #ifdef WITH_MPI #include <mpi.h> #endif #ifdef _OPENMP #include <omp.h> #endif typedef struct { long n; int is_verbose; } Params; Params get_params(int argc, char *argv[]); double *compute_limits(); double partial_pi(double left, double right, Params *pa...
tree-vect-loop.c
/* Loop Vectorization Copyright (C) 2003-2017 Free Software Foundation, Inc. Contributed by Dorit Naishlos <dorit@il.ibm.com> and Ira Rosen <irar@il.ibm.com> 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...
core_math.h
// == mojo ==================================================================== // // Copyright (c) gnawice@gnawice.com. All rights reserved. // See LICENSE in root folder // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentatio...
blur_utils.h
/** * (C) Copyright 2020 - 2021 * Proiect APP Blurarea imaginilor * * Georgescu Alin-Andrei 342 C3 * Iuga Florin-Eugen 342 C5 * Negru Bogdan-Crisitan 342 C3 */ #ifndef BLUR_UTILS_H_ #define BLUR_UTILS_H_ #include <stdio.h> #include <stdint.h> #include <stdlib.h> #include <string.h> /** * Pentru portabili...
helloworld.c
#include <stdio.h> #include <omp.h> int main() { printf("BEFORE PARALLEL REGION\n"); #pragma omp parallel { int ID = omp_get_thread_num(); printf("hello world(%d)\n", ID); } printf("BEFORE PARALLEL REGION\n"); }
matrix.h
/** * @file matrix.h This code provide a templated matrix implementation * @author TPOC: palisade@njit.edu * * @copyright 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 provid...
kmeans_clustering.c
/*****************************************************************************/ /*IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. */ /*By downloading, copying, installing or using the software you agree */ /*to this license. If you do not agree to this license, do not download, */ ...
Example_target_data.1.c
/* * @@name: target_data.1c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ extern void init(float*, float*, int); extern void output(float*, int); void vec_mult(float *p, float *v1, float *v2, int N) { int i; init(v1, v2, N); #pragma omp target data map(to: v1[0:N]...
ripemd_fmt_plug.c
/* ripemd cracker patch for JtR. Hacked together during April of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and * it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary...
mmgraph-exp.h
#ifndef MGRAPH_H #define MGRAPH_H #include "network.h" #include "networkmp.h" template<class TNode> class TMNet; class TSVNode { private: TInt TypeId; TInt Id; TVec<TIntV > InEIdVV, OutEIdVV; TInt InDeg, OutDeg; public: TSVNode() : TypeId(-1), Id(-1), InEIdVV(), OutEIdVV(), InDeg(0), OutDeg(0) { } TSVNo...
symv_x_dia_u_hi_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA* A, const ALPHA_Number* x, const ALPHA_N...
utils.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
mandel-omp.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
ccl_fftlog.c
#include <stdlib.h> #include <math.h> #include <complex.h> #include <fftw3.h> #include <gsl/gsl_sf_result.h> #include <gsl/gsl_sf_gamma.h> #include "ccl.h" /**************************************************************** This is the famous FFTLog. First imlplemented by the living legend Andrew Hamilton: http://...
if-clauseModificado.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char **argv) { int i, n=20, tid, x; int a[n],suma=0,sumalocal; if(argc < 3) { fprintf(stderr,"Uso: \n %s <num-iteraciones> <num-hebras>\n", argv[0]); exit(-1); } n = atoi(argv[1]); if (n>20) n=20; for (i=0; i<n; i++) { a...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ioc-bandwidth-threads.c
//gcc -fopenmp ioc-bandwidth-threads.c -I$HOME/test-rdma/usr2/include -lioc-client -L$HOME/test-rdma/usr2/lib -Wl,-rpath,$HOME/test-rdma/usr2/lib -o ioc-bandwidth-threads #include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdbool.h> #include <ioc-client.h> #include <time.h> #include <omp.h> const si...
pi04.c
#include <omp.h> #include <stdio.h> static long num_steps = 100000000; double step; #define NUM_THREADS 8 void main () { int i; double x, pi, sum = 0.0; step = 1.0/(double) num_steps; omp_set_num_threads(NUM_THREADS); #pragma omp parallel for reduction(+:sum) private(x,i) for (i=0;i<num_ste...
rose_v1_jacobi_seq.c
/* An example code * * */ #include <stdio.h> #include <math.h> #include <omp.h> void driver(); void initialize(); void jacobi(); void error_check(); #define MSIZE 200 int n; int m; int mits; double tol; double relax = 1.0; double alpha = 0.0543; double u[200][200]; double f[200][200]; double uold[200][200]; double ...
GB_binop__hypot_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
convolution_7x7_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 ...
ast-dump-openmp-target-teams.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test() { #pragma omp target teams ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp...
reinas0.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <omp.h> #include <time.h> /* Sencilla solución de el problema de las 8 reinas usando recursividad (backtracking), con arrays dinámicos. (Este código solo imprime una solución) */ int *crearVec(int t); void llenarPositivo(int *v,int...
GB_binop__lor_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_unaryop__lnot_fp32_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
calculate_discontinuous_distance_to_skin_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Pooyan Dadvand // ...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__ainv_uint64_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
concurrent_unordered_map.cuh.h
/* * Copyright (c) 2017-2018, NVIDIA CORPORATION. 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 ...
targc-generic.c
#include <omp.h> #include <stdio.h> int main (){ #define N 1024 double x_d[N]; for (size_t i = 0; i < N; ++i) x_d[i] = -1; printf("x_d = %p\n",x_d); #pragma omp target { int lower = 0; printf("hello\n"); x_d[1] = 1; } printf("x_d[1] = %f\n", x_d[1]); if (x_d[1] != 1.0) {printf("Faile...
cudanetworkexecutor.h
#pragma once #include "networkexecutor.h" #include "cudanetworkbatch.h" namespace NEAT { //--- //--- CLASS CudaNetworkExecutor //--- template<typename Evaluator> class CudaNetworkExecutor : public NetworkExecutor<Evaluator> { std::vector<class CudaNetworkBatch<Evaluator> *> batches; p...
GB_binop__bor_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_unaryop__lnot_uint8_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...
ExtraRocksDBController.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef _SPTAG_SPANN_EXTRADBSEARCHER_H_ #define _SPTAG_SPANN_EXTRADBSEARCHER_H_ #include "inc/Helper/VectorSetReader.h" #include "inc/Helper/AsyncFileReader.h" #include "IExtraSearcher.h" #include "ExtraFullGraphSearcher.h...
13_omp_loops.c
// clang-format off // RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | %filecheck %s // RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %opt -O2 -S | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | %filecheck %s // RUN: %c-to-llvm -fno-di...
sddmm.h
/*! * Copyright (c) 2020 by Contributors * \file array/cpu/sddmm.h * \brief SDDMM CPU kernel function header. */ #ifndef DGL_ARRAY_CPU_SDDMM_H_ #define DGL_ARRAY_CPU_SDDMM_H_ #include <dgl/array.h> #include <dgl/bcast.h> #include <dgl/runtime/parallel_for.h> #include "../selector.h" namespace dgl { namespace ate...
LAGraph_SortByDegree.c
//------------------------------------------------------------------------------ // LAGraph_SortByDegree: sort a graph by its row or column degree //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-License-Iden...
PropagationMPlex.h
#ifndef RecoTracker_MkFitCore_src_PropagationMPlex_h #define RecoTracker_MkFitCore_src_PropagationMPlex_h #include "Matrix.h" namespace mkfit { inline void squashPhiMPlex(MPlexLV& par, const int N_proc) { #pragma omp simd for (int n = 0; n < NN; ++n) { if (par(n, 4, 0) >= Const::PI) par(n, 4, 0) ...
task_spawn_time.c
#include <omp.h> #include <sys/time.h> #include <stdio.h> void worker_timed(int delay_us) { struct timeval start, now; gettimeofday(&start, NULL); while(1) { gettimeofday(&now, NULL); if(((now.tv_sec - start.tv_sec)*1000000) + ((now.tv_usec - start.tv_usec)) >= delay_us) bre...
dist_async_sum-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 ...
main.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include "osmpbfreader.h" #include "graph.h" #define NUM_NODES 100000 #define NUM_THREADS 4 int main(int argc, char** argv) { char *path = argv[1]; int num_threads = argc > 2 ? atoi(argv[2]) : NUM_THREADS; printf("This is streets4c\n"); printf(...
residualbased_newton_raphson_contact_strategy.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
NeuralNetwork_OMP_CPU7.c
/* NEURAL NETWORK OMP CPU7.c * by Lut99 * * Created: * 4/18/2020, 11:25:46 PM * Last edited: * 19/11/2020, 17:19:47 * Auto updated? * Yes * * Description: * The NeuralNetwork class implements a matrix-based Feedforward Neural * Network which is hardcoded to use Mean Squared Error for cost functi...
static_linking.c
// RUN: %libomptarget-compile-generic -DLIBRARY -c -o %t.o // RUN: llvm-ar rcs %t.a %t.o // RUN: %libomptarget-compile-generic %t.a && %libomptarget-run-generic 2>&1 | %fcheck-generic // REQUIRES: nvptx64-nvidia-cuda-newDriver // REQUIRES: amdgcn-amd-amdhsa-newDriver #ifdef LIBRARY int x = 42; #pragma omp declare tar...
pathtracing.h
#ifndef PATHTRACING_H #define PATHTRACING_H #include "scene.h" #include <omp.h> #define MAX_DEP 5 class pathtracer { public: scene nowscene; inline Vec3f importancesample(Vec3f nowdirect,double n) { double z,phi,theta; z=rand_at(0,1); phi=rand_at(0,1)*2*PI; theta=(n==1?acos(s...
GB_binop__remainder_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
MsnhCVMatOp.h
#ifndef MSNHCVOP_H #define MSNHCVOP_H #include <Msnhnet/cv/MsnhCVMat.h> #include <Msnhnet/utils/MsnhTimeUtil.h> namespace Msnhnet { class MsnhNet_API MatOp { public: static void getROI(Mat &src, Mat &dst, const Vec2I32 &p1, const Vec2I32 &p2); static void setROI(Mat &srcDst, Mat &roi, const Vec2I32 &pos); ...
GB_binop__land_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
DRB050-functionparameter-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
templatemath.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * Copyright (c) 2019 Konduit K.K. * * 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.apa...
vlisa_grouped_twosample.c
/* ** Implementation of LISA algorithm ** for statistical inference of fMRI images ** ** 2nd level inference for grouped samples, two-sample ttest, paired t-test ** ** G.Lohmann, MPI-KYB, 2018 ** Zalan Rajna, University of Oulu, 2020 */ #include <viaio/Vlib.h> #include <viaio/file.h> #include <viaio/mu.h> #include <via...
mpm_energy_calculation_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Bodhinanda Chandra // #ifndef KRATOS_MPM_ENERG...
DRB030-truedep1-var-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...
mixed_tentusscher_myo_epi_2004_S0.c
// Scenario 0 - Original Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S0.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_of_ode_equations =...
test.c
#include <stdio.h> #define N (8*1024) #define C 4 #define P 2 #define M (N/C) #define TEST_PAR_NOWAIT 1 #define TEST_PAR_MAP_ALL 1 #pragma omp requires unified_shared_memory int a[N], b[N]; int main() { int i; int error, totError = 0; #if TEST_PAR_NOWAIT for (i=0; i<N; i++) a[i] = b[i] = i; #prag...
PReLU.c
#include "../thnets.h" static void nnfree_PReLU(struct module *mod) { THFloatTensor_free(mod->PReLU.weight); } int nnload_PReLU(struct module *mod, struct nnmodule *n) { struct table *t = n->table; mod->type = MT_PReLU; mod->updateOutput = nn_PReLU_updateOutput; mod->nnfree = nnfree_PReLU; struct PReLU *m = &mo...
sections.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> int main() { int x = 0; #pragma omp parallel num_threads(2) { //implicit barrier after sections with nowait but with lastprivates //implicit barrier at end of sections #pragma omp...
GB_binop__isne_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
device-2.c
/* { dg-do run } */ /* { dg-require-effective-target offload_device } */ #include <omp.h> #include <stdlib.h> #define N 10 int main () { int i; int offload[N]; int num = omp_get_num_devices(); #pragma omp parallel for for (i = 0; i < N; i++) #pragma omp target device(i) map(from: offload[i:1]) of...
correlation.c
/** * correlation.c This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * Web address: http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael....