source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_dense_subassign_06d_template.c
//------------------------------------------------------------------------------ // GB_dense_subassign_06d_template: C<A> = A where C is dense or bitmap //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SP...
task_memory.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7 #define USE_PRIVATE_TOOL 1 #include "callback.h" #include <omp.h> int main() { int x; #pragma omp parallel num_threads(2) { #pragma omp master { #pragma omp task { x++; } #pragma omp task firstpriv...
wand-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % W W AAA N N DDDD ...
timing.c
#include <stdlib.h> #include <stdio.h> #include <errno.h> #include <time.h> #include <sys/time.h> #include <assert.h> #include "timing.h" #ifndef POLYBENCH_CACHE_SIZE_KB # define POLYBENCH_CACHE_SIZE_KB 16384 #endif /** * Always clear the L1/L2/L3 caches before running a benchmark * Imported from Polybench 2.0...
kmp_sch_simd_runtime_api.c
// RUN: %libomp-compile-and-run // The test checks schedule(simd:runtime) // in combination with omp_set_schedule() #include <stdio.h> #include <stdlib.h> #include <omp.h> #if defined(WIN32) || defined(_WIN32) #include <windows.h> #define delay() Sleep(1); #define seten(a,b,c) _putenv_s((a),(b)) #else #include <unist...
allAlgos.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <omp.h> #include <math.h> #define INF 99999 #define min(X, Y) (((X) < (Y)) ? (X) : (Y)) //HELPER FUNCTIONS void printdistances(int **dist, int n) { printf("\nShortest distances between vertices\n"); for(int i = 0; i<n; i++) { for(int j=0; j<...
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 // //===---------------------------...
pr60823-3.c
/* PR tree-optimization/60823 */ /* { dg-do compile } */ /* { dg-options "-O2 -fopenmp-simd -fno-strict-aliasing" } */ void bar (char *, double *); #if __SIZEOF_DOUBLE__ >= 4 struct S { char c[sizeof (double)]; }; void baz (struct S, struct S); union U { struct S s; double d; }; #pragma omp declare simd simdlen(4) ...
image-view.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % IIIII M M AAA GGGG EEEEE ...
simple_map.c
#include <stdio.h> #define N 10 #define M 5 void init(int* array, int size, int scale) { for (int i = 0; i < size; i++) array[i] = i*scale; } int main() { int tab[N][M]; /* The schedule(static, 1) enforces each iteration to be executed in a different thread, whatever the number of CPU is: */ #pragma o...
TriSolve.h
void TriSolve_forward(double *X, const double *A, const double *b, const double *C, const double *d, int n){ double *B = new double[n]; double *D = new double[n]; memcpy(B, b, sizeof(double)*n); memcpy(D, d, sizeof(double)*n); #pragma omp parallel for for (int i=1;i<n;i++){ double w...
WjCryptLib_AesCtr.c
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // WjCryptLib_AesCtr // // Implementation of AES CTR stream cipher. // // Depends on: CryptoLib_Aes // // AES CTR is a stream cipher using the AES block cipher in counter mode. // This implement...
omp_single_private.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" int myit = 0; #pragma omp threadprivate(myit) int myresult = 0; #pragma omp threadprivate(myresult) int test_omp_single_private() { int nr_threads_in_single; int result; int nr_iterations; int i; myit = 0; nr_threads_in_single ...
softmax-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
trsm_c_sky_u_lo_row_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy) { ALPHA_INT num_thread = alpha_get_thread_num(); #ifdef _OPEN...
kmp_aligned_malloc.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <stdint.h> #include <omp.h> #include "omp_testsuite.h" int alignments[] = {64, 128, 256, 512, 1024, 2048, 4096}; unsigned aligned_by(uint64_t addr) { uint64_t alignment = 1; while((addr & (alignment-1)) == 0) { alignment <<= 1; } retu...
LookupTable.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "generic/LookupTable.c" #else static void nn_(LookupTable_resetCount)(int *count_data, THLongTensor *input) { int i; long *input_data = THLongTensor_data(input); long numel = THLongTensor_nElement(input); for (i = 0; i<numel; i++) { long k = input_data[i] ...
parallel_for_ordered.c
#include <stdio.h> #include <math.h> #include "omp_testsuite.h" static int last_i = 0; /*! Utility function: returns true if the passed argument is larger than the argument of the last call of this function. */ static int check_i_islarger2 (int i) { int islarger; islarger = (i > last_i); last_i = i; r...
libomp_interface.h
// This file does not contain any code; it just contains additional text and formatting // for doxygen. //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Il...
trmm_x_sky_u_hi_col.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.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 ldy) { ALPHA_INT...
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 //RECO...
3d25pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted fr...
omp_point_product.c
#include <omp.h> #include <stdio.h> #define N 100000 main () { int i,tid,NTHR; float a[N],b[N],c[N]; float sum = 0; /* Some initializations */ for (i=0; i < N; i++) a[i] = b[i] = i * 1.0; double start = omp_get_wtime(); omp_set_dynamic(0); omp_set_num_threads(4)...
nested.c
// RUN: %libomp-compile-and-run | FileCheck %s // RUN: %libomp-compile-and-run | %sort-threads | FileCheck --check-prefix=THREADS %s // REQUIRES: ompt // UNSUPPORTED: gcc-4, gcc-5, gcc-6, gcc-7, gcc-8 #define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN #include "callback.h" #include <omp.h> #include <unistd.h> int main() {...
GB_unaryop__lnot_int8_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...
GB_unaryop__ainv_int16_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...
Searching.202008062049.computation_quota.profile.h
// // Created by Zhen Peng on 8/6/2020. // #ifndef BATCH_SEARCHING_SEARCHING_H #define BATCH_SEARCHING_SEARCHING_H #include <vector> #include <boost/dynamic_bitset.hpp> //#include <boost/sort/sort.hpp> #include <iostream> #include <fstream> #include <unordered_map> #include <immintrin.h> #include <cstring> #include <...
StreamTriad_par7.c
#include <stdio.h> #include <stdlib.h> #include <time.h> #include "timer.h" int main(int argc, char *argv[]){ int nsize = 20000000, ntimes=16; double a[nsize], b[nsize], c[nsize]; #pragma omp target enter data map(alloc:a[0:nsize], b[0:nsize], c[0:nsize]) struct timespec tstart; // initializing data and...
facedetectcnn.h
/* By downloading, copying, installing or using the software you agree to this license. If you do not agree to this license, do not download, install, copy or use the software. License Agreement For libfacedetection (3-clause BSD License) Copyright (c) 2018-2020, Shiqi Yu, all ...
_eval.c
/* Generated by Cython 0.23.1 */ #define PY_SSIZE_T_CLEAN #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000) #error Cython ...
GB_binop__lt_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...
ast-dump-openmp-taskloop.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_one(int x) { #pragma omp taskloop for (int i = 0; i < x; i++) ; } void test_two(int x, int y) { #pragma omp taskloop for (int i = 0; i < x; i++) f...
updateSwap.c
int main() { int A = 10; int B; B = A; B = B + A; /* * Testing no-swap for shared update. */ int C = 10; int D; D = C; int X = D; #pragma omp parallel { #pragma omp atomic D = D + 1; } /* * Testing swap for private update. */ int Y = 10; int Z; Z = Y; #pragma omp parallel { int C1 = 10; in...
if-3.c
/* { dg-do compile } */ /* { dg-additional-options "-O2" } */ #define N 1024 void foo (int *x, int *y, int *z, int a) { int i; #pragma omp simd if (simd: a > 2) aligned (x, y, z : 16) for (i = 0; i < N; i++) x[i] = y[i] + z[i]; }
hist_util.h
/*! * Copyright 2017-2020 by Contributors * \file hist_util.h * \brief Utility for fast histogram aggregation * \author Philip Cho, Tianqi Chen */ #ifndef XGBOOST_COMMON_HIST_UTIL_H_ #define XGBOOST_COMMON_HIST_UTIL_H_ #include <xgboost/data.h> #include <xgboost/generic_parameters.h> #include <limits> #include <v...
GB_binop__isle_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
GB_unaryop__ainv_uint16_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
pardiso_solver.h
#pragma once #ifndef OPTIMIZATION_LIB_PARDISO_SOLVER_H #define OPTIMIZATION_LIB_PARDISO_SOLVER_H // Eigen includes #include <Eigen/Core> #include <Eigen/Sparse> // MKL includes #include "mkl.h" #include "mkl_types.h" #include "mkl_pardiso.h" // Optimization lib includes #include "./solver.h" // https://software.int...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
integral.c
#include <math.h> float IntegrateMyFunction(int const n, float const a, float const b) { // Running sum of the integral float I = 0.0f; // Integration interval float const dx = (b-a)/float(n); // Loop through the integration range #pragma omp parallel for for (int i = 0; i < n; i++) { // Midpoin...
commondraw.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__identity_uint16_int32.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...
expected_output.c
#include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> #include <polybench.h> #include "doitgen.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 */ /*...
hypre_memory.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) **************************************...
fixed_version.c
#include <stdio.h> int main(){ int T[5]; int sum = 0; // initializing array T for (int i = 0; i < 10; i ++) { T[i] = i; } // running the loop 10 times using openmp #pragma omp parallel for shared (sum) private(T) reduction (+ : sum) for ( int i = 0; i < 10; i ++) { // assign value for el...
functions.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include "functions.h" //compute a*b mod p safely unsigned int modprod(unsigned int a, unsigned int b, unsigned int p) { unsigned int za = a; unsigned int ab = 0; while (b > 0) { if (b%2 == 1) ab = (ab + za) % p; za = (2 * za...
filter.c
#ifndef _FILTER_ #define _FILTER_ #include "Parameter_files/INIT_PARAMS.H" /* Function FILTER filters the k-space box, <box>, using filter type <filter_type> on a characteristic comoving scale <R> (in Mpc), where: 0 = top-hat real space filter 1 = top-hat k-space filter 2 = gaussian Relavant box paramete...
DRB015-outofbounds-var-yes.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s /* 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@lln...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
NQueensParallel.c
/** * Author: https://www.dreamincode.net/forums/topic/336580-recursive-algorithm-for-n-queens-problem/ */ #include <stdio.h> #include <stdlib.h> #include <omp.h> unsigned int solutions; void setQueen(int queens[], int row, int col, int size) { //check all previously placed rows for attacks for(int i = 0; ...
mea_pb_traco.c
#include <stdio.h> #include <stdlib.h> #include <limits.h> #include <omp.h> #include <math.h> #define min(a,b) (((a)<(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b)) #define max(a,b) (((a)>(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) #define floord(n,d) floor(((double)(n))/((double)(d))) #define ceild(n,d) ce...
amdgcn-openmp-device-math-complex.c
// RUN: %clang_cc1 -internal-isystem %S/Inputs/include -x c -fopenmp -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm-bc %s -o %t-host.bc // RUN: %clang_cc1 -internal-isystem %S/../../lib/Headers/openmp_wrappers -include __clang_openmp_device_functions.h -internal-isystem %S/../../lib/Header...
embedded_skin_utility.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Ruben Zorrilla // #if !define...
resize.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__sinh_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...
watchpoint_support.c
// // WatchPointDriver.cpp // // // Created by Milind Chabbi on 2/21/17. // // #if !defined(_GNU_SOURCE) #define _GNU_SOURCE #endif #include <asm/unistd.h> #include <errno.h> #include <fcntl.h> #include <linux/hw_breakpoint.h> #include <linux/perf_event.h> #include <linux/kernel.h> #include <signal.h> #include <stdl...
fitness6.h
/* * Modification of ff4. This is multiplicative between the genes, but * takes a mean of the anterior and posterior scores. */ #ifndef __FITNESS_FUNCTION__ #define __FITNESS_FUNCTION__ #include <set> #include <array> using namespace std; /*! * When working with states in a graph of nodes, it may be necessary ...
correctness-checking-partitioned-impl.c
/* Copyright 2021 Tim Jammer Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software d...
BF_std.c
/* * This file is part of John the Ripper password cracker, * Copyright (c) 1996-2001,2008,2010,2011 by Solar Designer * * Redistribution and use in source and binary forms, with or without * modification, are permitted. * * There's ABSOLUTELY NO WARRANTY, express or implied. * * A public domain version of thi...
GB_binop__times_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
hello-omp.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> int main (int argc, char *argv[]) { int nthreads, tid; /* Fork a team of threads giving them their own copies of variables */ #pragma omp parallel private(nthreads, tid) { /* Obtain thread number */ tid = omp_get_thread_num(); printf("Hello World from threa...
util.h
#pragma once #include<vector> #include<iostream> #include<sstream> #include<exception> #include<cmath> #include<fstream> #include<cstring> #include<unordered_set> #include<unordered_map> #include<limits> using std::vector; using std::cerr; using std::endl; using std::stringstream; using std::exception; using std::st...
GB_unaryop__ainv_fp32_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
3d7pt.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) ...
tree.h
#ifndef LIGHTGBM_TREE_H_ #define LIGHTGBM_TREE_H_ #include <LightGBM/meta.h> #include <LightGBM/dataset.h> #include <string> #include <vector> #include <memory> #include <map> namespace LightGBM { #define kCategoricalMask (1) #define kDefaultLeftMask (2) /*! * \brief Tree model */ class Tree { public: /*! * \...
3d7pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
9.norace2.c
// RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s #include <omp.h> #define N 100 int main() { int sum = 0; #pragma omp single for (int i = 0; i < N; i++) { sum += i; } sum = sum / N; return sum; } // We do not support inter SCoP data races for now // CHECK: Region is Data Race Free. // END
pyfr_gemm_cm.c
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
target.c
// RUN: %libomptarget-compile-generic -fopenmp-extensions // RUN: %libomptarget-run-generic | %fcheck-generic -strict-whitespace #include <omp.h> #include <stdio.h> #define CHECK_PRESENCE(Var1, Var2, Var3) \ printf(" presence of %s, %s, %s: %d, %d, %d\n", ...
search_sequences.c
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdlib.h> #include <stdio.h> #include <string.h> #include <getopt.h> #include <libgen.h> #include <omp.h> #include "tldevel.h" #include "tlmisc.h" #include "tllogsum.h" #include "tlrng.h" #include "tlseqio.h" #include "tlalphabet.h" #include "tlseqbuffer.h" #...
globalsums.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <omp.h> #include "timer.h" #define ORDERS_OF_MAGNITUDE 1.0e9; double PairwiseSumByTask(double* restrict var, long ncells); int main(int argc, char **argv) { #pragma omp parallel if (omp_get_thread_num() == 0) printf("\n Running with %d thread(s)\n...
gemm.c
/** * gemm.c: This file was adapted from PolyBench/GPU 1.0 test suite * to run on GPU with OpenMP 4.0 pragmas and OpenCL driver. * * http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU * * Contacts: Marcio M Pereira <mpereira@ic.unicamp.br> * Rafael Cardoso F Sousa <rafael.cardoso@students.ic...
md2_fmt_plug.c
/* MD2 cracker patch for JtR. Hacked together during May of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and * it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary form...
matrix_op-inl.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
2.hello.c
#include <stdio.h> #include <omp.h> /* If the OMP_NUM_THREADS variable is set to 8 with */ /* export OMP_NUM_THREADS=8 */ /* Q1: Is the execution of the program correct? Add a */ /* data sharing clause to make it correct */ /* Q2: Are the lines always printed in the same...
5229.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 <...
matrix.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
firstPrivateArray.c
/* Array typed firstprivate variables: element-by-element copy. Contributed by Pranav Tendulkar pranav@ics.forth.gr 4/12/2010 */ #include <stdio.h> #include <stdlib.h> #include <assert.h> int array[100]; int main() { // Sara 5/13/2013 // Initialize all positions for run-time check int i; for(i=0;i<100;i++)...
displacement_lagrangemultiplier_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
pure_convection_edgebased.h
/* ============================================================================== KratosPFEMApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi pooyan@cimne.upc.edu rrossi@cim...
Huuugefile.c
1 #include <stdio.h>2 #include <stdlib.h>3 #include <string.h>4 #include <time.h>5 voidMerge(int*a1,intn1,int*a2,intn2,int*r)6 {inti1,i2,i;7 for(i1=0,i2=0,i=0;i1<n1&&i2<n2;)8 if(a1[i1]<a2[i2])9 r[i++]=a1[i1++];10 else11 r[i++]=a2[i2++];12 while(i1<n1)r[i++]=a1[i1++];13 while(i2<n2)r[i++]=a2[i2++...
pprefix.c
#include "omp.h" #include <math.h> #include <stdio.h> #include <stdbool.h> #include <stdlib.h> #include "pprefix.h" typedef struct index_t_container { index_t data; } data_t; typedef void* generic_p; #define SIZE 10000000 index_t *prefix_sum(index_t *x, index_t n) { //prefix sum happens _in place_. make sure no...
MatrixMultiplication.c
#include<omp.h> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<time.h> typedef double ttype; #define rand 1111 ttype tdiff(struct timespec a, struct timespec b) { ttype dt = (( b.tv_sec - a.tv_sec ) + ( b.tv_nsec - a.tv_nsec ) / 1E9); //Finding the time difference (cop...
FriendAlignFinder.h
/////////////////////////////////////////////////////////////////////////////// // SOFTWARE COPYRIGHT NOTICE AGREEMENT // // This software and its documentation are copyright (2012) by the // // Broad Institute. All rights are reserved. This software is supplied // ...
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
devito_prob1.c
#include "omp.h" #include <stdio.h> int main(int argc, char* argv[]) { int t_size = 1; int x_size = 4; int y_size = 4; int z_size = 4; int time_m = 0, time_M = t_size - 1; int x_m = 0, x_M = x_size - 1; int y_m = 0, y_M = y_size - 1; int z_m = 0, z_M = z_size - 1; int *u_vec2 = (int*) malloc(sizeof...
convolution_sgemm_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
attribute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
mergesort.c
#include "stdio.h" #include <omp.h> void merge(int a[], int l, int m, int r){ int temp1[m - l +1], temp2[r - m]; for(int i = 0; i < (m-l+1); i++){ temp1[i] = a[l + i]; } for(int i = 0; i < (r-m); i++){ temp2[i] = a[m + i +1]; } int i = 0, j = 0, k = l; while(i < (m-l+1) && j...
nvptx_device_math_sin.c
// REQUIRES: nvptx-registered-target // RUN: %clang_cc1 -x c -internal-isystem %S/Inputs/include -fopenmp -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -x c -include __clang_openmp_device_functions.h -internal-isystem %S/../../lib/Headers/...
GB_binop__ge_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-...
ark_heat1D_adapt_ompdev.c
/*--------------------------------------------------------------- * Programmer(s): Shelby Lockhart @ LLNL *--------------------------------------------------------------- * Based on the serial code ark_heat1D_adapt.c developed * by Daniel R. Reynolds and parallelized with OpenMP 4.5 *------------------------------...
rose_slowInput_47.c
#include "omp.h" typedef double real8; /************************************************************************ * Function : StressZero * * Purpose : ************************************************************************/ void StressZero(real8 *newSxx,real8 *newSyy,real8 *newSzz,real8 *newTxy,real8 *newTx...
convolution_3x3_pack8_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a ...
data.h
/*! * Copyright (c) 2015 by Contributors * \file data.h * \brief The input data structure of xgboost. * \author Tianqi Chen */ #ifndef XGBOOST_DATA_H_ #define XGBOOST_DATA_H_ #include <dmlc/base.h> #include <dmlc/data.h> #include <dmlc/serializer.h> #include <rabit/rabit.h> #include <xgboost/base.h> #include <xgb...
transform.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
phocount.c
/* * Copyright (c) 2014, Brookhaven Science Associates, Brookhaven * National Laboratory. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are perm...
GB_binop__bclr_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-...
GB_select_phase1.c
//------------------------------------------------------------------------------ // GB_select_phase1: count entries in each vector for C=select(A,thunk) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SP...
pfmg_setup_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...