source
stringlengths
3
92
c
stringlengths
26
2.25M
omp_bug5fix.c
/****************************************************************************** * FILE: omp_bug5fix.c * DESCRIPTION: * The problem in omp_bug5.c is that the first thread acquires locka and then * tries to get lockb before releasing locka. Meanwhile, the second thread * has acquired lockb and then tries to get loc...
convolution_pack4_bf16s.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 ...
SeparableFilter.h
/* * (C) 2007 Niels Martin Hansen * (C) 2013-2017 see Authors.txt * * This file is part of MPC-BE. * * MPC-BE 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 of the License, or * (at your opti...
debug_bvh.h
#ifndef DEBUG_BVH_H #define DEBUG_BVH_H #include "../integrator.h" class DebugBVH : public Integrator { public: DebugBVH(const std::shared_ptr<Camera>& _camera, const std::shared_ptr<Sampler>& _sampler) : Integrator(_camera, _sampler) {}; RGB Li(const Ray& ray, Scene& scene) const { Hit res; sce...
format_phi.h
#ifndef FORMAT_PHI_H #define FORMAT_PHI_H #include "common_phi.h" #include "utils_phi.h" template<typename iT, typename uiT> __attribute__ ((target(mic))) void generate_partition_pointer_s1_kernel(const iT *d_row_pointer, uiT *d_partition_pointer, ...
hoNDArray_utils.h
#pragma once #include <boost/make_shared.hpp> #include <boost/range/combine.hpp> #include <numeric> #include "hoNDArray.h" #include "hoNDArray_iterators.h" #include "vector_td_utilities.h" #include <boost/version.hpp> #if (BOOST_VERSION < 107200) #include <boost/math/interpolators/cubic_b_spline.hpp> namespace boost...
kmp_sch_simd_runtime_api.c
// RUN: %libomp-compile-and-run // The test checks schedule(simd:runtime) // in combination with omp_set_schedule() #include <stdio.h> #include <stdlib.h> #include <omp.h> #if defined(WIN32) || defined(_WIN32) #include <windows.h> #define delay() Sleep(1); #define seten(a,b,c) _putenv_s((a),(b)) #else #include <unist...
2.c
#include<stdio.h> #include<omp.h> #include<stdlib.h> int main(){ for(int d=250;d<=1400;d+=250){ printf("\n Matrix of size %d \n",d); for(int nt=1;nt<=8;nt*=2){ printf("\n Threads %d\n",nt); int **a = (int**) malloc(d*sizeof(int**)); for(int j=0;j<d;j++) a[j] = (int*) malloc(d*s...
mlp_mnist_f32.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
GB_binop__rminus_fc64.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_pi_num_integration.c
/* vim: set ts=4 sw=4: */ /* Filename : omp_pi_num_integration.c * Description : calculate pi * Author : SunYoung Kim <sunyzero@gmail.com> * Notes : numerical integration method */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <omp.h> int num_steps=800000000; /* integration 횟수: 8억...
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-...
memdbg.c
/* * This software was written by Jim Fougeron jfoug AT cox dot net * in 2013. No copyright is claimed, and the software is hereby * placed in the public domain. In case this attempt to disclaim * copyright and place the software in the public domain is deemed * null and void, then the software is Copyright (c) 20...
GB_unaryop__abs_uint16_int64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_unop__frexpx_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
GB_bitmap_select_template.c
//------------------------------------------------------------------------------ // GB_bitmap_select_template: C=select(A,thunk) if A is bitmap or full //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPD...
8.norace4.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define M 200 #define N 200 double sum = 0.0; #pragma omp threadprivate(sum) int main() { double A[M], B[M][N], C[N]; #pragma omp parallel for for (int i = 0; i < M; i++) { for (int j = 0; j < N; j++) { sum += B[i][j] * C[j]; ...
countsketch.h
#ifndef COUNTSKETCH_H #define COUNTSKETCH_H extern "C" { /*! * Class representing a CountSketch linear transform. The transform is defined as a sparse * matrix of size r*n with only one non-zero element per column. It is stored in memory as a * 3-level vector (vector of vectors of vectors). The top level ve...
KDTree.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef _SPTAG_COMMON_KDTREE_H_ #define _SPTAG_COMMON_KDTREE_H_ #include <iostream> #include <vector> #include <string> #include <shared_mutex> #include "../../../../simde/simde/x86/sse4.2.h" #include "../VectorIndex.h" ...
diagmm_x_dia_u_col.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 *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *...
GB_unaryop__lnot_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...
hasGPU.c
//https://lc.llnl.gov/confluence/display/LC/Clang+OpenMP+4.5+with+GPU+support#space-menu-link-content // Revised a bit #include <stdio.h> #include <omp.h> int main() { #pragma omp parallel { #pragma omp master { int thread_count = omp_get_num_threads(); printf ("Using %d out of max %d thr...
pr70550-2.c
/* PR middle-end/70550 */ /* { dg-do compile } */ /* { dg-additional-options "-Wuninitialized" } */ void bar (int); void foo (void) { int i, j, k, l, m, n, o, p, q; #pragma omp task /* { dg-bogus "is used uninitialized" } */ { i = 2; bar (i); } #pragma omp taskloop /* { dg-bogus "is used unini...
DRB103-master-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...
upwind5slow_impl_c_.c
static double denom; static int size; void upwind5slow_init(int asize, double adx) { size = asize; denom = 1.0 / (60.0 * adx); } void upwind5slow_interpolate( double *a, double *b, double *c, double *d, double *e, double *f, double *g, double * restrict u_x_plus, double...
DRB026-targetparallelfor-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...
image_handler.h
#include "parameters.h" class ImageHandler { public: ros::NodeHandle nh; ros::Publisher pub_image; cv::Mat image_range; cv::Mat image_noise; cv::Mat image_intensity; pcl::PointCloud<PointType>::Ptr cloud_track; ImageHandler() { cloud_track.reset(new pcl::PointCloud<PointTyp...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
smul_glv4.c
#ifdef DEBUG_MODE #include <stdio.h> #include "kernel.h" #else #include "_core.h" #endif #include "multiprecision.h" #include "multiprecision_stack.h" #include "finite128.h" static inline void phi(DIV_hec_fp_2e128mc D3, const DIV_hec_fp_2e128mc D1, const CNS_hec_fp_2e128mc_glv4 cn){ fp_mul_2e128mc_x8664...
convolution_winograd_transform_pack8.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 ...
atomic-test.c
int foo(int x) { return 15; } int main() { int x = 0; #pragma omp parallel { #pragma omp atomic x += foo(foo(0)); } }
bd_omp.c
#include <stdlib.h> #include <stdio.h> #include <unistd.h> // access #include <math.h> #include <assert.h> #include "timer.h" #include "bd.h" #include <omp.h> #include <mkl.h> #define NTHREADS 240 #define M_PI 3.14159265358979323846 #define my_EPS 0.000000001 void print_matrix(double *a, int n){ for(int i=0;i<5;...
locktable.h
#pragma once #include <list> #include <memory> #include <sstream> #include "config.h" #include "row.h" #include "txn.h" #include "row_lock.h" #include "row_ts.h" #include "row_mvcc.h" #include "row_hekaton.h" #include "row_occ.h" #include "row_tictoc.h" #include "row_silo.h" #include "row_vll.h" #include "log.h" #inclu...
GB_binop__isgt_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...
convolution_3x3_pack8to4_int8.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 ...
tensor_convert.h
/* Copyright 2019 The Blueoil 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...
main.c
/* Universidade Federal da Fronteira Sul Curso: Ciencia da Computação Disciplina: Computação Distribuida Trabalho: Implementação de Quick Sort em lista dupla com ordenação em multithread e na GPU. Aluno: Rodolfo Trevisol, Murilo Olveira Instalação do OpenMP: sudo apt-get install gcc-multilib */ #include <stdio.h> #in...
GB_binop__first_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-...
c55c7aec73df0f31d67fbe39510946453b899e1d.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "omp.h" struct dataobj { void *restrict data; int * size; int * npsize; int * dsize; int * hsize; int * hofs; int * oofs; } ; struct profiler { double section0; double section1; double section2; } ...
sse-blk-dag1.h
#include <util/omp_wrapper.h> extern "C" void wilson_dslash_blk_dag1(IFloat *chi_p_f, IFloat *u_p_f, IFloat *psi_p_f, int cb, Wilson *wilson_p) { int tt; int cbn; Float *chi_p = (Float *) chi_p_f; Float *u_p = (Float *) u_p_f; Float *psi_p = (Float *) psi_p_f; #if defin...
chap_fmt_plug.c
/* iSCSI CHAP authentication cracker. Hacked together during September of 2012 * by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in s...
activate.c
#include "lib.h" #include <math.h> #include <stdint.h> #include <stdlib.h> void NEURALOPS_SYMBOL(rect_fwd)( size_t batch_sz, size_t dim, const float *in_buf, float *out_buf) { #pragma omp parallel for for (size_t p = 0; p < batch_sz * dim; p += 1) { float x = in_buf[p]; out_buf[p] = x * (x ...
fib.c
#include <stdio.h> #include <omp.h> #define N 41 #define max(x,y) (x < y) ? y : x long fib(int n) { if (n < 2) return n; return fib(n-1) + fib(n-2); } int main(int argc, char **argv) { #pragma omp parallel { int tid = omp_get_thread_num(); printf("thread %d fib(%d) = %ld\n", tid, (int) N, fib(max(1, N-tid/4)))...
hybrid.h
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #include <mpi.h> #include <omp.h> #define SIZE 1024 #define min(a,b) ((a)<(b)?(a):(b)) #define NTHREADS 4 /* OpenMP function defn */ void omp_set_num_threads(int num_threads); int omp_get_thread_num(void); /* Function definitions */ unsigned ...
sageInterface_modified.h
#ifndef ROSE_SAGE_INTERFACE #define ROSE_SAGE_INTERFACE #include "sage3basic.hhh" #include <stdint.h> #include <utility> #include "rosePublicConfig.h" // for ROSE_BUILD_JAVA_LANGUAGE_SUPPORT #if 0 // FMZ(07/07/2010): the argument "nextErrorCode" should be call-by-reference SgFile* determineFileType ( std::vector<...
GB_bitmap_assign_M_col_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_M_col_template: traverse M for GB_COL_ASSIGN //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Lic...
GB_binop__bset_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
zcposv.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions mixed zc -> ds * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include "pl...
DRB055-jacobi2d-parallel-no.c
/** * jacobi-2d-imper.c: This file is part of the PolyBench/C 3.2 test suite. * Jacobi with array copying, no reduction. * * Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu> * Web address: http://polybench.sourceforge.net * License: /LICENSE.OSU.txt */ #include <stdio.h> #include <unistd.h> #include <st...
kernel.h
#include "spt.h" void wsm ( float *__restrict th, const float *__restrict pii, float *__restrict q, float *__restrict qc, float *__restrict qi, float *__restrict qr, float *__restrict qs, const float *__restrict den, const float *__restrict p, const float *__rest...
reduction-classic.c
/* 1. A local copy of reduction variable is made and initialized depending on the op(e.g. 0 for +). 2. Compiler finds standard reduction expressions containing op and uses them to update the local copy. 3. Local copies are reduced into a single value and combined with the original global value. */ #include <stdio.h>...
atomic-14.c
/* PR middle-end/45423 */ /* { dg-do compile } */ /* { dg-options "-fopenmp -Wno-deprecated" } */ /* { dg-skip-if "invalid in C++1z" { c++1z } } */ #ifdef __cplusplus bool *baz (); #else _Bool *baz (); #endif int *bar (); int foo (void) { #pragma omp barrier #pragma omp atomic (*bar ())++; #pragma omp barri...
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 // //===---------------------------...
UMESimdCastOperators.h
// The MIT License (MIT) // // Copyright (c) 2015-2017 CERN // // Author: Przemyslaw Karpinski // // 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 lim...
convolution_1x1_packn_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 ...
munit.c
/* Copyright (c) 2013-2018 Evan Nemerson <evan@nemerson.com> * * 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, copy...
opencl_DES_bs_f_plug.c
/* * This software is Copyright (c) 2012-2015 Sayantan Datta <std2048 at gmail dot 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. * Based on Solar Designer implementation of DES_bs_b....
cho_omp.c
#include "matrix.h" #include <omp.h> double ** cholOMP(double ** L, int n) { // Warning: acts directly on given matrix! int i, j, k; omp_lock_t writelock; omp_init_lock(&writelock); for (j = 0; j < n; j++) { for...
GB_binop__times_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
StreamTriad_par2.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include "timer.h" int main(int argc, char *argv[]){ int nsize = 20000000, ntimes=16; double* restrict a = malloc(nsize * sizeof(double)); double* restrict b = malloc(nsize * sizeof(double)); double* restrict c = malloc(nsize * sizeof(double)); ...
7070.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- 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_unaryop__identity_int64_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...
GB_unop__abs_int8_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
bodysystemcpu_impl.h
/* * Copyright 1993-2010 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related...
axpy.c
/* * AXPY Y[N] = Y[N] + a*X[N] */ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <sys/timeb.h> #include <pthread.h> /* read timer in second */ double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } /* read tim...
owl_matrix_swap_impl_omp.h
/* * OWL - OCaml Scientific Computing * Copyright (c) 2016-2022 Liang Wang <liang@ocaml.xyz> */ #ifdef OWL_ENABLE_TEMPLATE // swap row i and row j in x(m,n) void FUNCTION (c, swap_rows) (TYPE *x, int m, int n, int i, int j) { if (i != j) { TYPE * src = x + n * i; TYPE * dst = x + n * j; if (n >= OW...
workspace.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * **/ #include "plasma_workspace.h" #include "plasma_internal.h" #include <omp.h> /******************************************************************************/ int plasma_workspace_...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
stack-propagate.c
// RUN: %libomp-compile-and-run // UNSUPPORTED: abt // https://bugs.llvm.org/show_bug.cgi?id=26540 requested // stack size to be propagated from master to workers. // Library implements propagation of not too big stack // for Linux x86_64 platform (skipped Windows for now). // // The test checks that workers can use m...
init.c
#include "../Parameter_files/INIT_PARAMS.H" #include "../Parameter_files/ANAL_PARAMS.H" #include "../Parameter_files/Variables.h" #include "filter.c" /* Generates the initial conditions: gaussian random density field (DIM^3) as well as the equal or lower resolution velocity fields, and smoothed density field (...
test_hierarchical_source.c
void X(inner_test_hierarchical)(int * checksum, int m, int n, FLT (*f)(FLT x, FLT y), FLT * x, FLT * y) { int NTIMES = 3; struct timeval start, end; unitrange ir = {0, m}, jr = {0, n}; FLT err = 0; X(densematrix) * A = X(sample_densematrix)(f, x, y, ir, jr); FT_TIME({X(densematrix) * A = X(sampl...
convolution_7x7_pack1to8_int8.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 ...
zip_fmt_plug.c
/* * ZIP cracker patch for JtR. Hacked together during June of 2011 * by Dhiru Kholia <dhiru.kholia at gmail.com> for GSoC. * * This software is Copyright (c) 2011, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in so...
main.c
/* * Copyright (c) 2016 NSR (National Security Research Institute) * * 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 ...
wave1d_perf_b.c
#ifndef TAPENADE #include <math.h> #endif #define Max(x,y) fmax(x,y) #define Min(x,y) fmin(x,y) #define Heaviside(x) ((x>=0)?1.0:0.0) #define u(x) u[x] #define u_b(x) u_b[x] #define c(x) c[x] #define u_1(x) u_1[x] #define u_1_b(x) u_1_b[x] #define u_2(x) u_2[x] #define u_2_b(x) u_2_b[x] void wave1d_perf_b(double* u, ...
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 = (int) atoi(argv[2]); omp_set_num_threads(Nthreads); //seed value for the randomizer double seed = clock(); //this will mak...
12_matrix_row_wise_avg.c
/* Program : 12 Author : Soumili Topic : Write a C program using OpenMP features to find the column wise average of a matrix in linear time complexity. */ #include<stdio.h> #include<omp.h> int main() { int i,j,k,m,sum,avgc; int A[3][3]={1,2,3, 4,5,6, 7,8,9}; omp_s...
hoImageRegDeformationFieldSolver.h
/** \file hoImageRegDeformationFieldSolver.h \brief Implement the PDE solver for deformation field non-linear image registration The PDE solver is a classical gradient descent method, derived from the calculus of variation: [1] Gerardo Hermosillo, Christophe Chefd'Hotel, Olivier Faugera...
multilook.h
#pragma once #include <isce3/core/EMatrix.h> namespace isce3 { namespace signal { /** * @brief Multilooks an input Eigen::Array by taking the * weighted average of contributions to each pixel. * * Note that input pixels with total weight zero * will be NaN in the output array. * * @param[in] row_looks The num...
chain_access.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> void use_pointer(int * p, int x) { *p = x; } int main() { int* ptr = (int*)malloc(sizeof(int)); *ptr = 0; #pragma omp parallel { use_pointer(ptr, 42); } printf("p: %d\n", *ptr); free(ptr); }
multiway_merge.h
/*************************************************************************** * include/stxxl/bits/parallel/multiway_merge.h * * Implementation of sequential and parallel multiway merge. * Extracted from MCSTL - http://algo2.iti.uni-karlsruhe.de/singler/mcstl/ * * Part of the STXXL. See http://stxxl.sourceforg...
reduce_to_width_mex.c
#include "mex.h" //Not sure why one is preferable over the other ... #include <immintrin.h> //#include <x86intrin.h> #include "simd_guard.h" #include <math.h> //for nan,-infnity #include <limits.h> //for other limits // Changes // ----------- // 1) Fix NaN bugs // 2) Make SIMD optional ... // 3) Break OpenMP o...
convolution_sgemm_pack1to16.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.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
softmax_ref.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...
gemm.c
#include "gemm.h" #include "utils.h" #include "im2col.h" #include "dark_cuda.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <float.h> #include <string.h> #include <stdint.h> #ifdef _WIN32 #include <intrin.h> #endif #if defined(_OPENMP) #include <omp.h> #endif #define TILE_M 4 // ...
trsm_x_coo_u_hi_row.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { ALPHA_INT m = A->rows; int num_t...
teams-1.c
#ifdef __cplusplus extern "C" { #endif int omp_get_num_teams (void); int omp_get_team_num (void); #ifdef __cplusplus } #endif void bar (int *, int *, int *, int, int, int, int); void foo (void) { int a = 1, b = 2, c = 3, d = 4, e = 5, f = 6; #pragma omp teams num_teams (4) shared (b) firstprivate (c, d) private...
axpy_int.c
//axpy.c #include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define N_RUNS 20 #define N 102400000 // read timer in second double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } //Create a matrix and a v...
pr48591.c
/* PR middle-end/48591 */ /* { dg-do compile { target i?86-*-* x86_64-*-* ia64-*-* } } */ /* { dg-options "-fopenmp" } */ extern void abort (void); int main () { __float128 f = 0.0; int i; #pragma omp parallel for reduction(+:f) for (i = 0; i < 128; i++) f += 0.5Q; if (f != 64.0Q) abort (); #p...
target_enter_data_map_messages.c
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s int main(int argc, char **argv) { int r; #pragma omp target enter data // expected-error {{expected at least one 'map...
GB_assign_zombie5.c
//------------------------------------------------------------------------------ // GB_assign_zombie5: delete entries in C for C_replace_phase //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License...
convolution_3x3.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 ...
utils.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
single.c
#include <stdio.h> #include <omp.h> void work1() { printf("%s","Work1.\n"); } void work2() { printf("%s","Work2.\n"); } int main(int argc, char const *argv[]) { /* code */ #pragma omp parallel { #pragma omp single printf("%s","Beginning work1.\n"); work1(); #pragma omp single pr...
common.c
/* * The MIT License (MIT) * * Copyright (c) 2017 Pantelis Sopasakis (https://alphaville.github.io), * Krina Menounou (https://www.linkedin.com/in/krinamenounou), * Panagiotis Patrinos (http://homes.esat.kuleuven.be/~ppatrino) * Copyright (c) 2012 Brendan O'Donoghue (bodonog...
GB_unaryop__lnot_int16_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...
aux_interp.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
grid.h
// ----------------------------------------------------------------------------- // // Copyright (C) The BioDynaMo Project. // 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. // // See the LICENSE file distrib...