source
stringlengths
3
92
c
stringlengths
26
2.25M
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
GB_binop__bor_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
1.race5.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 20 int main() { int A[N][N]; #pragma omp parallel for schedule(guided) for (int i = 1; i < N; i++) for (int j = 1; j < N; j++) A[i][j] = A[i - 1][j - 1]; } // CHECK: Data Race detected // END
Bvh.h
#ifndef GAME_ENGINE_BVH_H #define GAME_ENGINE_BVH_H #include "CoreLib/Basic.h" #include "CoreLib/Graphics/BBox.h" #include "Ray.h" namespace GameEngine { using namespace CoreLib::Basic; const int nBuckets = 16; class BvhNode { public: CoreLib::Graphics::BBox Bounds; unsigned ...
25_omp_stack.c
// clang-format off // RUN: %run %s --omp 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN // RUN: %run %s --omp 2>&1 | FileCheck %s // REQUIRES: openmp // clang-format on void f() { char c[4]; double d = 5; } int main(int argc, char** argv) { // CHECK: [Trace] TypeART Runtime Trace #pragma omp parallel sections ...
A069675_extra.h
// Note the omp parallel for requires -fopenmp at compile time // yields ~10x speedup. #include <gmpxx.h> #include <atomic> #include <cassert> #include <cmath> #include <cstdio> #include <iostream> #include <fstream> #include "A069675_config.h" using namespace std; void AssertDivisible(int a, int d, int b, long p...
dynamic_fmt.c
/* * This software was written by Jim Fougeron jfoug AT cox dot net * in 2009-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 (...
csf.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "csf.h" #include "sort.h" #include "tile.h" #include "ccp/ccp.h" #include "io.h" /*****************************************************...
prepress.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
test.c
#include <stdio.h> #include <omp.h> #pragma omp requires unified_shared_memory #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (992) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) int main(void) { check_offloadin...
pcgetrf.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/pzgetrf.c, normal z -> c, Fri Sep 28 17:38:11 2018 * **/ #include "plasma_async.h" #include "plasma_contex...
rhs.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB SP code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
simd_utils_avx512_int32.h
/* * Project : SIMD_Utils * Version : 0.1.12 * Author : JishinMaster * Licence : BSD-2 */ #pragma once #include <stdint.h> #include "immintrin.h" static inline void add512s(int32_t *src1, int32_t *src2, int32_t *dst, int len) { int stop_len = len / AVX512_LEN_INT32; stop_len *= AVX512_LEN_INT32; if...
seidel_2d-a.pluto.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)) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> #includ...
vednnActivationForward.c
#include <stdio.h> #include <stdint.h> #include "vednnActivationForward.h" #ifdef VEDNN_USE_OPENMP #include <stdint.h> #include <omp.h> extern int __vednn_omp_num_threads ; #endif static inline vednnError_t vednnActivationForward_wrapper( vednnActivationForward_t pFunc, const void *pDataIn, void *...
omp_task.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" #include "omp_my_sleep.h" int test_omp_task() { int tids[NUM_TASKS]; int i; #pragma omp parallel { #pragma omp single { for (i = 0; i < NUM_TASKS; i++) { /* First we have to store the value o...
generator_gemm_common.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
LAGraph_pagerankx4.c
//------------------------------------------------------------------------------ // LAGraph_pagerankx4: pagerank using a real semiring //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2020 LAGraph Contributors. (se...
core_dlaset.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/core_blas/core_zlaset.c, normal z -> d, Fri Sep 28 17:38:22 2018 * **/ #include <plasma_core_blas.h> #include "pla...
Jacobi1D-NaiveParallel-OMP_static.test.c
/****************************************************************************** * Jacobi1D benchmark * Basic parallelisation with OpenMP * * Usage: * make omp * export OMP_NUM_THREADS=8 * bin/Jacobi1D-NaiveParallel-OMP `cat src/$V.perfexecopts` * For a run on 8 threads *****************************************...
GB_unop__identity_int16_uint32.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...
count_func.c
/******************************************************************************* * 2pt/count_func.c: this file is part of the FCFC program. * FCFC: Fast Correlation Function Calculator. * Github repository: https://github.com/cheng-zhao/FCFC * Copyright (c) 2020 -- 2021 Cheng Zhao <zhaocheng03@gmail.com> [M...
GB_unop__identity_fc32_uint16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
GB_unaryop__identity_int16_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
wino_conv_kernel_1_arm.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...
GB_binop__times_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
mandelbrot.c
/* Stress test can not find put why its not working on newriver To compile: gcc -O3 -o mandelbrot mandelbrot.c png_util.c -I. -lpng -lm -fopenmp Or just type: module load gcc make To create an image with 4096 x 4096 pixels (last argument will be used to set number of threads): ./mandelbrot 4096 409...
parallel_if0.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 #include "callback.h" int main() { // print_frame(0); #pragma omp parallel if(0) { // print_frame(1); print_ids(0); print_ids(1); // print_frame(0); #pragma omp parallel if(0) { // ...
maxpool_layer.c
#include "maxpool_layer.h" #include "convolutional_layer.h" #include "dark_cuda.h" #include "gemm.h" #include <stdio.h> image get_maxpool_image(maxpool_layer l) { int h = l.out_h; int w = l.out_w; int c = l.c; return float_to_image(w,h,c,l.output); } image get_maxpool_delta(maxpool_layer l) { int ...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
matrix.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
10-omp.c
/****************************************************************************** * FILE: omp_hello.c * DESCRIPTION: * OpenMP Example - Hello World - C/C++ Version * In this simple example, the master thread forks a parallel region. * All threads in the team obtain their unique thread number and print it. * The m...
EwaldRef.h
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2019 QMCPACK developers. // // File developed by: Jaron T. Krogel, krogeljt@...
blake2bp.c
/* BLAKE2 reference source code package - optimized C implementations Written in 2012 by Samuel Neves <sneves@dei.uc.pt> To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is dist...
GB_bitmap_assign_M_row_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_M_row_template: traverse M for GB_ROW_ASSIGN //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Lic...
mapc.c
#include <stdlib.h> #include <stdint.h> #include <stdio.h> #include <memory.h> #include <math.h> #include <float.h> #include <assert.h> #include <omp.h> /* ////////////////////////////////////////////////////// Example: create a 256x256 float image with 1 component: struct m_image foo1 = M_...
setsketch.h
#ifndef EHLL_H__ #define EHLL_H__ #include <stdexcept> #include <cassert> #include "aesctr/wy.h" #include <queue> #include "sketch/div.h" #include <unordered_map> #include <memory> #include "fy.h" #include "sketch/count_eq.h" #include "sketch/macros.h" #include "sketch/hash.h" #include "xxHash/xxh3.h" #include "flat_ha...
relic_cp_phpe.c
/* * RELIC is an Efficient LIbrary for Cryptography * Copyright (c) 2014 RELIC Authors * * This file is part of RELIC. RELIC is legal property of its developers, * whose names are not listed here. Please refer to the COPYRIGHT file * for contact information. * * RELIC is free software; you can redistribute it a...
GB_subassign_04.c
//------------------------------------------------------------------------------ // GB_subassign_04: C(I,J) += A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apache-...
2d_array_ptr_v2.c
#include <stdlib.h> #include <omp.h> int main() { int* data = malloc( sizeof(int) * 4); int** arr = malloc(sizeof(int*)*2); arr[0] = data; arr[1] = data + 2; #pragma omp parallel { arr[0][0] = 0; arr[0][1] = 1; arr[1][0] = 2; arr[1][1] = 3; printf("[%d...
update_ops_named_CZ.c
#include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _USE_SIMD #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif #endif //void CZ_gate_old_single(UINT control_qubit_index, UINT target_qubit_index, CTYPE *state, ITYPE dim); //void CZ_ga...
GB_unop__tan_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...
arm_device.h
#ifndef ANAKIN2_SABER_ARM_DEVICES_H #define ANAKIN2_SABER_ARM_DEVICES_H #include <stdio.h> #include <vector> #include "device.h" #ifdef PLATFORM_ANDROID #include <sys/syscall.h> #include <unistd.h> #define __NCPUBITS__ (8 * sizeof (unsigned long)) #define __CPU_SET(cpu, cpusetp) \ ((cpusetp)->mask_bits[(cpu) / _...
dvr_smd.h
#ifndef METHODS_DVR_SMD_H #define METHODS_DVR_SMD_H namespace method { namespace dvr_smd { namespace details { template<typename Function> auto expectation(const Function & function, const arma::mat & points, const arma::vec & weights, const arma::vec & scaling) { ...
pumathreadpool.c
#define _GNU_SOURCE #include <sched.h> #include "pumathreadpool.h" #include "internal/profiling.h" #include "internal/pthreadbarrier.h" #include <stdlib.h> #include <stdbool.h> #include <stdio.h> #include <string.h> #include <pthread.h> #include <unistd.h> #ifndef NOOPENMP #include <omp.h> #endif #ifdef NOOPENMP sta...
NAS_CG.c
//--------------------------------------------------------------------- // program CG //--------------------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <sys/time.h> #if !defined(CLASS_W) && !defined(CLASS_S) && !defined(CLASS_A)...
crypt-sha1_fmt_plug.c
/* * This file is based on the "cryptsha512_fmt_plug.c" file. * * This software is Copyright (c) 2014 Dhiru Kholia, 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. * * Enhanced cod...
triMeshAcceleratorBVH.h
#pragma once #ifndef _TRIMESH_ACCELERATOR_BVH_H_ #define _TRIMESH_ACCELERATOR_BVH_H_ namespace ml { template <class FloatType> struct TriangleBVHNode { TriangleBVHNode() : rChild(0), lChild(0), leafTri(0) {} ~TriangleBVHNode() { SAFE_DELETE(rChild); SAFE_DELETE(lChild); } //wait for vs 2013 //template<clas...
mpm_search_element_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Bodhinanda Chandra // #ifndef KRATOS_MPM_SEARC...
irbuilder_for_unsigned_dynamic_chunked.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=45 -x c++ -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics #if...
cq_fmt_plug.c
/* * This software is Copyright (c) Peter Kasza <peter.kasza at itinsight.hu>, * 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_cq; #elif...
model_2cxm_mex.c
/*========================================================== * model_2cxm_mex.c - STARDCE toolbox * * Implements the DCE 2-compartment exchange model * * The calling syntax is: * * C = model_2cxm_mex(time, VIF, vp, ve, kt, fp ); * * Compilation: * * mex -R2018a model_2cxm_mex.c * or: * 1) uncomment the...
3d25pt.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-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
lis_vector_opv.c
/* Copyright (C) 2002-2012 The SSI Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condition...
GB_binop__minus_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-...
effect.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
2-8t.c
#include <stdio.h> #include <omp.h> int main() { omp_set_num_threads(8); #pragma omp parallel { printf(" Hello "); } printf("\n\n GoodBye – Team Destroyed – Exiting Program \n\n"); }
segment_reduce.h
/*! * Copyright (c) 2020 by Contributors * \file array/cpu/spmm.h * \brief Segment reduce kernel function header. */ #ifndef DGL_ARRAY_CPU_SEGMENT_REDUCE_H_ #define DGL_ARRAY_CPU_SEGMENT_REDUCE_H_ #include <dgl/array.h> namespace dgl { namespace aten { namespace cpu { /*! * \brief CPU kernel of segment sum. *...
detector.c
#include "darknet.h" #include <unistd.h> ////0 #include <dirent.h> ////0 #include <stdlib.h> ////0 #include <sys/stat.h> ////0 static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,...
sum_openmp.c
/* Copyright (C) 2018 Francesc Alted http://blosc.org License: BSD 3-Clause (see LICENSE.txt) Example program showing how to operate with compressed buffers. To compile this program for synthetic data (default): $ gcc -fopenmp -O3 sum_openmp.c -o sum_openmp -lblosc2 To run: $ OMP_PROC_BIND=spread ...
illumination.c
#include<stdio.h> void srcillum_helper_float( float* field_ginsu, size_t n, int nthreads) { size_t i; #pragma omp parallel for num_threads(nthreads) for (i = 0; i < n; i++) { field_ginsu[i] = field_ginsu[i]*field_ginsu[i]; } } void srcillum_helper_double( double* field_ginsu, ...
GB_unaryop__one_uint16_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
LAGraph_BF_full.c
//------------------------------------------------------------------------------ // LAGraph_BF_full.c: Bellman-Ford single-source shortest paths, returns tree //------------------------------------------------------------------------------ // LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved. // SPDX-...
hdp_math_utils.c
#include <math.h> #include <tgmath.h> #include <stdlib.h> #include <stdio.h> #include <float.h> #include <stdbool.h> #include <inttypes.h> #include "hdp_math_utils.h" #include "sonLib.h" #define LOG_ROOT_PI 0.572364942924700087071713 #define LOG_4 1.386294361119890618834464 #ifndef M_PI #define M_PI 3.141592653589793...
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
myprog.c
#define MSIZE 200 int n, m, mits; double tol, relax = 1.0, alpha = 0.0543; double u[MSIZE][MSIZE], f[MSIZE][MSIZE], uold[MSIZE][MSIZE]; double dx, dy; void initialize () { int i, j, xx, yy; // double PI = 3.1415926; dx = 2.0 / (n - 1); // -->dx@112:2 dy = 2.0 / (m - 1); //-->dy@113:2 /* Initialize initial co...
vadd.orio.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> double getClock() { struct timezone tzp; struct timeval tp; gettimeofday (&tp, &tzp); return (tp.tv_sec + tp.tv_usec*1.0e-6); } int main(int argc, char *argv[]) { double *y; double *x1; double *x2; double *x3...
GB_binop__bget_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...
parallel_levelset_distance_calculator.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // // #if !defined(KRATOS_PARALLE...
parallel_measurement.c
/* Calculating the value of pi using reduction : Parallel Implementation Author : Omkar Damle. Date : August 2016. */ #include<stdio.h> #include<math.h> #include<omp.h> #include<time.h> #include<string.h> #include<stdlib.h> // Using the MONOTONIC clock #define CLK CLOCK_MONOTONIC /* Function to compute the dif...
DemBonesExt.h
/////////////////////////////////////////////////////////////////////////////// // Dem Bones - Skinning Decomposition Library // // Copyright (c) 2019, Electronic Arts. All rights reserved. // /////////////////////////////////////////////////////////////////////////////// ...
clip.c
#include "msghandling.h" #include "zgl.h" /* fill triangle profile */ /* #define PROFILE */ #define CLIP_XMIN (1 << 0) #define CLIP_XMAX (1 << 1) #define CLIP_YMIN (1 << 2) #define CLIP_YMAX (1 << 3) #define CLIP_ZMIN (1 << 4) #define CLIP_ZMAX (1 << 5) static void gl_transform_to_viewport_clip_c(GLVertex* v) { /* MA...
region_localization_objective.h
#pragma once #ifndef OPTIMIZATION_LIB_REGION_LOCALIZATION_OBJECTIVE_H #define OPTIMIZATION_LIB_REGION_LOCALIZATION_OBJECTIVE_H // STL includes #include <vector> // Optimization lib includes #include "../data_providers/plain_data_provider.h" #include "./dense_objective_function.h" // Spectra #include <Spectra/SymEigs...
libmsr_write_test.c
/** * @author Asim YarKhan (updated) * @author Vince Weaver (original version) */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "papi.h" #include "msr_core.h" #include "msr_rapl.h" #define MAX_EVENTS 128 char events[MAX_EVENTS][BUFSIZ]; char filenames[MAX_EVENTS][BUFSIZ...
bt_onefile.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - BT This benchmark is an OpenMP C version of the NPB BT code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS...
sornaive.c
#include <stdio.h> #include <math.h> #include <string.h> #include <sys/time.h> #include <omp.h> #define M 500 double compute_error(double solution[][M + 2], double u[][M + 2], const int m); int sor(double unew[][M + 2], double uold[][M + 2], double solution[][M + 2], const double omega, const double tol, const int m...
parallel-walsh.c
#include <stdlib.h> #include <stdint.h> void fast_parallel_walsh(int* vec, int vecSize) { // if the vector is of size 1 or less (0), we dont need to do anything and we can just return it as is if(vecSize<=1) return; // start to divide the original vecSize into 2 on every step, until we can't divide any lo...
comment_manager.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include "mpi.h" #include "map.h" #include "map_iterator.h" #include "utils.h" #include "constants.h" #include "types.h" #include "comment_manager.h" #include "comment.h" #include "parser.h" int comments_size; /* * Set commented_post field to the real post id, ...
ex2.c
#include <errno.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define PERROR fprintf(stderr, "%s:%d: error: %s\n", __FILE__, __LINE__, strerror(errno)) #define PERROR_GOTO(label) \ do { \ PERROR; \ goto label; \ } while (0) #define INIT_ARRAY(arr, label) \ do { \ if (!(arr)) ...
convolutiondepthwise_3x3_pack4.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2019 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 ...
Calculate_RDs.c
#include "utils.h" #include"num_of_threads.h" #include"matrix_ops.h" void Calculate_Range_Doppler(int *tlist,double *vlist,int nfac,int nvert,double *angles,double *Eo,double TIME,double *freqx,double *freqy,int nfreq,double rfreq,double *offset,double scal,double rexpe,double * Fr,double *Fi); void Calculate_Range_Dop...
BEIntegratorLaplace.h
/*! * @file BEIntegratorLaplace.h * @author Michal Merta * @author Jan Zapletal * @date July 10, 2013 * @brief Header file for class BEIntegratorLaplace * */ #ifndef BEINTEGRATORLAPLACE_H #define BEINTEGRATORLAPLACE_H #include "BEIntegrator.h" //#include "BESpace.h" namespace bem4i { /*! * concre...
wbb3_fmt_plug.c
/* WoltLab Burning Board 3 (WBB3) cracker patch for JtR. Hacked together during * May 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...
omptarget.h
//===---- omptarget.h - OpenMP GPU initialization ---------------- CUDA -*-===// // // 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 // //===---------------------------...
oskar_cross_correlate_gaussian_scalar_omp.c
/* * Copyright (c) 2014-2015, The University of Oxford * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright notice, * this ...
tinyexr.h
/* Copyright (c) 2014 - 2018, 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 the above copyright notice, this l...
for_schedule_dynamic.c
/* * Test for dynamic scheduling with chunk size * Method: caculate how many times the iteration space is dispatched * and judge if each dispatch has the requested chunk size * unless it is the last one. * It is possible for two adjacent chunks are assigned to the same thread * Modifyied by Chunhua Liao...
mpm_search_element_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Bodhinanda Chandra // #ifndef KRATOS_MPM...
swap_buffer.c
#include <stdio.h> #include "wgrib2.h" /* * does a byte swap of 4-byte integers/ieee * * n should be a multiple of 4 * * 3/2008 Public Domain Wesley Ebisuzaki * 7/2015 OpenMP version Wesley Ebisuzaki */ int swap_buffer(unsigned char *buffer, unsigned int n) { unsigned int ii; unsigned char i, j; #prag...
11_det_3x3.c
/* Program : 11 Author : Gyan Topic : Write a C program using OpenMP features to find the determinant of a 3x3 matrix. */ #include <stdio.h> #include <omp.h> int main() { int i, m, D=0; int a[3][3] = { {1, 2, 3}, {4, 5, 6}, {7, 8, 10}}; m = omp_get_num_procs(); ...
knn.h
/* * Copyright (c) 2019, NVIDIA CORPORATION. * * 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 ...
archive_blake2sp_ref.c
/* BLAKE2 reference source code package - reference C implementations Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at your option. The terms of these licenses can be found at: - CC0 1.0 Universal :...
nvector_openmpdev.c
/* ----------------------------------------------------------------- * Programmer(s): David J. Gardner and Shelby Lockhart @ LLNL * ----------------------------------------------------------------- * Acknowledgements: This NVECTOR module is based on the NVECTOR * Serial module by Scott D. Cohen, A...
GB_unop__identity_fc64_uint16.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...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) >...
nbody_barnes_hut.c
/* ** nbody_barnes_hut.c - nbody simulation that implements the Barnes-Hut algorithm (O(nlog(n))) ** **/ #include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <math.h> #include <sys/time.h> #include <assert.h> #include <unistd.h> #ifdef DISPLAY #include <X11/Xlib.h> #include <X11/Xutil.h> #endif #incl...
HDF5Dumper_MPI.h
/* * HDF5Dumper_MPI.h * Cubism * * Created by Babak Hejazialhosseini on 5/24/09. * Copyright 2009 CSE Lab, ETH Zurich. All rights reserved. * */ #pragma once #include <cassert> #include <cstdio> #include <iostream> #include <vector> #include <string> #include <sstream> #include <mpi.h> #include "HDF5Dumpe...
ast-dump-openmp-task.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test() { #pragma omp task ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-task.c:...
GB_unaryop__abs_fp32_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
templatemath.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * Copyright (c) 2019 Konduit K.K. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apa...