source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_unop__identity_fp64_fp64.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...
omp-low.c
/* Lowering pass for OpenMP directives. Converts OpenMP directives into explicit calls to the runtime library (libgomp) and data marshalling to implement data sharing and copying clauses. Contributed by Diego Novillo <dnovillo@redhat.com> Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Fre...
DRB040-truedepsingleelement-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...
integrate.c
/* * integrate.c: Example of numerical integration in OpenMP. * * (C) 2015 Mikhail Kurnosov <mkurnosov@gmail.com> */ #include <stdio.h> #include <math.h> #include <sys/time.h> #include <omp.h> const double PI = 3.14159265358979323846; const double a = -4.0; const double b = 4.0; const int nsteps = 40000000; doub...
diagsm_x_coo_u_col.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_COO *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { ALPHA_INT num_th...
collapse-2.c
/* { dg-do run } */ #include <stdlib.h> #include <omp.h> int main (void) { int i, j, k, l = 0, f = 0; int m1 = 4, m2 = -5, m3 = 17; #pragma omp parallel for num_threads (8) collapse(3) \ schedule(static, 9) reduction(+:l) \ firstprivate(f) for (i = -2; i < m1; i++) for (j = m2; j < ...
profile.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unaryop__lnot_uint8_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
gemm.c
#include "gemm.h" #include "utils.h" #include "im2col.h" #include "cuda.h" #include <stdlib.h> #include <stdio.h> #include <math.h> #include <float.h> #include <string.h> #include <stdint.h> #ifdef _WIN32 #include <intrin.h> #endif #if defined(_OPENMP) #include <omp.h> #endif #define TILE_M 4 // 4 ops #define TILE_N 1...
GB_unaryop__lnot_uint32_uint64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
NeuralNet-OpenMP.c
/* Author: Makarios Christakis Description: Feedforward multi layer neural network implementation, parallelized for CPUs using the OpenMP API. Trained using the MNIST fashion dataset, after normalising the pixel values and initialising the neuron weights from a standard normal distribution. ...
GB_unop__identity_fp64_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...
ex04.c
/* Copyright (c) 2019 CSC Training */ /* Copyright (c) 2021 ENCCS */ #include <stdio.h> #include <math.h> #define NX 102400 int main(void) { double vecA[NX],vecB[NX],vecC[NX]; double r=0.2; /* Initialization of vectors */ for (int i = 0; i < NX; i++) { vecA[i] = pow(r, i); vecB[i] = 1.0; } /* dot p...
DRB021-reductionmissing-orig-yes.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
opencl_pgpsda_fmt_plug.c
/* * Format for brute-forcing PGP SDAs (self-decrypting archives). * * This software is Copyright (c) 2017 Dhiru Kholia <dhiru at 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 p...
GB_unop__identity_int8_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
oned_csr.c
/* Copyright (C) 2010-2011 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
generator_gemm_common.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
GB_binop__first_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_binop__pow_fc32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
barrier.c
/* PMSIS includes */ #include "pmsis.h" #include "omp.h" #define ARRAY_SIZE 64 uint32_t a[ARRAY_SIZE] = {0}; uint32_t b[ARRAY_SIZE] = {0}; uint32_t c[ARRAY_SIZE] = {0}; /* Cluster main entry, executed by core 0. */ void cluster_delegate(void *arg) { printf("Cluster master core entry\n"); #pragma omp paralle...
CALPHADFreeEnergyFunctionsTernary.h
#ifndef included_CALPHADFreeEnergyFunctionsTernary #define included_CALPHADFreeEnergyFunctionsTernary #include "CALPHADSpeciesPhaseGibbsEnergy.h" #include "InterpolationType.h" #include "Phases.h" #include "datatypes.h" #include "functions.h" #include <boost/property_tree/ptree.hpp> #include <fstream> #include <iost...
find_ellipse.c
#include "find_ellipse.h" #include <sys/time.h> // The number of sample points per ellipse #define NPOINTS 150 // The expected radius (in pixels) of a cell #define RADIUS 10 // The range of acceptable radii #define MIN_RAD RADIUS - 2 #define MAX_RAD RADIUS * 2 // The number of different sample ellipses to try #define...
test.c
#include <unistd.h> #include <stdio.h> #include <omp.h> int main(void){ #pragma omp parallel for for(int i = 0; i < 256; i++) { sleep(1); } printf("Exit loop\n"); while (1) { sleep(1); } return 0; }
proposal.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...
t_cholmod_gpu.c
/* ========================================================================== */ /* === GPU/t_cholmod_gpu ==================================================== */ /* ========================================================================== */ /* -------------------------------------------------------------------------...
par_cheby.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) **************************************...
parser.c
/***************************************************************************** * * Elmer, A Finite Element Software for Multiphysical Problems * * Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland * * This library is free software; you can redistribute it and/or * modify it under the term...
attribute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
13_vector_dot_product.c
/* Program : 13 Author : Debottam Topic : Write a C program using Open MP features to find the dot product of two vectors of size n each in constant time complexity. [Hint: Dot product = Ʃ(A[i]*B[i])] */ #include <stdio.h> #include <omp.h> #define N 3 int main() { int A[]={3,-5,4},i; ...
simple_env.c
// RUN: %libomp-compile // RUN: env OMP_DISPLAY_AFFINITY=true OMP_AFFINITY_FORMAT='TESTER-ENV: tl:%L tn:%n nt:%N' OMP_NUM_THREADS=8 %libomp-run | %python %S/check.py -c 'CHECK-8' %s // REQUIRES: !abt #include <stdio.h> #include <stdlib.h> #include <omp.h> int main(int argc, char** argv) { #pragma omp parallel { }...
pi01.c
#include <omp.h> #include <stdio.h> static long num_steps = 100000; double step; #define NUM_THREADS 2 void main () { int i; double x, pi, sum[NUM_THREADS]; step = 1.0/(double) num_steps; omp_set_num_threads(NUM_THREADS); #pragma omp parallel private(i) { double x; int id; id = omp_get...
omp_ex_28.c
#include <stdio.h> #include <omp.h> /* MIT License Copyright (c) 2019 NOUREDDINE DAGHBOUDJ 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 ri...
GB_unop__asinh_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
option_warn.c
// RUN: %clang_cc1 -verify -Wsource-uses-openmp -o - %s int a; #pragma omp threadprivate(a,b) // expected-warning {{unexpected '#pragma omp ...' in program}} #pragma omp parallel
mandel-par-dynamic.c
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <omp.h> #include "complex.h" #include "linspace.h" int rows; int columns; int chunk_size; int nthreads; void setGlobalVariables() { rows = atoi(getenv("INPUTMAT_ROWS")); columns = atoi(getenv("INPUTMAT_COLS")); chunk_size = atoi(getenv("S...
bml_submatrix_ellpack_typed.c
#ifdef BML_USE_MAGMA #include "magma_v2.h" #endif #include "../../macros.h" #include "../../typed.h" #include "../bml_allocate.h" #include "../bml_logger.h" #include "../bml_submatrix.h" #include "../bml_types.h" #include "../dense/bml_allocate_dense.h" #include "bml_allocate_ellpack.h" #include "bml_submatrix_ellpack...
doall1-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
nestedomp.c
#include <stdio.h> #include <unistd.h> #ifdef THREADED_OMP #include <omp.h> #endif #include "../gptl.h" int main () { int m, n; /* inner, outer nested loop indices */ int t; /* linear thread number */ const int msize = 2; /* dimension M */ double value; /* return from GPTLget_wa...
4126.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...
residualbased_newton_raphson_contact_strategy.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
squareddifference_ref.c
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * License); you ma...
GB_binop__pair_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
racey_tasks.c
// // This is a very simple program to play with tasks. // // the idea is to print one of two strings // // I think race cars are fun. // I think car races are fun // // This is a race condition since depending on how the // threads are scheduled, you will get a different answer. // We aren't writing any var...
mbs_extforces_walkman_robotran.c
// //------------------------------------------------------------- // // ROBOTRAN - Version 6.6 (build : february 22, 2008) // // Copyright // Universite catholique de Louvain // Departement de Mecanique // Unite de Production Mecanique et Machines // 2, Place du Levant // 1348 Louvain-la-Neuve // http://www.robotran.b...
pair_mat.h
#include <ctype.h> #include "utils.h" #include "fold_vars.h" #define NBASES 8 /*@notnull@*/ static const char Law_and_Order[] = "_ACGUTXKI"; static int BP_pair[NBASES][NBASES]= /* _ A C G U X K I */ {{ 0, 0, 0, 0, 0, 0, 0, 0}, { 0, 0, 0, 0, 5, 0, 0, 5}, { 0, 0, 0, 1, 0, 0, 0, 0}, { 0, 0, 2, 0, 3, 0, 0, 0}, ...
nvector_openmpdev.c
/* ----------------------------------------------------------------- * Programmer(s): David J. Gardner and Shelby Lockhart @ LLNL * ----------------------------------------------------------------- * Acknowledgements: This NVECTOR module is based on the NVECTOR * Serial module by Scott D. Cohen, A...
threadpool.h
/* Copyright 2015 The TensorFlow 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 a...
lu2tlib.c
// lu2tlub.c // // blocked LU decomposition library for column-major version // // Time-stamp: <11/05/13 11:35:56 makino> #include <stdio.h> #include <stdlib.h> #include <math.h> #ifndef NOBLAS #ifdef MKL #include <mkl_cblas.h> #else #include <cblas.h> #endif #endif #include <lu2lib.h> typedef double v2df __attribu...
omp_for_firstprivate.c
<ompts:test> <ompts:testdescription>Test which checks the omp for firstprivate clause by counting up a variable in a parallelized loop. Each thread has a firstprivate variable (1) and an variable (2) declared by for firstprivate. First it stores the result of its last iteration in variable (2). Then it stores the value...
Fig_10.7_threadpriv.c
// sample compile command: "gcc -fopenmp -c Fig_10.7_threadpriv.c" to generate *.o object file // will get warning messages about functions init_list, processwork, and freeList are implicitly declared #include <stdio.h> #include <sys/time.h> #include <omp.h> struct node { int data; struct node * next; }; int c...
sicm_low.c
#include "sicm_low.h" #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <math.h> #include <numa.h> #include <numaif.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <sys/mman.h> // https://www.mail-archive.com/devel@lists.o...
cancel_taskgroup.c
// RUN: %libomp-compile && env OMP_CANCELLATION=true %libomp-run | %sort-threads | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: clang-3, clang-4.0.0 // Current GOMP interface implementation does not support cancellation; icc 16 has a bug // XFAIL: gcc, icc-16 #include "callback.h" #include <unistd.h> #include <st...
GB_unaryop__abs_uint64_uint8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
state.h
#pragma once #ifndef STATE_H #define STATE_H #include "logger.h" //#include "pop.h" struct state{ vector<long long> ptevals; //number of instruction evals vector<long long> numevals; //number of evals on each thread vector<int> genevals; //total evals for each generation vector <int> fit_best; vector <float> fit...
_sampled_kronecker_products.c
/* Generated by Cython 0.28.2 */ /* BEGIN: Cython Metadata { "distutils": { "extra_compile_args": [ "-fopenmp" ], "extra_link_args": [ "-fopenmp" ], "include_dirs": [ "/home/ajairo/anaconda3/lib/python3.6/site-packages/numpy/core/include" ...
mandel-omp.c
/* * Sequential Mandelbrot program * * This program computes and displays all or part of the Mandelbrot * set. By default, it examines all points in the complex plane * that have both real and imaginary parts between -2 and 2. * Command-line parameters allow zooming in on a specific part of * this range. ...
particle_utilities.h
/* ============================================================================== KratosTestApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2010 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc.edu rrossi@cim...
GB_binop__eq_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
tensor_transpose.h
// Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved. // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation the rights to use,...
scan-4.c
int a, b; void f1 (int *c, int *d) { int i; #pragma omp for simd reduction (inscan, +: a) for (i = 0; i < 64; i++) { d[i] = a; #pragma omp scan exclusive (a) a += c[i]; } }
blake2bp-ref.c
/* BLAKE2 reference source code package - reference C implementations Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at your option. The terms of these licenses can be found at: - CC0 1.0 Univers...
GB_binop__isgt_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-...
raytracing.c
#include <stdio.h> #include <stdlib.h> #include "math-toolkit.h" #include "primitives.h" #include "raytracing.h" #include "idx_stack.h" #include <omp.h> #define MAX_REFLECTION_BOUNCES 3 #define MAX_DISTANCE 1000000000000.0 #define MIN_DISTANCE 0.00001 #define SAMPLES 4 #define SQUARE(x) (x * x) #define MAX(a, b) (a...
sycl_vtypes.h
#pragma once #include <cassert> #include "lattice/constants.h" #include "dslash/dslash_defaults.h" #include "lattice/lattice_info.h" #include "dslash/dslash_complex.h" #include "dslash/dslash_vectype_sycl.h" #include "dslash/sycl_view.h" #include "dslash/dslash_vnode.h" #include "dslash/sycl_vneighbor_table.h" name...
GB_unop__identity_uint32_int64.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...
heat_2d-a.pluto.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Discretized 2D heat equation stencil with non periodic boundary conditions * Adapt...
task_in_joinbarrier.c
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s // REQUIRES: ompt #define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN #include "callback.h" #include <omp.h> int main() { int condition=0; omp_set_nested(0); print_frame(0); #pragma omp parallel num_threads(2) { print_frame_from_outlined_fn(1); ...
segment.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
convert.c
/* This file is part of ParTI!. ParTI! 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. ParTI! is distributed...
integral_serial.c
#include<stdio.h> #include<omp.h> #define NUM_THREADS 4 static long num_steps = 100000; double step; int main(){ int i, nthreads; double pi = 0.0, init_time, finish_time; step = 1.0 / (double)num_steps; init_time = omp_get_wtime(); omp_set_num_threads(NUM_THREADS); #pragma omp parallel { int i, id, nthrds; ...
evolve.c
/** @file evolve.c @brief This file contains all the core VPLANET integration routines including the timestepping algorithm and the Runge-Kutta Integration scheme. @author Rory Barnes ([RoryBarnes](https://github.com/RoryBarnes/)) @date May 2014 */ #define NUM_THREADS 4 #include "vplanet.h" void PropsAu...
sample_nested.c
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */ /* * See LICENSE.txt in top-level directory. */ #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <sys/time.h> int main(int argc, char *argv[]) { int size = (argc > 1) ? atoi(argv[1]) : 100; int i, j; int nthreads; struct time...
DOT_R2_Solver.h
/** * @fileoverview Copyright (c) 2019, Stefano Gualandi, * via Ferrata, 1, I-27100, Pavia, Italy * * @author stefano.gualandi@gmail.com (Stefano Gualandi) * */ #pragma once #include <omp.h> #include <cassert> #include <chrono> #include <cinttypes> #include <fstream> #include <limits> #include <r...
irbuilder_unroll_partial_factor_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 #ifnd...
aalloc.c
#include "aalloc.h" fint salloc2_(const fnat m[static restrict 1], const fnat n[static restrict 1], float **const restrict A, fnat ldA[static restrict 1]) { if (A) *A = (float*)NULL; *ldA = 0u; if (!*m) return 0; if (!*n) return 0; const fnat k = *m & VSL_1; *ldA = (k ? (*m + (VSL - k)) : *m);...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
DRB047-doallchar-orig-no.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
pcpaes_ecbencrypt.c
/******************************************************************************* * Copyright 2013-2018 Intel Corporation * All Rights Reserved. * * If this software was obtained under the Intel Simplified Software License, * the following terms apply: * * The source code, information and material ("Material") co...
generator_spgemm_csr_asparse.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
AlgebraicPageRank.h
/* * AlgebraicPageRank.h * * Created on: Jun 20, 2016 * Author: Michael Wegner (michael.wegner@student.kit.edu) */ #ifndef NETWORKIT_CPP_ALGEBRAIC_ALGORITHMS_ALGEBRAICPAGERANK_H_ #define NETWORKIT_CPP_ALGEBRAIC_ALGORITHMS_ALGEBRAICPAGERANK_H_ #include "../../base/Algorithm.h" #include "../../auxiliary/Para...
Main.c
#include "XSbench_header.h" #ifdef MPI #include<mpi.h> #endif int main( int argc, char* argv[] ) { // ===================================================================== // Initialization & Command Line Read-In // ===================================================================== int version = 17; int mype ...
GB_binop__rminus_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__ainv_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...
pr81687-2.c
/* PR c/81687 */ /* { dg-do link } */ /* { dg-additional-options "-O2" } */ int main () { __label__ lab4, lab5, lab6; volatile int l = 0; int m = l; void foo (int x) { if (x == 1) goto lab4; } void bar (int x) { if (x == 2) goto lab5; } void baz (int x) { if (x == 3) goto lab6; } #pragma omp parallel {...
Process.h
#ifndef PROCESS_H_ #define PROCESS_H_ /* ========================================================================= Copyright (c) 2008-2015, Institute for Microelectronics, TU Wien. ----------------- ViennaTS - The Vienna Topography Simulator ...
query.h
#ifndef HUBPPR_QUERY_H #define HUBPPR_QUERY_H #include "algo.h" #include "graph.h" #include "heap.h" #include "config.h" // #include "threadpool.hpp" // #include "thread_pool.hpp" static Avg avg_bwd; static Avg avg_hub; static Avg avg_fwd; extern iMap<int> hub_used_samples; extern vector<iMap<int>> mu...
spike.c
/* * spike.c * Spike * * Created by Ben Evans on 19/06/2008. * Copyright 2008 University of Oxford. All rights reserved. * */ #include "spike.h" int spike(PARAMS * mp) { /*** Declare variables ***/ int error = 0; STIMULI * stim = NULL; STIMULI * gStim = NULL; // Change to PPstim //RECORD *RECSP = REC...
tree-pretty-print.c
/* Pretty formatting of GENERIC trees in C syntax. Copyright (C) 2001-2015 Free Software Foundation, Inc. Adapted from c-pretty-print.c by Diego Novillo <dnovillo@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 Licens...
rotth.c
/* * rotth.c * * does rotation of complex array tvar through real angle thetb * Input array does NOT have guard cells, so it uses CELTNDX2 * and CELTNDX3 index macros. * */ #ifdef _OPENMP #include <omp.h> #endif #include <stdio.h> #include "light.h" #include "pf3dbench.h" #include "util.h" #include "runparm....
mp3.c
//Transpose with locks #include<stdio.h> #include<time.h> #include<omp.h> void main() { int a[5][5],b[5][5],c[5][5],temp=0,ch; printf("Menu\n1.Express Mode\n2.Custom Mode\n"); printf("Enter your choice:"); scanf("%d",&ch); if(ch == 1) { int l = 1; for(int i=0;i<5;i++) { for(int j=0;j<5;j++) { ...
nmf_pgd.c
/* Generated by Cython 0.29.21 */ /* BEGIN: Cython Metadata { "distutils": { "depends": [], "language": "c", "name": "gensim.models.nmf_pgd", "sources": [ "gensim/models/nmf_pgd.pyx" ] }, "module_name": "gensim.models.nmf_pgd" } END: Cython Metadata */ #...
05_loop_decompose_private.c
#include <stdio.h> #include <omp.h> #define MAX_ITS 10000 int main() { int nproc, i, sum, thread_id; nproc = omp_get_max_threads(); int its_per_proc[nproc]; for (i = 0; i< nproc; ++i){ its_per_proc[i] = 0; } #pragma omp parallel for private(thread_id) for (i = 0; i< MAX_ITS; ++i){ thread_id = om...
jacobi.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <sys/timeb.h> #include <malloc.h> #define REAL float static double read_timer_ms() { struct timeb tm; ftime(&tm); return (double) tm.time * 1000.0 + (double) tm.millitm; } /************************************************************ * pr...
C_pp.c
// this is autogenerated file, do not edit it. #include "ficus/ficus.h" struct _fx_N14K_form__ktyp_t_data_t; static void _fx_free_N14K_form__ktyp_t(struct _fx_N14K_form__ktyp_t_data_t** dst); struct _fx_N14C_form__ctyp_t_data_t; static void _fx_free_N14C_form__ctyp_t(struct _fx_N14C_form__ctyp_t_data_t** dst); st...
ejercicio3.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #endif main(){ int i, n = 7; int a[n], suma; for (i=0; i<n; i++) a[i] = i; #pragma omp parallel { suma=5; #pragma omp for for(i=0; i<n; i++){ suma = suma +...
imd_integrate.c
/****************************************************************************** * * IMD -- The ITAP Molecular Dynamics Program * * Copyright 1996-2011 Institute for Theoretical and Applied Physics, * University of Stuttgart, D-70550 Stuttgart * **************************************************************************...
quicksort.c
/* C implementation QuickSort from http://w...content-available-to-author-only...s.org/quick-sort/ */ #include<stdio.h> #include<stdlib.h> #include<omp.h> // A utility function to swap two elements void swap(int* a, int* b) { int t = *a; *a = *b; *b = t; } /* This function takes last element as pivot, places ...
DRB011-minusminus-orig-yes.c
/* Copyright (C) 1991-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it andor modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the L...
GB_binop__max_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...