source
stringlengths
3
92
c
stringlengths
26
2.25M
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
Simulation.c
#include "XSbench_header.h" //////////////////////////////////////////////////////////////////////////////////// // BASELINE FUNCTIONS //////////////////////////////////////////////////////////////////////////////////// // All "baseline" code is at the top of this file. The baseline code is a simple // implementation ...
fx.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
conv3x3s1_winograd23_sse_BdB.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. // Copyright (C) 2019 BUG1989. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in...
DRB093-doall2-collapse-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...
gemv_x_coo_trans.c
#include "alphasparse/kernel.h" #include "alphasparse/kernel_plain.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t gemv_coo_trans_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_COO *A, const ALPHA_Numbe...
Example_SIMD.5.c
/* * @@name: SIMD.5c * @@type: C * @@compilable: yes * @@linkable: no * @@expect: success * @@version: omp_4.0 */ void work( double **a, double **b, double **c, int n ) { int i, j; double tmp; #pragma omp for simd collapse(2) private(tmp) for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { tm...
tstfft.c
/* -*- mode: C; tab-width: 2; indent-tabs-mode: nil; fill-column: 79; coding: iso-latin-1-unix -*- */ /* tstfft.c */ /* * ref: http://csweb.cs.wfu.edu/~torgerse/fftw_2.1.2/fftw_2.html * ref: http://www.fftw.org/fftw3_doc/Complex-One_002dDimensional-DFTs.html#Complex-One_002dDimensional-DFTs * author: Ringbo * date: 20...
GB_unaryop__ainv_int32_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GoL_p.c
/****************************************************** ************* Conway's game of life ****************** ****************************************************** Usage: ./exec ArraySize TimeSteps Compile with -DOUTPUT to print output in output.gif (You will need ImageMagick for that - Install with sudo apt...
graphutil.c
#include<stdio.h> #include<sys/time.h> #include "graph.h" #include "graphutil.h" #include "parsegraph.h" graph* readGraph(const char* filename, const char* graphformat) { struct timeval start, end; gettimeofday(&start, NULL); graph* G = parseedgeListGraph(filename, graphformat); gettimeofday(&end, NULL); pr...
sse-blk-dag0.h
#if 0 #include "try-blk-dag0.h" #else #include <util/omp_wrapper.h> //inline int omp_get_num_threads(void){return 1;} void wilson_dslash_blk_dag0(IFloat *chi_p_f, IFloat *u_p_f, IFloat *psi_p_f, int cb, Wilson *wilson_p) { int tt; int cbn; Float *chi_p = (Float *) chi_p_f; Floa...
rules.h
#ifndef RULES_H #define RULES_H #include "constants.h" #include <map> #include <mpi.h> class Rules { std::map<ssize_t, ssize_t> m_rules; public: Rules(); inline const std::map<ssize_t, ssize_t>::const_iterator begin() const { return this->m_rules.begin(); } inline const...
cgadither2.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <omp.h> #include "common.h" extern int opt_alt; static float PI = acos(-1); typedef struct { short hue; float saturation, value; } hsv_t; typedef struct { size_t w, h; hsv_t* pixels; } hsvimg_t; #define MAX(A, B, ...
block-10.c
// { dg-do compile } void foo(int i) { int j; switch (i) // { dg-error "invalid entry to OpenMP structured block" } { #pragma omp parallel // { dg-warning "statement will never be executed" } { case 0:; } } switch (i) // { dg-error "invalid entry to OpenMP structured block" } { #pragma omp for // {...
user_basis_core.h
#ifndef _user_basis_core_H #define _user_basis_core_H #include <complex> #include <vector> #include <stdio.h> #include "general_basis_core.h" #include "numpy/ndarraytypes.h" #include "benes_perm.h" #include "openmp.h" namespace basis_general { template<class I> struct op_results { std::complex<double> m; I r; op_...
SimulationTools.h
////////////////////////////////////////////////////////////////////////////////// // COMPANY: Ruhr University Bochum, Embedded Security // AUTHOR: Amir Moradi (for the paper: https://eprint.iacr.org/2019/1312 ) ////////////////////////////////////////////////////////////////////////////////// // Copyright (c) 2019, ...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
transpose.h
// This code is part of the Problem Based Benchmark Suite (PBBS) // Copyright (c) 2011-2016 Guy Blelloch and the PBBS team // // 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 restri...
GB_unaryop__abs_int8_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
apply.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
DRB005-indirectaccess1-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...
SB_TV_core.c
/* * This work is part of the Core Imaging Library developed by * Visual Analytics and Imaging System Group of the Science Technology * Facilities Council, STFC * * Copyright 2017 Daniil Kazantsev * Copyright 2017 Srikanth Nagella, Edoardo Pasca * * Licensed under the Apache License, Version 2.0 (the "License")...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
hello_parallel.c
#include <stdio.h> #include <omp.h> int main() { #pragma omp parallel //CREATE A PARALLEL REGION { printf("\nhello world "); printf("hello from thread number %d \n", omp_get_thread_num()); fflush(stdout); } printf("\ngoodbye world \n\n"); return 0; }
degeneracy_approx_csr.h
#pragma once #include "../general.h" #include <cstdlib> #include <omp.h> #include <gms/third_party/fast_statistics.h> #include <gms/third_party/fast_range.h> #include "boundary_function.h" namespace PpParallel { template <BoundaryFunction boundary, bool useRankFormat = false, class CGraph = CSRGraph, class Output = s...
drivers.c
// Driver routines for the harmonic polynomial connection problem. #include "fasttransforms.h" #include "ftinternal.h" static void chebyshev_normalization_2d(double * A, const int N, const int M) { for (int i = 0; i < N; i++) A[i] *= M_SQRT1_2; for (int j = 0; j < M; j++) { A[j*N] *= M_SQRT1_2...
y_solve.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB SP code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__second_fc64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
self_mask.h
/* * Copyright (c) 2008, Willow Garage, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this l...
DRB001-antidep1-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...
data_absent_at_exit.c
// RUN: %libomptarget-compile-run-and-check-aarch64-unknown-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-powerpc64le-ibm-linux-gnu // RUN: %libomptarget-compile-run-and-check-x86_64-pc-linux-gnu // RUN: %libomptarget-compile-run-and-check-nvpt...
boundary.c
#include "boundary.h" #include "LBDefinitions.h" #include "helper.h" #include "computeCellValues.h" /** * Set NOSLIP condition */ void setNoSlip(float * collideField, int * flagField, int * node, int * n) { int i, coord_dest[3], flag; float * cell_ptr; /* for each lattice */ for (i = 0; i < Q; i++) ...
wino_conv_kernel_mips.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...
KDTree.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #ifndef _SPTAG_COMMON_KDTREE_H_ #define _SPTAG_COMMON_KDTREE_H_ #include <iostream> #include <vector> #include <string> #include "../VectorIndex.h" #include "CommonUtils.h" #include "QueryResultSet.h" #include "WorkSpace...
DRB110-ordered-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...
rose_plusAssign.c
#include "omp.h" int main(int argc,char *argv[]) { int i; int j; double a[20][20]; // memset(a,0,(sizeof(a))); for (i = 0; i <= 18; i += 1) { #pragma omp parallel for private (j) for (j = 0; j <= 19; j += 1) { a[i][j] += a[i + 1][j]; } } return 0; }
GB_unop__lnot_uint16_uint16.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_binop__gt_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:...
ScatterHelper.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
raycaster.h
#ifndef INTEGRATORS_RAYCASTER_H #define INTEGRATORS_RAYCASTER_H #ifndef DEBUG #include <omp.h> #endif #include "integrator.h" #include "regular_pixel_sampler.h" #include "timer.h" /* * The RayCaster class template implements a common interface for all ray casters. It assumes that all ray * casters shoot only one r...
matrix_multiplication.c
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<omp.h> void* init_matriz (int rows, int cols) { return malloc (sizeof (float[rows][cols])); } void* read_matriz (FILE *fr, int *n_row, int *n_col) { fscanf(fr, "%d", n_row); fscanf(fr, "%d", n_col); int rows = *n_row; int cols = *n_col; flo...
Grid.c
/* Grid.c */ /********************************************************************************************************** Copyright (c) 2002-2013 Abdul-Rahman Allouche. All rights reserved Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (t...
IO.h
// This code is part of the project "Ligra: A Lightweight Graph Processing // Framework for Shared Memory", presented at Principles and Practice of // Parallel Programming, 2013. // Copyright (c) 2013 Julian Shun and Guy Blelloch // // Permission is hereby granted, free of charge, to any person obtaining a // copy of t...
rmse.c
/*************************************************************************/ /** File: rmse.c **/ /** Description: calculate root mean squared error of particular **/ /** clustering. **/ /** Author: Sang-Ha Lee **/ /** University of Virginia. **/ /** ...
attribute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
progressbar.h
// The MIT License (MIT) // // Copyright (c) 2019 Luigi Pertoldi // // 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, ...
exemplo_section.c
#include "exemplos.h" // Exemplo Section void times_table(int n) { int i, i_times_n, thread_id; thread_id = omp_get_thread_num(); for (i = 1; i <= n; ++i) { i_times_n = i * n; printf("Thread %d says %d times %d equals %d.\n", thread_id, i, n, i_times_n); sleep(1)...
pooling.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...
bwBench-likwid.c
/* * ======================================================================================= * * Author: Jan Eitzinger (je), jan.eitzinger@fau.de * Copyright (c) 2020 RRZE, University Erlangen-Nuremberg * * Permission is hereby granted, free of charge, to any person obtaining a copy * of th...
CrossValidationMMD.h
/* * Copyright (c) The Shogun Machine Learning Toolbox * Written (w) 2016 - 2017 Soumyajit De * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must ret...
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 // //===---------------------------...
box3d2r.c
#define BENCH_DIM 3 #define BENCH_FPP 249 #define BENCH_RAD 2 #include "common.h" double kernel_stencil(SB_TYPE *A1, int compsize, int timestep, bool scop) { double start_time = sb_time(), end_time = 0.0; int dimsize = compsize + BENCH_RAD * 2; SB_TYPE (*A)[dimsize][dimsize][dimsize] = (SB_TYPE (*)[dimsize]...
log_helper_sockclient.c
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <sys/time.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <netdb.h> #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> //=======================local log helper // Location of timetamp...
reduction.c
#include <stdio.h> #include <omp.h> int main() { int arr[] = {1, 2, 3, 4, 5, 6}; int sum = 0; #pragma omp parallel for shared(arr) // shared is not required { for (int i = 0; i < 6; i++) { sum += arr[i]; // May produce a wrong result } } printf("%d\n", sum); ...
fdtd_data.h
// vim: tabstop=3: ai /////////////////////////////////////////////////////////////////////////////// // This file is a part of PFFDTD. // // PFFTD is released under the MIT License. // For details see the LICENSE file. // // Copyright 2021 Brian Hamilton. // // File name: fdtd_data.h // // Description: Header-only fun...
GB_unop__identity_uint64_fp32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
LAGraph_tricount.c
//------------------------------------------------------------------------------ // LAGraph_tricount: count the number of triangles in a graph //------------------------------------------------------------------------------ /* LAGraph: graph algorithms based on GraphBLAS Copyright 2020 LAGraph Contributors. ...
par_interp.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
keyring_fmt_plug.c
/* GNOME Keyring cracker patch for JtR. Hacked together during Monsoon 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 the following terms: * Redistribution and use in s...
GB_bitmap_assign_M_row_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_M_row_template: traverse M for GB_ROW_ASSIGN //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Lic...
diagsm_x_csr_n_row.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #include <memory.h> alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_CSR *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { ALPHA_Number dia...
conv_kernel_fp16_arm82.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); ...
GB_unop__ceil_fc32_fc32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
8.norace4.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define M 200 #define N 200 double sum = 0.0; #pragma omp threadprivate(sum) int main() { double A[M], B[M][N], C[N]; #pragma omp parallel for for (int i = 0; i < M; i++) { for (int j = 0; j < N; j++) { sum += B[i][j] * C[j]; ...
GB_unaryop__identity_bool_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
ids.c
#include "globals.h" /* Set IDs with spacing so an ID domain decomposition is more balanced */ void Make_IDs() { printf ( "Make IDs ..." ); fflush ( stdout ); #pragma omp parallel for for ( int ipart = Param.Npart; ipart < Param.Npart; ipart++ ) { P[ipart].ID = ipart + 1; } size_t de...
GB_unaryop__abs_int8_uint16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
GB_binop__times_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX...
lis_matrix_crs.c
/* Copyright (C) 2002-2012 The SSI Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of condition...
hello_world.c
#include <stdlib.h> #include <stdio.h> #include "omp.h" int main() { #pragma omp parallel { int ID = omp_get_thread_num(); printf("Hello the current thread id is (%d)\n", ID); } }
triad.c
/******************************************************************************* * Copyright 2021 UChicago Argonne, LLC. * (c.f. AUTHORS, LICENSE) * * This file is part of the NRM Benchmarks project. * For more info, see https://github.com/anlsys/nrm-benchmarks * * SPDX-License-Identifier: BSD-3-Clause ********...
opencl_gpg_fmt_plug.c
/* * Modified by Dhiru Kholia <dhiru at openwall.com> for GPG format. * * 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 per...
openmp_selection_sort.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #define NUM_THREADS 4 struct min_info { int val; int index; }; #pragma omp declare reduction(minimum : struct min_info : omp_out = omp_in.val < omp_out.val ? omp_in : omp_out) \ initializer(omp_priv = omp_orig) int main(int argc, char *argv[]) { i...
Task1.h
#pragma once #include <iostream> #include <omp.h> #include <vector> typedef std::vector<std::vector<double> > matrix; double matrices_multiplication(int n, bool is_parallel = false) { double start, end; std::vector<double> row(n, 0.0); matrix a(n, row), b(n, row), c(n, row); start = omp_get_wtime(); ...
alignment.ref.c
#include <sys/time.h> #include <time.h> #include <stdio.h> static unsigned long long current_time_ns() { #ifdef __MACH__ clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), c...
private.c
// OpenMP Private Example // Inclusions #include <omp.h> #include <stdio.h> #include <stdlib.h> // Main int main( int argc, char** argv ) { int thread = 0; // Thread Number int num = 3; // Number printf( "Master Thread\n Num Value = %d\n", num ); printf( "Parallel Region\n" ); #pragma omp paralle...
Example_array_sections.2.c
/* * @@name: array_sections.2c * @@type: C * @@compilable: no * @@linkable: no * @@expect: failure * @@version: omp_4.0 */ void foo () { int A[30], *p; #pragma omp target data map( A[0:4] ) { p = &A[0]; /* invalid because p[3] and A[3] are the same * location on the host but the array section * specifi...
GB_unop__identity_uint16_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...
6964.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...
composite.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
colormap.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
task-taskgroup-unrelated.c
/* * task-taskgroup-unrelated.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-ex...
IcgThreshold2.c
// Copyright (C) 2016 Gernot Riegler // Institute for Computer Graphics and Vision (ICG) // Graz University of Technology (TU GRAZ) // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // 1. Redistributions of source code m...
a.33.3.c
/* { dg-do compile } */ #include <stdio.h> #include <stdlib.h> #include <omp.h> omp_lock_t * new_lock () { omp_lock_t *lock_ptr; #pragma omp single copyprivate(lock_ptr) { lock_ptr = (omp_lock_t *) malloc (sizeof (omp_lock_t)); omp_init_lock (lock_ptr); } return lock_ptr; }
omp_for_schedule_auto.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdlib.h> #include <math.h> #include "omp_testsuite.h" int sum1; #pragma omp threadprivate(sum1) int test_omp_for_auto() { int j; int sum; int sum0; int known_sum; int threadsnum; sum = 0; sum0 = 12345; // array which keeps track of which ...
ztrsm.c
#include "blas.h" #include "error.h" #include <stdio.h> #include "handle.h" #include "config.h" #include "ztrsm.fatbin.c" static inline size_t min(size_t a, size_t b) { return (a < b) ? a : b; } static inline size_t max(size_t a, size_t b) { return (a > b) ? a : b; } static inline CUresult cuMemcpyHtoD2DAsync(CUdevic...
tinyexr.h
/* Copyright (c) 2014 - 2015, 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...
GB_subassign_10_and_18.c
//------------------------------------------------------------------------------ // GB_subassign_10_and_18: C(I,J)<M or !M,repl> = A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License...
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 <s...
syr2k.pp-dst.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)) /** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <po...
PersistenceCurve.h
/// \ingroup base /// \class ttk::PersistenceCurve /// \author Guillaume Favelier <guillaume.favelier@lip6.fr> /// \author Julien Tierny <julien.tierny@lip6.fr> /// \date September 2016. /// /// \brief TTK processing package for the computation of persistence curves. /// /// This package computes the list of extremum-s...
work_bench.c
/* * Copyright (c) 2014 ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group. */ #include <string.h> #includ...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
ten_tusscher_2004_epi_S1_10.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S1_10.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...
kernel_parallel.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
with_openmp.c
/** * Example C code for demonstrating the use of OpenMP in user code * to interface into a simple linear algebra library. * * This example illustrates how a possible library interface * with support for different threading methodologies can look like. * In particular, 'mylib' is not restricted to either * pthread, C++...