source
stringlengths
3
92
c
stringlengths
26
2.25M
particlefilter.c
/** * @file ex_particle_OPENMP_seq.c * @author Michael Trotter & Matt Goodrum * @brief Particle filter implementation in C/OpenMP */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <sys/time.h> #include <time.h> // RISC-V VECTOR Version by Cristóbal Ramírez Lazo, "...
GB_unop__acos_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...
arraymult.c
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <omp.h> #include "ctimer.h" void add (int A[], int B[], int C[], int N) { int i, carry, sum; carry = 0; for (i=0; i<N; i++) { sum = A[i] + B[i] + carry; if (sum >= 10) { carry = 1; sum -= 10; } else carry = 0; C[i] = sum; } }...
linearFiltering-hessian.c
/************************************************************************* * linearFiltering-hessian.c - * * $Id$ * * Copyright (c) INRIA 2012, all rights reserved * * AUTHOR: * Gregoire Malandain (gregoire.malandain@inria.fr) * * CREATION DATE: * Wed Dec 26 22:52:20 CET 2012 * * ADDITIONS, CHANGES * ...
mandelbrot.c
/* * mandelbrot.c: adaptive mesh refinement (AMR) * (c)2010-2018 Seiji Nishimura * $Id: mandelbrot.c,v 1.1.1.3 2018/09/11 00:00:00 seiji Exp seiji $ */ #include <math.h> #include <stdlib.h> #include <pixmap.h> #include <palette.h> #include <stdbool.h> // for adaptive mesh refinement #define MIN_GRID (0x01<<2) #de...
omp_parallel_private.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdlib.h> #include "omp_testsuite.h" //static int sum1 = 789; int test_omp_parallel_private() { int sum, num_threads,sum1; int known_sum; sum = 0; num_threads = 0; #pragma omp parallel private(sum1) { int i; sum1 = 7; /*printf("sum...
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) #...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_AxB_colscale_template.c
//------------------------------------------------------------------------------ // GB_AxB_colscale_template: C=A*D where D is a square diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPD...
conv_dw_k5_k7_kernel_arm.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 ma...
global.h
#ifndef GLOBAL_H #define GLOBAL_H #pragma omp declare target extern int * device_arr; #pragma omp end declare target #endif
t000.c
#include<stdint.h> #include<stdlib.h> #include<stdio.h> #include<omp.h> typedef struct {int64_t nteam; int64_t nthread;} tinfo; int main(int argc, char **argv) { tinfo *t = malloc(sizeof(tinfo)); t->nteam = -1; t->nthread = -1; #pragma omp target teams map(t[0:1]) { #pragma omp parallel { if(omp_get_team_n...
kmp_set_dispatch_buf.c
// RUN: %libomp-compile && %libomp-run 7 // RUN: %libomp-run 0 && %libomp-run -1 // RUN: %libomp-run 1 && %libomp-run 2 && %libomp-run 5 // RUN: %libomp-compile -DMY_SCHEDULE=guided && %libomp-run 7 // RUN: %libomp-run 1 && %libomp-run 2 && %libomp-run 5 // UNSUPPORTED: clang-11, clang-12 #include <stdio.h> #include <o...
FullMatrix.h
/*! * @file FullMatrix.h * @author Michal Merta * @date July 5, 2013 * @brief Header file for the FullMatrix class * */ #ifndef FULLMATRIX_H #define FULLMATRIX_H #include <cstring> #include <vector> #include "Matrix.h" #include "SparseMatrix.h" #include "Macros.h" #if N_MIC > 0 #pragma offload_attr...
parallel_string.h
/* Header ini adalah kumpulan fungsi string.h yang dibutuhkan oleh kelompok kami dan beberapa dimodifikasi menjadi versi paralel jika memungkinkan. */ #ifndef PARALLEL_STRING #define PARALLEL_STRING #include <omp.h> //Fungsi strlen. Tidak bisa diparalelkan. int my_strlen(const unsigned char * str...
update_values_x_bsr.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(ALPHA_SPMAT_BSR *A, const ALPHA_INT nvalues, const ALPHA_INT *indx, const ALPHA_INT *indy, ALPHA_Number *values) { ALPHA_INT num_thread = alpha_...
mesh-amit.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <complex.h> #include <sys/types.h> #include <time.h> #include <fftw3.h> #include "globalvars.h" #include "sharedvars.h" #include "prototype.h" #include "mesh.h" /*****************************************************************************/ void init_n...
pi-v10.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #include "extrae_user_events.h" #define PROG...
TensorNode.h
#ifndef TENSOR_NODE_H #define TENSOR_NODE_H #include <complex> #include <vector> #include <map> #include <exception> #include <stdlib.h> #include "Core/Utilities/QPandaNamespace.h" #include "Core/Utilities/Tools/QPandaException.h" using std::map; using std::complex; using std::vector; using std::exception; using std::...
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...
kernel_cos.c
/*! @copyright (c) 2017 King Abdullah University of Science and * Technology (KAUST). All rights reserved. * * STARS-H is a software package, provided by King Abdullah * University of Science and Technology (KAUST) * * @generate NDIM -> n 1 2 3 4 * Generate different functions fo...
broadcast_reduce_customized-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 ...
Interp1PrimFifthOrderHCWENOChar.c
/*! @file Interp1PrimFifthOrderHCWENOChar.c @author Debojyoti Ghosh @brief Characteristic-based hybrid compact-WENO5 Scheme */ #include <stdio.h> #include <basic.h> #include <arrayfunctions.h> #include <mathfunctions.h> #include <interpolation.h> #include <tridiagLU.h> #include <mpivars.h> #include <hypar.h> ...
irbuilder_unroll_partial_heuristic_runtime_for.c
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs // RUN: %clang_cc1 -fopenmp-enable-irbuilder -verify -fopenmp -fopenmp-version=51 -x c -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s // expected-no-diagnostics // RE...
threshold.c
/* Copyright 2014. The Regents of the University of California. * Copyright 2015-2017. Martin Uecker. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2013-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de> * 2015-20...
add_sparse_gradient.h
/* * Copyright 1999-2017 Alibaba Group. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or a...
GradientStrengthImageFilter.h
/* * MIT License * * Copyright (c) 2018-2019 Benjamin Köhler * * 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, c...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
activations.c
#include "activations.h" #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <float.h> char *get_activation_string(ACTIVATION a) { switch(a){ case LOGISTIC: return "logistic"; case LOGGY: return "loggy"; case RELU: retur...
fibonacci.c
#include <stdio.h> #include <omp.h> #define NUM 10 int fibonacci(int n){ int x, y; printf("%d\n", omp_get_thread_num()); if (n<2) return n; #pragma omp task shared(x) x = fibonacci(n-1); #pragma omp task shared(y) y = fibonacci(n-2); #pragma omp taskwait return x + y; } int main(){ int res; #pragma omp...
partial.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) ***************************************...
work.c
/******************************************************************** * BenchIT - Performance Measurement for Scientific Applications * Contact: developer@benchit.org * * $Id: work.c 1 2009-09-11 12:26:19Z william $ * $URL: svn+ssh://william@rupert.zih.tu-dresden.de/svn-base/benchit-root/BenchITv6/kernel/numerical...
GB_binop__times_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-...
GB_binop__gt_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_unaryop__identity_int16_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...
FourierTransform.h
/* Copyright 2016 Kristofer Björnson * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed...
sample-2.c
#include <stdio.h> #include <omp.h> int main() { int id,x; omp_set_num_threads(100); #pragma omp parallel private(id,x) { // int id,x; id=omp_get_thread_num(); x=10*id; printf("\n"); printf("Hello from thread %d, x= %d", id,x); printf("\n"); } ...
GB_unop__lnot_uint64_uint64.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__minv_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...
ike_fmt_plug.c
/* PSK cracker patch for JtR. Hacked together during March of 2012 by * Dhiru Kholia <dhiru.kholia at gmail.com> . * * This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com> * and it is hereby released to the general public under GPL * * The IKE Scanner (ike-scan) is Copyright (C) 2003-2007...
CacheEfficientHogwildTrainer.h
/* * Copyright 2016 [See AUTHORS file for list of authors] * * 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 require...
risingexp.c
#include<Python.h> #include<numpy/arrayobject.h> #include<math.h> #include<omp.h> #define IND(a,i) *((double *)(a->data+i*a->strides[0])) static PyObject *risingexp(PyObject *self, PyObject *args, PyObject *keywds); static PyObject *risingexp(PyObject *self, PyObject *args, PyObject *keywds) { PyObject *etc; PyA...
x86_utils.h
/* Copyright (c) 2016 Anakin Authors All Rights Reserve. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law...
Example_task_dep.5.c
/* * @@name: task_dep.5c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ // Assume BS divides N perfectly void matmul_depend(int N, int BS, float A[N][N], float B[N][N], float C[N][N] ) { int i, j, k, ii, jj, kk; for (i = 0; i < N; i+=BS) { for (j = 0; j < N; j+=...
trmv_x_sky_u_lo.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_N...
atomic-2.c
/* { dg-do run } */ /* { dg-options "-O2 -fopenmp" } */ /* { dg-options "-O2 -fopenmp -march=nocona" { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -fopenmp" { target ilp32 } } */ double d = 1.5; long double ld = 3; extern void abort (void); void test (void) { #pragma omp atomic d *= 1.25; #pragma omp ato...
tutorial_region_prof.c
/* * Copyright (c) 2015, 2016, 2017, 2018, 2019, Intel Corporation * * 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 ...
time_omp_fib.c
#include <stdio.h> /* for printf() */ #include <assert.h> /* for assert() */ #include <omp.h> #include <qthread/qthread.h> #include <qthread/qtimer.h> #include "argparsing.h" static aligned_t validation[] = { 0, // 0 1, // 1 1, // 2 2, ...
nco_var_rth.c
/* $Header$ */ /* Purpose: Variable arithmetic */ /* Copyright (C) 1995--present Charlie Zender This file is part of NCO, the netCDF Operators. NCO is free software. You may redistribute and/or modify NCO under the terms of the 3-Clause BSD License with exceptions described in the LICENSE file */ #include ...
GB_unop__cos_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...
geopm_sched.c
/* * Copyright (c) 2015, 2016, 2017, 2018, 2019, 2020, Intel Corporation * * 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,...
core_ztsmlq.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" #include <omp.h> /********************...
dropout_op.h
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
main.c
#include <stdio.h> #if defined(_OPENMP) #include <omp.h> #endif int main() { #if defined(_OPENMP) omp_set_num_threads(4); #endif #pragma omp parallel { #if defined(_OPENMP) printf("Thread ID: %d\n", omp_get_thread_num()); #endif } printf("Done!\n"); return 0; }
opencl_iwork_fmt_plug.c
/* JtR format to crack iWork '09, and '13 / '14 files. * * This software is Copyright (c) 2015, Dhiru Kholia <kholia at kth.se> and * Maxime Hulliger <hulliger at kth.se>, and it is hereby released to the * general public under the following terms: * * Redistribution and use in source and binary forms, with or wi...
dacemath.c
/****************************************************************************** * * * DIFFERENTIAL ALGEBRA CORE ENGINE * * * ...
mergesort.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> long usecs (); void merge(int a[],int temp[], int low, int high, int mid); void mergesortrec(int a[],int temp[], int low, int high); /* Parallelization concerns this routine and the next one */ void mergesort(int a[],int temp[], int low...
ompcompress.c
#ifdef _OPENMP /* compress 1d contiguous array in parallel */ static void _t2(compress_omp, Scalar, 1)(zfp_stream* stream, const zfp_field* field) { /* array metadata */ const Scalar* data = (const Scalar*)field->data; uint nx = field->nx; /* number of omp threads, blocks, and chunks */ uint threads = threa...
NearestNeighbor.h
#pragma once #include <flann/flann.hpp> #include "Eigen.h" #define MAX_DISTANCE 0.005f struct Match { int idx; float weight; }; class NearestNeighborSearch { public: virtual ~NearestNeighborSearch() {} virtual void setMatchingMaxDistance(float maxDistance) { m_maxDistance = maxDistance; // Squared } flo...
GB_binop__lt_bool.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
fill_ints.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 ...
deconvolution_4x4.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 ...
GB_binop__land_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
quantize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__conj_fc32_fc32.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...
spmm_x_csr.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> #ifdef _OPENMP #include <omp.h> #endif alphasparse_status_t ONAME(const ALPHA_SPMAT_CSR *A, const ALPHA_SPMAT_CSR *B, ALPHA_SPMAT_CSR **matC) { check_return(B->cols != A->rows, ALPHA_SPARSE_STATUS_INVALI...
GB_unop__atanh_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...
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 <cinttypes> #include <fstream> #include <functional> #include <type_traits> #include <utility> #include "command_line.h" #include "ge...
GB_binop__ne_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-...
omp.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <sys/time.h> #include <omp.h> double get_walltime() { struct timeval tp; gettimeofday(&tp, NULL); return (double) (tp.tv_sec + tp.tv_usec*1e-6); } void force_repulsionStatic(int np, const double *pos, double L, double krepulsion, double *forces...
dyn_mc.h
#ifndef DYN_MC_H_ #define DYN_MC_H_ #include <algorithm> #include "traversal.h" #include "../common/timer.h" #include "sliding_queue_dynamic.h" #include "../common/pvector.h" /* Algorithm: Incremental Max computation and Max Computation starting from scratch */ #include <fstream> extern std::ofstream algF; templat...
Example_affinity.2.c
/* * @@name: affinity.2c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ void work(); void foo() { #pragma omp parallel num_threads(16) proc_bind(spread) { work(); } }
temporal_max_method.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Suneth Warnakulasuriya (https://github.com/suneth...
doitgen.c
/** * 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 */ /* doitgen.c: this file is part of PolyBench/C */ #include <stdio.h> #include <unistd.h> #include <string.h> #incl...
Cycle.c
/* * The MIT License * * Copyright 2020 The OpenNARS authors. * * 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,...
GB_unaryop__lnot_uint8_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...
ex2_reduction.c
/* * This code calculates pi using the formula to calculate * the atan(z) which is the integral from 0 to z of 1/(1+x*x) * times dx. atan(1) is 45 degrees or pi/4 */ #include <stdio.h> #include <omp.h> static long num_steps = 10000000; /* number of intervals */ double step; /* the size of the interval - dx */ i...
sections.c
/* --- File sections.c --- */ #include <omp.h> #include <stdio.h> #include <stdlib.h> #define N 5000 int main(int argc, char *argv[]) { int i, th; float a[N], b[N], c[N], d[N]; /* Initialize arrays */ for (i = 0; i < N; i++) { a[i] = i * 2.3; b[i] = i + 10.35; } #pragma omp parallel private(i, th) { th ...
eavlDestinationTopologyPackedMapOp.h
// Copyright 2010-2014 UT-Battelle, LLC. See LICENSE.txt for more information. #ifndef EAVL_DESTINATION_TOPOLOGY_PACKED_MAP_OP_H #define EAVL_DESTINATION_TOPOLOGY_PACKED_MAP_OP_H #include "eavlCUDA.h" #include "eavlCellSet.h" #include "eavlCellSetExplicit.h" #include "eavlCellSetAllStructured.h" #include "eavlDataSet...
GB_unaryop__minv_int64_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_binop__gt_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...
GB_unop__abs_fp64_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...
softmax_layer.c
#include "softmax_layer.h" #include "blas.h" #include "dark_cuda.h" #include "utils.h" #include "blas.h" #include <float.h> #include <math.h> #include <stdlib.h> #include <stdio.h> #include <assert.h> #define SECRET_NUM -1234 void softmax_tree(float *input, int batch, int inputs, float temp, tree *hierarchy, float *...
depth-metrics.h
// License: Apache 2.0. See LICENSE file in root directory. // Copyright(c) 2017 Intel Corporation. All Rights Reserved. // // Plane Fit implementation follows http://www.ilikebigbits.com/blog/2015/3/2/plane-from-points algorithm #pragma once #include <vector> #include <mutex> #include <array> #include <imgui.h> #incl...
ordering_op-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 ...
PoW.c
#include "PoW.h" #include <stdio.h> #include <stdint.h> #include <string.h> #include <stdlib.h> #include <assert.h> #ifndef SYS_OS_MAC #include <omp.h> #endif #include "my_time.h" #include "sha256.h" #include "common.h" #include "my_rand48_r.h" #include "oneWayFunction.h" // #define SSE_VERSION extern void showbuf(...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
mxEvaluateStrongFromEdgeRHS.c
#ifdef _OPENMP #include <omp.h> #endif #include "mex.h" #include "blas.h" #if !defined(_WIN32) #define dgemm dgemm_ #endif // #if !defined(_WIN32) // #define dgemm dgemm_ // #endif #define DEBUG 0 #define NRHS 10 #define NLHS 1 void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { /* che...
mxnet_op.h
#include "hip/hip_runtime.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...
train3.c
#define _GNU_SOURCE #include <syscall.h> #include <sched.h> #include "graph.h" #include "mainFunctions.h" #include "powerperformacetracking.h" #include "print.h" #include <stdlib.h> #include<unistd.h> #define NO_OF_ARGS 2 //#define REPEAT 25 #define REPEAT 25 long long iters[8]; struct timeval start, end; // We d...
tinyexr.h
/* Copyright (c) 2014 - 2018, Syoyo Fujita 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 list of conditions and t...
1.norace8.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 20 int main() { int A[N][N]; #pragma omp parallel for schedule(static, 4) for (int i = 1; i < N; i++) for (int j = 1; j < N; j++) A[i][j] = A[i][j - 1]; } // CHECK: Region is Data Race Free. // END
DRB011-minusminus-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...
GaussianProcess.h
/** * @file GaussianProcess.h * @author Jan Nguyen * @date 17.05.19 */ #pragma once #include <Eigen/Dense> #include "autopas/options/AcquisitionFunctionOption.h" #include "autopas/utils/ExceptionHandler.h" #include "autopas/utils/Math.h" #include "autopas/utils/NumberSet.h" #include "autopas/utils/Random.h" #inc...
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-...
GB_unop__identity_int32_int16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
kmp_csupport.c
/* * kmp_csupport.c -- kfront linkage support for OpenMP. */ //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE....
sp.c
/*-------------------------------------------------------------------- NAS Parallel Benchmarks 2.3 OpenMP C versions - SP This benchmark is an OpenMP C version of the NPB SP code. The OpenMP C versions are developed by RWCP and derived from the serial Fortran versions in "NPB 2.3-serial" developed by NAS...
libperf.c
/** * Copyright (C) Mellanox Technologies Ltd. 2001-2019. ALL RIGHTS RESERVED. * Copyright (C) UT-Battelle, LLC. 2015. ALL RIGHTS RESERVED. * Copyright (C) The University of Tennessee and The University * of Tennessee Research Foundation. 2015-2016. ALL RIGHTS RESERVED. * Copyright (C) ARM Ltd. 2017-2020...
median.c
/* * median.c * * Code generation for function 'median' * */ /* Include files */ #include "rt_nonfinite.h" #include "yaapt.h" #include "median.h" #include "yaapt_emxutil.h" #include "eml_int_forloop_overflow_check.h" #include "isequal.h" #include "yaapt_data.h" #include "blas.h" #include "lapacke.h" /* Variable ...