source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_unaryop__identity_int16_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
base.h
#include "callback.h" #include <omp.h> int main() { unsigned int i; #pragma omp parallel for num_threads(4) schedule(SCHEDULE) for (i = 0; i < 4; i++) { } // Check if libomp supports the callbacks for this test. // CHECK-NOT: {{^}}0: Could not register callback 'ompt_callback_parallel_begin' // CHECK-N...
unnamedCritical.c
// OpenMP Unnamed Critical Example // Inclusions #include <omp.h> #include <stdio.h> #include <stdlib.h> // Main int main( int argc, char** argv ) { int *a = malloc( 25 * sizeof( int ) ); // Array of Values int i = 0; // Loop Iterator int n = 25; ...
OpenMPClause.h
//===- OpenMPClause.h - Classes for OpenMP clauses --------------*- 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 // //===---------------------------...
matvec.c
/* * matvec.c: Example of matrix-vector product in OpenMP. * * (C) 2015 Mikhail Kurnosov <mkurnosov@gmail.com> */ #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <omp.h> #include <sys/time.h> /* * Memory consumption: O(m * n + n + m) */ enum { m = 20000, n = 20000 }; void *xmallo...
cauchy.c
/*! @copyright (c) 2017 King Abdullah University of Science and * Technology (KAUST). All rights reserved. * * STARS-H is a software package, provided by King Abdullah * University of Science and Technology (KAUST) * * @file src/applications/cauchy.c * @version 0.3.0 * @author A...
hello_world.c
//===-- hello_world.c - Almost the classic "Hello World" example --*- C -*-===// // // Part of the LOMP 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 // //===---------------------------...
appendParallelEdges.h
#pragma once #include<string> #include<sstream> #include<fstream> #include<unordered_map> #include<unordered_set> #include<list> #include<vector> #include<functional> // needed for posix io #include<cstdio> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> // for truncate #include<omp.h> #include"util...
optest.c
#include <stdio.h> #include <time.h> #include <stdlib.h> int main(int argc, char* argv[]) { int s; clock_t start, end; start = clock(); #pragma omp parallel for for (int i = 0; i < 100000000; i++ ) { s=s*i; //printf("i = %d\n", i); } end = clock(); printf("%f\n", (do...
explicit_strategy.h
/* ============================================================================== KratosStructuralApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Felix...
cp-tree.h
/* Definitions for C++ parsing and type checking. Copyright (C) 1987-2013 Free Software Foundation, Inc. Contributed by Michael Tiemann (tiemann@cygnus.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 by ...
convolution_pack4_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
omp_target_offload.c
// RUN: %libomp-compile-and-run #include <string.h> #include <stdlib.h> enum kmp_target_offload_kind { tgt_disabled = 0, tgt_default = 1, tgt_mandatory = 2 }; extern int __kmpc_get_target_offload(); extern void kmp_set_defaults(char const *str); const char *disabled_examples[] = { // Allowed inputs "di...
modulo.c
/*Fecha: 08/02/2022 * Autor: Andres C. Lopez R. * Subject: Parallel and Distributed Computing. * Topic: Construction of the first Benchmark * Description: Application that allows evaluating the performance of a specific aspect of the computer using matrix multiplication with the calssical algorithm (rows x columns)...
GB_binop__gt_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-...
multiply.h
#pragma once #include "intgemm/intgemm_config.h" #include "interleave.h" #include "intrinsics.h" #include "vec_traits.h" #include "callbacks.h" namespace intgemm { INTGEMM_SSE2 static inline dvector_t<CPUType::SSE2, int> PermuteSummer(__m128i pack0123, __m128i pack4567) { // No op for 128 bits: already reduced ful...
convolution_1x1.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 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 ...
attribute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
NETSPLITLM_fmt_plug.c
/* * NETHALFLM_fmt.c * Written by DSK (Based on NetLM/NetNTLM patch by JoMo-Kun) * Performs brute-force cracking of the HalfLM challenge/response pairs. * * Modified for performance and OMP support by magnum 2011 * * Storage Format: * domain\username:::lm response:nt response:challenge * * NOTE, in loader.c,...
ParallelFor.h
/* Bullet Continuous Collision Detection and Physics Library Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permiss...
GB_binop__first_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
omp-parallel-nested-single.c
#include <omp.h> #include <unistd.h> #include <stdio.h> #define THREADS 4 int main(void) { omp_set_max_active_levels(2); #pragma omp parallel num_threads(THREADS) { int j = omp_get_thread_num(); #pragma omp single #pragma omp parallel num_threads(THREADS) { pri...
tm_efficientdet.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
sync.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 <stdlib.h>...
trsv_x_sky_n_hi.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) { ALPHA_Number diag[A->cols]; memset(diag,...
hmm_conversion.c
#include <omp.h> #include "finite_hmm_alloc.h" #include "finite_hmm_stats.h" #include "hmm_conversion.h" #include "finite_hmm_plot.h" #include "randomkit_tl_add.h" int convert_ihmm_to_fhmm(struct ihmm_model* model,struct fhmm* fhmm, int allow_zero_counts ); int add_composistion_background(struct fhmm* fhmm, float* oc...
GB_binop__pow_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
schedule.c
#include <stdio.h> #include <omp.h> #include <math.h> int prime(int n) { int i = 2; for (i; i <= sqrt(n); i++) { if (n%i == 0) { return 0; } } return 1; } int main() { double t1,t2,time; int i=0; omp_set_num_threads(5); t1=omp_get_wtime(); #pragma omp parallel private(i) default(shared) #pragma o...
prepare_nn_input.h
#pragma once ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #define N 256 #define OTHER_PARAMS 3 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #include <limits> ///////////...
re_model_template.h
/*! * This file is part of GPBoost a C++ library for combining * boosting with Gaussian process and mixed effects models * * Copyright (c) 2020 Fabio Sigrist. All rights reserved. * * Licensed under the Apache License Version 2.0. See LICENSE file in the project root for license information. */ #ifndef GPB_RE_MODEL_TEM...
omp4_demo1.c
/* Copyright since 2016 the OMPi Team Dept. of Computer Science & Engineering, University of Ioannina 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, ...
PR44893.c
// RUN: %clang -fopenmp -O -g -x c %s -c -disable-output // Do not crash ;) void foo() { #pragma omp critical ; } void bar() { foo(); foo(); }
explicit_strategy.h
/* ============================================================================== KratosStructuralApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi, Janosch Stascheit, Felix...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
rakp_fmt_plug.c
/* * This software is Copyright (c) 2013 magnum, 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. */ #if FMT_EXTERNS_H extern struct fmt_main fmt_rakp; #elif FMT_REGISTERS_H john_register_...
declare_reduction_codegen.c
// RUN: %clang_cc1 -verify -fopenmp -x c -emit-llvm %s -triple %itanium_abi_triple -o - -femit-all-decls | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c -triple %itanium_abi_triple -emit-pch -o %t %s -femit-all-decls // RUN: %clang_cc1 -fopenmp -x c -triple %itanium_abi_triple -include-pch %t -verify %s -emit-llvm -o -...
TestQuantArray0.h
#ifndef __TESTQUANTARRAY0__ #define __TESTQUANTARRAY0__ #include "../Headers/Common.h" #include "../Headers/Timer.h" #include "../Headers/Range.h" #include "../Headers/Ref.h" #include "../Headers/Thread.h" #include "../Headers/NDArrayQuantCPU.h" #include "../Headers/NDArrayApproxCPU.h" #include "../Headers/OpsQuant.h...
tsp_rnd06.c
/* Description: This program executes my "Random Swapping" algorithm to solve the "Travelling Salesman Problem" Author: Georgios Evangelou (1046900) Year: 5 Parallel Programming in Machine Learning Problems Electrical and Computer Engineering Department, University of Patras System Specifications...
pca_.c
/* * pca_.c * * Created on: 20 gen 2016 * Author: Fabio */ // #include "hwPerf.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <time.h> #include "pca_.h" #include "dat.h" #include <omp.h> #include "init.h" #define SIGN(a, b) ((b) >= 0.0 ? fabsf(a) : -fabsf(a)) #def...
GB_unop__identity_int16_int64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
riemann.c
/* A simple 2D hydro code (C) Romain Teyssier : CEA/IRFU -- original F90 code (C) Pierre-Francois Lavallee : IDRIS -- original F90 code (C) Guillaume Colin de Verdiere : CEA/DAM -- for the C version */ /* This software is governed by the CeCILL license under French law and abiding by the ru...
heat.c
/*********************************************************************************/ /* */ /* Animation of heat equation in a planar domain */ /* ...
GB_unop__ceil_fc32_fc32.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...
Pooling.h
#ifndef POOLING #define POOLING /* * Pooling.h: * pool operation, max, min, average and sum pooling * * Created on: Apr 22, 2017 * Author: mszhang */ #include "MyLib.h" #include "Node.h" #include "Graph.h" class PoolNode : public Node { public: vector<PNode> ins; public: PoolNode() : Node() { ...
laplace_mp.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <sys/time.h> // grid size #define GRIDY 2048 #define GRIDX 2048 #define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) // smallest permitted change in temperature #define MAX_TEMP_ERROR 0.02 double T_new[GRIDX+2][GRIDY+2]; // temperature grid double T[GRIDX+...
single.c
/* */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif #include<assert.h> int main(void) { int i = 100 ; int num_threads =0; #pragma omp parallel { #pragma omp single { num_threads = omp_get_num_threads(); #pragma omp atomic i+=100; } #pragma omp single nowait { num_t...
DRB101-task-value-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_binop__bshift_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-...
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>...
wem.c
#include "seismic.h" #include "wem.h" void wem(float **d, float **m, float **wav, int nt, float ot, float dt, int nmx,float omx, float dmx, int nmy,float omy, float dmy, float sx,float sy, int nz, float oz, float dz, float gz, float sz, float **vel, int nref, float fmin, float fmax, int padt, int padx, ...
rt_dsrtdg.c
#include "runtime.h" void RT_dsrtdg(Quark *quark, Quark_Task_Flags *task_flags, int M, const double *A, int lda, double *work, int ldw) { plasma_context_t *plasma; plasma = plasma_context_self(); #pragma omp target device (smp) copy_deps #pragma omp task...
zoomData.c
/* * Copyright 2014 NeuroData (http://neurodata.io) * * 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...
GB_binop__le_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...
compute_s2_refl.c
/****************************************************************************** FILE: compute_s2_refl.c PURPOSE: Contains functions for handling the S2 TOA reflectance and surface reflectance corrections. PROJECT: Land Satellites Data System Science Research and Development (LSRD) at the USGS EROS LICENSE TYPE: NA...
top_k_op.h
/* Copyright (c) 2016 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...
pairweight.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include "eigenmap.h" void diff_reduce(double *w, double *feat, double *pos, int feat_dim, int pos_dim, int par0, int par1, int n_patch); /* pairweight calculates and modifies the weight matrix w (symmetric) * * w: pointer to...
GB_unaryop__ainv_uint8_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
morn_image_segment.c
/* Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com> Licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri...
advection2d.c
// // acoustics.c // AcousticsNd-CPU // // Created by Manuel Diaz on 7/26/16. // Copyright © 2016 Manuel Diaz. All rights reserved. // #include "advection2d.h" /*******************************/ /* Prints a flattened 1D array */ /*******************************/ void Print2D(REAL *u, const unsigned int nx, const u...
tinyexr.h
#ifndef TINYEXR_H_ #define TINYEXR_H_ /* Copyright (c) 2014 - 2020, Syoyo Fujita and many contributors. 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 th...
imagesupport.h
#ifndef YOLOV3 #define YOLOV3 #include <stdio.h> #include <stdlib.h> //#include <iostream> #include <math.h> #include <fcntl.h> #include <string.h> #include <time.h> #include "xconv_hw.h" //#include "hw_drivers.h" #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include...
Fig_8.2_race.c
#include <omp.h> #include <assert.h> #include <stdlib.h> int main() { int x = 0, y = 0, r = 0; omp_set_num_threads(2); // request two threads #pragma omp parallel { int id = omp_get_thread_num(); #pragma omp single { int nthrds = omp_get_num_threads(); // ve...
manifoldoctree.c
#include "mana/graphics/dualcontouring/manifold/manifoldoctree.h" //struct Threadz { // DWORD thread_id; // HANDLE thread_handle; // bool in_use; //}; //static inline bool manifold_octree_construct_nodes(struct ManifoldOctreeNode* octree_node, struct Vector* noises, float* noise_set, int used_threads, struct Threa...
gi_max_vertex_labeling.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 MAXIMUM_VERTEX_LABELING_H #define MAXIMUM_VERTEX_LABELING_H #include <omp.h> #include "gi_basic_...
GB_unaryop__lnot_uint16_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...
target_parallel_for_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 parallel for'}} #pragma omp target parallel for // expected-error@+1 {{unexpected OpenMP directive '#pr...
vla-3.c
// { dg-do compile } /* { dg-require-effective-target alloca } */ void foo(int n, int i) { int A[n]; #pragma omp parallel shared(A) { A[i] = sizeof(A); } }
alg-yescrypt-opt.c
/*- * Copyright 2009 Colin Percival * Copyright 2012-2018 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...
Example_set_dynamic_nthrs.1.c
/* * @@name: set_dynamic_nthrs.1c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success */ #include <omp.h> #include <stdlib.h> void do_by_16(float *x, int iam, int ipoints) {} void dynthreads(float *x, int npoints) { int iam, ipoints; omp_set_dynamic(0); omp_set_num_threads(16); #pragma omp ...
Stmt.h
//===- Stmt.h - Classes for representing statements -------------*- 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 // //===---------------------------...
elkan_par32.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <stdbool.h> #include <string.h> #include <omp.h> #include "csvparser.h" void vector_init(double *a, int length) { for (int i = 0; i < length; i++) { a[i] = 0; } } void vector_copy(double *dst, double *src, int length) { for...
frame.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "pix.h" /*------------------------------------------------------------------------- * * Create or delete a frame data structure. * *------------------------------------------------------------------------*/ frameloc_t *frameCreate(...
psrs_sort.c
#include <omp.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> /* headers */ int fcompare(const void *ptr2num1, const void *ptr2num2); float *merge(float *left, float *right, int l_end, int r_end); float *merge_sort(float *arr, int size); void insertion_sort(float *arr, int n); void calc...
matvec_double_avx2.c
//matvec.c //Multiplies a matrix by a vector #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 1000 #define N 1200 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 100...
Simulation.c
#include "XSbench_header.h" //////////////////////////////////////////////////////////////////////////////////// // BASELINE FUNCTIONS //////////////////////////////////////////////////////////////////////////////////// // All "baseline" code is at the top of this file. The baseline code is a simple // implementation ...
ordering_op-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 ...
clauses-1.c
/* { dg-do compile } */ /* { dg-additional-options "-std=c99" { target c } } */ int t; #pragma omp threadprivate (t) #pragma omp declare target int f, l, ll, r, r2; void foo (int d, int m, int i1, int i2, int p, int *idp, int s, int nte, int tl, int nth, int g, int nta, int fi, int pp, int *q, int ntm) { #pra...
conv1x1s1_sgemm_neon_interleave.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 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 ...
LevelElimination.h
/* * LevelElimination.h * * Created on: 10.01.2015 * Author: Michael */ #ifndef LEVELELIMINATION_H_ #define LEVELELIMINATION_H_ #include "Level.h" #include "EliminationStage.h" namespace NetworKit { /** * @ingroup numerics */ template<class Matrix> class LevelElimination : public Level<Matrix> { privat...
explicit_task.c
// RUN: %libomp-compile-and-run | %sort-threads | tee %s.out | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 #define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN #include "callback.h" #include <omp.h> int main() { int condition=0; omp_set_nested(0); print_frame(0); #pragma omp parallel n...
mttkrp_omp.c
/* This file is part of ParTI!. ParTI! is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ParTI! is distributed...
BEIntegratorHelmholtz.h
/*! * @file BEIntegratorHelmholtz.h * @author Jan Zapletal * @date August 12, 2013 * @brief Header file for class BEIntegratorHelmholtz * */ #ifndef BEINTEGRATORHELMHOLTZ_H #define BEINTEGRATORHELMHOLTZ_H #include "BEIntegrator.h" //#include "BESpace.h" namespace bem4i { /*! * concrete class for He...
GB_subassign_20.c
//------------------------------------------------------------------------------ // GB_subassign_20: C(I,J)<!M,repl> += A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com ...
mandle.c
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <math.h> #include <string.h> #include <omp.h> //SSE STUFF #ifdef __SSE__ #include <xmmintrin.h> #endif //const vars const int XPICR = 1000; const int YPICR = 1000; uint IterateMandelbrot(float a, float b );//prototype void GenerateMandleBlock(uint...
main-single-mailbox-atomics.c
#include <stdint.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <assert.h> #include <shmem.h> #include <shmemx.h> #include <time.h> #include <sys/time.h> #include <stdlib.h> #include <omp.h> #include <signal.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <limits.h>...
idaFoodWeb_kry_omp.c
/* * ----------------------------------------------------------------- * Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU * ----------------------------------------------------------------- * SUNDIALS Copyright Start * Copyright (c) 2002-2019, Lawrence Livermore National Security * and Southern Methodist Univ...
deconvolution_pack1to8.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 ...
Optimizer.h
/* * Optimizer.h * * Created by Guido Novati on 30.10.18. * Copyright 2018 ETH Zurich. All rights reserved. * */ #pragma once #include <fstream> #include "Network.h" struct Adam { const Real eta, fac, beta1, beta2, lambda; static constexpr Real EPS = 1e-8; Adam(const Real _eta, const int batchSize, co...
GB_unop__acos_fc32_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://...
concurrent-computing-2.c
#include <stdio.h> #include <omp.h> int main() { const char *str[] = { "Enjoy", "Rosetta", "Code" }; #pragma omp parallel for num_threads(3) for (int i = 0; i < 3; i++) printf("%s\n", str[i]); return 0; }
openmp.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> /* Compilacao: gcc -o exec openmp.c -fopenmp -O3 Execucao: ./exec 2048 2000 4 */ #define SRAND_VALUE 1985 int tam; int ger; #define ESQ(i) (i + tam - 1) % tam #define DIR(i) (i + 1) % tam #define CIMA(i) (i + tam - 1) % tam #define BAIXO(...
counting.c
#include <stdio.h> #include <stdlib.h> #include <limits.h> #include <omp.h> #include <math.h> #define min(a,b) (((a)<(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b)) #define max(a,b) (((a)>(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #define floord(n,d) floor(((double)(n))/((double)(d))) #define ceild(n,d) ce...
GB_unaryop__minv_int8_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_unop__identity_uint16_bool.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...
matmat_mw.c
/* matmat_mw.c : parallel multiplication of two matrices. * To execute: mpicc matmat_mw.c ; mpiexec -n 4 ./a.out N L M * Or replace "4" with however many procs you want to use. * Arguments N L M should be replaced with any integer numbers which is * no larger than the corresponding dimension decided in the "data" ...
mcrat_io.c
// // mcrat_io.c // // // Created by Tyler Parsotan on 7/23/21. // #include "mcrat.h" int getOrigNumProcesses(int *counted_cont_procs, int **proc_array, char dir[STR_BUFFER], int angle_rank, int angle_procs, int last_frame) { int i=0, j=0, val=0, original_num_procs=-1, rand_num=0; int frame2=0, framesta...
nbody-align.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include "timer.h" #define CACHELINE 64 // size of cache line [bytes] #define SOFTENING 1e-9f typedef struct { float *x, *y, *z, *vx, *vy, *vz; } BodySystem; void randomizeBodies(float *data, int n) { for (int i = 0; i < n; i++) { data[i] = 2.0f * (rand(...
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...
convolution_packn.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 ...