source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_bitmap_masker_template.c
//------------------------------------------------------------------------------ // GB_bitmap_masker_template: phase2 for R = masker (C, M, Z), R is bitmap //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. /...
c3_fmt.c
/* * Generic crypt(3) support, as well as support for glibc's crypt_r(3) and * Solaris' MT-safe crypt(3C) with OpenMP parallelization. * * This file is part of John the Ripper password cracker, * Copyright (c) 2009-2015 by Solar Designer * * Redistribution and use in source and binary forms, with or without * m...
GB_unop__identity_int16_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...
gather_double.c
// create a list of 64 numbers, and only sum the even ones #include <stdio.h> #include <stdlib.h> #define N 32000 int main() { srand(time(NULL)); double *numbers = malloc(sizeof(double)*N); int *mask = malloc(sizeof(int)*N); // Init the numbers for (int i = 0; i<N; i++) numbers[i] = rand() % ...
mkldnn_graph.h
// Copyright (C) 2018-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include "ie_parallel.hpp" #include "config.h" #include "mkldnn_memory.h" #include "mean_image.h" #include "mkldnn_node.h" #include "mkldnn_edge.h" #include "mkldnn_streams.h" #include <map> #include <string> #include...
target_simd_misc_messages.c
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s -Wuninitialized // RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s -Wuninitialized // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target simd'}} #pragma omp target simd // expected-error@+1 {{unexpected OpenMP directive '#pragma omp target ...
bdlevd2.c
#include "laev2.h" #include "wnrme.h" #include "rnd.h" #include "timer.h" int main(int argc, char *argv[]) { (void)set_cbwr(); if (4 != argc) { (void)fprintf(stderr, "%s filename 2^{batch_size} #batches\n", *argv); return EXIT_FAILURE; } const size_t n = ((size_t)1u << atoz(argv[2u])); int th = 0; ...
dtrmm.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/ztrmm.c, normal z -> d, Fri Sep 28 17:38:03 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
nn_index.h
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. * * THE BSD LICENSE * * Redistribution an...
grib_bits_fast_big_endian_omp.c
/* * Copyright 2005-2017 ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * * In applying this licence, ECMWF does not waive the privileges and immunities granted to it by * virtue of its status as an int...
DRB019-plusplus-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...
fibonacci1.c
/* OpenMP TASK Example: Computing Fibonacci Numbers */ #include <stdio.h> #include <omp.h> int fib(int n) { int i, j; if (n<2) return n; else { #pragma omp task shared(i) firstprivate(n) i=fib(n-1); #pragma omp task shared(j) firstprivate(n) j=fib(n-2); #pragma omp taskwa...
intruder.c
/* ============================================================================= * * intruder.c * * ============================================================================= * * Copyright (C) Stanford University, 2006. All Rights Reserved. * Author: Chi Cao Minh * * =======================================...
IO.h
// This code is part of the project "Ligra: A Lightweight Graph Processing // Framework for Shared Memory", presented at Principles and Practice of // Parallel Programming, 2013. // Copyright (c) 2013 Julian Shun and Guy Blelloch // // Permission is hereby granted, free of charge, to any person obtaining a // copy of t...
app.c
/** * Christina Giannoula * cgiannoula: christina.giann@gmail.com */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <dpu.h> #include <dpu_log.h> #include <unistd.h> #include <getopt.h> #include <assert.h> #include <math.h> #include <omp.h> #include "../support/common.h" #i...
GB_dense_subassign_25_template.c
//------------------------------------------------------------------------------ // GB_dense_subassign_25_template: C<M> = A where C is empty and A is dense //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. /...
GB_unop__log1p_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...
trsm_x_dia_u_lo_row.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { ...
mixed_tentusscher_myo_epi_2004_S3_13.c
// Scenario 3 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt + Rc) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S3_13.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_o...
acado_solver.c
/* * This file was auto-generated using the ACADO Toolkit. * * While ACADO Toolkit is free software released under the terms of * the GNU Lesser General Public License (LGPL), the generated code * as such remains the property of the user who used ACADO Toolkit * to generate this code. In partic...
CPSfield_impl.h
#ifndef CPS_FIELD_IMPL #define CPS_FIELD_IMPL //Implementations of CPSfield.h //Real-reduce for norm2 template<typename T> struct normdefs{}; template<> struct normdefs<double>{ inline static double real_reduce(const double in){ return in; } inline static double conjugate(const double in){ return in; } }; templ...
TopologicalSimplification.h
/// \ingroup base /// \class ttk::TopologicalSimplification /// \author Julien Tierny <julien.tierny@lip6.fr> /// \author Guillaume Favelier <guillaume.favelier@lip6.fr> /// \date February 2016 /// /// \brief TTK processing package for the topological simplification of scalar /// data. /// /// Given an input scalar fi...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
shallow_water_residual_based_bdf_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Miguel Maso Sotomayor // #ifndef KRATOS_SHALLOW_...
GB_unop__tanh_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...
GB_binop__div_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-...
declare_variant_mixed_codegen.c
// RUN: %clang_cc1 -verify -fopenmp -x c -triple x86_64-unknown-linux -emit-llvm %s -o - | FileCheck %s --check-prefix HOST // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-unknown-linux -emit-pch -o %t -fopenmp-version=45 %s // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-unknown-linux -include-pch %t -verify %s -emit-...
GB_binop__ge_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
statistic.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GrB_Matrix_exportSize.c
//------------------------------------------------------------------------------ // GrB_Matrix_exportSize: determine sizes of arrays for GrB_Matrix_export //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // ...
main.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include "omp.h" #include "functions.h" int main (int argc, char **argv) { int Nthreads = 1; // change this every time you run this omp_set_num_threads(Nthreads); //seed value for the randomizer double seed = clo...
displacement_lagrangemultiplier_residual_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
GB_unaryop__minv_fp32_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
declare_variant_messages.c
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s #pragma omp declare // expected-error {{expected an OpenMP directive}} int foo(void); #pra...
shared-clause.c
/* * private-clause.c * * Created on: 02/04/2014 * Author: Carlos de la Torre */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif int main() { int i, n = 7; int a[n]; for (i = 0; i < n; i++) a[i] = i + 1; #pragma omp parallel for shared(a) for (i = 0; i < n; i++) a[i] += i; printf("Después ...
declare_reduction_ast_print.c
// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp-simd -emit-pch...
omp_thread_attach_test_2.c
// execute in sequence // input the number of num_user_threadsation #include <stdlib.h> #include <pthread.h> #include <omp.h> #include <sys/timeb.h> #include <omp_interop.h> #include <unistd.h> /* read timer in second */ double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.t...
diagsv_x_sky_u.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, ALPHA_Number *y) { int num_thread = alpha_get_thread_num(); #...
fpURFBase.h
#ifndef fpURF_h #define fpURF_h #include "../../../baseFunctions/fpForestBase.h" #include <vector> #include <map> #include <algorithm> #include <unordered_map> #include <stdio.h> #include <ctime> #include <chrono> #include <cstdlib> #include "urfTree.h" #include <sys/time.h> #include <eigen3/Eigen/Dense> #include <eig...
owl_ndarray_conv_impl.h
/* * OWL - OCaml Scientific and Engineering Computing * Copyright (c) 2016-2018 Liang Wang <liang.wang@cl.cam.ac.uk> */ #ifdef OWL_ENABLE_TEMPLATE /* * im2col implementation */ CAMLprim value FUN_NATIVE (spatial_im2col) ( value vInput_ptr, value vKernel_ptr, value vOutput_ptr, value vBatches, value vInput_...
GB_unop__identity_uint32_int8.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...
GB_AxB_dot4_template.c
//------------------------------------------------------------------------------ // GB_AxB_dot4_template: C+=A'*B via dot products, where C is full //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-L...
GB_binop__div_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
CRSMatrix.h
/** * Copyright (c) 2012, OpenGeoSys Community (http://www.opengeosys.com) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.com/LICENSE.txt * * * \file CRSMatrix.h * * Created on 2011-09-20 by Thomas Fischer */ #if...
convolution_sgemm_pack16to4.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 ...
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) #...
lu.c
/*[]*/ typedef long long __int64_t; /*[]*/ typedef __int64_t __darwin_off_t; /*[]*/ typedef __darwin_off_t fpos_t; /*[]*/ struct __sbuf { unsigned char *_base; int _size; } ; /*[]*/ struct __sFILEX ; /*[]*/ struct __sFILE { unsigned char *_p; int _r; int _w; short _flags; short _file; s...
generated-funcs.c
// Check that the CHECK lines are generated for clang-generated functions // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fopenmp %s -emit-llvm -o - | FileCheck --check-prefix=OMP %s // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck --check-prefix=NOOMP %s const int size = 1024 * ...
reduce_to_width_mex.c
#include "mex.h" #include <immintrin.h> #include "simd_guard.h" // // For compiling instructions, see big_plot.compile() // // Flags: // ENABLE_SIMD //Status //----------- //1) Parallel min and max across threads //2) Starts at an arbitrary index into the data (for processing subsets) //3) All classes supported //...
FileParser.h
// // Created by Timm Felden on 04.11.15. // #ifndef SKILL_CPP_COMMON_FILEPARSER_H_H #define SKILL_CPP_COMMON_FILEPARSER_H_H #include "../common.h" #include "../api/SkillFile.h" #include "ParseException.h" #include "../streams/FileInputStream.h" #include "StringPool.h" #include "AbstractStoragePool.h" #include "../re...
V4_openmp.h
#include <time.h> #include <omp.h> long v4_openmp( int * row, int * col, float * c, int M, int nz) { //The Variables used to time the function struct timespec ts_start; struct timespec ts_end; //Initialization of c for(int i=0; i<M; i++) c[i] = 0; //Declaring the priva...
Ooura_FFT.h
#ifndef _H_OOURA_FFT_ #define _H_OOURA_FFT_ #include <cmath> class Ooura_FFT{ private: int frame_size; int channels; double **a, **w; int **ip; public: inline Ooura_FFT(int _frame_size, int _channels); inline ~Ooura_FFT(); inline void FFT(double **); inline void FFT(d...
collapse-nonrectangle.c
#include <stdio.h> #include "assert.h" #include <unistd.h> void vmul(int*a, int*b, int*c, int N){ #pragma omp target map(to: a[0:N],b[0:N]) map(from:c[0:N*N]) #pragma omp teams distribute parallel for collapse(2) for(int i=0;i<N;i++) for(int j=0;j<N-i;j++){ c[i*N+j]=a[i]*b[j]; } } int main(){ con...
cpl_geom_img-test.c
/* * This file is part of the ESO Common Pipeline Library * Copyright (C) 2001-2017 European Southern Observatory * * 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 ...
GB_unaryop__identity_int32_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
geo_particle_iter_mass.kernel_runtime.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include "local_header.h" #include "openmp_pscmc_inc.h" #include "geo_particle_iter_mass.kernel_inc.h" int openmp_relng_1st_sg2_small_grids_init (openmp_pscmc_env * pe ,openmp_relng_1st_sg2_small_grids_struct * kerstr ){ return 0 ;} void openmp_relng_1st_sg2...
generator_gemm_common.c
/****************************************************************************** ** Copyright (c) 2015-2019, Intel Corporation ** ** All rights reserved. ** ** ** ...
J2OrbitalSoA.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers. // // File developed by: Jeongnim ...
csr.c
/*! * \file * * \brief Various routines with dealing with CSR matrices * * \author George Karypis * \version\verbatim $Id: csr.c 21044 2017-05-24 22:50:32Z karypis $ \endverbatim */ #include <GKlib.h> #define OMPMINOPS 50000 /*************************************************************************/ /*...
app_baseline.c
/** * @file app.c * @brief Template for a Host Application Source File. * */ #include "../../support/timer.h" #include <assert.h> #include <getopt.h> #include <omp.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> static uint64_t *A; static u...
Main.c
#include "XSbench_header.h" #ifdef MPI #include<mpi.h> #endif int main(int argc, char* argv[]) { // ===================================================================== // Initialization & Command Line Read-In // ===================================================================== int version = 13; int mype = ...
GB_unop__log2_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...
genopheno.h
/** * CMA-ES, Covariance Matrix Adaptation Evolution Strategy * Copyright (c) 2014 Inria * Author: Emmanuel Benazera <emmanuel.benazera@lri.fr> * * This file is part of libcmaes. * * libcmaes is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as...
diagsm_x_csc_u_row.c
#include "alphasparse/opt.h" #include "alphasparse/kernel.h" #include "alphasparse/util.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_CSC *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { ALPHA_INT num_thread = alpha_get_thr...
morph_library.h
#include "../include/CImgFloatWrapper.h" #include "../loewner_morphology.h" #include "omp.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #include <thread> #define THREADS_X 16 #define THREADS_Y 16 #define TILE_X 16 #define TILE_Y 16 #define BLOCK_SIZE 256 #define CONSTANT_SIZE 1024 #define OMP_THREA...
Shuffle.h
// -------------------------------------------------------------------------- // Binary Brain -- binary neural net framework // // Copyright (C) 2018 by Ryuji Fuchikami // https://github.com/ryuz // ryuji.fuch...
keyval.h
/* * The MIT License (MIT) * * Copyright (c) 2016 Eduard L�pez * * 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,...
oracle_fmt_plug.c
/* * This software is Copyright (c) 2004 bartavelle, <simon at banquise.net>, 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. * * UTF-8 support: Copyright magnum 2012 and hereby released to t...
stinger-physmap.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <stdint.h> #include "stinger-physmap.h" #include "stinger-atomics.h" #define MARKERINT INT64_MAX int64_t MARKER_; void * MARKER = (void *)&MARKER_; #define CHILDREN_COUNT 256 /* struct defs */ typedef struct tree_node { struct tree_node * childr...
normal.c
// RUN: %libomp-compile-and-run | FileCheck %s // RUN: %libomp-compile-and-run | %sort-threads \ // RUN: | FileCheck --check-prefix=THREADS %s // REQUIRES: ompt #include "callback.h" int main() { #pragma omp parallel num_threads(4) { print_ids(0); print_ids(1); } print_fuzzy_addre...
omp-nested-par.c
#include <stdio.h> int main() { #pragma omp parallel { printf("Hello World\n"); #pragma omp parallel { printf("nested parallel region\n"); } } return 0; }
OMPIRBuilder.h
//===- IR/OpenMPIRBuilder.h - OpenMP encoding builder for LLVM IR - 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 // //===---------------------------...
test.c
#include <stdio.h> #pragma omp requires unified_shared_memory #include "../utilities/check.h" #define N 100 int main() { check_offloading(); int a[N], aa[N]; int i, error = 0; // initialize for(i=0; i<N; i++) aa[i] = a[i] = -1; // offload #pragma omp target map(tofrom: a[0:100]) { int k;...
GB_unaryop__identity_fp64_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
vector.c
#include "lib.h" #include <math.h> #include <stdint.h> #include <stdlib.h> void DENSEARRAY_SYMBOL(set_scalar_f32)( float *dst, size_t dim, float c) { #pragma omp parallel for for (size_t idx = 0; idx < dim; idx++) { dst[idx] = c; } } void DENSEARRAY_SYMBOL(set_scalar_i32)( int32_t *dst, ...
Fig_4.9_piparCpadSum.c
#include <stdio.h> #include <omp.h> #define NTHREADS 4 #define CBLK 8 static long num_steps = 100000000; double step; int main () { int i, j, actual_nthreads; double pi, start_time, run_time; double sum[NTHREADS][CBLK]={0.0}; step = 1.0 / (double) num_steps; omp_set_num_threads(NTHREADS); sta...
convolution_winograd_transform.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 ...
GB_unaryop__one_uint32_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_binop__isgt_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...
residualbased_elimination_quasiincompresible_builder_and_solver.h
/* ********************************************************* * * Last Modified by: $Author: anonymous $ * Date: $Date: 2009-01-15 14:50:24 $ * Revision: $Revision: 1.12 $ * * ***********************************************************/ #if !defined(KRATOS_RESIDUAL_BASED_ELIMINATION_...
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__minv_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...
padlock_fmt_plug.c
/* * Format for cracking Padlock password databases. * * This software is Copyright (c) 2017, Dhiru Kholia <dhiru.kholia at gmail.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 permitted...
yescrypt-simd_c.h
/*- * Copyright 2009 Colin Percival * Copyright 2012-2014 Alexander Peslyak * 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 copy...
p1.c
#include <stdio.h> #include <omp.h> #include <time.h> #define INTERVALS 1000000 int main(int arc, char* argv[]) { double area; /* The final anser */ double ysum; /* Sum of rectangle heights */ double xi; /* Midpoint of interval */ int i; ysum = 0.0; omp_set_num_threads(4); double begin = omp_get_wtime();...
GB_binop__land_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
HashFunction.h
/* * HashFunction.h * * Created on: 20/lug/2016 * Author: samuele */ #ifndef HASHFUNCTION_H_ #define HASHFUNCTION_H_ #include "HashType.h" #include "../Spaced/SpacedQmer_Multi.h" #include <algorithm> #include <iostream> inline static hash_type CharToInt(char ch) { if(ch == 'A') return 0; if(ch == 'C')...
helloworld_mp.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> int main(int argc, char argv[]) { int omp_rank, omp_threads; #pragma omp parallel private(omp_rank) { omp_rank = omp_get_thread_num(); omp_threads = omp_get_num_threads(); printf("Hello World! by thread number %d of threads %d\n", omp_rank, omp_th...
conv_im2col_layer.h
//Tencent is pleased to support the open source community by making FeatherCNN available. //Copyright (C) 2018 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 of...
t_cholmod_super_numeric.c
/* ========================================================================== */ /* === Supernodal/t_cholmod_super_numeric =================================== */ /* ========================================================================== */ /* -------------------------------------------------------------------------...
red_black_gs.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...
OMPIRBuilder.h
//===- IR/OpenMPIRBuilder.h - OpenMP encoding builder for LLVM IR - C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
GB_binop__bclr_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...
ic.c
/* * ============================ ic ===================== * IC sets the initial condition * ATMS 502 / CSE 566, Spring 2016 * * Arguments: * * q1 real array IC data. Set 1..nx here; * [0],[nx+1] = ghost zones * if 1 ghost point on each side * dx real grid spacing * i1,i2 integers indices bounding...
normal.c
/* ============================================================================= * * normal.c * -- Implementation of normal k-means clustering algorithm * * ============================================================================= * * Author: * * Wei-keng Liao * ECE Department, Northwestern University * ...
volumeramdistancetransform.h
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2016-2020 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
geneticalgorithm.h
#ifndef GENETICALGORITHM_H #define GENETICALGORITHM_H #include "../entities/problem.h" #include "globalsolver.h" #include "parameters.h" #include <iostream> #include <memory> template <class T> class GeneticAlgorithm : public GlobalSolver<T> { public: GeneticAlgorithm(const GeneticAlgorithmParameters &parameters,...
omp_zsyrk_batch.c
/** * @file omp_zsyrk_batch.c * * @brief BBLAS omp_zsyrk_batch double _Complex routine. * * BBLAS is a software package provided by Univ. of Manchester, * Univ. of Tennessee. * * @version 1.0.0 * @author Samuel D. Relton * @author Pedro V. Lara * @author Mawussi Zounon * @date 2016-02-20 * **/ ...
v_p_strategy.h
// // Project Name: KratosPFEMFluidDynamicsApplication $ // Last modified by: $Author: AFranci $ // Date: $Date: January 2016 $ // Revision: $Revision: 0.0 $ // // #ifndef KRATOS_V_P_STRATEGY_H #define KRATOS_V_P_STRATEGY_...
Example_acquire_release.1.c
/* * @@name: acquire_release.1.c * @@type: C * @@compilable: yes * @@linkable: yes * @@expect: success * @@version: omp_5.0 */ #include <stdio.h> #include <omp.h> int main() { int x = 0, y = 0; #pragma omp parallel num_threads(2) { int thrd = omp_get_thread_num(); if (thrd == 0) { x = 10...