source
stringlengths
3
92
c
stringlengths
26
2.25M
main.c
//=============================================================================================================================================================================================================== //===========================================================================================================...
convolutiondepthwise_3x3_int8.h
// BUG1989 is pleased to support the open source community by supporting ncnn available. // // Copyright (C) 2019 BUG1989. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy of the License at ...
multiplication.h
#ifndef MULTIPLICATION_H #define MULTIPLICATION_H #include <omp.h> #include <sys/time.h> #include "matrix.h" ull mstandard(ull ar, ull ac, // Matrix A rows and cols ull br, ull bc, // Matrix B rows and cols ul threads) // Number of threads { timeval start, end; matrix* A = all...
GB_binop__eq_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-...
unified_shared_memory.c
// RUN: %libomptarget-compile-generic -fopenmp-version=51 // RUN: %libomptarget-run-generic 2>&1 \ // RUN: | %fcheck-generic #include <stdio.h> // The runtime considers unified shared memory to be always present. #pragma omp requires unified_shared_memory int main() { int i; // CHECK-NOT: Libomptarget #pragma ...
GB_unaryop__minv_int16_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...
conv7x7s2_neon.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
scale_channels_layer.c
#include "scale_channels_layer.h" #include "dark_cuda.h" #include "blas.h" #include <stdio.h> #include <assert.h> layer make_scale_channels_layer(int batch, int index, int w, int h, int c, int w2, int h2, int c2, int scale_wh) { fprintf(stderr,"scale Layer: %d\n", index); layer l = { (LAYER_TYPE)0 }; l.typ...
pairwise3.c
/* Generated by Cython 0.25.2 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "extra_compile_args": [ "-Wno-unused-function", "-Wno-maybe-uninitialized", "-O3", "-ffast-math", "-fopenmp" ], "extra_link_args": [...
shared-clauseModificado.c
/* gcc -fopenmp -O2 shared-clause.c -o shared-clause */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif main() { int i, n = 7; int a[n]; for (i=0; i<n; i++) a[i] = i+1; // Se comparte la variable a por todas las hebras --> shared(a) #pragma omp parallel for shared(a,n) private(i) default(none) f...
Private.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #define TRUE 1 #define FALSE 0 #else #define omp_get_thread_num() 0 #define omp_get_num_threads() 1 #endif int main() { #ifdef _OPENMP (void) omp_set_dynamic(FALSE); if (omp_get_dynamic()) {printf("Advertencia: se ha hecho el aju...
GB_subassign_10_and_18.c
//------------------------------------------------------------------------------ // GB_subassign_10_and_18: C(I,J)<M or !M,repl> = A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
LAGraph_cc_fastsv5b.c
//------------------------------------------------------------------------------ // LAGraph_cc_fastsv5b: connected components //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2020 LAGraph Contributors. (see Contrib...
convolution_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 ...
mkldnn_graph.h
// Copyright (C) 2018-2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #pragma once #include "ie_parallel.hpp" #include "config.h" #include "mkldnn_memory.h" #include "mean_image.h" #include "mkldnn_node.h" #include "mkldnn_edge.h" #include "mkldnn_streams.h" #include <map> #include <string> #include...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__expm1_fc64_fc64.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...
omp_cherk_batch.c
/** * @file omp_cherk_batch.c * * @brief BBLAS cherk_batch float _Complex routine. * * BBLAS is a software package provided by Univ. of Manchester, * Univ. of Tennessee. * * @version 1.0.0 * @author Samuel D. Relton * @author Pedro V. Lara * @author Mawussi Zounon * @date 2016-02-20 * **/ #ifnde...
GB_unop__abs_uint32_uint32.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...
convolution_sgemm_pack8to4_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 ...
fig3.10-mxv-omp.c
/* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2009 Sun Microsystems, Inc. All rights reserved. The contents of this file are subject to the terms of the BSD License("BSD")(the "License"). You can obtain a copy of the License at: http://www.opensparc.net/pubs/t1/licenses/BSD+_Lice...
pixrender.c
/** * My solution to being unable to * apply per-pixel effects using * the SDL2 primitive render functions * * (See header file for details on * PixBuffers) */ //#include <omp.h> #include "pixrender.h" uint32_t getColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a); /** * Precomputed 4x4 bayer matrix * to be...
conversions.h
#ifndef CONVERSIONS_H #define CONVERSIONS_H #include <stdio.h> #include <stdlib.h> #include <cmath> #include <float.h> #include "omp.h" #include "loewner_declaration.h" #include "morph_color_matrix.h" /* *==============================================================================================================...
test8.c
int foo(int a[]) { #pragma omp parallel { a[0] = 1; } } int main() { int arr[10]; int x; foo(arr); x = 10; }
enm_cython.c
/* Generated by Cython 0.25.1 */ #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 ...
mlpcell_fp32.h
#ifndef MLPCELL_F32 #define MLPCELL_F32 #include "mc_funcs.h" #define PCL_ASSERT(cond, x...) do { if(!(cond)) { printf(x); fflush(stdout); exit(1); } } while(0) #define DECL_VLA_PTR(type, name, dims, ptr) type (*name)dims = (type (*)dims)ptr #define DECL_VLA_PTR_CHECK_VAR(var, type, name, dims, ptr) type (*name)dims ...
atomic-10.c
/* { dg-do run } */ /* { dg-options "-O2 -fopenmp" } */ extern void abort (void); int x1, x2, x3, x4, x5; volatile int y6 = 9, y2, y3, y4, y5; volatile unsigned char z1, z2, z3, z4, z5; float a1, a2, a3, a4; void f1 (void) { #pragma omp atomic x1++; #pragma omp atomic x2--; #pragma omp atomic ++x3; ...
offloading_success.c
// RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu // RUN: %libomptarget-compile-run-and-check-nvpt...
GB_unaryop__identity_int8_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...
blake2bp.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 :...
optimized_cluster_tree.h
#pragma once #include "bct_kernel_type.h" #include "optimized_bct_types.h" namespace rsurfaces { struct BVHSettings { mint split_threshold = 8; // bool use_old_prepost = false; // TreePercolationAlgorithm tree_perc_alg = TreePercolationAlgorithm::Chunks; // TreePercol...
md5test.c
/*** * How to compile: * GCC 4.6.3: gcc -fopenmp -o md5test md5test.c -lcrypto -lssl -std=c99 * GCC 6.3.0: gcc -fopenmp -o md5test md5test.c -lcrypto -lssl **/ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <assert.h> #include <openssl/md5.h> #include <omp.h> #define NU...
test.c
#include <stdio.h> #include <omp.h> #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_offloading(); double A[N], B[N], C[N], D[N], E[N]; ...
stTree.h
#ifndef _STTREE_H__ #define _STTREE_H__ #include <cassert> #include <vector> #include <algorithm> #include <fstream> #include <iostream> #include <map> #include <utility> #include <util.h> #include "binTree.h" using namespace std; /* ************************************************** */ class stNode; //class binDa...
GB_unaryop__lnot_bool_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...
parallel.h
#ifndef PARALLEL_H_ #define PARALLEL_H_ #include <algorithm> #include <functional> #include <vector> class Parallel { public: Parallel(int argc, char** argv) { (void)argc; (void)argv; }; virtual ~Parallel() = default; virtual bool is_master() const = 0; virtual int get_proc_id() const = 0; vi...
lis_matvec_bsr.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...
wd.h
#ifndef METHODS_WD_H #define METHODS_WD_H namespace method { // use your method name to create a subspace for your // implementation of details namespace wd { namespace details { template<typename Initial, typename Potential> arma::mat effective_force(const Potential & potential, const Init...
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 // //===---------------------------...
mexutil.h
/******************************************************************************* * mexutil.h - mex helpers ******************************************************************************* * Add license here... *******************************/ #ifndef MEXUTIL_H #define MEXUTIL_H // omp #if _OPENMP #include <omp.h> ...
grid_basis.c
/* Copyright 2014-2018 The PySCF Developers. 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 requi...
test.c
#include <stdio.h> #include <omp.h> #include <string.h> int main(int argc, char * argv[]) { printf("there are %d arguments found\n", argc); for(int i = 0; i < argc; i++) { printf("%s\n", argv[i]); } char strArr[1][1000] = {'\0'}; // char arr[1][255] = {"./tools/programmingTools/c_tools/...
generate-score-table.c
#include <glib.h> #include <gio/gio.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <sys/mman.h> #include <string.h> #if HAVE_OPENMP #include <omp.h> #else static int omp_get_thread_num (void) { return 0; } #endif #include <sparse.h> G_DEFINE_AUTOPTR_CLEANUP_FUNC (FILE, fclose)...
3d25pt_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 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
spacetime_heat_dl_kernel_antiderivative.h
/* Copyright (c) 2020, VSB - Technical University of Ostrava and Graz University of Technology 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 copyr...
GB_binop__pow_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...
column_matrix.h
/*! * Copyright 2017 by Contributors * \file column_matrix.h * \brief Utility for fast column-wise access * \author Philip Cho */ #ifndef XGBOOST_COMMON_COLUMN_MATRIX_H_ #define XGBOOST_COMMON_COLUMN_MATRIX_H_ #include <limits> #include <vector> #include <memory> #include "hist_util.h" namespace xgboost { names...
GB_unop__ainv_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
sorter.h
#pragma once ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef __USE_ASL__ #include <asl.h> #endif #ifdef __USE_ASL__ #define vgl_sort_indexes asl_int_t #endif #ifndef __USE_ASL__ #define vgl_sort_indexes long long #endif #ifdef __USE_GPU__ ...
test.c
#include <stdio.h> #include <float.h> #include <stdlib.h> #include <math.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (957*3) #define ZERO(X) ZERO_ARRAY(N, X) #define INIT() { \ INIT_LOOP(N, { \ Ad[i] = 1 << 16; \ Bd[i] = i << 16; \ Cd...
GB_binop__lt_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
ResultHandler.h
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* * Structures that collect search results from distance computations */ #pragma once #include <faiss/impl/AuxIndexStructures...
GB_binop__isge_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-...
GB_unop__expm1_fp32_fp32.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_unop__lnot_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...
teams.c
#include <stdlib.h> #include <assert.h> #include <omp.h> int main() { int res = 0, n = 10; #pragma omp teams num_teams(n) reduction(+:res) { res = omp_get_team_num(); if (omp_get_team_num() == 0) n = omp_get_num_teams(); } Assert (res == (n*(n-1))/2); // Sum of first n-1 natural numbers }
omp_task_red_taskloop.c
// RUN: %libomp-compile-and-run // Parsing error until gcc8: // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 // Parsing error until clang11: // UNSUPPORTED: clang-10, clang-9, clang-8, clang-7 // Missing GOMP_taskgroup_reduction_(un)register in LLVM/OpenMP // Should be removed once the functions are implemented //...
quick_sort_omp.h
// g++ -std=c++17 -fopenmp test_quick_sort.cpp -o test // Multithreaded quicksort using openMP #include <omp.h> // Swaps two pointer values template<typename T> void swap(T* a, T* b) { T tmp = *a; *a = *b; *b = tmp; } // Partitions the array such that: // - The entry args[j] is in its final place in the array, f...
UniOP.h
#ifndef UNIOP_H_ #define UNIOP_H_ /* * UniOP.h: * a simple feed forward neural operation, unary input. * * Created on: Apr 22, 2017 * Author: mszhang */ #include "Param.h" #include "MyLib.h" #include "Node.h" #include "Graph.h" #include "ModelUpdate.h" #include <cstdlib> #include "profiler.h" class UniParam...
GB_unaryop__ainv_fp64_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...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
timestep.c
#include <stddef.h> #include <string.h> #include <stdint.h> #include <omp.h> #include <math.h> #include "geometry.h" #include "bench.h" #include "phy.h" #include "core_kernel.h" /* Calculate a time step for each cell Note that this routine assumes conservative variables Local time stepping, loop over faces and ...
GB_binop__bclr_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
utils.h
/* Copyright (C) 2010 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
update_ops_named_SWAP.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 SWAP_gate_old_single(UINT target_qubit_index_0, UINT target_qubit_index_1, CTYPE *state, ITYPE dim); //void ...
Utils.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #pragma once #include <string> #include <vector> #include "inc/Core/Common.h" #include <algorithm> #include "inc/Core/Common/DistanceUtils.h" #include "inc/Core/Common/QueryResultSet.h" #include "inc/Core/VectorSet.h" #incl...
black_kernel.h
#pragma omp target teams distribute parallel for collapse(2) thread_limit(BLOCK_SIZE) for (int col = 1; col < NUM+1; col++) { for (int row = 1; row < NUM/2+1; row++) { int NUM_2 = NUM >> 1; Real p_ij = pres_black(col, row); Real p_im1j = pres_red(col - 1, row); Real p_ip1j = pres_red(col + 1, row...
GB_msort_2.c
//------------------------------------------------------------------------------ // GB_msort_2: sort a 2-by-n list of integers, using A[0:1][ ] as the key //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // ...
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...
GB_unaryop__identity_int32_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...
custom_functions.h
// // Project Name: Kratos // Last Modified by: $Author: G.Casas (gcasas@cimmne.upc.edu) $ // Date: $Date: 2011-6-13 08:56:42 $ // Revision: $Revision: 1.5 $ // // //README::::look to the key word "VERSION" if you want to find all the points where you have to change something...
sixs_runs.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "sixs_runs.h" struct etm_spectral_function_t { int nbvals[SIXS_NB_BANDS]; float wlinf[SIXS_NB_BANDS]; float wlsup[SIXS_NB_BANDS]; float response[SIXS_NB_BANDS][155]; } etm_spectral_function_t; int create_6S_tables(sixs_tables_...
GB_binop__bshift_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-...
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)...
mobilenet_64.c
/* Pretrained MobileNet Convolutional Neural Network in C language and OpenMP API GitHUB Page: https://github.com/jcanore/vgg16 Author: ZFTurbo/jocare Compilation: gcc -O3 MobileNet_CPU_cifar.c -lm -fopenmp -o MobileNet_CPU_cifar Usage: MobileNet_CPU_cifar <weights_path> <file_with_list_of_...
cherk.c
#include "blas.h" #include "error.h" #include <stdio.h> #include "handle.h" #include "config.h" #include "cherk.fatbin.c" static inline size_t min(size_t a, size_t b) { return (a < b) ? a : b; } static inline size_t max(size_t a, size_t b) { return (a > b) ? a : b; } static inline CUresult cuMemcpyHtoD2DAsync(CUdevic...
openmp.c
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<time.h> #include<omp.h> void sample_rand(const double a, const double b ,const int dim, double *x) { #pragma omp parallel for for(int i=0;i<dim;++i) { double tmp = ((double) rand())/((double) RAND_MAX); x[i] = (b-a)*tmp + a; } } int main(int argc,...
NDArray.h
#ifndef NDARRAY_H #define NDARRAY_H #include <initializer_list> #include <functional> #include <shape.h> #include "NativeOpExcutioner.h" #include <memory/Workspace.h> #include <indexing/NDIndex.h> #include <indexing/IndicesList.h> #include <graph/Intervals.h> #include <array/DataType.h> #include <stdint.h> namespace...
hello-openmp.c
#include<stdio.h> #include<omp.h> int main() { int nthreads, tid; #pragma omp parallel private(tid) { tid = omp_get_thread_num(); printf("Hello World from thread = %d \n", tid); //master thread if(tid == 0){ nthreads = omp_get_num_threads(); printf("Number of threads = %d\n", nthreads); } } ...
AtomicOP.h
#ifndef ATOMICIOP_H_ #define ATOMICIOP_H_ /* * AtomicOP.h: * a list of atomic operations * * Created on: June 11, 2017 * Author: yue_zhang(suda), mszhang */ /* ActivateNode TanhNode SigmoidNode ReluNode IndexNode PSubNode PDotNode */ #include "Param.h" #include "MyLib.h" #include "Node.h" #include "Graph.h" ...
par_csr_matop_device.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) **************************************...
GB_unaryop__abs_fp64_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
3d7pt_var.c
/* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #...
openmp_critical1.c
///TAFFO_TEST_ARGS -Xvra -propagate-all -fopenmp #include <stdio.h> #define MAX_N (100) int main(int argc, char *argv[]) { float result __attribute__((annotate("scalar(range(0,100))"))) = 0.0; int i = 0; #pragma omp parallel for for (i = 0; i < MAX_N; i++) { #pragma omp critical result += 1.0; } ...
csc.h
#ifndef __csc_H #define __csc_H template<typename I, typename T1,typename T2> void csc_matvec_noomp_contig(const bool overwrite_y, const I n_row, const I n_col, const I Ap[], const I Ai[], const T1...
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...
GB_unop__abs_uint32_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...
singleModificado2.c
/* $ gcc -fopenmp -O2 src/single.c -o bin/single $ ./bin/single Introduce valor de inicialización a: 1 Single ejecutada por el thread 0 Depués de la región parallel: b[0] = 1 b[1] = 1 b[2] = 1 b[3] = 1 b[4] = 1 b[5] = 1 b[6] = 1 b[7] = 1 b[8] = 1 */ #include <stdio.h> #include <omp.h> main() { int n = 9, i, a...
RNACI.h
/* This Source Code Form is subject to the terms of the BSD 2-Clause * License. If a copy of the this license was not distributed with this * file, you can obtain one from http://opensource.org/licenses/BSD-2-Clause. */ // Copyright 2014-2015, Schmidt #ifndef __RNACI_H__ #define __RNACI_H__ #define RNACI_VERSION ...
PixelBasedRenderFunc.h
#include"..\Core\SanTypes.h" #include"SanGraphics.h" namespace San { namespace Graphics { #ifndef __SANPIXELBASEDRENDERFUNC_H__ #define __SANPIXELBASEDRENDERFUNC_H__ struct PIXCAMERA { SVECTOR3 Coord; SVECTOR3 LookAt; SVECTOR3 Dir; SVECTOR3 UpDir; sfloat Cutoff; sfloat Near; sfloat Far; SV...
util.h
#pragma once #include "datatypes.h" #include "timing.h" class Util { public: static void updatePerLocationAgentLists(const thrust::device_vector<unsigned>& locationOfAgents, thrust::device_vector<unsigned>& locationIdsOfAgents, thrust::device_vector<unsigned>& locationAgentList, thrust::dev...
core_zlacpy_band.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include "core_blas.h" #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" /**************************************...
GB_unop__identity_bool_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
GB_unop__lnot_int8_int8.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
ceil_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...
ellipticBuildContinuous.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 without limitatio...
openmp_scan.h
#include <omp.h> template<typename T, typename R, typename C, typename S> void openmp_scan( size_t n, T initial, size_t tilesize, R reduce, C combine, S scan ) { if (n > 0) { // Set t to the number of tiles that might be used, at most one tile // per thread with no ti...
Example_target_update.1.c
/* * @@name: target_update.1c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@expect: success * @@version: omp_4.0 */ extern void init(float *, float *, int); extern void init_again(float *, float *, int); extern void output(float *, int); void vec_mult(float *p, float *v1, float *v2, int N) { ...
reciprocal_to_normal.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* 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 abo...