source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_unop__identity_int8_int16.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_subassign_12_and_20.c
//------------------------------------------------------------------------------ // GB_subassign_12_and_20: C(I,J)<M or !M,repl> += A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Licens...
cosapi.h
#ifndef COS_COS_COSAPI_H #define COS_COS_COSAPI_H /** * C Object System * COS api * * Copyright 2006+ Laurent Deniau <laurent.deniau@gmail.com> * * 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 L...
sorw.c
#include <stdio.h> #include <math.h> #include <string.h> #include <sys/time.h> #include <omp.h> #define M 700 double compute_error(double solution[][M + 2], double u[][M + 2], const int m); int sor(double unew[][M + 2], double uold[][M + 2], double solution[][M + 2], const double omega, const double tol, const int m...
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...
second_omp_exemple.c
// second_omp_exemple.c // compile with: /openmp /* ############################################################################# ## DESCRIPTION: Simple exemple to read a name and show your Threads - OpenMp. ## NAME: second_omp_exemple.c ## AUTHOR: Lucca Pessoa da Silva Matos ## DATE: 10.04.2020 ## VERSION: 1.0 ## EXE...
resize-inl.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 ...
cg.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "globals.h" #include "randdp.h" #include "timers.h" #include <omp.h> //--------------------------------------------------------------------- #define CACHE_LINE_SIZE_PAD 128 #define INT_PAD_SIZE CACHE_LINE_SIZE_PAD/sizeof(int) #define DOUBLE_PAD_SIZE CA...
parallelBad.c
#include <civlc.cvh> int main() { int counter = 0; #pragma omp parallel if (counter == 0) counter++; $assert(counter == 1); }
convolution_1x1_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 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 ...
joseph3d_back_2.c
/** * @file joseph3d_back_2.c */ #include<stdio.h> #include<stdlib.h> #include<math.h> #include<omp.h> #include "ray_cube_intersection.h" void joseph3d_back_2(const float *xstart, const float *xend, float *img, const float *img_origin, ...
616fb_dev.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include "omp.h" #include <stdio.h> #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size; i...
GB_assign_zombie4.c
//------------------------------------------------------------------------------ // GB_assign_zombie4: delete entries in C(i,:) for C_replace_phase //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://...
stats.c
//----------------------------------------------------------------------------- // stats.c // // Project: EPA SWMM5 // Version: 5.1 // Date: 03/20/14 (Build 5.1.001) // 09/15/14 (Build 5.1.007) // 03/19/15 (Build 5.1.008) // 08/01/16 (Build 5.1.011) // ...
pooling_2x2.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 ...
render.c
#include "render.h" #if BYTE_ORDER == BIG_ENDIAN #define to_little_endian16(x) __builtin_bswap16((uint16_t) (x)) #else #define to_little_endian16(x) (x) #endif #define FRAMES_DIRECTORY_PATH "frames/" #define FRAME_FILE_NAME_PREFIX FRAMES_DIRECTORY_PATH "frame_" #define WITCH_CONSTANT 6.f #define RENDER_RADIU...
GB_unop__identity_fp64_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...
get_max_threads.c
// RUN: %compile-run-and-check #include <omp.h> #include <stdio.h> int main(){ int max_threads = -1; int num_threads = -1; #pragma omp target map(tofrom: max_threads) max_threads = omp_get_max_threads(); #pragma omp target parallel map(tofrom: num_threads) { #pragma omp master num_threads = o...
convolutiondepthwise_3x3_pack8_fp16.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 ...
GB_binop__isne_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...
SectionsEndLink.c
int main() { #pragma omp sections { } #pragma omp sections { #pragma omp section { int x; } } #pragma omp sections { #pragma omp section { } #pragma omp section { } } #pragma omp sections { #pragma omp section { } } #pragma omp sections { #pragma omp section { int x; } #pragma omp ...
mxv_col_omp.c
/* !----------------------------------------------------------------------- ! Author: Ruud van der Pas, Sun Microsystems ! ! Copyright: Sun Microsystems, All rights reserved, Un-authorized ! distribution not permitted !----------------------------------------------------------------------- */ #i...
3d25pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
sweep.c
/*********************************************************************** * Module: sweep.c * * This module contains all the subroutines related to the mesh sweep. ***********************************************************************/ #include "snap.h" void sweep_data_init ( sweep_data *sweep_vars ) { MTAG ...
GB_unop__asin_fc64_fc64.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...
prelu_kernel_arm.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
GB_binop__gt_int8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
parallel_for.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 ...
tinyexr.h
/* Copyright (c) 2014 - 2018, Syoyo Fujita and many contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this l...
integrator.h
#ifndef _INTEGRATOR_H #define _INTEGRATOR_H #include <omp.h> #include <optional> #include "camera.h" #include "core.h" #include "image.h" #include "scene.h" class Integrator { protected: const std::shared_ptr<Camera> camera; public: Integrator(const std::shared_ptr<Camera>& camera) : camera(camera) {} // ...
convolution_sgemm_pack8to1_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 ...
main.c
#include <omp.h> #include <stdio.h> __attribute__ ((constructor)) void a_constructor() { #pragma omp parallel printf("hello from thread %d\n", omp_get_num_threads()); } int main(int argc, char **argv) { printf("hello from main\n"); return 0; }
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
fft.c
/**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite */ /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ /* Copyright (C) 2009 Univer...
completed-ex36.c
/* randomized quicksort */ #include <stdio.h> #include <stdlib.h> #include <tictoc.h> #include <omp.h> #if !defined(MINSIZE) #define MINSIZE 16384 #endif int minsize = MINSIZE; int * create_random_list(int N) { int *list = (int *) malloc(N * sizeof(int)); int i; #pragma omp parallel { unsigned int seed =...
IJVector_parcsr.c
/****************************************************************************** * Copyright (c) 1998 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) ***************************************...
2Dpfold.c
/* * minimum free energy * RNA secondary structure with * basepair distance d_1 to reference structure 1 and distance d_2 to reference structure 2 * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdio.h> #include <stdlib.h> #include <math.h> #include <ctype.h> #include <string.h> #include...
pi_nonreentrant.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif /* * This program approximates pi by computing the area of a quarter circle and * compare that to a square that circumscribes it. It generateds random x and * y coordinates and checks whether these are in the quarter circle or not. * *...
main.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...
signalMachine.c
#include <getopt.h> #include <string.h> #include "fasta_handler.h" #define ESTIMATE_PARAMS 1 #define ASSIGNMENT_THRESHOLD 0.1 typedef enum { full = 0, variantCaller = 1, assignments = 2, both = 3 } OutputFormat; void usage() { fprintf(stderr, "\n\tsignalMachine - Align ONT ionic current to a refe...
simulate_blif.c
/* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of t...
deconv_dw_kernel_arm.c
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the License); ...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
2d.np.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> #define ceild(n,d) (((n)-1)/(d) + 1)// ceil(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) #define myabs(x,y) (((x) > (y))? ((x)-(y)) : ((y)-(x))) #if !defined(point) #de...
par_rap.c
/****************************************************************************** * Copyright (c) 1998 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) ***************************************...
builder.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef BUILDER_H_ #define BUILDER_H_ #include <algorithm> #include <parallel/algorithm> #include <cinttypes> #include <fstream> #include <functional> #include <type_traits> #include <utility> #include ...
ROF_TV_core.c
/* * This work is part of the Core Imaging Library developed by * Visual Analytics and Imaging System Group of the Science Technology * Facilities Council, STFC * * Copyright 2017 Daniil Kazantsev * Copyright 2017 Srikanth Nagella, Edoardo Pasca * * Licensed under the Apache License, Version 2.0 (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 ...
GB_binop__rdiv_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-...
seq_multivector.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) **************************************...
graphCSR.c
// ----------------------------------------------------------------------------- // // "00_AccelGraph" // // ----------------------------------------------------------------------------- // Copyright (c) 2014-2019 All rights reserved // ----------------------------------------------------------------------------- ...
modernFft.h
/** * @cond ___LICENSE___ * * Copyright (c) 2016-2018 Zefiros Software. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights ...
lastprivate-conditional-2.c
void foo (int *p) { int a = -1, b = -1, c = -1, d = -1, e = -1, f = -1, g = -1, h = -1; int i; #pragma omp parallel #pragma omp for lastprivate (conditional: a) for (i = 0; i < 32; i++) if (p[i]) a = i; #pragma omp simd lastprivate (conditional: b) for (i = 0; i < 32; i++) if (p[i]) b ...
factorize_gmp_2step.c
/***************************************************************************************************************** * Compiling: mpicc fattor.c -lgmp -fopenmp -o fattor * Running: mpirun -n PROCNUM --bind-to none fattor NUMBER * Note: PROCNUM is the number of processes that will be ran, and it must be >=2, NUMBER is the...
fabio_c.c
/* Contains the IO routines for fabio module */ #include <math.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <float.h> #include <limits.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #if !defined(WIN32) #include <unistd.h> #else #include <io.h> typedef...
GB_extractTuples.c
//------------------------------------------------------------------------------ // GB_extractTuples: extract all the tuples from a matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Ide...
opal_test.c
// Copyright 2009-2017 Sandia Corporation. Under the terms // of Contract DE-NA0003525 with Sandia Corporation, the U.S. // Government retains certain rights in this software. // // Copyright (c) 2009-2017, Sandia Corporation // All rights reserved. // // Portions are copyright of other developers: // See the file CONT...
GB_unaryop__lnot_fp64_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...
tinyexr.h
/* Copyright (c) 2014 - 2019, Syoyo Fujita and many contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this l...
rose_matrixmultiply.c
/* Naive matrix-matrix multiplication(mmm) By C. Liao */ #define N 1000 #define M 1000 #define K 1000 #include "omp.h" int i; int j; int k; double a[1000][1000]; double b[1000][1000]; double c[1000][1000]; int mmm() { //#pragma omp parallel for private(i,j,k) shared(a,b,c) #pragma omp parallel for private (i,j,k) ...
main.c
//=============================================================================================================================================================================================================== //===========================================================================================================...
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) ...
GB_binop__rdiv_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-...
lsh_index.h
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. * * THE BSD LICENSE * * Redistribution an...
LAGraph_grread.c
//------------------------------------------------------------------------------ // LAGraph_grread: read a matrix from a binary file //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2019 LAGraph Contributors. (see...
THZTensorMath.c
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #ifndef T...
GB_unaryop__lnot_int32_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...
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) #...
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()); } main() { #pragma omp parallel sections { #pragma omp section (vo...
bml_introspection_csr.c
#include "../../macros.h" #include "../bml_introspection.h" #include "../bml_logger.h" #include "../bml_logger.h" #include "../bml_types.h" #include "bml_introspection_csr.h" #include "bml_types_csr.h" #include <complex.h> #include <math.h> #include <stdlib.h> /** Return the matrix precision. * * \param A The matr...
phonon.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...
GB_unaryop__abs_bool_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
GB_unop__erf_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...
nr_numint.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 ...
omp_set_wait_policy_test_1.c
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <omp.h> #include <sys/timeb.h> #include <sys/syscall.h> #include <unistd.h> #include <sys/types.h> #include <signal.h> /**Important: make sure you use num_threads clause in parallel direction and set it to the * number of hardware cores, ...
csr.c
/*! * \file * * \brief Various routines with dealing with CSR matrices * * \author George Karypis * \version\verbatim $Id: csr.c 16297 2014-02-24 20:36:56Z karypis $ \endverbatim */ #include <GKlib.h> #define OMPMINOPS 50000 /*************************************************************************/ /*...
central_difference.h
#include <stdio.h> static inline long long SUB2IND(const long long j, const long long i, const long long k, const long long row_size, const long long col_size, const long long n_channels) { //return ((i + col_size * j) * n_channels) + k; return (i...
loop-1.c
int bar (int); int baz (int *); void f1 (int x) { int i = 0, j = 0; #pragma omp for for (i = 0; i < 16; i++) ; #pragma omp for for (i = 0; 16 > i; i++) ; #pragma omp for for (i = 0; i < 16; i = i + 2) ; #pragma omp for for (i = 0; i < 16; i = 2 + i) ; #pragma omp for /* { dg-error "...
9e6bc14_so8.c
#define _POSIX_C_SOURCE 200809L #include "stdlib.h" #include "math.h" #include "sys/time.h" #include "xmmintrin.h" #include "pmmintrin.h" #include <stdio.h> #include "omp.h" #define min(a, b) (((a) < (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b)) struct dataobj { void *restrict data; int *size; in...
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 // //===---------------------------...
GB_unaryop__abs_int64_uint16.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.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...
omp_simd_aligned2.c
//Variable examples of using simd directives void foo (int n, double *a, double* b) { for (int i=0; i<n; i++) a[i]=b[i]; } void foo2 (int n, double *a, double* b) { for (int i=0; i<n; i++) a[i]=b[i]; } void foo3 (int n, double *a, double* b) { int j=0; for (int i=0; i<n; i++,j++) { a[i]=b[i]+j; ...
scheduled-clauseModificado4.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif main(int argc, char **argv) { omp_sched_t kind; int modifier; int i, n=200,chunk,a[n],suma=0; if(argc < 3) { fprintf(stderr,"\nFalta iteraciones o chunk \n"); exit(-1); } n = atoi(argv[1])...
cnn_builtin_math.c
#include <math.h> #include <string.h> #include <cblas.h> #include "cnn.h" #include "cnn_builtin_math.h" #include "cnn_builtin_math_inline.h" #include "cnn_config.h" #include "cnn_init.h" #include "cnn_macro.h" #ifdef CNN_WITH_CUDA #include <cuda_runtime.h> #include "cnn_builtin_math_cu.h" #endif CNN_ACTIV_DEF((*cnn...
MsnhCVMatOp.h
#ifndef MSNHCVOP_H #define MSNHCVOP_H #include <Msnhnet/cv/MsnhCVMat.h> #include <Msnhnet/utils/MsnhTimeUtil.h> namespace Msnhnet { class MsnhNet_API MatOp { public: static void getROI(Mat &src, Mat &dst, const Vec2I32 &p1, const Vec2I32 &p2); static void setROI(Mat &srcDst, Mat &roi, const Vec2I32 &pos); ...
gimple.h
/* Gimple IR definitions. Copyright 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.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 the F...
convolutiondepthwise_3x3_packn_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a ...
missing.c
#include <stdio.h> #include <stdlib.h> #include "grb2.h" #include "wgrib2.h" /* * Public domain: w. ebisuzaki * number of missing data points as determined by bitmap * * v1.1: just faster my dear * v1.2: just faster my dear * v1.3: just faster my dear * */ static unsigned int bitsum[256] = { 8, 7,...
collision.c
/* * $Id: collision.c 40659 2011-09-28 15:22:13Z mont29 $ * * ***** BEGIN GPL LICENSE BLOCK ***** * * 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, or ...
pcg.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <math.h> #include "pcg.h" // Left preconditioned Conjugate Gradient for solving A * x = b void pcg( const int n, const DTYPE tol, const int max_iter, const matvec_fptr Ax, const void *Ax_param, const DTYP...
cache.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
master.c
#include <stdio.h> #include <omp.h> int main() { #pragma omp parallel { printf("Start of Secret\n"); #pragma omp master { printf("Only Master knows the SECRET\n"); } printf("Secret Delivered\n"); } }
image2pdf.c
/** @file image2pdf.c * * Oyranos is an open source Color Management System * * Copyright (C) 2008-2012 Kai-Uwe Behrmann * */ /** * @brief public Oyranos API's * @internal * @author Kai-Uwe Behrmann <ku.b@gmx.de> * @par License: * new BSD <http://www.opensource.org/licenses/BSD-3-Cla...
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) **************************************...
5632.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
softmax-inl.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 ...
buggy_version.c
#include<stdio.h> #include <stdlib.h> int main(){ int T[10]; srand (1); // initializing array T for (int i = 0; i < 10; i ++) { T[i] = i; } // running the loop 10 times using openmp // increase all element in array T by 1 each iteraion #pragma omp parallel for shared (T) for ( int i = 0; i <...
Example2.c
//#include <stdio.h> //#include <omp.h> //#include <conio.h> // //int main(int argc, char *argv[]) //{ // int tid, tsize; //#pragma omp parallel num_threads(5) // { // tsize = omp_get_num_threads(); // printf("Number of Threads = %d \n", tsize); //#pragma omp sections // { //#pragma omp section // {...
VolumetricConvolutionMM.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "THNN/generic/VolumetricConvolutionMM.c" #else #include <ATen/div_rtn.h> #include <ATen/Parallel.h> #define CONV3D_OMP_THRESHOLD 20 static void inline THNN_(VolumetricConvolutionMM_shapeCheck)( THNNState *state, THTenso...