source
stringlengths
3
92
c
stringlengths
26
2.25M
3d25pt.c
/* * Order-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b)...
main.c
//=============================================================================================================================================================================================================== //===========================================================================================================...
nest_lock.c
#include <stdio.h> #include <omp.h> omp_nest_lock_t my_lock; void Test() { int tid = omp_get_thread_num( ); omp_set_nest_lock(&my_lock); printf("Thread %d - starting nested locked region\n", tid); printf("Thread %d - ending nested locked region\n", tid); omp_unset_nest_lock(&my_lock); } int main() { ...
openmp.c
// RUN: %clang_cc1 -fopenmp -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -emit-llvm-only -main-file-name openmp.c %s | FileCheck %s // CHECK: openmp.c:{{.+}}omp_outlined{{.+}}: // CHECK: File 0, 10:3 -> 10:31 // CHECK: File 0, 10:19 -> 10:24 // CHECK: File 0, 10:26 -> 10:29 // CHECK: File 0, 10...
2intersect.h
/* SPDX-License-Identifier: MIT * * 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, ...
statistic.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
Fig_10.3_runtimeEx.c
// sample compile command: "gcc -fopenmp -c Fig_10.3_runtimeEx.c" to generate *.o object file #include <omp.h> #include <stdio.h> #define DEBUG 1 // map schedule kind enum values to strings for printing static char* schdKind[] = { "ERR","static","dynamic","guided","auto"}; // external function for potential energy ...
hello.c
#include "omp.h" #include <stdio.h> int main(int argc, char* argv[]) { int nthreads, tid; int nprocs; char buf[32]; /* Fork a team of threads */ #pragma omp parallel private(nthreads, tid) { /* Obtain and print thread id */ tid = omp_get_thread_num(); prin...
threading.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for * license information. */ #ifndef LIGHTGBM_UTILS_THREADING_H_ #define LIGHTGBM_UTILS_THREADING_H_ #include <LightGBM/meta.h> #include <LightGBM/utils/common.h> #include <L...
GB_unjumbled_template.c
//------------------------------------------------------------------------------ // GB_unjumble_template: unjumble the vectors of a matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Ide...
studentspar.c
// Rodar com a flag -D DEBUG para ativar o modo debug // #define DEBUG /* Este programa calcula as seguintes estatisticas das notas dos alunos nas escolas das diferentes cidades do Brasil: Menor, Maior, Media, Mediana e Desvio Padrao (DP) */ #include <stdlib.h> #include <stdio.h> #include <stdint.h> #i...
parallel_fann.c
/* * parallel_FANN.c * Author: Alessandro Pietro Bardelli */ #ifndef DISABLE_PARALLEL_FANN #include <omp.h> #include "parallel_fann.h" #include "config.h" #include "fann.h" FANN_EXTERNAL float FANN_API fann_train_epoch_batch_parallel(struct fann *ann, struct fann_train_data *data, const unsigned int threadnumb)...
math_cpu.c
/******************************************************************************* * Copyright 2017-2018 Intel 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.apa...
common.c
/**************************************************************************** * * * OpenMP MicroBenchmark Suite - Version 3.1 * * * * ...
target_x86.c
/***************************************************************************** * * target_x86.c * * Implementation is serial or OpenMP. * * Edinburgh Soft Matter and Statistical Physics Group and * Edinburgh Parallel Computing Centre * * (c) 2018 The University of Edinburgh * * Contributing authors: *...
mixed_tentusscher_myo_epi_2004_S2_8.c
// Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium) // (AP + max:dvdt) #include <stdio.h> #include "mixed_tentusscher_myo_epi_2004_S2_8.h" GET_CELL_MODEL_DATA(init_cell_model_data) { if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_...
memory_simd_sse.c
#include <immintrin.h> #include <stdio.h> // From https://stackoverflow.com/a/57844027 //Convert from RGBRGBRGB... to RRR..., GGG..., BBB... //Input: Two XMM registers (24 uint8 elements) ordered RGBRGB... //Output: Three XMM registers ordered RRR..., GGG... and BBB... // Unpack the result from uint8 elements ...
pmv-OpenMP-b.c
/* Multiplica una matriz por un vector */ #include <stdlib.h> // biblioteca con funciones atoi(), malloc() y free() #include <stdio.h> // biblioteca donde se encuentra la función printf() #include <time.h> // biblioteca donde se encuentra la función clock_gettime() #ifdef _OPENMP #include <omp.h> #else #d...
ast-dump-openmp-teams.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test() { #pragma omp target #pragma omp teams ; } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc> // CHECK: `-FunctionDecl {{.*}} <{{.*}}ast...
gradient.c
/********************************************************************[libaroma]* * Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.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 Lic...
GB_unop__bnot_uint64_uint64.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...
MathTools.h
/** * * \copyright * Copyright (c) 2012-2017, OpenGeoSys Community (http://www.opengeosys.org) * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license * */ #pragma once #include <cstddef> #ifdef _OPENM...
GB_unop__identity_uint8_bool.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__lor_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...
cpubound3.c
#include<stdlib.h> #include<stdio.h> #include<sys/time.h> #include<math.h> double convert_time_to_sec(struct timeval tv){ double elapsed_time = (double)(tv.tv_sec) + ((double)(tv.tv_usec)/1000000); return elapsed_time; } int main(int argc, const char* argv[] ){ float result = 0; unsigned i...
minimumTest.c
#include <stdlib.h> #include <stdio.h> #include <omp.h> int main(int argc, char const *argv[]) { omp_set_num_threads(4); #pragma omp parallel { printf("Printing from thread #%d\n",omp_get_thread_num()); } return 0; }
hello.c
#include <stdio.h> #include <omp.h> int main(int argc, char const *argv[]) { int nthreads,tid; char buf[32]; // attributes must be defined before the parallel region printf("%d\n", omp_get_num_procs()); // how many processors #pragma omp parallel private(nthreads,tid) { tid = om...
omp_single_copyprivate_nothreadprivate.c
// RUN: %libomp-compile-and-run #include "omp_testsuite.h" #define DEBUG_TEST 0 int test_omp_single_copyprivate() { int result; int nr_iterations; result = 0; nr_iterations = 0; int j; #pragma omp parallel num_threads(4) private(j) { int i; for (i = 0; i < LOOPCOUNT; i++) { #if DEBUG_TEST ...
parallel_file_map.h
// Copyright 2019-2020 the ProGraML authors. // // Contact Chris Cummins <chrisc.101@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 License at // // http://www.apache.org/licenses/LI...
maxclique.h
//COMMON UTILS SECTION void printClique(const vector<vertex* >&clique){ printf("Clique size: %zu => ",clique.size()); for (auto &x : clique){ printf("%d ", x->v_id); } cout << "\n"; } bool verifyClique(const vector<vertex *> &clique){ for (int i = 0 ;i <clique.size(); ++i){ for (int j = 0 ; j < cliqu...
GB_unaryop__ainv_fp64_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...
CGOpenMPRuntime.h
//===----- CGOpenMPRuntime.h - Interface to OpenMP Runtimes -----*- 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 // //===---------------------------...
l7_update.c
/* * Copyright (c) 2011-2019, Triad National Security, LLC. * All rights Reserved. * * CLAMR -- LA-CC-11-094 * * Copyright 2011-2019. Triad National Security, LLC. This software was produced * under U.S. Government contract 89233218CNA000001 for Los Alamos National * Laboratory (LANL), which is operated...
ConvolutionalTsetlinMachine.c
/* Copyright (c) 2019 Ole-Christoffer Granmo 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, dis...
nbody-block.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include "timer.h" #define CACHELINE 64 // size of cache line [bytes] #define SOFTENING 1e-9f typedef struct { float *x, *y, *z, *vx, *vy, *vz; } BodySystem; void randomizeBodies(float *data, int n) { for (int i = 0; i < n; i++) { data[i] = 2.0f * (rand(...
par_csr_matop.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) **************************************...
matrix.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) ...
ooc_pcontext.h
// ========================================================================== // // Copyright (c) 2017-2018 The University of Texas at Austin. // // All rights reserved. // // ...
par_hw.c
#include "stdio.h" #include "omp.h" int main(){ int cnt=0; #pragma omp parallel { int ID = omp_get_thread_num(); printf("hello((%d)",ID); printf("world(%d)\n",ID); cnt = omp_get_num_threads(); }//return 0; printf("serial_NUM_threads:%d\n",omp_get_num_threads()); printf("parallel_nu...
gimple-pretty-print.c
/* Pretty formatting of GIMPLE statements and expressions. Copyright (C) 2001-2020 Free Software Foundation, Inc. Contributed by Aldy Hernandez <aldyh@redhat.com> and Diego Novillo <dnovillo@google.com> This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the terms o...
SwathFile.h
// -------------------------------------------------------------------------- // OpenMS -- Open-Source Mass Spectrometry // -------------------------------------------------------------------------- // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen, // ETH Zurich, and Freie Universit...
SOCRSStorage.h
// // Created by iskakoff on 28/07/16. // #ifndef EDLIB_SOCRSSTORAGE_H #define EDLIB_SOCRSSTORAGE_H #include <vector> #include <iomanip> #ifdef _OPENMP #include <omp.h> #endif #include "Storage.h" namespace EDLib { namespace Storage { template<class ModelType> class SOCRSStorage : public Storage < typenam...
batch_to_space.h
// Copyright 2018 Xiaomi, Inc. 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 applicab...
GB_unaryop__minv_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...
DijkstraOPENMP.c
# include <stdlib.h> # include <stdio.h> # include <time.h> # include <omp.h> # define NV 15000 int main ( int argc, char **argv ); int *dijkstra_distance ( int *ohd); void find_nearest ( int s, int e, int mind[NV], int connected[NV], int *d, int *v ); void init ( int *ohd); void timestamp ( void ); void update_mind...
9372.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...
mpiomp.c
#include <stdio.h> #include <assert.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <mpi.h> #include <omp.h> const double PI = 3.1415926535897932; const long STEP_NUM = 1070596096; const double STEP_LENGTH = 1.0 / 1070596096; int main (int argc, char* argv[]) { double pi, sum = 0.0; MPI_Init ...
network_simplex_simple.h
/* -*- mode: C++; indent-tabs-mode: nil; -*- * * * This file has been adapted by Nicolas Bonneel (2013), * from network_simplex.h from LEMON, a generic C++ optimization library, * to implement a lightweight network simplex for mass transport, more * memory efficient than the original file. A previous version of this fi...
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...
matrixmultiply-ompacc.c
/* Naive matrix-matrix multiplication(mmm) By C. Liao */ #include <stdio.h> #ifdef _OPENMP #include <omp.h> #endif #define N 1024 #define M 1024 #define K 1024 #define REAL float int i,j,k; REAL a[N][M],b[M][K],c[N][K], c2[N][K]; int init(); int mmm(); int mmm2(); int verify(); int main(void) { init(); mmm(); ...
DRB019-plusplus-var-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...
kmp_doacross_check.c
// RUN: %libomp-compile-and-run #include <stdio.h> #define N 1000 struct dim { long long lo; // lower long long up; // upper long long st; // stride }; extern void __kmpc_doacross_init(void*, int, int, struct dim *); extern void __kmpc_doacross_wait(void*, int, long long*); extern void __kmpc_doacross_post(vo...
math_array.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
neighbor.h
#pragma once class ExPair{ public: PS::S64 id_in; PS::S64 id_out; PS::S64 id_cluster; PS::S32 * rank_list; static PS::S32 size; static PS::S32 rem; static PS::S32 n_bit; static void initialize() { const PS::S32 n_proc = PS::Comm::getNumberOfProc(); n_...
GB_unop__lnot_uint16_uint16.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...
convolution_bf16s.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 ...
dropout-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 ...
convolution_sgemm_packnto1.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 ...
zip_fmt_plug.c
/* * ZIP cracker patch for JtR. Hacked together during June of 2011 * by Dhiru Kholia <dhiru.kholia at gmail.com> for GSoC. * * This software is Copyright (c) 2011, Dhiru Kholia <dhiru.kholia at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in so...
mattoepz.c
#include "matrix.h" #include <stdlib.h> /** \brief Computes the symmetric Toeplitz matrix from a co-efficient matrix * * \param[in] R Input coefficient matrix * \param[in] result Matrix to store the result * \return \f$ \textrm{symtoep}(\mathbf{R}) \f$ * */ MATRIX mat_symtoeplz(MATRIX R, MATRIX result) { in...
regex-dna.c
// The Computer Language Benchmarks Game // http://benchmarksgame.alioth.debian.org/ // // Based on C contribution of Mike Pall // Contributed by The Anh Tran /* http://benchmarksgame.alioth.debian.org/u64q/program.php?test=regexdna&lang=gcc&id=4 usr/bin/gcc -pipe -Wall -O3 -fomit-frame-pointer -march=native -fope...
GB_binop__max_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-...
convert_csr5_x_csr.c
#include <alphasparse/opt.h> #include <memory.h> #include <stdlib.h> #include <string.h> #include <stdio.h> #include <math.h> #include "alphasparse/format.h" #include "alphasparse/util.h" alphasparse_status_t ONAME(const ALPHA_SPMAT_CSR *A, ALPHA_SPMAT_CSR5 **dst) { // if (!A->ordered) { // printf("we nee...
RasterisationScanner.h
#ifndef RASTERISATIONCAMERA_H #define RASTERISATIONCAMERA_H #include <fanScanner.h> #include <algo/rasterize/fanScanLineGenerator.h> #include <texture/MemoryTexture.h> #if ENABLE_OPENMP #include <omp.h> #endif // ENABLE_OPENMP template<typename FillerType, typename ValueType> class RasterisationScanner : publ...
test36.c
#include<stdio.h> int main () { int shared = 0, pri = 0; #pragma omp parallel private(pri) { int pri= 0; #pragma omp atomic update shared = shared + 1; #pragma omp atomic update pri = pri + shared++; } printf ("Shared=%d, Private=%d", shared, pri); }
KDTreeBuilder.h
// Copyright 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #pragma once #include "../../openpgl_common.h" #include "KDTree.h" #include "../../data/SampleStatistics.h" #include "../../data/Range.h" #include "../../include/openpgl/types.h" /* #if !defined(__WIN32__) and !defined(__MACOSX__) #includ...
Matrix.h
/* Copyright (c) 2016-2019 Liav Turkia See LICENSE.md for full copyright information */ #pragma once #ifndef MACE__UTILITY_MATRIX_H #define MACE__UTILITY_MATRIX_H #include <MACE/Utility/Vector.h> namespace mc { /** Used in the `Matrix` class. Defined for clarity for when you iterate over a `Matrix.` @see Matrix ...
graph-gen.c
/* * This file is part of an experimental software implementation for solving the * single-source shortest path problem in edge-weighted graphs. The algorithm * considered for the implementation is Dijkstra's algorithm for the shortest * path problem and it runs in linear time with respect to the size of the host ...
mc_synch.c
/* This file is for the different functions for emitting and absorbing synchrotron photons */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #include <glob.h> #include <unistd.h> #include <dirent.h> #include "hdf5.h" #include <math.h> #include <time.h> #include <gsl/gsl_math.h> #includ...
getStartLists.c
#include "defs.h" double getStartLists(graph* G, edge** maxIntWtListPtr, INT_T* maxIntWtListSizePtr) { mcsim_skip_instrs_begin(); LONG_T *local_max, maxWeight; edge *maxIntWtList; LONG_T maxIntWtListSize; LONG_T *p_start, *p_end; double elapsed_time; elapsed_time = get_seconds(); ...
expected_output.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include <polybench.h> #include "2mm.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 */ /*2mm....
dyn.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 <math.h> #include <stdio.h> #include <stdlib.h> #define min(x,y) ((x) < (y) ?...
arm_device.h
#ifndef ANAKIN2_SABER_ARM_DEVICES_H #define ANAKIN2_SABER_ARM_DEVICES_H #include <stdio.h> #include <vector> #include "saber/core/device.h" #ifdef PLATFORM_ANDROID #include <sys/syscall.h> #include <unistd.h> #define __NCPUBITS__ (8 * sizeof (unsigned long)) #define __CPU_SET(cpu, cpusetp) \ ((cpusetp)->mask_bit...
deconv_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...
colormap.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
pdgstrs.c
/*! \file Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy) All rights reserved. The source code is distributed under BSD license, see the file License.txt at the top-level directory. ...
CutPursuit.h
#pragma once #include "Graph.h" #include <math.h> #include <queue> #include <iostream> #include <fstream> #include <boost/graph/boykov_kolmogorov_max_flow.hpp> namespace CP { template <typename T> struct CPparameter { T reg_strenth; //regularization strength, multiply the edge weight uint32_t flow_steps; //...
vec-pose-inner.c
#include <float.h> #include <math.h> #include <stddef.h> #include "bude.h" // Energy evaluation parameters #define CNSTNT 45.0f #define HBTYPE_F 70 #define HBTYPE_E 69 #define HARDNESS 38.0f #define NPNPDIST 5.5f #define NPPDIST 1.0f void fasten_main(const int natlig, const int natpro, ...
GB_binop__le_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-...
for-1.c
/* { dg-do compile } */ /* { dg-options "-fopenmp -fshow-column" } */ void baz (int); void foo (int j, int k) { int i; /* Valid loops. */ #pragma omp for for (i = 0; i < 10; i++) baz (i); #pragma omp for for (i = j; i <= 10; i+=4) baz (i); #pragma omp for for (i = j; i > 0; i = i - 1) ...
bml_copy_ellpack_typed.c
#include "../../macros.h" #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_copy.h" #include "../bml_types.h" #include "bml_allocate_ellpack.h" #include "bml_copy_ellpack.h" #include "bml_types_ellpack.h" #include <complex.h> #include <stdlib.h> #include <string.h> /** Copy an ellpack matrix - re...
Winograd_convolution.c
#include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <time.h> double rtclock() { struct timezone Tzp; struct timeval Tp; int stat; stat = gettimeofday(&Tp, &Tzp); if (stat != 0) printf("Error return from gettimeofday: %d", stat); retur...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
tutorial_region.c
/* * Copyright (c) 2015 - 2022, 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 list of condition...
pbkdf2-hmac-sha512_fmt_plug.c
/* This software is Copyright (c) 2012 Lukas Odzioba <ukasz@openwall.net> * 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. * * Based on hmac-sha512 by magnum * * Minor fixes, format uni...
AsagiReader.h
/** * @file * This file is part of SeisSol. * * @author Sebastian Rettenberger (sebastian.rettenberger AT tum.de, http://www5.in.tum.de/wiki/index.php/Sebastian_Rettenberger) * * @section LICENSE * Copyright (c) 2016-2017, SeisSol Group * All rights reserved. * * Redistribution and use in source and binary fo...
t_factorize_subtree.c
/* ========================================================================== */ /* === GPU/t_factorize_subtree.c ============================================ */ /* ========================================================================== */ /* -------------------------------------------------------------------------...
test_task_barrier.c
//===-- test_task_barrier.cc - Test task execution at barriers ---*- C -*-===// // // Part of the LOMP 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_binop__isge_fp64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
LocalIdMap.h
#pragma once #include <cassert> #include <cstdint> #include <numeric> #include <vector> #include <omp.h> #include "DataStructures/Containers/BitVector.h" #include "Tools/Bitwise.h" // This class maps a set of n IDs in the range 0..m - 1 to the range 0..n - 1, preserving the // relative order. We call the IDs in the...
nonlinear_chain_sqp.c
/* * This file is part of acados. * * acados 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 Foundation; either * version 3 of the License, or (at your option) any later version. * * acado...
trmm_x_sky_u_hi_row_conj.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_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ...
SimulatorBase.h
/* Menge Crowd Simulation Framework Copyright and trademark 2012-17 University of North Carolina at Chapel Hill 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/licen...
ten_tusscher_2006_RS_CPU.c
#include <assert.h> #include <stdlib.h> #include "ten_tusscher_2006.h" GET_CELL_MODEL_DATA(init_cell_model_data) { assert(cell_model); if(get_initial_v) cell_model->initial_v = INITIAL_V; if(get_neq) cell_model->number_of_ode_equations = NEQ; } //TODO: this should be called only once f...
flush.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int main() { int data=10, flag = 0; #pragma omp parallel num_threads(4) { if (omp_get_thread_num()%2==0) { data = 5; #pragma omp flush(flag, data) /* Set flag to release thread 1 */ flag = 1; printf("fla...
movementPolicies.h
#pragma once #include <iostream> #include "timeHandler.h" #include "datatypes.h" #include "cxxopts.hpp" #include "operators.h" #include "locationTypesFormat.h" template<typename SimulationType> class NoMovement { public: // add program parameters if we need any, this function got called already // from Simulat...
GB_unaryop__lnot_uint16_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_binop__land_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
versaoB.c
// Fernanda Lyra Alves // Ivan Dos Santos Muniz // Programação Concorrente e Distribuída - 2020.2 #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/time.h> static const int cel_morta = 0; static const int cel_viva = 1; static const unsigned int num_geracoes = 2000; static cons...