source
stringlengths
3
92
c
stringlengths
26
2.25M
DRB024-simdtruedep-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...
bug_proxy_task_dep_waiting.c
// RUN: %libomp-compile-and-run // The runtime currently does not get dependency information from GCC. // UNSUPPORTED: gcc, icc-16 // REQUIRES: !abt #include <stdio.h> #include <omp.h> #include <pthread.h> #include "omp_my_sleep.h" /* An explicit task can have a dependency on a target task. If it is not directly sa...
GB_unop__identity_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
MatrixVectorOpt.c
/****************************************************************************** * Example - Matrix-vector multiplication - C/C++ Version * FILE: MatrixVector.c * DESCRIPTION: * This example multiplies matrix A with a vector element and * stores the summed products in vector c. **********************************...
kernel.c
#include "SimpleMOC-kernel_header.h" void run_kernel( Input * I, Source * S, Table * table) { // Enter Parallel Region #pragma omp parallel default(none) shared(I, S, table) { #ifdef OPENMP int thread = omp_get_thread_num(); #else int thread = 0; #endif // Create Thread Local Random Seed unsigned int...
parallel_master_taskloop_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s -Wuninitialized void xxx(int argc) { int x; // expected-note {{initialize the variable 'x' to silence this warning}} #pragma om...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
nested-2.c
#include <omp.h> #include <stdlib.h> int main (void) { int i = -1, j = -1; omp_set_nested (0); omp_set_dynamic (0); #pragma omp parallel num_threads (4) { #pragma omp single { i = omp_get_thread_num () + omp_get_num_threads () * 256; #pragma omp parallel num_threads (2) { #pragma omp single ...
broadcasting.h
/* * broadcasting.h * * Created on: Dec 28, 2015 * Author: agibsonccc */ #ifndef BROADCASTING_H_ #define BROADCASTING_H_ #include <dll.h> #include <sharedmem.h> #include <shape.h> #include <op.h> #include <templatemath.h> #include <helper_cuda.h> #include <pairwise_util.h> #ifdef __CUDACC__ #include <cuda....
convolution_sgemm_pack4.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 ...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
dm.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "dm.kernel_inc.h" int openmp_dm_1st_eqn_right_init (openmp_pscmc_env * pe ,openmp_dm_1st_eqn_right_struct * kerstr ){ return 0 ;} void openmp_dm_1st_eqn_right_get_struct_len (size_t * len ){ (...
watchpoint_support.c
// // WatchPointDriver.cpp // // // Created by Milind Chabbi on 2/21/17. // // #if !defined(_GNU_SOURCE) #define _GNU_SOURCE #endif #include <asm/unistd.h> #include <errno.h> #include <fcntl.h> #include <linux/hw_breakpoint.h> #include <linux/perf_event.h> #include <linux/kernel.h> #include <signal.h> #include <stdl...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
target_data-6.c
/* { dg-do run } */ /* { dg-require-effective-target offload_device_nonshared_as } */ #include <stdlib.h> #include <omp.h> #define EPS 0.000001 #define THRESHOLD 1000 const int MAX = 1800; void check (float *a, float *b, int N) { int i; for (i = 0; i < N; i++) if (a[i] - b[i] > EPS || b[i] - a[i] > EPS) ...
GB_binop__le_bool.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__lor_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:...
bpmfutils.h
#pragma once #include <chrono> #include <Eigen/Sparse> #include <Eigen/Dense> #include <cmath> #include <algorithm> #include <fstream> #include <iomanip> #include <memory> #include "sparsetensor.h" inline double tick() { return std::chrono::duration_cast<std::chrono::duration<double>>(std::chrono::high_resolutio...
GB_unop__minv_bool_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
declare-simd-fix.h
#ifndef LLVM_CLANG_TEST_OPENMP_INPUTS_DECLARE_SIMD_FIX_H #define LLVM_CLANG_TEST_OPENMP_INPUTS_DECLARE_SIMD_FIX_H #pragma omp declare simd float foo(float a, float b, int c); float bar(float a, float b, int c); #endif
kd_tree_index.h
#ifndef panene_base_index_h #define panene_base_index_h #include <vector> #include <algorithm> #include <random> #include <util/allocator.h> #include <util/heap.h> #include <util/dynamic_bitset.h> #include <util/random.h> #include <util/result_set.h> #include <dist.h> #include <map> #include <kd_tree.h> #include <r...
GB_unop__identity_int8_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
gi_topological_gradient_using_algorithms.h
/* * * Copyright (C) 2018 Attila Gyulassy <jediati@sci.utah.edu> * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ #ifndef TOPOLOGICAL_GRADIENT_USING_ALGORITHMS_H #define TOPOLOGICAL_GRADIENT_USING_ALGORITHMS_H #include...
exponential.h
#ifndef MATH_EXPONENTIAL_H #define MATH_EXPONENTIAL_H namespace math { namespace exponential { struct Phase { arma::vec wavenumbers; explicit inline Phase(const arma::uword dim) : wavenumbers(arma::zeros<arma::vec>(dim)) {} explicit inline Phase(const arma::vec & wavenumbers) : wavenumbers(wav...
net_Greduced_code.h
/* including file for different pagerank subroutines */ #ifndef __GREDUCED__ #define __GREDUCED__ #include <stdio.h> #include <math.h> #include "filesize.h" #include "matrix_simple.h" #include "network_class.h" #include "read_ascii.h" #include "utf_string.h" #include "quicksort_page.h" double eps_pagerank=1e-13; /*...
GB_binop__second_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...
reduction-clauseModificado7.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main(int argc, char **argv) { int i, n=20, a[n],suma=0; if(argc < 2){ fprintf(stderr,"Falta iteraciones\n"); exit(-1); } n = atoi(argv[1]); if(n>20) {n=20; printf("n=%d",n);} for(i=0;i<...
electrons.c
/*--------------------------------------------------------------------------------- ELECTRONS.C -Initialize electron and gas entropies -Assign electron and total entropies based on https://academic.oup.com/mnras/article/454/2/1848/2892599 ------------------------------------------------------------------------...
diamond_ts.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <math.h> #include "mpi.h" #include "data_structures.h" #define ST_BUSY (0) #define ST_NOT_BUSY (1) extern int get_ntg(Parameters); extern void sub_array_copy_tg(const real_t * restrict src_buf, real_t * restrict dst_buf, int *src_size, int *dst_size,...
threadpool.h
/* Copyright 2015 The TensorFlow 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 a...
picolrn.c
/* * This code is released under the MIT License. * Copyright (c) 2013 Nenad Markus */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <stdint.h> #include <omp.h> // hyperparameters #define NRANDS 128 /* auxiliary stuff */ #define MAX(a, b) ((a)>(b)?(a):(b)) #define MIN(a, b) ((a)<(b)?(a):(...
nsfactor.c
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team, * check out http://www.gromacs.org for more information. * Copyright (c) 2012,2013, by the GROMACS development team, l...
nested_lwt_thread_num.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt #include "callback.h" #include <omp.h> __attribute__ ((noinline)) // workaround for bug in icc void print_task_info_at(int ancestor_level, int id) { #pragma omp critical { int task_type; char buffer[2048]; ompt_data_t *parallel_data; ...
libsvm_parser.h
/*! * Copyright (c) 2015 by Contributors * \file libsvm_parser.h * \brief iterator parser to parse libsvm format * \author Tianqi Chen */ #ifndef XGBOOST_IO_LIBSVM_PARSER_H_ #define XGBOOST_IO_LIBSVM_PARSER_H_ #define NOMINMAX #include <vector> #include <cstring> #include <cctype> #include <algorithm> #include "....
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (992) #define INIT() INIT_LOOP(N, {C[i] = 0; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) #define PARALLEL_A() { \ _Pragma("omp parallel num_threads(33) if (0)") \ { \ ...
omp_loop.h
// -*- C++ -*- // Copyright (C) 2007-2019 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the terms // of the GNU General Public License as published by the Free Software // Foundation; either version 3...
GB_binop__isge_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-...
irbuilder_unroll_partial_factor_for_collapse.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -no-opaque-pointers -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-n...
init.c
// Test the placement of XOMP_init() in C/C++ input #include <stdlib.h> #include <stdio.h> #include <omp.h> int main(int argc, char* argv[]) { if (argc <2 ) exit (1); #pragma omp parallel #pragma omp master { printf("Number of threads = %d\n", omp_get_num_threads()); } return 0; }
NLmean_propag2dirs_sspacing3_tspacing8_sim12_acc12_neighbor5_tau0100.c
/* * compile: gcc -O3 -std=c99 -o [filename_out] -fopenmp [filename].c -lm -I/usr/include/netcdf-3/ -L/usr/lib64/ -lnetcdf -lnetcdf_c++ * in the terminal: export OMP_NUM_THREADS=3 */ #include<stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <netcdf.h> #include <omp.h> /* This is the name ...
pi_omp.c
/* * Copyright (c) 2009-2010, Oracle and/or its affiliates. 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, * th...
GB_unop__tgamma_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
ast-dump-openmp-target-exit-data.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(int x) { #pragma omp target exit data map(from \ : x) } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> ...
learner.c
#include <stdlib.h> #include <stdbool.h> #include <sys/mman.h> #include <stdio.h> #include <stdint.h> #include "../corpus/corpus_io.h" #include "../tagger/tags.h" #include "../lib/hashmap.h" #include "learner.h" #include "../rules/rules.h" #include "../util/dynamic_array.h" #include "../tagger/tagger.h" #include "../di...
GB_transpose.c
//------------------------------------------------------------------------------ // GB_transpose: C=A' or C=op(A'), with typecasting //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.co...
simpleFlush.c
int main() { int x; { int x; #pragma omp flush } { int x; #pragma omp flush } }
GB_unop__exp_fp32_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
openmp.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include <sys/time.h> #define PACKET_COUNT 10000 #define RESOLUTION 10000000 typedef struct { void *data; } t_data; typedef struct { void *result; } t_result; int is_prime(const int p) { for (int i = 3; i <= sqrt(p); i++) { if...
GB_binop__second_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
cpu_stream.h
/* Copyright 2020 The OneFlow 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 agre...
symv_c_coo_n_lo_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/kernel_plain.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t symv_coo_n_lo_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *A, const ALPHA_Number *...
GB_unop__sqrt_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...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You c...
VerletClusterListsTest.h
/** * @file VerletClusterListsTest.h * @author nguyen * @date 21.10.18 */ #pragma once #include <gtest/gtest.h> #include "AutoPasTestBase.h" #include "autopas/cells/FullParticleCell.h" #include "autopas/containers/verletClusterLists/traversals/VerletClustersColoringTraversal.h" #include "autopas/particles/Partic...
common.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_UTILS_COMMON_FUN_H_ #define LIGHTGBM_UTILS_COMMON_FUN_H_ #include <LightGBM/utils/log.h> #include <LightGBM/utils/openmp_wrapper.h>...
nvm_vblk.c
/* * vblock - Virtual block functions * * Copyright (C) 2015-2017 Javier Gonzáles <javier@cnexlabs.com> * Copyright (C) 2015-2017 Matias Bjørling <matias@cnexlabs.com> * Copyright (C) 2015-2017 Simon A. F. Lund <slund@cnexlabs.com> * All rights reserved. * * Redistribution and use in source and binary forms, wi...
weighted_sptree.h
/* * * Copyright (c) 2014, Laurens van der Maaten (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 ...
jacobi-task.c
# include "poisson.h" /* #pragma omp task/taskwait version of SWEEP. */ void sweep (int nx, int ny, double dx, double dy, double *f_, int itold, int itnew, double *u_, double *unew_, int block_size) { int i; int it; int j; double (*f)[nx][ny] = (double (*)[nx][ny])f_; double (*u)[nx][ny] = ...
hamming.c
/* Copyright © INRIA 2010-2011. Authors: Matthijs Douze & Herve Jegou Contact: matthijs.douze@inria.fr herve.jegou@inria.fr This software is a computer program whose purpose is to provide efficient tools for basic yet computationally demanding tasks, such as find k-nearest neighbors using exhaustive search and k...
reduce_demo.c
//------------------------------------------------------------------------------ // GraphBLAS/Demo/Program/reduce_demo: reduce a matrix to a scalar //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
CutPursuit.h
#pragma once #include "Graph.h" #include <math.h> #include <queue> #include <iostream> #include <fstream> #include <boost/graph/boykov_kolmogorov_max_flow.hpp> namespace CP { template <typename T> struct CPparameter { T reg_strenth; //regularization strength, multiply the edge weight uint32_t cutoff; //min...
target-data.c
// RUN: %libomptarget-compile-generic -fopenmp-extensions // RUN: %libomptarget-run-generic | %fcheck-generic -strict-whitespace #include <omp.h> #include <stdio.h> #define CHECK_PRESENCE(Var1, Var2, Var3) \ printf(" presence of %s, %s, %s: %d, %d, %d\n", ...
DRB008-indirectaccess4-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
progress.c
/* * Copyright (c) 2009, 2010, 2011, 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. Attn: Systems Group. */ #include <assert.h>...
GB_binop__bclr_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
rmsprop_op.h
#pragma once #include "caffe2/core/operator.h" namespace caffe2 { template <typename Context> void rmsprop_update( int N, const float* g, const float* ms, const float* mom, float* ng, float* nms, float* nmom, float decay, float momentum, float epsilon, const float* lr, ...
GB_unop__abs_uint64_uint64.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_unaryop__lnot_uint32_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
ethereum_fmt_plug.c
/* * JtR format to crack password protected Ethereum Wallets. * * This software is Copyright (c) 2017, Dhiru Kholia <kholia at kth.se> and it * is hereby released to the general public under the following terms: * * Redistribution and use in source and binary forms, with or without * modification, are permitted....
kde_nsw.h
// // Created by xinyan on 3/4/2020. // #ifndef SSKDE_KDE_NSW_H #define SSKDE_KDE_NSW_H #include <hnswlib/hnswlib.h> #include <hnswlib/space_l2.h> using hnswlib::L2Space; using hnswlib::HierarchicalNSW; template <typename R, typename S> R* const_reinterpret_cast(const S* x) { return const_cast<R*>(reinterpret_cas...
homomorphic_functions.c
long long int sk[NUM_PRIME][4096]; long long int pk0[NUM_PRIME][4096], pk1[NUM_PRIME][4096]; long long int rlk00[NUM_PRIME][4096], rlk01[NUM_PRIME][4096], rlk10[NUM_PRIME][4096], rlk11[NUM_PRIME][4096]; long long int rlk20[NUM_PRIME][4096], rlk21[NUM_PRIME][4096], rlk30[NUM_PRIME][4096], rlk31[NUM_PRIME][4096], rlk40[N...
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_binop__isgt_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...
omp_hello.c
/* a simple openMP program */ #include <stdio.h> #include <omp.h> int main(int argc, char *argv[]){ int num_threads = 999999; // omp_set_num_threads(4); // or use num_threads(4) as part of the pragma below #pragma omp parallel { int thread_id = omp_get_thread_num(); #pragma omp...
reduction2.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif main(int argc, char **argv) { int i, n=20, a[n],sumalocal,suma=10; if(argc < 2) { fprintf(stderr,"Falta iteraciones\n"); exit(-1); } n = atoi(argv[1]); if (n>20) {n=20; printf("n=%d",n);} for (...
DRB013-nowait-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...
quick_gemm.h
// Quick gemm if alpha==0.0 if ( alpha==zero ) { if ( beta==zero ) if ( orderC=='C' ) { #pragma omp parallel for (int jc=0; jc<n; jc++ ) for (int ic=0; ic<m; ic++ ) Ccol(ic,jc) = 0.0; } else { #pragma omp parallel for (int jc=0; jc<n; jc++ ...
aurora_runtime_kernels.c
#include <omp.h> #include <pthread.h> #include <string.h> #include <stdlib.h> #include <stdint.h> void ve_init() { #pragma omp parallel { auto tx = omp_get_thread_num(); cpu_set_t set; memset(&set, 0, sizeof(cpu_set_t)); set.__bits[0] = 1 << tx; pthread_setaffinity_np(pt...
convolution_sgemm_int8.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at // //...
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 // //===---------------------------...
memspeed.c
/* cc memspeed.c cpuidc.c -lm -lrt -O3 -o memspeedIL gcc memspeed.c cpuidc.c -lm -lrt -O3 -march=armv6 -mfloat-abi=hard -mfpu=vfp -o memspeedPiA6 #define version "32 Bit Version 4" Compile time Raspberry Pi - 9 seconds+ gcc memspeed.c cpuidc.c -lm -lrt -O3 -mcpu=cortex-a7 -mfloat-abi=hard -mfpu=neon-vfpv4...
updater_basemaker-inl.h
/*! * Copyright 2014 by Contributors * \file updater_basemaker-inl.h * \brief implement a common tree constructor * \author Tianqi Chen */ #ifndef XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_ #define XGBOOST_TREE_UPDATER_BASEMAKER_INL_H_ #include <rabit/rabit.h> #include <vector> #include <algorithm> #include <string>...
lis_matrix_msr.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...
BRKGA.h
/* * BRKGA.h * * This class encapsulates a Biased Random-key Genetic Algorithm (for minimization problems) with K * independent Populations stored in two vectors of Population, current and previous. It supports * multi-threading via OpenMP, and implements the following key methods: * * - BRKGA() constructor: ini...
edge_miner.h
#ifndef EDGE_MINER_H #define EDGE_MINER_H #include <mutex> #include <numeric> #include "miner.h" #include "domain_support.h" typedef std::pair<unsigned, unsigned> InitPattern; typedef QuickPattern<EdgeEmbedding, ElementType> QPattern; typedef CanonicalGraph<EdgeEmbedding, ElementType> CPattern; typedef std::unordered_...
k_clique_count_set_based.h
#pragma once #include <gms/representations/graphs/set_graph.h> template <class SGraph, class Set> size_t RecursiveStepCliqueCount(SGraph& graph, const size_t k, const Set &isect) { if (k == 1) return isect.cardinality(); assert(k > 1); size_t current = 0; for (auto vi : isect) { auto c...
axpy.c
// Experimental test input for Accelerator directives // simplest scalar*vector operations // Liao 1/15/2013 #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <sys/timeb.h> #define NUM_RUNS 10 double read_timer_ms() { struct timeb tm; ftime(&tm); return (double) tm.tim...
GB_binop__rdiv_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
IJVector_parcsr.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) **************************************...
facedetectcnn.h
/* By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software. License Agreement For libfacedetection (3-clause BSD License) Copyright (c) 2018-2021, Shiqi Yu, all ...
openmp-ex33.c
/* Although OpenMP emphasizes data parallelism, there are also constructs for * instruction parallelism */ #include <stdio.h> #include <omp.h> int main(void) { int clients[2] = {-1, -1}; #pragma omp parallel { int id = omp_get_thread_num(); #pragma omp sections { #pragma omp section { ...
lap.h
#include <cassert> #include <cstdio> #include <limits> #include <memory> #include <vector> #include "knn.h" #ifdef __GNUC__ #define always_inline __attribute__((always_inline)) inline #define restrict __restrict__ #elif _WIN32 #define always_inline __forceinline #define restrict __restrict #else #define always_inline ...
pmv-OpenMP-reduction.c
/* Multiplica una matriz por un vector */ #include <stdlib.h> // biblioteca con funciones atoi(), malloc() y free() #include <stdio.h> // biblioteca donde se encuentra la función printf() #include <time.h> // biblioteca donde se encuentra la función clock_gettime() #ifdef _OPENMP #include <omp.h> #else #d...
gemm.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...
absgradMEX_test.c
/************************************************************************** MEX function to compute the approximate gradient of the absolute value Author: R. Marc Lebel Contact: mlebel@gmail.com Date: 11/2010 Useage: wc2 = absgradMEX(wc,smooth) Input: wc: numeric array (single/double; real/complex) smooth...
collective_reduction.c
/***************************************************************************** * * * Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 * * * * ...
facedetectcnn.h
/* By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software. License Agreement For libfacedetection (3-clause BSD License) Copyright (c) 2018-2020, Shiqi Yu, all ...
lbfgsbsolver.h
// CppNumericalSolver // based on: // L-BFGS-B: A LIMITED MEMORY ALGORITHM FOR BOUND CONSTRAINED OPTIMIZATION // Richard H. Byrd, Peihuang Lu, Jorge Nocedal and Ciyou Zhu #include <iostream> #include <list> #include <Eigen/LU> #include "isolver.h" #include "../boundedproblem.h" #include "../linesearch/morethuente.h" #i...
main.c
/* * spike.c * Spike * * Created by Ben Evans on 19/06/2008. * Copyright 2008 University of Oxford. All rights reserved. * */ #include <stdio.h> #include <time.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <unistd.h> #ifdef SERIAL #undef _OPENMP #endif #ifdef _OPENMP #include <omp...
target-data-2c.c
// ---------------------------------------------------------------------------------------- // Implementation of Example target.3c (Section 52.3, page 196) from Openmp // 4.0.2 Examples // on the document http://openmp.org/mp-documents/openmp-examples-4.0.2.pdf // // // // // -------------------------------------------...