source
stringlengths
3
92
c
stringlengths
26
2.25M
omp_bug5.c
/****************************************************************************** * FILE: omp_bug5.c * DESCRIPTION: * Using SECTIONS, two threads initialize their own array and then add * it to the other's array, however a deadlock occurs. * AUTHOR: Blaise Barney 01/29/04 * LAST REVISED: 08/15/11 *******************...
genprimes.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> // Main func. int main(int argc, char * argv[]) { // Check arguments if (argc != 3) { printf("Incorrect number of arguments passed. 3 needed. %d passed.\n", argc); exit(1); } // Declare (and initialize) vars. // Initialize up...
Analyzer.h
#ifndef ANALYZER_H #define ANALYZER_H /************************************************************* * Copyright: (C) 2012 by Markus Schordan * * Author : Markus Schordan * * License : see file LICENSE in the CodeThorn distribution * ****************************...
GB_assign_zombie4.c
//------------------------------------------------------------------------------ // GB_assign_zombie4: delete entries in C(i,:) for C_replace_phase //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
computepi.c
#include "computepi.h" #include <immintrin.h> #include <math.h> #include <omp.h> #include <stdio.h> double compute_pi_baseline(size_t N) { double pi = 0.0; double dt = 1.0 / N; // dt = (b-a)/N, b = 1, a = 0 for (size_t i = 0; i < N; i++) { double x = (double) i / N; // x = ti = a+(b-a)*i/N = i/N ...
pcptdesdecryptcbccaomp.c
/******************************************************************************* * Copyright 2002-2019 Intel Corporation * All Rights Reserved. * * If this software was obtained under the Intel Simplified Software License, * the following terms apply: * * The source code, information and material ("Material") co...
mathematigames.c
/* Andi Farhan (2006521616) Aryoshi Wicaksono (2006532140) Gemilang Bagas Ramadhani (2006535205) Nabil Mafaza (2006529133) */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <omp.h> #include <time.h> #include <ctype.h> struct soal { char pertanyaan[100]; char opsiA[10]; char o...
auction_cpu.h
/** * @file auction_cpu.h * @author Jiaqi Gu, Yibo Lin * @date Apr 2019 */ #ifndef _DREAMPLACE_GLOBAL_MOVE_AUCTION_CPU_H #define _DREAMPLACE_GLOBAL_MOVE_AUCTION_CPU_H #include <iostream> #include <cstring> #include <cassert> DREAMPLACE_BEGIN_NAMESPACE #define AUCTION_MAX_EPS 10.0 // Larger values mean soluti...
activation_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Pooyan Dadvand // // #incl...
snefru_fmt_plug.c
/* Snefru cracker patch for JtR. Hacked together during May of 2013 by Dhiru * Kholia <dhiru at openwall.com>. * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and * it is hereby released to the general public under the following terms: * * Redistribution and use in source and binary f...
ast-dump-openmp-parallel-sections.c
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s void test_zero() { #pragma omp parallel sections {} } void test_one() { #pragma omp parallel sections { ; } } // CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>>...
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...
tinyexr.h
/* Copyright (c) 2014 - 2015, Syoyo Fujita All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and t...
custom_data_storage.c
// RUN: %libomp-tool -DFIRST_TOOL -o %t.first.tool.so %s && \ // RUN: %libomp-tool -DSECOND_TOOL -o %t.second.tool.so %s && \ // RUN: %libomp-compile && \ // RUN: env OMP_TOOL_LIBRARIES=%t.first.tool.so \ // RUN: CUSTOM_DATA_STORAGE_TOOL_LIBRARIES=%t.second.tool.so \ // RUN: %libomp-run | %sort-threads | FileCheck %s ...
GB_unaryop__abs_uint64_fp32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
vect-simd-clone-10.h
#pragma omp declare simd notinbranch extern int foo (long int a, int b, int c); #pragma omp declare simd notinbranch extern long int bar (int a, int b, long int c);
Stmt.h
//===- Stmt.h - Classes for representing statements -------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
privatemissing-var-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_unop__acos_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...
channel.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
debug-1.c
/* PR debug/36617 */ /* { dg-do run } */ /* { dg-options "-g -O0" } */ int f1 (void) { int v1i, v1j, v1k, v1l = 0; v1i = 6; v1j = 8; #pragma omp parallel private (v1k) firstprivate (v1j) shared (v1i) reduction (+:v1l) { v1k = v1i + v1j; { int v1m = 1; v1l = v1m; } } return v1l; } ...
GB_unaryop__abs_uint64_int8.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
DRB071-targetparallelfor-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...
main.c
#include <stdio.h> #include <omp.h> int main() { int i; #pragma omp parallel num_threads(2) // seta o número de threads em 2 { int tid = omp_get_thread_num(); // lê o identificador da thread #pragma omp for ordered schedule(static) for(i = 1; i <= 3; i++) { pr...
nstream-ua-target.c
/// /// Copyright (c) 2019, Intel Corporation /// /// Redistribution and use in source and binary forms, with or without /// modification, are permitted provided that the following conditions /// are met: /// /// * Redistributions of source code must retain the above copyright /// notice, this list of conditions ...
room_assignment.c
/* The following C code implements the room-assignment problem * Written By : Sai Suraj(21560) and Suvam Tamang(21561) * MTCS - 103(P) Project */ /* Declaring all the header files used */ #include<stdio.h> #include<time.h> #include<stdlib.h> #include<time.h> #include<math.h> #include<omp.h> /* All the...
motivate_matmul.c
/* gcc -std=c89 -fopenmp -Wall -O3 motivate_matmul.c -o motivate_matmul */ /* C89 to keep OpenMPC happy. */ /* To run: ./motivate_matmul $MATRIX_DIMENSION */ #include <stdlib.h> #include <assert.h> typedef float TYPE; static void fill(TYPE *matrix, int size, TYPE val) { int loop; for (loop = 0; loop < size; lo...
fsm3d_bfsm_openmp_v2.c
#include "openst/eikonal/fsm.h" #define M_FSM3D_IMP_NAME "BFSMv2" const char OPENST_FSM3D_COMPUTEPARTIAL_IMP_NAME[] = M_FSM3D_IMP_NAME; const size_t OPENST_FSM3D_COMPUTEPARTIAL_IMP_NAME_LENGTH = sizeof(M_FSM3D_IMP_NAME); #include <pthread.h> #include <semaphore.h> #include <errno.h> sem_t *sem; int OpenST_FSM3D_C...
GB_binop__rminus_int32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
convolution_1x1_pack8to4_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GB_assign_zombie1.c
//------------------------------------------------------------------------------ // GB_assign_zombie1: delete all entries in C(:,j) for GB_assign //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://su...
with_openmp.c
/** * Example C code for demonstrating the use of OpenMP in user code * to interface into a simple linear algebra library. * * This example illustrates how a possible library interface * with support for different threading methodologies can look like. * In particular, 'mylib' is not restricted to either * pthread, C++...
builder.h
// Copyright (c) 2015, The Regents of the University of California (Regents) // See LICENSE.txt for license details #ifndef BUILDER_H_ #define BUILDER_H_ #include <algorithm> #include <cinttypes> #include <fstream> #include <functional> #include <type_traits> #include <utility> #include "command_line.h" #include "ge...
relic_core.c
/* * RELIC is an Efficient LIbrary for Cryptography * Copyright (C) 2007-2017 RELIC Authors * * This file is part of RELIC. RELIC is legal property of its developers, * whose names are not listed here. Please refer to the COPYRIGHT file * for contact information. * * RELIC is free software; you can redistribute...
loss.h
#ifndef LOSS_H #define LOSS_H #include "data.h" #define VECM Vector<typename M::value_type> enum loss_t { SQUARE, LOGISTIC, HINGE, SQHINGE, SAFE_LOGISTIC, MULTI_LOGISTIC, PPA, INCORRECT_LOSS }; static bool is_loss_for_matrices(const loss_t& loss) { return loss==SQUARE || loss==MULTI_LOGISTIC; } static bool is_...
GB_subassign_20.c
//------------------------------------------------------------------------------ // GB_subassign_20: C(I,J)<!M,repl> += A ; using S //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com ...
GB_unop__acos_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...
marginPolish.c
/* * Copyright (C) 2018 by Benedict Paten (benedictpaten@gmail.com) * * Released under the MIT license, see LICENSE.txt */ #include <getopt.h> #include <stdio.h> #include <ctype.h> #include <memory.h> #include <hashTableC.h> #include <unistd.h> #include <omp.h> #include <time.h> #include <sys/stat.h> #include "ma...
polybench.c
// RUN: mlir-clang %s %stdinclude -S --function=* | FileCheck %s /** * This version is stamped on May 10, 2016 * * Contact: * Louis-Noel Pouchet <pouchet.ohio-state.edu> * Tomofumi Yuki <tomofumi.yuki.fr> * * Web address: http://polybench.sourceforge.net */ /* polybench.c: this file is part of PolyBench/C *...
cyclic_reduction.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
sparsify.h
/****************************************************************************** * sparsify.h * * Source of VieCut. * ****************************************************************************** * Copyright (C) 2017 Alexander Noe <alexander.noe@univie.ac.at> * * Published under the MIT license in the LICENSE f...
elemwise_binary_op.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
GB_unaryop__abs_int32_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...
compare.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_unop__identity_bool_uint32.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
reciprocal_to_normal.c
/* Copyright (C) 2015 Atsushi Togo */ /* All rights reserved. */ /* This file is part of phonopy. */ /* 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 abo...
fig4.70-if-clause.c
/* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2009 Sun Microsystems, Inc. All rights reserved. The contents of this file are subject to the terms of the BSD License("BSD")(the "License"). You can obtain a copy of the License at: http://www.opensparc.net/pubs/t1/licenses/BSD+_Lice...
GraphBLAS.h
//------------------------------------------------------------------------------ // GraphBLAS.h: definitions for the GraphBLAS package //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identif...
IOLayersRules.h
// Copyright 2016-present, Facebook, Inc. // All rights reserved. // // This source code is licensed under the BSD-style license found in the // LICENSE file in the root directory of this source tree. #ifndef INPUTLAYER_H #define INPUTLAYER_H // Rulebook Format // rules[0][0] == mode // rules[0][1] == maxActive per s...
omp_for_nowait.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include "omp_testsuite.h" /* * This test will hang if the nowait is not working properly. * * It relies on a thread skipping to the second for construct to * release the threads in the first for construct. * * Also, we use static scheduling to guarantee that on...
3d7pt.c
/* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tareq Malas */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #ifdef LIKWID_PERFMON #include <likwid.h> #endif #include "print_utils.h" #define TESTS 2 #define MAX(a,b) ((a) > (b) ? a : b) #define MIN(a,b) ((a) < (b) ...
dds.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
displacement_lagrangemultiplier_mixed_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
Pooling.h
#ifndef POOLING #define POOLING /* * Pooling.h: * pool operation, max, min, average and sum pooling * * Created on: Apr 22, 2017 * Author: mszhang */ #include "MyLib.h" #include "Node.h" #include "Graph.h" class PoolNode : public Node { public: vector<int> masks; vector<PNode> ins; public: ...
GB_binop__times_fp32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
test-new-conv.c
/* Test and timing harness program for developing a multichannel multikernel convolution (as used in deep learning networks) Note there are some simplifications around this implementation, in particular with respect to computing the convolution at edge pixels of the image. Author: David Gregg Date: ...
deprecate.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
schedule.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> int ordered_example(int lb, int ub, int stride, int nteams) { int i; int size = (ub-lb)/ stride; double *output = (double*)malloc(size * sizeof(double)); #pragma omp target teams map(from \ ...
test.c
#include <stdio.h> #include <omp.h> #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (1024*3) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i+1;}) #define ZERO(X) ZERO_ARRAY(N, X) #define DUMP_SUCCESS9() { \ DUMP_SUCCESS(gpu_threads-max_threads); \ ...
quicksort.h
// -*- C++ -*- // Copyright (C) 2007-2014 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library 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 3...
denoise.gold.h
#include "common/common.hpp" #define epsilon (1.0e-20) void denoise_step (double* h_u0, double *h_u, double *h_f, double *h_g, int N) { double (*u)[N][N] = (double (*)[N][N])h_u; double (*u0)[N][N] = (double (*)[N][N])h_u0; double (*f)[N][N] = (double (*)[N][N])h_f; double (*g)[N][N] = (double (*)[N][N])h_g; ...
GB_unop__ainv_bool_bool.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
coordinate_common.h
/*! * Copyright 2018 by Contributors * \author Rory Mitchell */ #pragma once #include <algorithm> #include <string> #include <utility> #include <vector> #include <limits> #include "xgboost/data.h" #include "xgboost/parameter.h" #include "./param.h" #include "../gbm/gblinear_model.h" #include "../common/random.h" n...
TrainMTCNNprocessor.h
#ifndef _TRAIN_MTCNN_PROCESSOR_H_ #define _TRAIN_MTCNN_PROCESSOR_H_ #pragma once #include "ZQ_CNN_Net.h" #include <vector> #include <string> #include <iostream> #include <omp.h> #include <stdio.h> #include "opencv2/opencv.hpp" namespace ZQ { class TrainMTCNNprocessor { public: static bool generateWiderProb(const c...
kvstore_dist_server.h
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
Mrpt.h
#ifndef CPP_MRPT_H_ #define CPP_MRPT_H_ #include <algorithm> #include <cmath> #include <functional> #include <map> #include <numeric> #include <random> #include <set> #include <stdexcept> #include <string> #include <utility> #include <vector> #include <Eigen/Dense> #include <Eigen/SparseCore> struct Mrpt_Parameters ...
GB_unaryop__lnot_int64_int16.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
CT_OMP_IMPL.c
/* * _CT_OMP_IMPL_C_ * * Copyright (C) 2017-2021 Tactical Computing Laboratories, LLC * All Rights Reserved * contact@tactcomplabs.com * * See LICENSE in the top level directory for licensing details */ #include <omp.h> #include <stdint.h> /* OpenMP Benchmark Implementations * * Benchmark implementations a...
model.c
#include <cdnn/model.h> #include <cdnn/progressbar.h> __Model__ * m; void __init__(){ m->predicting = 0; m->testing=0; m->test_accuracy = 0.0; m->train_accuracy = 0.0; m->train_cost = 0.0; m->cross_val_accuracy = 0.0; m->iter_cost = 0.0; m->current_iter = 1; m->output = NULL; __initialize_params__...
utilities.h
#ifndef __UTILITIES_H__ #define __UTILITIES_H__ #define ZERO_ARRAY(UB, X) { \ int i; \ for (i = 0; i < UB; i++) { \ X[i] = 0; \ } \ } #define INIT_LOOP(UB, B) { \ int i; \ for (i = 0; i < UB; i++) { \ B \ } \ } #define VERIFY_E(LB, UB, X, VAL, EPSILON) { \ int i; \ int errorNum = 0 ; \ ...
GB_sort.c
//------------------------------------------------------------------------------ // GB_sort: sort all vectors in a matrix //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-License-Identifier: Apache-2...
GB_binop__le_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
nlife.c
/* lance un jeu de la vie sur la totalité de la taille de la console */ /* devrait etre plus rapide que l algo naïf */ /* gcc -Wall -O3 nlife.c -lncurses */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <signal.h> #include <time.h> #include <string.h> #ifdef USE_LIBNCURSES # include <ncurses.h> #...
raytracing.c
#include <stdio.h> #include <stdlib.h> #include "math-toolkit.h" #include "primitives.h" #include "raytracing.h" #include "idx_stack.h" #include <omp.h> #define MAX_REFLECTION_BOUNCES 3 #define MAX_DISTANCE 1000000000000.0 #define MIN_DISTANCE 0.00001 #define SAMPLES 4 #define SQUARE(x) (x * x) #define MAX(a, b) (a...
kmean_par_schedule.c
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <float.h> #include "immintrin.h" #include "pack.h" #include "kernel.h" #include <string.h> #include "rdtsc.h" //#define DEBUG 1 //#define KERNEL 1 #define KERNEL_P_SIZE 8 #define KERNEL_D_SIZE 4 #define KERNEL_C_SIZE 4 #define MAX_CENTER_NUM 64 #defin...
llg.c
#include "common_clib.h" /* The right hand side of the LLG equation for the CVOde solver. This can be * used both for the micromagnetic and atomistic codes since m or S are unitless * and the prefactors keep the same structure. * * The LLG equation has the structure: * ( * is for dot or scalar product) * * ...
util.h
#ifndef _C_UTIL_ #define _C_UTIL_ #define DPCT_USM_LEVEL_NONE #include <CL/sycl.hpp> #include <dpct/dpct.hpp> //#include <omp.h> //------------------------------------------------------------------- //--initialize array with maximum limit //------------------------------------------------------------------- template<ty...
mm.c
#include <string.h> #include <omp.h> #include "mm.h" #define ALIGNED __attribute__((aligned(64))) inline size_t min2(const size_t a, const size_t b) { return (a < b) ? a : b; } #define MBLOCK 224 #define NBLOCK 48 #define KBLOCK (2 * MBLOCK) inline void mm_serial(const size_t m, const size_t n, const size_t k, ...
recon3d.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <time.h> #include <sys/time.h> #include <string.h> #include <omp.h> #include "mbir_ct.h" #include "MBIRModularDefs.h" #include "MBIRModularUtils.h" #include "allocate.h" #include "icd3d.h" #include "heap.h" #include "A_comp.h" #include "initialize.h" #...
map-2.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void foo (int *p, int (*q)[10], int r[10], int s[10][10]) { int a[10], b[10][10]; #pragma omp target map (tofrom: p[-1:2]) ; #pragma omp target map (tofrom: q[-1:2][0:10]) ; #pragma omp target map (tofrom: q[-1:2][-2:10]) /* { dg-error "negative low b...
subCycleStrongCubatureVolumeHex3D.c
/* The MIT License (MIT) Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation t...
3d7pt.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil * Adapted from PLUTO and Pochoir test bench * * Tare...
fft_host.h
#include <stdio.h> #include <assert.h> #include <vector> #include <iostream> #include <math.h> size_t bitreverse_host(size_t n, const size_t l) { size_t r = 0; for (size_t k = 0; k < l; ++k) { r = (r << 1) | (n & 1); n >>= 1; } return r; } template <typename FieldT> void _basic_ser...
partdiff-openmp.c
/****************************************************************************/ /****************************************************************************/ /** **/ /** TU Muenchen - Institut fuer Informatik **/ /** ...
gradbm_adj_mex.c
#include <inttypes.h> #include <omp.h> #include "mex.h" void gradbm_adjf(float *du, const float *x, const float *y, const float *z, const uint8_t *G, const double *h, const size_t *sz); void gradbm_adjd(double *du, const double *x, const double *y, const double *z, ...
sapH_fmt_plug.c
/* * this is a SAP-H plugin for john the ripper. * Copyright (c) 2014 JimF, and it is hereby released * to the general public under the following terms: Redistribution and use in * source and binary forms, with or without modification, are permitted. * * The internals of this algorithm were found on the hashcat ...
parallelfor.c
/* * Combined parallel for * with multiple clauses * */ #include <omp.h> int main(void) { int i, a[1000]; int sum; #pragma omp parallel for if(1) ordered reduction(+:sum) schedule(dynamic, 5) for (i=0;i<1000;i++) { a[i]=i*2; sum+=i; } return 0; }
callback.h
#define _BSD_SOURCE #define _DEFAULT_SOURCE #include <stdio.h> #include <inttypes.h> #include <omp.h> #include <ompt.h> #include "ompt-signal.h" // Used to detect architecture #include "../../src/kmp_platform.h" static const char* ompt_thread_type_t_values[] = { NULL, "ompt_thread_initial", "ompt_thread_worker"...
triMeshAcceleratorBVHMatt.h
#pragma once // // Perf changes to decrease size of TriangleBVHNode and improve cache coherency. Will test more thoroughly later. // #ifndef _TRIMESH_ACCELERATOR_BVH_H_ #define _TRIMESH_ACCELERATOR_BVH_H_ namespace ml { template <class FloatType> struct TriangleBVHNode { TriangleBVHNode() : rChild(0), lChild(0), l...
GB_binop__max_uint32.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
effect.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
GB_binop__second_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...
cherk.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/zherk.c, normal z -> c, Fri Sep 28 17:38:06 2018 * **/ #include "plasma.h" #include "plasma_async.h" #incl...
c-heatx.c
# include <stdlib.h> # include <stdio.h> # include <math.h> # include <float.h> # include <time.h> # include <omp.h> #define a(i,j,k) a[(k)*mxy+(j)*mx+(i)] #define anew(i,j,k) anew[(k)*mxy+(j)*mx+(i)] int main ( int argc, char *argv[] ) { double error ; double epsilon ; int i,j...
GB_reduce_build_template.c
//------------------------------------------------------------------------------ // GB_build_template: T=build(S), and assemble any duplicate tuples //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http:/...
color_bruteforcer.c
#include <ctype.h> // isalnum #include <math.h> // round #include <omp.h> // omp pragmas #include <string.h> // memcpy, memset, strlen #include <stdio.h> // printf, sprintf #include <stddef.h> // NULL #include <stdlib.h> // free, malloc, realloc, strtol #include "color_bruteforcer.h" const int OFFSET = 0xff; bool ver...
mm_parallel_for.c
#include <stdio.h> #include <stdlib.h> /* TEMPO SEQUENCIAL: real 3m30.117s user 1m15.715s sys 0m0.127s TEMPO PARALELO MULTICORE: real 1m29.670s user 1m14.390s sys 0m0.269s TEMPO PARALELO DISTRIBUTE: real 3m5.985s user 2m25.092s sys 0m40.084s Invocations ...
main.c
/*************************************************************************** *cr *cr (C) Copyright 2007 The Board of Trustees of the *cr University of Illinois *cr All Rights Reserved *cr ********************************************************************...
ops.h
/** Pasha: Parallel Algorithms for Approximating Compact Universal Hitting Sets ops.h Header file for main operations involving the calculation of the hitting set after the generation of the graph and the removal of the decycling set. @author Baris Ekim @version 1.0 4/15/19 */ #ifndef OPS_H #def...
GB_binop__lxor_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...