source
stringlengths
3
92
c
stringlengths
26
2.25M
ZQ_ImageProcessing.h
#ifndef _ZQ_IMAGE_PROCESSING_H_ #define _ZQ_IMAGE_PROCESSING_H_ #pragma once #ifdef ZQLIB_USE_OPENMP #include <omp.h> #endif #include <math.h> #include <stdlib.h> #include <string.h> #include "ZQ_CubicInterpolation.h" #include "ZQ_QuickSort.h" namespace ZQ { namespace ZQ_ImageProcessing { template<class T> T ...
blake2sp-ref.c
/* BLAKE2 reference source code package - reference 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...
syrk_m.c
/** * syrk_m.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contact: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@students.ic...
bt.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 3.0 structured OpenMP C versions - BT This benchmark is an OpenMP C version of the NPB BT code. The OpenMP C 2.3 versions are derived by RWCP from the serial Fortran versions in "NPB 2.3-serial" developed by N...
bml_add_dense_typed.c
/* Needs to be included before #include <complex.h>. */ #ifdef BML_USE_MAGMA #include "magma_v2.h" #endif #include "../../macros.h" #include "../../typed.h" #include "../blas.h" #include "../bml_add.h" #include "../bml_allocate.h" #include "../bml_logger.h" #include "../bml_parallel.h" #include "../bml_scale.h" #inclu...
ompapi.c
#include <stdio.h> #include <omp.h> int main(int argc, char* argv[]) { printf("OpenMP API Test\n"); int thread_count = omp_get_max_threads(); printf("Maximum number of OpenMP threads is: %d\n", thread_count); int thread_count_now = omp_get_num_threads(); printf("There are %d threads active now (should equal...
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 // //===---------------------------...
omp4_demo2.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, ...
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 ...
stream.c
/*-----------------------------------------------------------------------*/ /* Program: STREAM */ /* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */ /* Original code developed by John D. McCalpin */ /* Programm...
ParallelBeginLink.c
int main() { #pragma omp parallel { int x; } #pragma omp parallel if (1) { } #pragma omp parallel { } }
utils.h
#include <filesystem> #include <iostream> #include <fstream> #include <queue> #include <chrono> #include <unordered_set> #include "hnswlib.h" #include "stopwatch.h" using namespace std; using namespace hnswlib; /***************************************************** * I/O functions for fvecs and ivecs * Reference...
cloudkeychain_fmt_plug.c
/* 1Password Cloud Keychain cracker patch for JtR. Hacked together during * April of 2013 by Dhiru Kholia <dhiru.kholia at gmail.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru.kholia at gmail.com>, * Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> and Copyright (c) 2012 * magnum, and it is...
target.c
// RUN: %libomptarget-compile-generic -fopenmp-version=51 // RUN: %libomptarget-run-fail-generic 2>&1 \ // RUN: | %fcheck-generic #include <stdio.h> int main() { int i; // CHECK: addr=0x[[#%x,HOST_ADDR:]], size=[[#%u,SIZE:]] fprintf(stderr, "addr=%p, size=%ld\n", &i, sizeof i); // CHECK-NOT: Libomptarget #...
tirific.c
/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ /** @file tirific.c @brief Translation and recreation of tirific.f Is a code to apply simulated annealing fitting datacubes to a cube, currently in the gipsy environment. Guideline how to hack into it, without a guarantee: Check: interpi...
bml_threshold_dense_typed.c
#ifdef BML_USE_MAGMA #include "magma_v2.h" #include "../bml_export.h" #include "bml_export_dense.h" #endif #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_threshold.h" #include "../bml_parallel.h" #include "../bml_types.h" #include "bml_allocate_dense.h" #include "bml_threshold_dense.h" #include...
relu.c
#include <cdnn/activations.h> #include <cdnn/model.h> extern __Model__ * m; dARRAY * forward_pass_relu(){ dARRAY * relu_outf = NULL; relu_outf = (dARRAY*)malloc(sizeof(dARRAY)); relu_outf->matrix = (float*)calloc(m->current_layer->DENSE->cache->shape[0]*m->current_layer->DENSE->cache->shape[1],sizeof(float)); ...
GB_binop__min_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
lattice_doubleT.h
#ifndef LATTICE_DOUBLE_T_H #define LATTICE_DOUBLE_T_H #include<util/lat_cont.h> #include<util/dwf.h> CPS_START_NAMESPACE //Take a lattice resident in memory and double the temporal length by duplication class LatticeTimeDoubler{ LatticeContainer lat_orig; LRGState lrg_orig; size_t lat_size_orig; //units of floa...
common.c
/**************************************************************************** * * * OpenMP MicroBenchmark Suite - Version 3.1 * * * * ...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- 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 // //===---------------------------...
spotrf.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/zpotrf.c, normal z -> s, Fri Sep 28 17:38:02 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
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 // //===---------------------------...
stationary_cython.c
/* Generated by Cython 0.23.3 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython ...
3d7pt_var.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 with variable coefficients * Adapted from PLUTO and Po...
dnnl_utils_avx512.h
//===- dnnl_utils_avx512.h ------------------------------------------------===// // // Copyright (C) 2019-2020 Alibaba Group Holding Limited. // // 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 ...
GB_binop__le_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_binop__bxor_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-...
diagsm_x_coo_n_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.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_Number dia...
atomic_vs_reduction.c
#include <stdio.h> #include <omp.h> int main() { // // atomic_vs_reduction.c: This test shows how much faster reductions are than atomic operations // int main_rc = 0; int N = 5001; double expect = (double) (((double)N-1)*(double)N)/2.0; double a = 0.0; double t0 = omp_get_wtime(); #pragma omp t...
get_vdw0.c
#include <stdio.h> #include <string.h> #include "mcce.h" #include <sys/timeb.h> //int n_elem; //float C6_matrix[N_ELEM_MAX][N_ELEM_MAX]; //float C12_matrix[N_ELEM_MAX][N_ELEM_MAX]; FILE *vdwf; void get_vdw0(PROT prot) { int i_res, i_conf, i_atom; get_connect12(prot); setup_vdw_fast(prot); ...
timer.h
#ifndef __TIMER_H__ #define __TIMER_H__ #include <h2opus/core/h2opus_defs.h> #include <chrono> template <int hw> class Timer; template <> class Timer<H2OPUS_HWTYPE_CPU> { private: std::chrono::duration<float> elapsed_time; std::chrono::time_point<std::chrono::system_clock> start_time, stop_time; public...
mxnet_op.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 ...
MBIRModularUtilities3D.c
#include "MBIRModularUtilities3D.h" void forwardProject3DCone( float *Ax, float *x, struct ImageParams *imgParams, struct SysMatrix *A, struct SinoParams *sinoParams) { long int j_u, j_x, j_y, i_beta, i_v, j_z, i_w; float B_ij, B_ij_times_x_j; setFloatArray2Value( &Ax[0], sinoParams->N_beta*sinoParams->N_...
DataGen.h
// Copyright (C) 2019-2020 Zilliz. 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 l...
SE_fkg_expand_all_mex.c
#include "mex.h" #include "../SE_fgg.h" #include "../SE_fkg.h" void SE_FGG_MEX_params(SE_FGG_params*, const mxArray*, int); #define X prhs[0] #define OPT prhs[1] #define ZX plhs[0] // Output #define ZY plhs[1] // Output #define ZZ plhs[2] // Output #define IDX plhs[3] // Output #ifndef VERBOSE #define VE...
omp-spawn-n-tasks-in-explicit-task-with-yield.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <stdbool.h> int main(int argc, char *argv[]) { if(argc == 1 || argc >= 4) { fprintf(stderr, "Usage: %s nTasks [yield (default:1)]\n", argv[0]); exit(EXIT_FAILURE); } int nTasks = atoi(argv[1]); boo...
sectionsModificado.c
#include <stdio.h> #include <omp.h> void funcA() { printf("En funcA: esta sección la ejecuta el thread %d\n", omp_get_thread_num()); } void funcB() { printf("En funcB: esta sección la ejecuta el thread %d\n", omp_get_thread_num()); } int main(int argc, char ** argv) { #pragma omp parallel sections { #prag...
CALPHADConcSolverBinary.h
#ifndef included_CALPHADConcSolverBinary #define included_CALPHADConcSolverBinary #include "NewtonSolver.h" #include "datatypes.h" namespace Thermo4PFM { class CALPHADConcSolverBinary : public NewtonSolver<2, CALPHADConcSolverBinary, JacobianDataType> { public: #ifdef HAVE_OPENMP_OFFLOAD #pragma omp declare targe...
configurator.c
/* Simple tool to create config.h. * Would be much easier with ccan modules, but deliberately standalone. * * Copyright 2011 Rusty Russell <rusty@rustcorp.com.au>. MIT license. * * c12r_err, c12r_errx functions copied from ccan/err/err.c * Copyright Rusty Russell <rusty@rustcorp.com.au>. CC0 (Public domain) Lice...
GB_unop__ainv_int16_int16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
main.c
#include <unistd.h> #include <time.h> #include <stdlib.h> #include <stdio.h> #include <omp.h> #define N_BUCKETS 10 struct Bucket { int* array; size_t n_elem; size_t max_elem; }; struct Bucket* make(size_t max){ struct Bucket* block_arr = malloc(sizeof(struct Bucket)); block_arr->array = malloc(si...
GB_unaryop__identity_int64_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
rumi-64-192-22r.c
/* * Date: 11 December 2015 * Contact: Thomas Peyrin - thomas.peyrin@gmail.com */ /* * Simulation of boomerang analysis for Skinny * Date: March 21, 2020 * Author: Hosein Hadipour * Contact: hsn.hadipour@gmail.com */ #include <stdio.h> #include <stdlib.h> #include <time.h> #include <math.h> #incl...
fdtd-2d.pluto.par.l1tile.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <math.h> #define tmax T #define nx N #define ny N double ex[nx][ny +1]; double ey[nx +1][ny]; double hz[nx][ny]; void init_arrays() { int i, j; for (i=0; i<nx+1; i++) { for (j=0; j<ny; j++) { ey[i][j] = 0; } ...
GB_binop__pow_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
unfold.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/unfold.c" #else /* note: due to write issues, this one cannot be parallelized as well as unfolded_copy */ void THNN_(unfolded_acc)( THTensor *finput, THTensor *input, int kW, int kH, int dW, int dH, ...
putty_fmt_plug.c
/* PuTTY private key cracker patch for JtR. Hacked together during Monsoon of * 2012 by Dhiru Kholia <dhiru.kholia at gmail.com> . * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com> * * p-ppk-crack v0.5 made by michu@neophob.com -- PuTTY private key cracker * * Source code based on...
8.norace8.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 copyin(sum) for (int i = 0; i < M; i++) { for (int j = 0; j < N; j++) { sum += B[i][...
GB_memcpy.c
//------------------------------------------------------------------------------ // GB_memcpy: parallel memcpy //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com See GraphBLAS/Doc/L...
GB_unop__identity_fc32_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...
ompfor-decremental.c
/* * default, decremental */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif void foo(int lower, int upper, int stride) { int i; #pragma omp for for (i=lower;i>upper;i-=stride) { printf("Iteration %2d is carried out by thread %2d\n",\ i, omp_get_thread_num()); } } int main(void) { #pra...
ops.h
#pragma once #ifndef OPS_H_ #define OPS_H_ #include <op_boilerplate.h> #include <array/DataTypeUtils.h> #include <helpers/shape.h> #include <vector> #include <Environment.h> #define MIN 1e-12 #define MAX_FLOAT 1e37 #define MIN_FLOAT 1e-37 #define MAX_INT 2147483647 #define MIN_CUTFOFF -3.79297773665f #define FLOAT_MI...
vednnMaxPoolingForward.c
#include <stdint.h> #include "vednnMaxPoolingForward.h" #ifdef VEDNN_USE_OPENMP #include <stdint.h> #include <omp.h> extern int __vednn_omp_num_threads ; #endif static inline vednnError_t vednnMaxPoolingForward_wrapper( vednnMaxPoolForward_t pFunc, const vednnTensorParam_t *pParamIn, const void *p...
simd-clones-4.c
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-fopenmp" } */ #pragma omp declare simd simdlen(4) notinbranch int f2 (int a, int b) { if (a > 5) return a + b; else return a - b; }
GB_unop__identity_int16_uint8.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...
merge_sort_par.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <omp.h> #include "merge_sort.h" #include "helper.h" void swap(int64_t **a, int64_t **b) { int64_t *tmp = *a; *a = *b; *b = tmp; } void merge(int64_t *a, int64_t *b, size_t begin, size_t mid, size_t end) { size_t l = begin, r = ...
function.c
#include <stdio.h> #include "assert.h" #include <unistd.h> #pragma omp declare target int mul_int(int, int); #pragma omp end declare target int mul_int(int a, int b){ int c; c=a*b; return c; } void vmul(int*a, int*b, int*c, int N){ #pragma omp target map(to: a[0:N],b[0:N]) map(from:c[0:N]) #pragma omp teams d...
GB_unop__identity_fc64_int8.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...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__ainv_uint8_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...
Fig_6.3_sharedEx.c
// sample compile command: "gcc -fopenmp -c Fig_6.3_sharedEx.c" to generate *.o object file #include <omp.h> #include <stdio.h> extern void initialize(int*, int*, int*); int main () { int A, B, C; initialize(&A, &B, &C); //remember the value of A before the parallel region printf("A before = %d\...
vow.c
/******************************************************************************************** * SIDH: an efficient supersingular isogeny cryptography library * * Abstract: functions for van Oorschot-Wiener attack *********************************************************************************************/ #include <o...
update_ops_named_Z.c
#include "constant.h" #include "update_ops.h" #include "utility.h" #ifdef _OPENMP #include <omp.h> #endif #ifdef _MSC_VER #include <intrin.h> #else #include <x86intrin.h> #endif //void Z_gate_old_single(UINT target_qubit_index, CTYPE *state, ITYPE dim); //void Z_gate_old_parallel(UINT target_qubit_index, CTYPE *stat...
GB_unaryop__abs_fp32_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
filter2.c
#include "mex.h" #include <time.h> //mex CFLAGS='$CFLAGS -ffast-math' filter.c void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { mwSize n_data_samples = mxGetNumberOfElements(prhs[2]); mwSize b_length = mxGetNumberOfElements(prhs[0]); mwSize a_length = mxGetNumberOfEleme...
blackscholes.c
// Copyright (c) 2007 Intel Corp. // Black-Scholes // Analytical method for calculating European Options // // // Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice // Hall, John C. Hull, #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #ifdef ENABLE_PARSEC_H...
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...
calib.c
/* Copyright 2013-2016. The Regents of the University of California. * Copyright 2016. Martin Uecker. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2012-2016 Martin Uecker <martin.uecker@med.uni-goettingen.de> * 2013 Dar...
utils.c
/* This works has been developed at Diamond Light Source Ltd. * * Copyright 2019 Daniil Kazantsev * * 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/LICE...
directive.h
#pragma omp taskwait
paint.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
issue_001.c
#include <stdio.h> #include "assert.h" #include <unistd.h> // 920 fails #define TRIALS 919 // 6000 fails #define N 64*5000 int main() { int fail = 0; double A[N], B[N], C[N]; for (int i = 0; i < N; i++) { A[i] = 0.0; B[i] = 0.0; C[i] = 1.0; } int nte = 32; int tl = 64; int blockSize = tl; ...
tensor_cpu-inl.h
/*! * Copyright (c) 2014 by Contributors * \file tensor_cpu-inl.h * \brief implementation of CPU host code * \author Bing Xu, Tianqi Chen */ #ifndef MSHADOW_TENSOR_CPU_INL_H_ #define MSHADOW_TENSOR_CPU_INL_H_ #include <cstring> #include <functional> #include <utility> #include <vector> #include "./base.h" #includ...
DRB028-privatemissing-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...
test.c
#include <stdio.h> #pragma omp requires unified_shared_memory #include "../utilities/check.h" #define N 100 int main() { check_offloading(); int a[N], aa[N]; int i, error = 0; // initialize for(i=0; i<N; i++) aa[i] = a[i] = -1; // offload #pragma omp target map(tofrom: a[0:100]) { int k;...
concurrent_unordered_map.cuh.h
/* * Copyright (c) 2017-2018, NVIDIA CORPORATION. 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 ...
aomp_mappings.c
#include <stdio.h> #include <omp.h> //Constants const int THREAD_LIMIT = 4; const int MAX_THREADS_PER_TEAM = 256; const int MAX_TEAMS = 128; const int WARP_SIZE = 64; const int GENERIC = 0; const int SPMD = 1; /* * Function: recordError * Description: Updates error number and prints error messages */ void recordEr...
sp.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...
csyrk.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/zsyrk.c, normal z -> c, Fri Sep 28 17:38:03 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
hist_util.h
/*! * Copyright 2017-2020 by Contributors * \file hist_util.h * \brief Utility for fast histogram aggregation * \author Philip Cho, Tianqi Chen */ #ifndef XGBOOST_COMMON_HIST_UTIL_H_ #define XGBOOST_COMMON_HIST_UTIL_H_ #include <xgboost/data.h> #include <xgboost/generic_parameters.h> #include <limits> #include <v...
classify.c
// // classify.c // taxonomer // // Created by Steven Flygare on 10/6/14. // Copyright (c) 2014 yandell lab. All rights reserved. // #include "classify.h" #define READS_PER_BLOCK 10000 #define READ_OUTPUT_SIZE 200 KSEQ_INIT(gzFile, gzread) char rev_base[] = {'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N'...
GB_binop__bshift_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-...
facedetectcnn.h
/* By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software. License Agreement For libfacedetection (3-clause BSD License) Copyright (c) 2018-2019, Shiqi...
RotationInvariantEncoding.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/RotationInvariantEncoding.c" #else int orn_(RIE_AlignFeature)( THTensor *feature, //128 x 640 x 1 x 1 THByteTensor *mainDirection, // None -> 128 x 80 THTensor *aligned, // 128 x 640 x 1 x 1 const uint8 nOrientation) // 8 { THArgCheck(feature...
private-clauseModificado3.c
/* * private-clause.c * * Created on: 02/04/2014 * Author: Carlos de la Torre */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif int main() { int i, n = 7; int a[n], suma; for (i = 0; i < n; i++) a[i] = i; #pragma omp parallel { suma = 0; #pragma omp ...
ellipticSerialUpdatePCG.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus 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 wi...
Toolbox.h
#ifndef TOOLBOX_H_ #define TOOLBOX_H_ #include "BaseObject.h" #include "Buffer.h" #include "DataStructures/NCSList.h" #include "DataStructures/FastNCSList.h" #include "DataStructures/FastKTuple.h" #include "DataStructures/Fifo.h" #include "Threading/Thread.h" #include <string> #include <time.h> #include <vector> #inc...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
blockchain_fmt_plug.c
/* blockchain "My Wallet" cracker patch for JtR. Hacked together during June of * 2013 by Dhiru Kholia <dhiru at openwall.com>. * * See https://blockchain.info/wallet/wallet-format * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com>, * and it is hereby released to the general public under...
blowfish-tables.h
// Refer to https://github.com/karashiiro/blowfish-tables for the README and latest version of this file. #ifndef MAKE_BLOWFISH_TABLES #define MAKE_BLOWFISH_TABLES #include <stddef.h> // https://en.wikipedia.org/wiki/Modular_exponentiation#Pseudocode // These must be 64-bit unsigned integers, or the base^2 operation...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__ainv_uint32_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
nr_incore.c
/* * File: nr_incore.c * Author: Qiming Sun <osirpt.sun@gmail.com> * */ #include <stdlib.h> #include <assert.h> //#include <omp.h> #include "config.h" #include "np_helper/np_helper.h" #include "nr_ao2mo.h" #define OUTPUTIJ 1 #define INPUT_IJ 2 void AO2MOtranse1_incore_s4(int (*fmmm)(), int row_id,...
GB_unaryop__abs_uint64_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
vision.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
omp_single_nowait.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" /* * This test will hang if the nowait is not working properly * * It relies on a one thread skipping to the last single construct to * release the threads in the first three single constructs */ volatile int release; volatile int count...
denoise.gold.h
#include "common/common.hpp" #define epsilon (1.0e-20) void denoise_step (double* h_u0, double *h_u, double *h_f, double *h_g, int N) { double (*u)[N][N] = (double (*)[N][N])h_u; double (*u0)[N][N] = (double (*)[N][N])h_u0; double (*f)[N][N] = (double (*)[N][N])h_f; double (*g)[N][N] = (double (*)[N][N])h_g; ...
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)...