source
stringlengths
3
92
c
stringlengths
26
2.25M
SpatialMatching.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialMatching.c" #else #define square(x) ((x)*(x)) #define max(x,y) (((x)>(y)) ? (x) : (y)) #define min(x,y) (((x)>(y)) ? (y) : (x)) static int nn_(SpatialMatching_updateOutput)(lua_State *L) { // get all params THTensor *input1 = luaT_checkudata(L, 2, to...
GB_unaryop__minv_int16_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
jacobi_openmp.c
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <math.h> #include <omp.h> #define MAX_ITER 10000 // Maximum value of the matrix element #define MAX 10000 #define TOL 0.000001 // Generate a random float number with the maximum value of max float rand_float(const int max) { return ((float)rand(...
parallel-numthreads.c
// Test if/num_threads clause handling #include <assert.h> #include <stdio.h> int main(void) { int i=0; #pragma omp parallel if(i==0) num_threads(3) { #pragma omp single { assert (omp_get_num_threads() == 3 ); } printf("Mutual exclusive output 1.\n"); } #pragma omp parallel if(i!=0) num_thread...
GB_unaryop__identity_fp32_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
q_rhashmap_mk_loc.c
#include "q_rhashmap_common.h" #include "q_rhashmap_mk_loc.h" int q_rhashmap_mk_loc( uint32_t *hashes, // input [nkeys] uint32_t nkeys, // input uint32_t hmap_size, // input uint32_t *locs // output [nkeys] ) { int status = 0; int chunk_size = 1024; uint64_t divinfo = fast_div32_init(hma...
decl2.c
/* Process declarations and variables for C++ compiler. Copyright (C) 1988-2018 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by...
DRB049-fprintf-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_unop__identity_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...
GB_binop__lxor_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
exact_rhs.c
//-------------------------------------------------------------------------// // // // This benchmark is a serial C version of the NPB SP code. This C // // version is developed by the Center for Manycore Programming at Seoul // // Nati...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
comm.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 ...
omp_smithW-v1-refinedOrig.c
/********************************************************************************* * Smith€“Waterman algorithm * Purpose: Local alignment of nucleotide or protein sequences * Authors: Daniel Holanda, Hanoch Griner, Taynara Pinheiro * * Compilation: g++ omp_smithW.c -o omp_smithW -fopenmp -DDEBUG // debuggi...
displacement_lagrangemultiplier_residual_frictional_contact_criteria.h
// KRATOS ______ __ __ _____ __ __ __ // / ____/___ ____ / /_____ ______/ /_/ ___// /________ _______/ /___ ___________ _/ / // / / / __ \/ __ \/ __/ __ `/ ___/ __/\__ \/ __/ ___/ / / / ___/ __/ / / / ___/ __ `/ / // / /___/ /_...
GB_memcpy.c
//------------------------------------------------------------------------------ // GB_memcpy: parallel memcpy //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 //-----...
DenseVector.h
//================================================================================================= /*! // \file blaze/math/smp/openmp/DenseVector.h // \brief Header file for the OpenMP-based dense vector SMP implementation // // Copyright (C) 2012-2019 Klaus Iglberger - All Rights Reserved // // This file is part ...
GB_binop__gt_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
NDArray.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * 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.apache.org/licenses/LICENSE-2.0. * *...
sam_layer.c
#include "sam_layer.h" #include "utils.h" #include "dark_cuda.h" #include "blas.h" #include <stdio.h> #include <assert.h> layer make_sam_layer(int batch, int index, int w, int h, int c, int w2, int h2, int c2) { fprintf(stderr,"scale Layer: %d\n", index); layer l = { (LAYER_TYPE)0 }; l.type = SA...
libdecimate.c
/* * This file is part of the libdecimate library * (https://github.com/zindy/libdecimate) * Copyright (c) 2017 Egor Zindy * * libdecimate is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foun...
convolution_3x3_pack8.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 ...
ZKBpp_bool.c
/* ============================================================================ Name : ZKBpp_bool.c Author : ANONYMOUS - based on Sobuno's ZKBoo v0.1 Version : 1.0 Description : MPC BITDEC and SHA-256 evaluation using ZKBpp ==========================================================================...
omp_array.c
/****************************************************************************** * * FILE: omp_array.c * * DESCRIPTION: * * Array addition - C/C++ Version * * This is a simple array adition running with omp * * AUTHOR: Victor Rodriguez * * LAST REVISED: 04/06/05 * *******************************************...
expected_output.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include <polybench.h> #include "adi.h" /** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /*adi....
LenSoftMax.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/LenSoftMax.c" #else void THLENN_(LenSoftMax_updateOutput)( THLENNState *state, THTensor *input, THTensor *output, THIndexTensor *len) { if ((input->nDimension != 2) && (len->nDimension != 1)) { THArgCheck(0, 2, "2D...
paradis.h
#include <cassert> #include <iostream> #include <vector> #include <algorithm> #include <chrono> #include <random> #include <sstream> #include <thread> #include <fstream> #include <iomanip> #include <iterator> #include <climits> #include <omp.h> #define FOR(i,a,b) for(int i=a;i<b;i++) #define rep(i,b) FOR(i,0,b) const...
align_stats.c
#include <getopt.h> #ifdef HAVE_OPENMP #include <omp.h> #endif #include <pthread.h> #include "gem_tools.h" #include "align_stats.h" // Every entry will be set to zero be default static const char base_tab[256]= { ['A']=2, ['C']=3, ['G']=4, ['T']=5, ['N']=1, ['a']=2, ['c']=3, ['g']=4, ['t']=5, ['n']=1}; static con...
fig6.22-overlap-comp-io.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...
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 check_results(double* A){ for...
Clustering.h
// // Copyright (C) 2015-2020 Yahoo Japan 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 applicab...
HDAA_fmt_plug.c
/* HTTP Digest access authentication patch for john * * Written by Romain Raboin. OMP and intrinsics support by magnum * * This software is Copyright (c) 2008 Romain Raboin - romain.raboin at * gmail.com, and Copyright (c) 2012 magnum and it is hereby released to * the general public under the following terms: ...
sigmoid_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...
arrays.c
/** * module with tools for manipulating arrays * Julien Lesgourgues, 18.04.2010 */ #include "arrays.h" /** * Called by thermodynamics_init(); perturb_sources(). */ int array_derive( double * array, int n_columns, int n_lines, int index_x, /** from 0 to (n_columns-1) */ int index_y, int index...
par_multi_interp.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
grid_ao.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 required ...
task4_solution.c
#include <math.h> #include <string.h> #include "timer.h" #define NN 1024 #define NM 1024 float A[NN][NM]; float Anew[NN][NM]; int main(int argc, char** argv) { const int n = NN; const int m = NM; const int iter_max = 1000; const double tol = 1.0e-6; double error = 1.0; memset(A,...
divsufsort.c
/* * divsufsort.c for libdivsufsort * Copyright (c) 2003-2008 Yuta Mori All Rights Reserved. * * 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 ...
GB_binop__gt_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-...
game_utils.c
#include <stdio.h> #include <stdlib.h> #include <mpi.h> #include <omp.h> #include "../headers/game_utils.h" #include "../../common/headers/io_utils.h" int exec_game_rules(char** prev_gen, char** next_gen, int i, int j, int alive_neighbours) { int changed = 0; // rules regarding an alive cell if (prev_gen[i][j...
fitsmooth.c
#include <stdio.h> /* gets */ #include <stdlib.h> /* atoi, malloc */ #include <string.h> /* strcpy */ #include "math.h" #include "sparse_dok.h" /* in utilities */ #include "quad_tree.h" /* in utilities */ #if defined(__APPLE__) // clang doesn't have openmp #else #include "omp.h" #endif // Errors define...
GB_binop__iseq_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
DRB098-simd2-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
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 // //...
sort.ref.c
#include <sys/time.h> #include <time.h> #include <stdio.h> static unsigned long long current_time_ns() { #ifdef __MACH__ clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), c...
Tutorial.h
//================================================================================================= /*! // \file blaze/Tutorial.h // \brief Tutorial of the Blaze library // // Copyright (C) 2013 Klaus Iglberger - All Rights Reserved // // This file is part of the Blaze library. You can redistribute it and/or modify...
GB_convert_sparse_to_bitmap_template.c
//------------------------------------------------------------------------------ // GB_convert_sparse_to_bitmap_template: convert A from sparse to bitmap //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // S...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
GB_unaryop__lnot_bool_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
remarks_parallel_in_multiple_target_state_machines.c
// RUN: %clang_cc1 -verify=host -Rpass=openmp -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -verif...
mmult_openmp.c
/** * @author Zachary M. Mattis * ECE 1166 * OpenMP Matrix Multiplication * February 19, 2019 * * This program is a matrix multiply program, * capable of multiplying an (M X N) * (N x P) matrix sizes. * The matrices of this program are stored in memory * in row-major order. * * This program was successfully ...
GB_binop__pow_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-...
matflip.c
#include "matrix.h" MATRIX mat_fliplr(MATRIX A, MATRIX result) { int i, j, m, n; m = MatCol(A); n = MatRow(A); if(result==NULL) if((result = mat_creat(MatRow(A), MatCol(A), UNDEFINED))==NULL) return mat_error(MAT_MALLOC); #pragma omp parallel for private(j) for(i=0; i<n; ++i) {...
GB_unaryop__one_uint64_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_binop__bshift_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-...
trmm_x_csr_n_lo_row.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_CSR *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ...
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...
segment.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__lnot_uint16_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_unop__round_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...
GB_unop__asinh_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...
target-14.c
#include <omp.h> #include <stdlib.h> int main () { int d = omp_get_default_device (); int id = omp_get_initial_device (); int err; void *p; if (d < 0 || d >= omp_get_num_devices ()) d = id; p = omp_target_alloc (128 * sizeof (int), d); if (p == NULL) return 0; #pragma omp target is_device_pt...
point_relax.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
GB_unop__lnot_int64_int64.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...
papiw_util.h
#ifndef PAPIWUTIL #define PAPIWUTIL #ifndef NOPAPIW #include <stdlib.h> #include <stdio.h> #include <vector> #include <iostream> #include <algorithm> #include <papi.h> #include <omp.h> #include <pthread.h> /** * PapiWrapper abstract class * * This interface defines the public interface and provides default functi...
simd-clone-4.h
template <int N> struct S { int s; #pragma omp declare simd notinbranch int f0 (int x); #pragma omp declare simd notinbranch uniform(this) int f1 (int x); #pragma omp declare simd notinbranch linear(this:sizeof(this)/sizeof(this)) int f2 (int x); }; template <int N> struct T { int t[64]; #pragma omp ...
hmacMD5_fmt_plug.c
/* * This software is Copyright (c) 2010 bartavelle, <bartavelle at bandecon.com> * and (c) magnum 2011-2015, * 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 exter...
omp_parallel_for_ordered_nothreadprivate.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" static int last_i = 0; /*! Utility function: returns true if the passed argument is larger than the argument of the last call of this function. */ static int check_i_islarger2(int i) { int islarger; islarger = (i > last_i); last_...
gemm.c
#include "gemm.h" #include "utils.h" #include "im2col.h" #include "dark_cuda.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <float.h> #include <string.h> #include <stdint.h> #ifdef _WIN32 #include <intrin.h> #endif #if defined(_OPENMP) #include <omp.h> #endif #define TILE_M 4 // 4 ops #define TIL...
FirstDerivativeFourthOrder.c
/*! @file FirstDerivativeFourthOrder.c @author Debojyoti Ghosh @brief Fourth order finite-difference approximation to the first derivative */ #include <stdio.h> #include <stdlib.h> #include <basic.h> #include <arrayfunctions.h> #include <firstderivative.h> #include <mpivars.h> #include <hypar.h> typedef MPIVa...
XT_ICD_update.c
/* =========================================================================== * Copyright (c) 2013 K. Aditya Mohan (Purdue University) * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * Redistri...
sdaxpy.c
/* * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of th...
MultiDimensionalArray.h
#pragma once #include <assert.h> #include <array> #include <vector> #include <functional> #include <memory> #include <iomanip> #include <numeric> #include <execution> #include <iostream> namespace Iyathuum { enum memoryLayout { Reversed, Normal }; template <typename Type, size_t Dimension, memoryLayout Lay...
ark_heat1D_adapt_ompdev.c
/*--------------------------------------------------------------- * Programmer(s): Shelby Lockhart @ LLNL *--------------------------------------------------------------- * Based on the serial code ark_heat1D_adapt.c developed * by Daniel R. Reynolds and parallelized with OpenMP 4.5 *------------------------------...
task.c
#include <stdlib.h> #include <stdio.h> #include "omp.h" #include "../utilities/check.h" #define PRINT(_args...) //#define PRINT(_args...) printf(_args) #define N 64 #define TRY_TASK 1 #define TASK_COMPUTE 1 #define OFF 1 #define T1 1 #define T1 1 #define T2 1 #define T3 1 #define T4 1 #define T5 1 #define T...
SpatialConvolutionMap.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/SpatialConvolutionMap.c" #else static int nn_(SpatialConvolutionMap_updateOutput)(lua_State *L) { THTensor *input = luaT_checkudata(L, 2, torch_Tensor); int kW = luaT_getfieldcheckint(L, 1, "kW"); int kH = luaT_getfieldcheckint(L, 1, "kH"); int dW = luaT_...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
core_zgemm.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 "core_lapack.h" /*******************************************************************...
generator.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef GENERATOR_H_ #define GENERATOR_H_ #include <algorithm> #include <cinttypes> #include <random> #include "graph.h" #include "pvector.h" #include "util.h" /* GAP Benchmark Suite Class: Generato...
convolution_packnto1_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GB_unaryop__minv_int16_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...
findSubGraphs.c
#include "defs.h" double findSubGraphs(graph* G, edge* maxIntWtList, int maxIntWtListSize) { mcsim_skip_instrs_begin(); VERT_T* S; LONG_T *start; char* visited; LONG_T *pSCount; #ifdef _OPENMP omp_lock_t* vLock; #endif LONG_T phase_num, numPhases; LONG_T count; double elapsed_time = get_se...
graphcoloring.c
#include <omp.h> #include <stdlib.h> #include <stdio.h> #include <time.h> struct node{ int color; int vertex; // unique id struct node* next; }; struct graph{ int numVertices; struct node** adjLists; // stores adjacent nodes to a given node struct node** adjListsCopy; // we can...
visualize.c
/***************************************************************************** * x264: h264 encoder ***************************************************************************** * Copyright (C) 2005 Tuukka Toivonen <tuukkat@ee.oulu.fi> * * This program is free software; you can redistribute it and/or modify * it ...
piTeste.c
// #include <stdio.h> // #include <omp.h> // #include <time.h> // #include <stdlib.h> // long long num_passos = 10; long long num_passos = 10000000000; double passo; int main(int argc, char** argv){ long long i; double x, pi, soma=0.0; passo = 1.0/(double)num_passos; #pragma omp para...
GB_ijsort.c
//------------------------------------------------------------------------------ // GB_ijsort: sort an index array I and remove duplicates //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitespa...
algo.c
/* * algo.c * * Created on: 2011-09-25 * Author: francis */ #define _GNU_SOURCE #include <stdlib.h> #include <stdio.h> #include <inttypes.h> #include <string.h> #include "algo.h" #include "chunk.h" #include "omp.h" int sigma(int n) { return (n + 1) * n; } struct cs { uint64_t checksum; } __attrib...
shape.c
#define PY_SSIZE_T_CLEAN #include <Python.h> #include "structmember.h" #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define NO_IMPORT_ARRAY #define PY_ARRAY_UNIQUE_SYMBOL MICPY_ARRAY_API #include <numpy/arrayobject.h> #include <numpy/arrayscalars.h> #include <numpy/npy_math.h> #include <numpy/npy_3kcompat.h> #inclu...
ASTMatchers.h
//===- ASTMatchers.h - Structural query framework ---------------*- 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 // //===---------------------------...
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...
perftest.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2014. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * * See file LICENSE for terms. */ #...
randFeature.c
#include <math.h> #include <time.h> #include <stdio.h> #include <limits.h> #include <stdlib.h> #include <string.h> #include <omp.h> #include "ReadLibSVM.h" #include "WriteLibSVM.h" #include "Feature_matrix.h" #include "Random.h" typedef enum { Gaussian, Laplace, ProdLaplace } KERNEL; int main(int argc, char* argv[])...
GB_unaryop__lnot_int16_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_binop__first_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...
RunOvlayBorders.c
/*****************************************************************************\ * RunOvlayBorders.c * * AUTHOR : Felipe Belem * DATE : 2021-02-28 * LICENSE : MIT License * EMAIL : felipe.belem@ic.unicamp.br \*****************************************************************************/ #include "ift.h" #include "...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define HOST_MAX_TEAMS 128 #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[...
distort.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__le_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
cgeadd.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/zgeadd.c, normal z -> c, Fri Sep 28 17:38:05 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
GB_binop__gt_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:...