source
stringlengths
3
92
original_c
stringlengths
26
2.25M
no_omp_formatted
stringlengths
0
2.25M
omp_formatted
stringlengths
0
2.25M
GB_unop__minv_int64_int64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
DRB026-targetparallelfor-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...
/* * Race condition due to anti-dependence within a loop offloaded to * accelerators. Data race pair: a[i]@64:5 vs. a[i+1]@64:10 */ #include "omprace.h" #include <omp.h> int main(int argc, char *argv[]) { omprace_init(); int i; int len = 1000; int a[1000]; for (i = 0; i < len; i++) a...
/* * Race condition due to anti-dependence within a loop offloaded to * accelerators. Data race pair: a[i]@64:5 vs. a[i+1]@64:10 */ #include "omprace.h" #include <omp.h> int main(int argc, char *argv[]) { omprace_init(); int i; int len = 1000; int a[1000]; for (i = 0; i < len; i++) a...
clantr.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/zlantr.c, normal z -> c, Fri Sep 28 17:38:08 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/zlantr.c, normal z -> c, Fri Sep 28 17:38:08 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/compute/zlantr.c, normal z -> c, Fri Sep 28 17:38:08 2018 * **/ #include "plasma.h" #include "plasma_async.h" #inc...
GB_unaryop__lnot_fp32_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...
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
mysql_fmt_plug.c
/* MYSQL_half_fmt.c * * Copyright (c) 2008 by <earthquake at rycon.hu> * * John the ripper MYSQL-fast module * * * Note: The mysql hash's first 8byte is relevant, * the another ones depends on the first 8. Maybe * the passwords after 9-10character have collision * in the first 8byte, so we have to check the f...
#if FMT_EXTERNS_H extern struct fmt_main fmt_MYSQL_fast; #elif FMT_REGISTERS_H john_register_one(&fmt_MYSQL_fast); #else #include <stdio.h> #include <stdlib.h> #include <string.h> #if !FAST_FORMATS_OMP #undef _OPENMP #endif #include "arch.h" #include "misc.h" #include "common.h" #include "formats.h" #include "memd...
#if FMT_EXTERNS_H extern struct fmt_main fmt_MYSQL_fast; #elif FMT_REGISTERS_H john_register_one(&fmt_MYSQL_fast); #else #include <stdio.h> #include <stdlib.h> #include <string.h> #if !FAST_FORMATS_OMP #undef _OPENMP #endif #ifdef _OPENMP #include <omp.h> #ifdef __MIC__ #ifndef OMP_SCALE #define OMP_SCALE 2048 #...
util.c
#include <mpi.h> #include "precision.h" #include "util.h" /* Use the modified Gram-Schmidt process to compute (in place) the portion of * the n-dimensional vector v orthogonal to each of the nv vectors s. The * projection * of the vector onto each of the basis vectors is stored in the * length-nv array c. This is...
#include <mpi.h> #include "precision.h" #include "util.h" /* * Use the modified Gram-Schmidt process to compute (in place) the portion of * the n-dimensional vector v orthogonal to each of the nv vectors s. The * projection * of the vector onto each of the basis vectors is stored in the * length-nv array c. This...
#include <mpi.h> #include "precision.h" #include "util.h" /* * Use the modified Gram-Schmidt process to compute (in place) the portion of * the n-dimensional vector v orthogonal to each of the nv vectors s. The * projection * of the vector onto each of the basis vectors is stored in the * length-nv array c. This...
distort.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
/* * Include declarations. */ #include "magick/studio.h" #include "magick/artifact.h" #include "magick/cache.h" #include "magick/cache-view.h" #include "magick/channel.h" #include "magick/color-private.h" #include "magick/colorspace.h" #include "magick/colorspace-private.h" #include "magick/composite-private.h" #i...
/* * Include declarations. */ #include "magick/studio.h" #include "magick/artifact.h" #include "magick/cache.h" #include "magick/cache-view.h" #include "magick/channel.h" #include "magick/color-private.h" #include "magick/colorspace.h" #include "magick/colorspace-private.h" #include "magick/composite-private.h" #i...
valid.res7.src.h
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_256_14_14_128_3_3.h" #include "gen_ukr_A4B2gemm_1_256_14_14_128_3_3.h" void testrun(float* A ,float*B, float*C, float*oriB ){ int tid = omp_get_thread_num(); int Nx = 14; int Ny = 14; int Nh = 3; long long...
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_256_14_14_128_3_3.h" #include "gen_ukr_A4B2gemm_1_256_14_14_128_3_3.h" void testrun(float* A ,float*B, float*C, float*oriB ){ int tid = omp_get_thread_num(); int Nx = 14; int Ny = 14; int Nh = 3; long long...
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_256_14_14_128_3_3.h" #include "gen_ukr_A4B2gemm_1_256_14_14_128_3_3.h" void testrun(float* A ,float*B, float*C, float*oriB ){ int tid = omp_get_thread_num(); int Nx = 14; int Ny = 14; int Nh = 3; long long...
c-parser.c
/* Parser for C and Objective-C. Copyright (C) 1987-2020 Free Software Foundation, Inc. Parser actions based on the old Bison parser; structure somewhat influenced by and fragments based on the C++ parser. This file is part of GCC. GCC is free software; you can redistribute it and/or modify it under the ter...
/* TODO: Make sure all relevant comments, and all relevant code from all actions, brought over from old parser. Verify exact correspondence of syntax accepted. Add testcases covering every input symbol in every state in old and new parsers. Include full syntax for GNU C, including erroneous case...
/* TODO: Make sure all relevant comments, and all relevant code from all actions, brought over from old parser. Verify exact correspondence of syntax accepted. Add testcases covering every input symbol in every state in old and new parsers. Include full syntax for GNU C, including erroneous case...
vmath.h
#ifndef VMATH #define VMATH #include <vector> #include <stdexcept> #include <algorithm> namespace vec { struct DefaultOperators { struct Sum { template <class T> inline T operator()(const T &a, const T &b) const noexcept { return a + b; } }; struct Rem { template <class T> inline T oper...
#ifndef VMATH #define VMATH #include <vector> #include <stdexcept> #include <algorithm> namespace vec { struct DefaultOperators { struct Sum { template < class T > inline T operator() (const T & a, const T & b)const noexcept { return a + b; ...
#ifndef VMATH #define VMATH #include <vector> #include <stdexcept> #include <algorithm> namespace vec { struct DefaultOperators { struct Sum { template < class T > inline T operator() (const T & a, const T & b)const noexcept { return a + b; ...
trans2d.c
/*Daala video codec Copyright (c) 2013 Daala project contributors. 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 o...
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdlib.h> #include "od_defs.h" #include "od_filter.h" #include "trans_tools.h" #include "int_search.h" #include "kiss99.h" #define USE_FILES (0) #define USE_AR95 (1) #define USE_SUBSET1 (0) #define USE_SUBSET3 (0) #define PRINT_COV (0) #define CG_SE...
#ifdef HAVE_CONFIG_H #include "config.h" #endif #include <stdlib.h> #include "od_defs.h" #include "od_filter.h" #include "trans_tools.h" #include "int_search.h" #include "kiss99.h" #define USE_FILES (0) #define USE_AR95 (1) #define USE_SUBSET1 (0) #define USE_SUBSET3 (0) #define PRINT_COV (0) #define CG_SE...
GB_binop__min_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
GB_binop__ge_bool.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: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
GB_is_diagonal.c
//------------------------------------------------------------------------------ // GB_is_diagonal: check if A is a diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com ...
//------------------------------------------------------------------------------ // GB_is_diagonal: check if A is a diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com ...
//------------------------------------------------------------------------------ // GB_is_diagonal: check if A is a diagonal matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com ...
ten_tusscher_2004_epi_S3_20.c
//Original Ten Tusscher #include <assert.h> #include <stdlib.h> #include "ten_tusscher_2004_epi_S3_20.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...
#include<stdio.h> #include<omp.h> static long num_steps = 100000; double step; int main() { int i; double x, sum = 0.0, pi; double init_time, finish_time; //double x, sum = 0.0; step = 1.0 / (double)num_steps; init_time = omp_get_wtime(); int start, end, id_thread; id_thread = omp_get...
#include<stdio.h> #include<omp.h> static long num_steps = 100000; double step; int main() { int i; double x, sum = 0.0, pi; double init_time, finish_time; //double x, sum = 0.0; step = 1.0 / (double)num_steps; init_time = omp_get_wtime(); #pragma omp parallel { int start, end, id_...
utility_ops.h
#ifndef CAFFE2_OPERATORS_UTILITY_OPS_H_ #define CAFFE2_OPERATORS_UTILITY_OPS_H_ #include <fstream> #include <sstream> #include "caffe2/core/context.h" #include "caffe2/core/logging.h" #include "caffe2/core/operator.h" #include "caffe2/utils/math.h" namespace caffe2 { const char kPrintFileExtension[] = ".log"; temp...
#ifndef CAFFE2_OPERATORS_UTILITY_OPS_H_ #define CAFFE2_OPERATORS_UTILITY_OPS_H_ #include <fstream> #include <sstream> #include "caffe2/core/context.h" #include "caffe2/core/logging.h" #include "caffe2/core/operator.h" #include "caffe2/utils/math.h" namespace caffe2 { const char kPrintFileExtension[] = ".log"; temp...
#ifndef CAFFE2_OPERATORS_UTILITY_OPS_H_ #define CAFFE2_OPERATORS_UTILITY_OPS_H_ #include <fstream> #include <sstream> #include "caffe2/core/context.h" #include "caffe2/core/logging.h" #include "caffe2/core/operator.h" #include "caffe2/utils/math.h" namespace caffe2 { const char kPrintFileExtension[] = ".log"; temp...
lib.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <float.h> #include <omp.h> double calculate_euclidean_distance(double *atom_i, double *atom_j) { return sqrt(pow(atom_i[0] - atom_j[0], 2) + pow(atom_i[1] - atom_j[1], 2) + pow(atom_i[2] - atom_j[2], 2)); } double calculate_dynamic_energy(double eucli...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <float.h> #include <omp.h> double calculate_euclidean_distance(double *atom_i, double *atom_j) { return sqrt(pow(atom_i[0] - atom_j[0], 2) + pow(atom_i[1] - atom_j[1], 2) + pow(atom_i[2] - atom_j[2], 2)); } double calculate_dynamic_energy(double ...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <float.h> #include <omp.h> double calculate_euclidean_distance(double *atom_i, double *atom_j) { return sqrt(pow(atom_i[0] - atom_j[0], 2) + pow(atom_i[1] - atom_j[1], 2) + pow(atom_i[2] - atom_j[2], 2)); } double calculate_dynamic_energy(double ...
reduce_demo.c
//------------------------------------------------------------------------------ // GraphBLAS/Demo/Program/reduce_demo: reduce a matrix to a scalar //------------------------------------------------------------------------------ #include "GraphBLAS.h" // #define N 65536 #define N 16384 int main (void) { #if ...
// ------------------------------------------------------------------------------ //GraphBLAS / Demo / Program / reduce_demo:reduce a matrix to a scalar // ------------------------------------------------------------------------------ #include "GraphBLAS.h" // #define N 65536 #define N 16384 int main(void) { /...
// ------------------------------------------------------------------------------ //GraphBLAS / Demo / Program / reduce_demo:reduce a matrix to a scalar // ------------------------------------------------------------------------------ #include "GraphBLAS.h" // #define N 65536 #define N 16384 int main(void) { #if d...
residual_based_bdf_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS...
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS...
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS...
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...
#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...
#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...
GB_unaryop__ainv_fp32_bool.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
//------------------------------------------------------------------------------ // 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: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
kmeans.h
#pragma once #include <assert.h> #include <float.h> #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include "files.h" #include "image.h" #include "ocl.h" typedef struct kmean_sample_t { int r; int g; int b; } kmean_sample_t; typedef struct kmean_t { int k...
#pragma once #include <assert.h> #include <float.h> #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include "files.h" #include "image.h" #include "ocl.h" typedef struct kmean_sample_t { int r; int g; int b; } kmean_sample_t; typedef struct kmean_t { int...
#pragma once #include <assert.h> #include <float.h> #include <math.h> #include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include "files.h" #include "image.h" #include "ocl.h" typedef struct kmean_sample_t { int r; int g; int b; } kmean_sample_t; typedef struct kmean_t { int...
blackscholes.simd.c
// Copyright (c) 2007 Intel Corp. // Black-Scholes // Analytical method for calculating European Options // // // Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice // Hall, John C. Hull, #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #ifndef WIN32 #inclu...
// Copyright (c) 2007 Intel Corp. // Black-Scholes // Analytical method for calculating European Options // // // Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice // Hall, John C. Hull, #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #ifndef WIN32 #inclu...
// Copyright (c) 2007 Intel Corp. // Black-Scholes // Analytical method for calculating European Options // // // Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice // Hall, John C. Hull, #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #ifndef WIN32 #inclu...
simple_mortar_mapper_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_...
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_...
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_...
omp_reduce.c
#include <assert.h> #include <omp.h> #include <stdio.h> int main () { int n = 5; int arr[5] = {5,3,9,1,7}; // Reduction combiners int max = -10; int min = 10; int sum = 0; int sub = 30; int prod = 1; _Bool land = 1; /* TRUE */ int band = ~(arr[0] & 0); _Bool lor = 0; /* FALSE */ int bor = (arr[...
#include <assert.h> #include <omp.h> #include <stdio.h> int main() { int n = 5; int arr[5] = {5, 3, 9, 1, 7}; //Reduction combiners int max = -10; int min = 10; int sum = 0; int sub = 30; int prod = 1; _Bool land = 1; /* TRUE */ int band = ~(arr[0] & 0); _Bo...
#include <assert.h> #include <omp.h> #include <stdio.h> int main() { int n = 5; int arr[5] = {5, 3, 9, 1, 7}; //Reduction combiners int max = -10; int min = 10; int sum = 0; int sub = 30; int prod = 1; _Bool land = 1; /* TRUE */ int band = ~(arr[0] & 0); _Bo...
GraphBuilder.h
/* * GraphBuilder.h * * Created on: 15.07.2014 * Author: Marvin Ritter (marvin.ritter@gmail.com) */ #ifndef GRAPH_BUILDER_H #define GRAPH_BUILDER_H #include <vector> #include "../Globals.h" #include "Graph.h" namespace NetworKit { /* * The GraphBuilder helps to speed up graph generation by minimizing t...
/* * GraphBuilder.h * * Created on: 15.07.2014 Author: Marvin Ritter (marvin.ritter@gmail.com) */ #ifndef GRAPH_BUILDER_H #define GRAPH_BUILDER_H #include <vector> #include "../Globals.h" #include "Graph.h" namespace NetworKit { /* * The GraphBuilder helps to speed up graph generation by minimizing t...
/* * GraphBuilder.h * * Created on: 15.07.2014 Author: Marvin Ritter (marvin.ritter@gmail.com) */ #ifndef GRAPH_BUILDER_H #define GRAPH_BUILDER_H #include <vector> #include "../Globals.h" #include "Graph.h" namespace NetworKit { /* * The GraphBuilder helps to speed up graph generation by minimizing t...
DRB092-threadprivatemissing2-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...
/* * A file-scope variable used within a function called by a parallel region. * No threadprivate is used to avoid data races. This is the case for a * variable referenced within a construct. * * Data race pairs sum0@68:7 vs. sum0@68:12 sum0@68:7 vs. sum0@68:7 */ #include <stdio.h> #include <assert.h> int sum...
/* * A file-scope variable used within a function called by a parallel region. * No threadprivate is used to avoid data races. This is the case for a * variable referenced within a construct. * * Data race pairs sum0@68:7 vs. sum0@68:12 sum0@68:7 vs. sum0@68:7 */ #include <stdio.h> #include <assert.h> int sum...
3_2_3.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 20000 #define TIMES 100 double cal_time(struct timespec *t_end, struct timespec *t_start) { double elapsedTime; elapsedTime = (t_end->tv_sec - t_start->tv_sec) * 1000.0; elapsedTime += (t_end->tv_nsec - t_start->tv_nsec) / 100000...
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 20000 #define TIMES 100 double cal_time(struct timespec *t_end, struct timespec *t_start) { double elapsedTime; elapsedTime = (t_end->tv_sec - t_start->tv_sec) * 1000.0; elapsedTime += (t_end->tv_nsec - t_start->tv_nsec) /...
#include <omp.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 20000 #define TIMES 100 double cal_time(struct timespec *t_end, struct timespec *t_start) { double elapsedTime; elapsedTime = (t_end->tv_sec - t_start->tv_sec) * 1000.0; elapsedTime += (t_end->tv_nsec - t_start->tv_nsec) /...
DRB049-fprintf-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...
/* * Example use of fprintf */ #include <stdio.h> int main(int argc, char *argv[]) { int i; int ret; FILE *pfile; int len = 1000; int A[1000]; for (i = 0; i < len; i++) A[i] = i; pfile = fopen("mytempfile.txt", "a+"); if (pfile == NULL) { fprintf(stderr, "Error...
/* * Example use of fprintf */ #include <stdio.h> int main(int argc, char *argv[]) { int i; int ret; FILE *pfile; int len = 1000; int A[1000]; #pragma omp parallel for for (i = 0; i < len; i++) A[i] = i; pfile = fopen("mytempfile.txt", "a+"); if (pfile == NULL) { ...
tree-dependencias.c
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "omp.h" #include <sys/time.h> double getusec_() { struct timeval time; gettimeofday(&time, NULL); return ((double)time.tv_sec * (double)1e6 + (double)time.tv_usec); } #define START_COUNT_TIME stamp ...
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "omp.h" #include <sys/time.h> double getusec_() { struct timeval time; gettimeofday(&time, NULL); return ((double)time.tv_sec * (double)1e6 + (double)time.tv_usec); } #define START_COUNT_TIME stamp...
#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include "omp.h" #include <sys/time.h> double getusec_() { struct timeval time; gettimeofday(&time, NULL); return ((double)time.tv_sec * (double)1e6 + (double)time.tv_usec); } #define START_COUNT_TIME stamp...
co2mco.c
// Copyright 2019 Huiguang Yi. All Rights Reservered. // // 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 applica...
// Copyright 2019 Huiguang Yi.All Rights Reservered. // //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 ...
// Copyright 2019 Huiguang Yi.All Rights Reservered. // //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 ...
GB_binop__pow_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
ctl_fragment.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...
#ifndef __libaroma_ctl_fragment_c__ #define __libaroma_ctl_fragment_c__ #include <aroma_internal.h> #include "../ui/ui_internal.h" /*************************** CONTROL HANDLERS *********************************/ dword _libaroma_ctl_fragment_msg(LIBAROMA_CONTROLP, LIBAROMA_MSGP); void _libaroma_ctl_fragment_draw(LIBAR...
#ifndef __libaroma_ctl_fragment_c__ #define __libaroma_ctl_fragment_c__ #include <aroma_internal.h> #include "../ui/ui_internal.h" /*************************** CONTROL HANDLERS *********************************/ dword _libaroma_ctl_fragment_msg(LIBAROMA_CONTROLP, LIBAROMA_MSGP); void _libaroma_ctl_fragment_draw(LIBAR...
pvector.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef PVECTOR_H_ #define PVECTOR_H_ #include <algorithm> #include <cassert> /* GAP Benchmark Suite Class: pvector Author: Scott Beamer Vector class with ability to not initialize or do initialize ...
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef PVECTOR_H_ #define PVECTOR_H_ #include <algorithm> #include <cassert> /* GAP Benchmark Suite Class: pvector Author: Scott Beamer Vector class with ability to not initialize or do initialize ...
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef PVECTOR_H_ #define PVECTOR_H_ #include <algorithm> #include <cassert> /* GAP Benchmark Suite Class: pvector Author: Scott Beamer Vector class with ability to not initialize or do initialize ...
GB_helper.c
//------------------------------------------------------------------------------ // GB_helper.c: helper functions for @GrB interface //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifie...
// ------------------------------------------------------------------------------ //GB_helper.c:helper functions for @GrB interface // ------------------------------------------------------------------------------ //SuiteSparse:GraphBLAS, Timothy A.Davis, (c) 2017 - 2022, All Rights Reserved. // SPDX - Lic...
// ------------------------------------------------------------------------------ //GB_helper.c:helper functions for @GrB interface // ------------------------------------------------------------------------------ //SuiteSparse:GraphBLAS, Timothy A.Davis, (c) 2017 - 2022, All Rights Reserved. // SPDX - Lic...
octree_openmp.c
/********************************************************************/ /* Octree partitioning 3-D points into spatial subvolumes */ /* using OPENMP project 2013 */ /* */ /* Implemented by Nikos Katirtzis...
/********************************************************************/ /* Octree partitioning 3-D points into spatial subvolumes */ /* using OPENMP project 2013 */ /* */ /* Implemented by Nikos Katirtzis...
/********************************************************************/ /* Octree partitioning 3-D points into spatial subvolumes */ /* using OPENMP project 2013 */ /* */ /* Implemented by Nikos Katirtzis...
ktensor.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...
/* * 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...
/* * 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...
for_simd.c
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // XFAIL: gcc-4 #include "callback.h" #include <omp.h> int main() { int y[] = {0,1,2,3}; int i; #pragma omp for simd for (i = 0; i < 4; i++) { y[i]++; } // Check if libomp supports the callbacks for this test. // CHECK-NOT: {{^}}0...
// RUN: %libomp-compile-and-run | FileCheck %s // REQUIRES: ompt // XFAIL: gcc-4 #include "callback.h" #include <omp.h> int main() { int y[] = {0,1,2,3}; int i; for (i = 0; i < 4; i++) { y[i]++; } // Check if libomp supports the callbacks for this test. // CHECK-NOT: {{^}}0: Could not register ca...
// RUN:%libomp - compile - and - run | FileCheck % s // REQUIRES:ompt // XFAIL:gcc - 4 #include "callback.h" #include <omp.h> int main() { int y[] = {0, 1, 2, 3}; int i; #pragma omp for simd for (i = 0; i < 4; i++) { y[i]++; } //Check if libomp supports the callbacks for th...
gol_fast.c
/* Copyright since 2016 the OMPi Team Dept. of Computer Science & Engineering, University of Ioannina This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, ...
/* * gol_fast.c ---------- This program is a fast implementation of Conway's * Game of Life on the Epiphany, using OpenMP4.x kernels. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <omp.h> #define NSTEPS 1000 /* Number of time steps */ #define NCORES 16 ...
/* * gol_fast.c ---------- This program is a fast implementation of Conway's * Game of Life on the Epiphany, using OpenMP4.x kernels. */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <omp.h> #define NSTEPS 1000 /* Number of time steps */ #define NCORES 16 ...
conv_kernel_rv64.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...
/* * Copyright (c) 2021, OPEN AI LAB Author: ddzhao@openailab.com */ #include <stdint.h> #include <stdlib.h> #include <math.h> #include "conv_kernel_rv64.h" // #include "wino_conv_kernel_arm.h" // FIXME: add wino support // #include "wino_conv_kernel_1_arm.h" // FIXME: add wino support #define PER_OUT_CHAN 1...
/* * Copyright (c) 2021, OPEN AI LAB Author: ddzhao@openailab.com */ #include <stdint.h> #include <stdlib.h> #include <math.h> #include "conv_kernel_rv64.h" // #include "wino_conv_kernel_arm.h" // FIXME: add wino support // #include "wino_conv_kernel_1_arm.h" // FIXME: add wino support #define PER_OUT_CHAN 1...
core_zlantr.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include <plasma_core_blas.h> #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" #include <math.h> /************...
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include <plasma_core_blas.h> #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" #include <math.h> /************...
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include <plasma_core_blas.h> #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" #include <math.h> /************...
newtonforwardinterpolation.c
#include<stdio.h> #define MAXN 100 #define ORDER 4 int main() { float ax[MAXN+1], ay [MAXN+1], diff[MAXN+1][ORDER+1], nr[ORDER+1], dr[ORDER+1],x,p,h,yp; int n,i,j,k; printf("\nEnter the value of n:\n"); scanf("%d",&n); printf("\nEnter the values in form x,y:\n"); for (i=0;i<=n;i++) s...
#include<stdio.h> #define MAXN 100 #define ORDER 4 int main() { float ax[MAXN+1], ay [MAXN+1], diff[MAXN+1][ORDER+1], nr[ORDER+1], dr[ORDER+1],x,p,h,yp; int n,i,j,k; printf("\nEnter the value of n:\n"); scanf("%d",&n); printf("\nEnter the values in form x,y:\n"); for (i=0;i<=n;i++) s...
#include<stdio.h> #define MAXN 100 #define ORDER 4 int main() { float ax[MAXN+1], ay [MAXN+1], diff[MAXN+1][ORDER+1], nr[ORDER+1], dr[ORDER+1],x,p,h,yp; int n,i,j,k; printf("\nEnter the value of n:\n"); scanf("%d",&n); printf("\nEnter the values in form x,y:\n"); for (i=0;i<=n;i++) s...
ZAdaptiveNormals.h
/**************************************************************************** ** ** Copyright (C) 2017 TU Wien, ACIN, Vision 4 Robotics (V4R) group ** Contact: v4r.acin.tuwien.ac.at ** ** This file is part of V4R ** ** V4R is distributed under dual licenses - GPLv3 or closed source. ** ** GNU General Public License Usa...
#ifndef SURFACE_ZADAPTIVE_NORMALS_HH #define SURFACE_ZADAPTIVE_NORMALS_HH #include <math.h> #include <omp.h> #include <pcl/common/eigen.h> #include <pcl/common/time.h> #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/search/kdtree.h> #include <boost/shared_ptr.hpp> #include <iostream> #include...
#ifndef SURFACE_ZADAPTIVE_NORMALS_HH #define SURFACE_ZADAPTIVE_NORMALS_HH #include <math.h> #include <omp.h> #include <pcl/common/eigen.h> #include <pcl/common/time.h> #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/search/kdtree.h> #include <boost/shared_ptr.hpp> #include <iostream> #include...
2.parallel.c
#include <stdlib.h> #include <stdio.h> #include "omp.h" #define N 25 /* Q1: Is the code printing what you expected? Is it executing */ /* in parallel? What is wrong with it? */ /* Q2: Add a directive to make its execution correct. */ /* Q3: What would happen if you...
#include <stdlib.h> #include <stdio.h> #include "omp.h" #define N 25 /* Q1: Is the code printing what you expected? Is it executing */ /* in parallel? What is wrong with it? */ /* Q2: Add a directive to make its execution correct. */ /* Q3: What would happen if you rem...
#include <stdlib.h> #include <stdio.h> #include "omp.h" #define N 25 /* Q1: Is the code printing what you expected? Is it executing */ /* in parallel? What is wrong with it? */ /* Q2: Add a directive to make its execution correct. */ /* Q3: What would happen if you rem...
sapB_fmt_plug.c
/* * this is a SAP-BCODE plugin for john the ripper. * tested on linux/x86 only, rest is up to you.. at least, someone did the reversing :-) * * please note: this code is in a "works for me"-state, feel free to modify/speed up/clean/whatever it... * * (c) x7d8 sap loverz, public domain, btw * cheers: see test-ca...
#if FMT_EXTERNS_H extern struct fmt_main fmt_sapB; #elif FMT_REGISTERS_H john_register_one(&fmt_sapB); #else #include <string.h> #include <ctype.h> #include "arch.h" #include "misc.h" #include "common.h" #include "formats.h" #include "memory.h" #include "johnswap.h" #include "options.h" #include "unicode.h" #includ...
#if FMT_EXTERNS_H extern struct fmt_main fmt_sapB; #elif FMT_REGISTERS_H john_register_one(&fmt_sapB); #else #include <string.h> #include <ctype.h> #include "arch.h" #include "misc.h" #include "common.h" #include "formats.h" #include "memory.h" #include "johnswap.h" #include "options.h" #include "unicode.h" #includ...
AdPointDataReaders.h
/* Ralf Kaehler 14 December 2016 Copyright (c) 2016, The Board of Trustees of the Leland Stanford Junior University, through SLAC National Accelerator Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. Redistribution and use in source and binary f...
#ifndef _AD_POINT_DATA_READERS_ #define _AD_POINT_DATA_READERS_ #include <cfloat> #include <string> #include "AdMeasureMPIWallClockTime.h" #include "AdUtils.h" #include "AdAssert.h" #include "AdLagrangianRedistribution.h" namespace AdaptiveMassDeposit { static inline AABBox get_global_bbox_mpi( const bool ...
#ifndef _AD_POINT_DATA_READERS_ #define _AD_POINT_DATA_READERS_ #include <cfloat> #include <string> #include "AdMeasureMPIWallClockTime.h" #include "AdUtils.h" #include "AdAssert.h" #include "AdLagrangianRedistribution.h" namespace AdaptiveMassDeposit { static inline AABBox get_global_bbox_mpi( const bool ...
data_4D.c
/* This file is part of the MCsquare software Copyright © 2016-2017 Université catholique de Louvain (UCL) All rights reserved. The MCsquare software has been developed by Kevin Souris from UCL in the context of a collaboration with IBA s.a. Each use of this software must be attributed to Université catholique de Louv...
#include "include/data_4D.h" DATA_CT ** Import_4DCT(DATA_config * config) { char phase_file_path[200]; config->Num_4DCT_phases = 0; int i; DATA_CT **CT = NULL; //count number of phases. sprintf(phase_file_path, "./4DCT/CT_1.mhd"); FILE *file_mhd = fopen(phase_file_path, "r"); w...
#include "include/data_4D.h" DATA_CT ** Import_4DCT(DATA_config * config) { char phase_file_path[200]; config->Num_4DCT_phases = 0; int i; DATA_CT **CT = NULL; //count number of phases. sprintf(phase_file_path, "./4DCT/CT_1.mhd"); FILE *file_mhd = fopen(phase_file_path, "r"); w...
3d25pt_var.c
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) >...
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) ...
/* * Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) ...
void_openmp_library.c
#include <stdio.h> #include "void_openmp_library.h" #include <omp.h> #include <math.h> void mark_void_region(char *in_void, int Ncells, int dims, float R_grid2, int i, int j, int k, int threads) { int l, m, n, i1, j1, k1; long number; float dist2; #pragma omp parallel for num_threads(threads) private(l...
#include <stdio.h> #include "void_openmp_library.h" #include <omp.h> #include <math.h> void mark_void_region(char *in_void, int Ncells, int dims, float R_grid2, int i, int j, int k, int threads) { int l, m, n, i1, j1, k1; long number; float dist2; for (l = -Ncells; l <= Ncells; l++) ...
#include <stdio.h> #include "void_openmp_library.h" #include <omp.h> #include <math.h> void mark_void_region(char *in_void, int Ncells, int dims, float R_grid2, int i, int j, int k, int threads) { int l, m, n, i1, j1, k1; long number; float dist2; #pragma omp parallel for num_threads(th...
GB_unop__identity_int32_int16.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
openmp_ctx.h
#ifndef MOBULA_INC_CONTEXT_OPENMP_CTX_H_ #define MOBULA_INC_CONTEXT_OPENMP_CTX_H_ #include <omp.h> namespace mobula { #define KERNEL_RUN(a, n) (a) template <typename Func> MOBULA_DEVICE void parfor(const int n, Func F) { #pragma omp parallel for for (int i = 0; i < n; ++i) { F(i); } } } // namespace mobul...
#ifndef MOBULA_INC_CONTEXT_OPENMP_CTX_H_ #define MOBULA_INC_CONTEXT_OPENMP_CTX_H_ #include <omp.h> namespace mobula { #define KERNEL_RUN(a, n) (a) template < typename Func > MOBULA_DEVICE void parfor(const int n, Func F) { for (int i = 0; i < n; ++i) { F(i); } } ...
#ifndef MOBULA_INC_CONTEXT_OPENMP_CTX_H_ #define MOBULA_INC_CONTEXT_OPENMP_CTX_H_ #include <omp.h> namespace mobula { #define KERNEL_RUN(a, n) (a) template < typename Func > MOBULA_DEVICE void parfor(const int n, Func F) { #pragma omp parallel for for (int i = 0; i < n; ++i) { ...
GB_unaryop__abs_int32_uint32.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: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
sizeof.c
// Liao, 11/17/2009 // Test SgSizeOfOp::replace_expression() // Distilled from spec_omp2001/benchspec/OMPM2001/332.ammp_m/atoms.c int atom() { int serial; #pragma omp parallel { int i =sizeof(serial); serial = i; } return serial; }
// Liao, 11 / 17 / 2009 // Test SgSizeOfOp: :replace_expression() // Distilled from spec_omp2001 / benchspec / OMPM2001 / 332. ammp_m / atoms.c int atom() { int serial; int i = sizeof(serial); serial = i; return serial; }
// Liao, 11 / 17 / 2009 // Test SgSizeOfOp: :replace_expression() // Distilled from spec_omp2001 / benchspec / OMPM2001 / 332. ammp_m / atoms.c int atom() { int serial; #pragma omp parallel { int i = sizeof(serial); serial = i; } return serial; }
kernel.openmp.h
#include <iris/iris_openmp.h> static void kernel0(float* dst, float* src, IRIS_OPENMP_KERNEL_ARGS) { int i; #pragma omp parallel for shared(dst, src) private(i) IRIS_OPENMP_KERNEL_BEGIN(i) dst[i] = src[i]; IRIS_OPENMP_KERNEL_END } static void kernel1(float* dst, float* src, IRIS_OPENMP_KERNEL_ARGS) { int i;...
#include <iris/iris_openmp.h> static void kernel0(float *dst, float *src, IRIS_OPENMP_KERNEL_ARGS) { int i; IRIS_OPENMP_KERNEL_BEGIN(i) dst[i] = src[i]; IRIS_OPENMP_KERNEL_END } static void kernel1(float *dst, float *src, IRIS_OPENMP_KERNEL_ARGS) { int i; IRIS_OPENMP_KERNEL_BEGIN(i) ...
#include <iris/iris_openmp.h> static void kernel0(float *dst, float *src, IRIS_OPENMP_KERNEL_ARGS) { int i; #pragma omp parallel for shared(dst, src) private(i) IRIS_OPENMP_KERNEL_BEGIN(i) dst[i] = src[i]; IRIS_OPENMP_KERNEL_END } static void kernel1(float *dst, float *src, IRIS_OPENMP_KERNEL_AR...
GB_unaryop__identity_uint8_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...
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <math.h> double A[N][N + 13]; void init_arrays() { int i, j; for (i = 0; i < N; i++) for (j = 0; j < N; j++) A[i][j] = i * i + j * j; } double rtclock() { struct timezone tzp; struct timeval tp; int stat; ...
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
nqueenspre.c
# 1 "nqueens.c" # 1 "<built-in>" 1 # 1 "<built-in>" 3 # 330 "<built-in>" 3 # 1 "<command line>" 1 # 1 "<built-in>" 2 # 1 "nqueens.c" 2 # 28 "nqueens.c" # 1 "/usr/include/stdlib.h" 1 3 4 # 24 "/usr/include/stdlib.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 345 "/usr/include/features.h" 3 4 # 1 "/usr/include/stdc-predef...
#1 "nqueens.c" #1 "<built-in>" 1 #1 "<built-in>" 3 #330 "<built-in>" 3 #1 "<command line>" 1 #1 "<built-in>" 2 #1 "nqueens.c" 2 #28 "nqueens.c" #1 "/usr/include/stdlib.h" 1 3 4 #24 "/usr/include/stdlib.h" 3 4 #1 "/usr/include/features.h" 1 3 4 #345 "/usr/include/features.h" 3 4 #1 "/usr/include/stdc-predef.h" 1 3 4 #34...
#1 "nqueens.c" #1 "<built-in>" 1 #1 "<built-in>" 3 #330 "<built-in>" 3 #1 "<command line>" 1 #1 "<built-in>" 2 #1 "nqueens.c" 2 #28 "nqueens.c" #1 "/usr/include/stdlib.h" 1 3 4 #24 "/usr/include/stdlib.h" 3 4 #1 "/usr/include/features.h" 1 3 4 #345 "/usr/include/features.h" 3 4 #1 "/usr/include/stdc-predef.h" 1 3 4 #34...
GB_transplant.c
//------------------------------------------------------------------------------ // GB_transplant: replace contents of one matrix with another //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suite...
//------------------------------------------------------------------------------ // GB_transplant: replace contents of one matrix with another //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suite...
//------------------------------------------------------------------------------ // GB_transplant: replace contents of one matrix with another //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suite...
GB_subassign_11.c
//------------------------------------------------------------------------------ // GB_subassign_11: C(I,J)<M,repl> += scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identi...
//------------------------------------------------------------------------------ // GB_subassign_11: C(I,J)<M,repl> += scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identi...
//------------------------------------------------------------------------------ // GB_subassign_11: C(I,J)<M,repl> += scalar ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identi...
cv_utils.h
/*! ***************************************************************************** * \file cv_utils.h * \author moennen * \brief * \date 2018-03-16 * *****************************************************************************/ #ifndef _UTILS_CV_UTILS_H #define _UTILS_CV_UTILS_H #include "utils/Hop.h" ...
/* * ! ***************************************************************************** * \file cv_utils.h \author moennen \brief \date 2018-03-16 **************************************************************************** */ #ifndef _UTILS_CV_UTILS_H #define _UTILS_CV_UTILS_H #include "utils/Hop.h" #include <opencv...
/* * ! ***************************************************************************** * \file cv_utils.h \author moennen \brief \date 2018-03-16 **************************************************************************** */ #ifndef _UTILS_CV_UTILS_H #define _UTILS_CV_UTILS_H #include "utils/Hop.h" #include <opencv...
MSCHAPv2_old_fmt_plug.c
/* * MSCHAPv2_fmt.c -- Microsoft PPP CHAP Extensions, Version 2 * * Written by JoMo-Kun <jmk at foofus.net> in 2010 * and placed in the public domain. * * Modified for performance, OMP and utf-8 support * by magnum 2010-2011 * * Support for freeradius-wep-patch challenge/response format * added by Linus Lüssi...
#if FMT_EXTERNS_H extern struct fmt_main fmt_MSCHAPv2_old; #elif FMT_REGISTERS_H john_register_one(&fmt_MSCHAPv2_old); #else #include <string.h> #include <openssl/des.h> #include "misc.h" #include "common.h" #include "formats.h" #include "options.h" #include "memory.h" #include "sha.h" #include "unicode.h" #include...
#if FMT_EXTERNS_H extern struct fmt_main fmt_MSCHAPv2_old; #elif FMT_REGISTERS_H john_register_one(&fmt_MSCHAPv2_old); #else #include <string.h> #include <openssl/des.h> #ifdef _OPENMP #include <omp.h> #endif #include "misc.h" #include "common.h" #include "formats.h" #include "options.h" #include "memory.h" #includ...
zoom.c
// This program is free software: you can use, modify and/or redistribute it // under the terms of the simplified BSD License. You should have received a // copy of this license along this program. If not, see // <http://www.opensource.org/licenses/bsd-license.html>. // // Copyright (C) 2012, Javier Sánchez Pérez <jsan...
// This program is free software: you can use, modify and/or redistribute it // under the terms of the simplified BSD License. You should have received a // copy of this license along this program. If not, see // <http://www.opensource.org/licenses/bsd-license.html>. // // Copyright (C) 2012, Javier Sánchez Pérez <jsan...
// This program is free software: you can use, modify and/or redistribute it // under the terms of the simplified BSD License. You should have received a // copy of this license along this program. If not, see // <http://www.opensource.org/licenses/bsd-license.html>. // // Copyright (C) 2012, Javier Sánchez Pérez <jsan...
GB_binop__le_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
pragma-3.c
/* { dg-options "-fopenmp" } { dg-do preprocess } { dg-require-effective-target fopenmp } */ void foo (void) { int i1, j1, k1; #define p parallel #define P(x) private (x##1) #define S(x) shared (x##1) #define F(x) firstprivate (x##1) #pragma omp \ p \ P(i) \ S(j) \ F(k) ; } /* The bug here ...
/* * { dg-options "-fopenmp" } { dg-do preprocess } { * dg-require-effective-target fopenmp } */ void foo(void) { int i1, j1, k1; #define p parallel #define P(x) private (x##1) #define S(x) shared (x##1) #define F(x) firstprivate (x##1) p \ P(i) \ S(j) \ F(k) ; } /* * The ...
/* * { dg-options "-fopenmp" } { dg-do preprocess } { * dg-require-effective-target fopenmp } */ void foo(void) { int i1, j1, k1; #define p parallel #define P(x) private (x##1) #define S(x) shared (x##1) #define F(x) firstprivate (x##1) #pragma omp \ p \ P(i) \ S(j) \ F(k) ; } /* * The bug here w...
GB_unop__ainv_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
//------------------------------------------------------------------------------ // 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_cast_array.c
//------------------------------------------------------------------------------ // GB_cast_array: typecast or copy an array //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apach...
//------------------------------------------------------------------------------ // GB_cast_array: typecast or copy an array //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apach...
//------------------------------------------------------------------------------ // GB_cast_array: typecast or copy an array //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-Identifier: Apach...
convolution_pack4.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 ...
// 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...
// 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...
workspace.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * **/ #include "plasma_workspace.h" #include "plasma_internal.h" #include <omp.h> /******************************************************************************/ int plasma_workspace_...
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * **/ #include "plasma_workspace.h" #include "plasma_internal.h" #include <omp.h> /******************************************************************************/ int plasma_workspace...
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * **/ #include "plasma_workspace.h" #include "plasma_internal.h" #include <omp.h> /******************************************************************************/ int plasma_workspace...
LRUCache_Prefetch.h
#include <iostream> #include<stdint.h> #include <unordered_map> #include <vector> using namespace std; vector<int64_t>List_offset; struct AIOReadInfo { int64_t readlength; int64_t readoffset; int64_t listlength; int64_t offsetForenums; int64_t memoffset; int64_t curSendpos; uint8_t *list_data; ...
#include <iostream> #include<stdint.h> #include <unordered_map> #include <vector> using namespace std; vector < int64_t > List_offset; struct AIOReadInfo { int64_t readlength; int64_t readoffset; int64_t listlength; int64_t offsetForenums; int64_t memoffset; in...
#include <iostream> #include<stdint.h> #include <unordered_map> #include <vector> using namespace std; vector < int64_t > List_offset; struct AIOReadInfo { int64_t readlength; int64_t readoffset; int64_t listlength; int64_t offsetForenums; int64_t memoffset; in...
GB_unaryop__identity_int16_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...
//------------------------------------------------------------------------------ // 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: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
apply.h
/****************************************************************************** * ** Copyright (c) 2016, Intel Corporation ** * ** All rights reserved. ** * ** ...
/* * Michael Anderson (Intel Corp.) * ***************************************************************************** */ #ifndef SRC_SINGLENODE_APPLY_H_ #define SRC_SINGLENODE_APPLY_H_ template < typename Ta, typename Tb > void apply_dense_segment(Ta * v1, int *bitvector, int *nnz, int num_ints, ...
/* * Michael Anderson (Intel Corp.) * ***************************************************************************** */ #ifndef SRC_SINGLENODE_APPLY_H_ #define SRC_SINGLENODE_APPLY_H_ template < typename Ta, typename Tb > void apply_dense_segment(Ta * v1, int *bitvector, int *nnz, int num_ints, ...
GB_unop__identity_fp64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
blockchain_fmt_plug.c
/* blockchain "My Wallet" cracker patch for JtR. Hacked together during June of * 2013 by Dhiru Kholia <dhiru at openwall.com>. * * See https://blockchain.info/wallet/wallet-format * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com>, * and it is hereby released to the general public under...
#if FMT_EXTERNS_H extern struct fmt_main fmt_blockchain; #elif FMT_REGISTERS_H john_register_one(&fmt_blockchain); #else #include <string.h> #include <errno.h> #include "arch.h" #include "jumbo.h" #include "common.h" #include "formats.h" #include "params.h" #include "options.h" #include "johnswap.h" #include "pbkdf2...
#if FMT_EXTERNS_H extern struct fmt_main fmt_blockchain; #elif FMT_REGISTERS_H john_register_one(&fmt_blockchain); #else #include <string.h> #include <errno.h> #include "arch.h" #include "jumbo.h" #include "common.h" #include "formats.h" #include "params.h" #include "options.h" #include "johnswap.h" #include "pbkdf2...
owl_ndarray_conv_impl.h
/* * OWL - OCaml Scientific and Engineering Computing * Copyright (c) 2016-2018 Liang Wang <liang.wang@cl.cam.ac.uk> */ #ifndef OWL_CORE_CONV_IMPL #define OWL_CORE_CONV_IMPL /* * Calculate the cache sizes and block sizes for convolution operations. * Code heavily inspired by Eigen (http://eigen.tuxfamily.org/). ...
#ifndef OWL_CORE_CONV_IMPL #define OWL_CORE_CONV_IMPL /* * Calculate the cache sizes and block sizes for convolution operations. * Code heavily inspired by Eigen (http://eigen.tuxfamily.org/). */ #define IM2COL_THRESHOLD 512 * 1024 #define ALIGN_SIZE 32 // for AVX address alignment OWL_INLINE void query_cache_...
#ifndef OWL_CORE_CONV_IMPL #define OWL_CORE_CONV_IMPL /* * Calculate the cache sizes and block sizes for convolution operations. * Code heavily inspired by Eigen (http://eigen.tuxfamily.org/). */ #define IM2COL_THRESHOLD 512 * 1024 #define ALIGN_SIZE 32 // for AVX address alignment OWL_INLINE void query_cache_...
for-13.c
// At one point in development, a typo disabled the remapping of the // for iteration variable as private. // { dg-do compile } // { dg-options "-fopenmp -fdump-tree-ompexp" } extern void bar(int); void foo(void) { int i; #pragma omp parallel for default(none) for (i = 0; i < 10; i++) bar(i); } // { dg-fina...
// At one point in development, a typo disabled the remapping of the // for iteration variable as private. // { dg-do compile } // { dg-options "-fopenmp -fdump-tree-ompexp" } extern void bar(int); void foo(void) { int i; for (i = 0; i < 10; i++) bar(i); } // { dg-final { scan-tree-dump-times "omp_data_o" 0 ...
// At one point in development, a typo disabled the remapping of the // for iteration variable as private. // { dg-do compile } // { dg-options "-fopenmp -fdump-tree-ompexp" } extern void bar(int); void foo(void) { int i; #pragma omp parallel for default(none) for (i = 0; i < 10; i++) bar(i); } // { dg-fina...
AsynchronousGibbsSampler.h
#ifndef __COGAPS_ASYNCHRONOUS_GIBBS_SAMPLER_H__ #define __COGAPS_ASYNCHRONOUS_GIBBS_SAMPLER_H__ #include "../atomic/ConcurrentAtomicDomain.h" #include "../atomic/ProposalQueue.h" #include "../data_structures/Matrix.h" #include "../math/Math.h" #include "../math/VectorMath.h" #include "../math/MatrixMath.h" #i...
#ifndef __COGAPS_ASYNCHRONOUS_GIBBS_SAMPLER_H__ #define __COGAPS_ASYNCHRONOUS_GIBBS_SAMPLER_H__ #include "../atomic/ConcurrentAtomicDomain.h" #include "../atomic/ProposalQueue.h" #include "../data_structures/Matrix.h" #include "../math/Math.h" #include "../math/VectorMath.h" #include "../math/MatrixMath.h" #i...
#ifndef __COGAPS_ASYNCHRONOUS_GIBBS_SAMPLER_H__ #define __COGAPS_ASYNCHRONOUS_GIBBS_SAMPLER_H__ #include "../atomic/ConcurrentAtomicDomain.h" #include "../atomic/ProposalQueue.h" #include "../data_structures/Matrix.h" #include "../math/Math.h" #include "../math/VectorMath.h" #include "../math/MatrixMath.h" #i...
ej1.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int obtenerMenor(int *a, int tam){ int res = 0; int i; #pragma omp parallel for num_threads(4) private(i) reduction(+:res) for(i=0;i<tam;++i) res+=*(a+i); res*=-1; return res; } int main() { printf("Probando, esto funciona !"); int *a = (int *)malloc(s...
#include <stdio.h> #include <stdlib.h> #include <omp.h> int obtenerMenor(int *a, int tam) { int res = 0; int i; for (i = 0; i < tam; ++i) res += *(a + i); res *= -1; return res; } int main() { printf("Probando, esto funciona !"); int *a = (int *)malloc(sizeof(int) * 20); for ...
#include <stdio.h> #include <stdlib.h> #include <omp.h> int obtenerMenor(int *a, int tam) { int res = 0; int i; #pragma omp parallel for num_threads(4) private(i) reduction(+:res) for (i = 0; i < tam; ++i) res += *(a + i); res *= -1; return res; } int main() { printf("Probando, esto ...
tammes.c
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #ifndef M_PI # define M_PI 3.141592653589793 #endif #define GA 2.39996322972865332 int frame = 0; int asymmetric = 1; int N; double minD = 0; double bestMinD = 0; typedef struct { double x,y,z; } v...
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #ifndef M_PI # define M_PI 3.141592653589793 #endif #define GA 2.39996322972865332 int frame = 0; int asymmetric = 1; int N; double minD = 0; double bestMinD = 0; typedef struct { double x,y,z; } v...
#include <string.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #ifndef M_PI # define M_PI 3.141592653589793 #endif #define GA 2.39996322972865332 int frame = 0; int asymmetric = 1; int N; double minD = 0; double bestMinD = 0; typedef struct { double x,y,z; } v...
GB_unaryop__identity_int64_int64.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: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
beta2u.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "compearth.h" /*! * @brief Computes u from lune colatitude beta as in Equation 24a of * Tape and Tape 2015. * * @param[in] n Number of points in arrays * @param[in] beta Lune colatitude \f$ \beta \in [0, \pi] \f$. This * ...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "compearth.h" /* * ! @brief Computes u from lune colatitude beta as in Equation 24a of Tape * and Tape 2015. * * @param[in] n Number of points in arrays @param[in] beta Lune * colatitude \f$ \beta \in [0, \pi] \f$. This is an array o...
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "compearth.h" /* * ! @brief Computes u from lune colatitude beta as in Equation 24a of Tape * and Tape 2015. * * @param[in] n Number of points in arrays @param[in] beta Lune * colatitude \f$ \beta \in [0, \pi] \f$. This is an array o...
residualbased_elimination_builder_and_solver_with_constraints.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // ...
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // ...
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Vicente Mataix Ferrandiz // ...
Stmt.h
//===--- Stmt.h - Classes for representing statements -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===--- Stmt.h - Classes for representing statements -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===--- Stmt.h - Classes for representing statements -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
tinyexr.h
/* Copyright (c) 2014 - 2017, 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...
// TinyEXR contains some OpenEXR code, which is licensed under ------------ /////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and bin...
// TinyEXR contains some OpenEXR code, which is licensed under ------------ /////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2002, Industrial Light & Magic, a division of Lucas // Digital Ltd. LLC // // All rights reserved. // // Redistribution and use in source and bin...
2d.p.c
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) #define myabs(x,y) (((x) > (y))? ((x)-(y)) : ((y)-(x))) #define myceil(x,y) (int)ceil(((double)x)/(...
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) #define myabs(x,y) (((x) > (y))? ((x)-(y)) : ((y)-(x))) #define myceil(x,y) (int)ceil(((double)x)/(...
#include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <omp.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) #define myabs(x,y) (((x) > (y))? ((x)-(y)) : ((y)-(x))) #define myceil(x,y) (int)ceil(((double)x)/(...
main.c
#include "rsbench.h" int main(int argc, char * argv[]) { // ===================================================================== // Initialization & Command Line Read-In // ===================================================================== int version = 9; #ifdef OPENMP int max_procs = omp_get_num_procs(); ...
#include "rsbench.h" int main(int argc, char *argv[]) { //== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == = //Initialization & Command Line Read - In // == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ...
#include "rsbench.h" int main(int argc, char *argv[]) { //== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == = //Initialization & Command Line Read - In // == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ...
GB_binop__isgt_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...
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
Builder.h
/********************************************************************************** Copyright (c) 2019 Tobias Zündorf MIT License 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 rest...
#pragma once #include <algorithm> #include "../../DataStructures/RAPTOR/Data.h" #include "../../Helpers/MultiThreading.h" #include "../../Helpers/Timer.h" #include "../../Helpers/Console/Progress.h" #include "RangeSearchUsingStations.h" namespace ULTRA { template < bool DEBUG = false, bool REQUIRE_DIRECT_TRA...
#pragma once #include <algorithm> #include "../../DataStructures/RAPTOR/Data.h" #include "../../Helpers/MultiThreading.h" #include "../../Helpers/Timer.h" #include "../../Helpers/Console/Progress.h" #include "RangeSearchUsingStations.h" namespace ULTRA { template < bool DEBUG = false, bool REQUIRE_DIRECT_TRA...
divsufsort.c
/* * divsufsort.c for libdivsufsort-lite * Copyright (c) 2003-2008 Yuta Mori 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 wit...
#include <assert.h> #include <stdio.h> #include <stdlib.h> #include "divsufsort.h" /*- Constants -*/ #define INLINE __inline #if defined(ALPHABET_SIZE) && (ALPHABET_SIZE < 1) #undef ALPHABET_SIZE #endif #if !defined(ALPHABET_SIZE) #define ALPHABET_SIZE (256) #endif #define BUCKET_A_SIZE (ALPHABET_SIZE) #define BUCK...
#include <assert.h> #include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #endif #include "divsufsort.h" /*- Constants -*/ #define INLINE __inline #if defined(ALPHABET_SIZE) && (ALPHABET_SIZE < 1) #undef ALPHABET_SIZE #endif #if !defined(ALPHABET_SIZE) #define ALPHABET_SIZE (256) #endif #define BUC...
original.c
#include <omp.h> int i, j, k; double a[2000UL][2000UL]; double b[2000UL][2000UL]; double c[2000UL][2000UL]; void compute() { #pragma omp parallel for shared( a, b, c) private(i, j, k) for (i = 0; i < 2000; i++) { for (j = 0; j < 2000; j++) { for (k = 0; k < 2000; k++) { c[...
#include <omp.h> int i, j, k; double a[2000UL][2000UL]; double b[2000UL][2000UL]; double c[2000UL][2000UL]; void compute() { for (i = 0; i < 2000; i++) { for (j = 0; j < 2000; j++) { for (k = 0; k < 2000; k++) { c[i][j] += (a[i][k] * b[k][j]); ...
#include <omp.h> int i, j, k; double a[2000UL][2000UL]; double b[2000UL][2000UL]; double c[2000UL][2000UL]; void compute() { #pragma omp parallel for shared( a, b, c) private(i, j, k) for (i = 0; i < 2000; i++) { for (j = 0; j < 2000; j++) { for (k = 0; k < 2000; k++) ...
targetparallelfor-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...
// Race condition due to anti - dependence // Happens on a loop offloaded to accelerators. int main(int argc, char *argv[]) { int i; int len = 1000; int a[1000]; for (i = 0; i < len; i++) a[i] = i; for (i = 0; i < len - 1; i++) a[i] = a[i + 1] + 1; return 0; }
// Race condition due to anti - dependence // Happens on a loop offloaded to accelerators. int main(int argc, char *argv[]) { int i; int len = 1000; int a[1000]; for (i = 0; i < len; i++) a[i] = i; #pragma omp target #pragma omp parallel for for (i = 0; i < len - 1; i++) a[i] ...
nestedpar.c
#include<omp.h> #include <stdio.h> void paroutput(char* s) { #pragma omp parallel printf("%s\n",s); } int main(void) { #pragma omp parallel { paroutput("before single"); #pragma omp single { paroutput("inside single"); } paroutput("after single"); } }
#include<omp.h> #include <stdio.h> void paroutput(char *s) { printf("%s\n", s); } int main(void) { paroutput("before single"); #pragma omp single { paroutput("inside single"); } paroutput("after single"); }
#include<omp.h> #include <stdio.h> void paroutput(char *s) { #pragma omp parallel printf("%s\n", s); } int main(void) { #pragma omp parallel { paroutput("before single"); #pragma omp single { paroutput("inside single"); } paroutput("after single"); } }
local_temperature_average_response_function.h
// KRATOS ___ ___ _ ___ __ ___ ___ ___ ___ // / __/ _ \| \| \ \ / /__| \_ _| __| __| // | (_| (_) | .` |\ V /___| |) | || _|| _| // \___\___/|_|\_| \_/ |___/___|_| |_| APPLICATION // // License: BSD License // Kratos default license: kratos/license.txt // // Main aut...
// KRATOS ___ ___ _ ___ __ ___ ___ ___ ___ // /__ / _ \ |\|\\//__ | \_ _ | __ | __ | //|(_ | (_) |.` |\V / ___ | |) | ||_ || _ | //\___ \ ___ / |_ | \_ | \_ / |___ / ___ | _ | |_ | APPLICATION // //License:BSD License // Kratos default license: kratos / license.txt // //Main authors:Jordi Cotela // #ifndef KRATOS_LOCA...
// KRATOS ___ ___ _ ___ __ ___ ___ ___ ___ // /__ / _ \ |\|\\//__ | \_ _ | __ | __ | //|(_ | (_) |.` |\V / ___ | |) | ||_ || _ | //\___ \ ___ / |_ | \_ | \_ / |___ / ___ | _ | |_ | APPLICATION // //License:BSD License // Kratos default license: kratos / license.txt // //Main authors:Jordi Cotela // #ifndef KRATOS_LOCA...
GB_unop__erfc_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...
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
main.c
#include "libabl_int.h" #include "time.h" #include "stdio.h" #include "CL/cl.h" #include "omp.h" #define PROFILING_ITERATION 20 #define PROFILING_INTERVAL 100 typedef struct { double velocity; float2 pos; int id; bool isFinished; bool forwardOnLane; double milage; }Point; static const type_info...
#include "libabl_int.h" #include "time.h" #include "stdio.h" #include "CL/cl.h" #include "omp.h" #define PROFILING_ITERATION 20 #define PROFILING_INTERVAL 100 typedef struct { double velocity; float2 pos; int id; bool isFinished; bool forwardOnLane; double milage; } Point; static const type_i...
#include "libabl_int.h" #include "time.h" #include "stdio.h" #include "CL/cl.h" #include "omp.h" #define PROFILING_ITERATION 20 #define PROFILING_INTERVAL 100 typedef struct { double velocity; float2 pos; int id; bool isFinished; bool forwardOnLane; double milage; } Point; static const type_i...
testmp.c
#include <omp.h> #include <stdio.h> int main() { #pragma omp parallel printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads()); }
#include <omp.h> #include <stdio.h> int main() { printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads()); }
#include <omp.h> #include <stdio.h> int main() { #pragma omp parallel printf("Hello from thread %d, nthreads %d\n", omp_get_thread_num(), omp_get_num_threads()); }
cones.c
#include "cones.h" #include "linalg.h" #include "scs.h" #include "scs_blas.h" /* contains BLAS(X) macros and type info */ #include "util.h" #define CONE_RATE (2) #define CONE_TOL (1e-8) #define CONE_THRESH (1e-6) #define EXP_CONE_MAX_ITERS (100) #define POW_CONE_MAX_ITERS (20) #ifdef USE_LAPACK void BLAS(syevr)(const...
#include "cones.h" #include "linalg.h" #include "scs.h" #include "scs_blas.h" /* contains BLAS(X) macros and type info */ #include "util.h" #define CONE_RATE (2) #define CONE_TOL (1e-8) #define CONE_THRESH (1e-6) #define EXP_CONE_MAX_ITERS (100) #define POW_CONE_MAX_ITERS (20) #ifdef USE_LAPACK void BLAS(s...
#include "cones.h" #include "linalg.h" #include "scs.h" #include "scs_blas.h" /* contains BLAS(X) macros and type info */ #include "util.h" #define CONE_RATE (2) #define CONE_TOL (1e-8) #define CONE_THRESH (1e-6) #define EXP_CONE_MAX_ITERS (100) #define POW_CONE_MAX_ITERS (20) #ifdef USE_LAPACK void BLAS(s...
GB_unaryop__ainv_uint32_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...
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
sha1-avx2.c
#define _BSD_SOURCE #include <stdint.h> #include <iso646.h> #include <stdbool.h> #include <string.h> #include "proofofwork-private.h" static inline __m256i sha1_f00(__m256i b, __m256i c, __m256i d) { return (b & c) | (~ b & d); } static inline __m256i sha1_f20(__m256i b, __m256i c, __m256i d) { return b ^ c ^ d; } sta...
#define _BSD_SOURCE #include <stdint.h> #include <iso646.h> #include <stdbool.h> #include <string.h> #include "proofofwork-private.h" static inline __m256i sha1_f00(__m256i b, __m256i c, __m256i d) { return (b & c) | (~b & d); } static inline __m256i sha1_f20(__m256i b, __m256i c, __m256i d) { return b ^ c ^ ...
#define _BSD_SOURCE #include <stdint.h> #include <iso646.h> #include <stdbool.h> #include <string.h> #include "proofofwork-private.h" static inline __m256i sha1_f00(__m256i b, __m256i c, __m256i d) { return (b & c) | (~b & d); } static inline __m256i sha1_f20(__m256i b, __m256i c, __m256i d) { return b ^ c ^ ...
gdal_metric_eta.c
#include<stdio.h> #include<omp.h> #include<math.h> #include "gdal.h" #include "metric_eta.h" #include "ogr_srs_api.h" #include "proj_api.h" void usage() { printf( "-----------------------------------------\n"); printf( "--Modis Processing chain--OpenMP code----\n"); printf( "----------------------------------------...
#include<stdio.h> #include<omp.h> #include<math.h> #include "gdal.h" #include "metric_eta.h" #include "ogr_srs_api.h" #include "proj_api.h" void usage() { printf( "-----------------------------------------\n"); printf( "--Modis Processing chain--OpenMP code----\n"); printf( "----------------------------------------...
#include<stdio.h> #include<omp.h> #include<math.h> #include "gdal.h" #include "metric_eta.h" #include "ogr_srs_api.h" #include "proj_api.h" void usage() { printf( "-----------------------------------------\n"); printf( "--Modis Processing chain--OpenMP code----\n"); printf( "----------------------------------------...
soma_clustering.h
// ----------------------------------------------------------------------------- // // Copyright (C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compl...
// ----------------------------------------------------------------------------- // //Copyright(C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration.All Rights Reserved. // //Licensed under the Apache License, Version 2.0(the "License"); //you may not use this file except...
// ----------------------------------------------------------------------------- // //Copyright(C) 2021 CERN & University of Surrey for the benefit of the // BioDynaMo collaboration.All Rights Reserved. // //Licensed under the Apache License, Version 2.0(the "License"); //you may not use this file except...
pr34610.c
/* PR gcov-profile/34610 */ /* { dg-do compile } */ /* { dg-options "-O2 -fprofile-arcs -fopenmp" } */ /* { dg-require-profiling "-fprofile-generate" } */ extern void bar (int); extern void baz (int) __attribute__((noreturn)); void foo (int k) { int i; #pragma omp for schedule(dynamic) for (i = 0; i < 10; ++i) ...
/* PR gcov-profile/34610 */ /* { dg-do compile } */ /* { dg-options "-O2 -fprofile-arcs -fopenmp" } */ /* { dg-require-profiling "-fprofile-generate" } */ extern void bar(int); extern void baz(int)__attribute__((noreturn)); void foo(int k) { int i; for (i = 0; i < 10; ++i) bar(i); for (i = 0; i < ...
/* PR gcov-profile/34610 */ /* { dg-do compile } */ /* { dg-options "-O2 -fprofile-arcs -fopenmp" } */ /* { dg-require-profiling "-fprofile-generate" } */ extern void bar(int); extern void baz(int)__attribute__((noreturn)); void foo(int k) { int i; #pragma omp for schedule(dynamic) for (i = 0; i < 10; ++i) ...