source
stringlengths
3
92
c
stringlengths
26
2.25M
luks_fmt_plug.c
/* luks.c * * hashkill - a hash cracking tool * Copyright (C) 2010 Milen Rangelov <gat3way@gat3way.eu> * * This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as p...
producer.c
#include "grid.h" #include "config.h" #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <time.h> #include <string.h> #include <omp.h> #ifndef NO_MPI #include <mpi.h> #else #define MPI_Request int #define MPI_REQUEST_NULL 0 #endif struct producer_stream { // Facet worker id, number of facets t...
omp_get_num_threads.c
<ompts:test> <ompts:testdescription>Test which checks that the omp_get_num_threads returns the correct number of threads. Therefor it counts up a variable in a parallelized section and compars this value with the result of the omp_get_num_threads function.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion...
dynamic_fmt.c
/* * This software was written by Jim Fougeron jfoug AT cox dot net * in 2009-2013. No copyright is claimed, and the software is hereby * placed in the public domain. In case this attempt to disclaim * copyright and place the software in the public domain is deemed * null and void, then the software is Copyright (...
GB_binop__atan2_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...
GeneralMatrixMatrix.h
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You c...
EmbeddingBag.h
/****************************************************************************** * Copyright (c) Intel Corporation - All rights reserved. * * This file is part of the LIBXSMM library. * * * ...
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) >...
GB_unaryop__minv_fp64_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...
knncpp.h
/* knncpp.h * * Author: Fabian Meyer * Created On: 22 Aug 2021 * License: MIT */ #ifndef KNNCPP_H_ #define KNNCPP_H_ #include <Eigen/Geometry> #include <vector> #include <map> #include <set> #ifdef KNNCPP_FLANN #include <flann/flann.hpp> #endif namespace knncpp { /*********************************...
bc_adj.h
/* * bc_adj.h * LLAMA Graph Analytics * * Copyright 2014 * The President and Fellows of Harvard College. * * Copyright 2014 * Oracle Labs. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Re...
StmtOpenMP.h
//===- StmtOpenMP.h - Classes for OpenMP directives ------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
seqramp.c
#include<Python.h> #include<numpy/arrayobject.h> #include<math.h> #include<omp.h> #define IND(a,i) *((double *)(a->data+i*a->strides[0])) static PyObject *seqramp(PyObject *self, PyObject *args, PyObject *keywds); static PyObject *seqramp(PyObject *self, PyObject *args, PyObject *keywds) { PyObject *etc; PyArray...
feature.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
network.c
#include <stdio.h> #include <time.h> #include <assert.h> #include "network.h" #include "image.h" #include "data.h" #include "utils.h" #include "blas.h" #include "crop_layer.h" #include "connected_layer.h" #include "gru_layer.h" #include "rnn_layer.h" #include "crnn_layer.h" #include "local_layer.h" #include "convoluti...
Main.c
#include "XSbench_header.h" #include "marker_stub.h" #ifdef MPI #include<mpi.h> #endif int main( int argc, char* argv[] ) { // ===================================================================== // Initialization & Command Line Read-In // ===================================================================== int...
transpose.h
#ifndef PARLAY_TRANSPOSE_H_ #define PARLAY_TRANSPOSE_H_ #include "../monoid.h" #include "../sequence.h" #include "../utilities.h" namespace parlay { namespace internal { #ifdef PAR_GRANULARITY constexpr const size_t TRANS_THRESHHOLD = PAR_GRANULARITY / 4; #else constexpr const size_t TRANS_THRESHHOLD = 500; #endif ...
GB_unop__tan_fp64_fp64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://...
sparselu.ref.c
#include <sys/time.h> #include <time.h> #include <stdio.h> static unsigned long long current_time_ns() { #ifdef __MACH__ clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), c...
engine.h
#pragma once #ifndef ENGINE_H #define ENGINE_H // Node API includes #include <napi.h> // STL includes #include <memory> #include <unordered_map> #include <any> // Eigen includes #include <Eigen/Core> // Optimization lib includes #include <libs/optimization_lib/include/core/core.h> #include <libs/op...
Test_IO_Compressed.h
/* * Test_IO_Compressed.h * CubismZ * * Copyright 2018 ETH Zurich. 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. */ #pragma once #include "Types_single.h" #include "SerializerIO_WaveletCompression_MPI_Sim...
tree.h
/*! * Copyright (c) 2016 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_TREE_H_ #define LIGHTGBM_TREE_H_ #include <LightGBM/dataset.h> #include <LightGBM/meta.h> #include <LightGBM/random_generator.h> #...
order-3.c
void foo (void); int v; #ifdef __cplusplus extern "C" { #endif int omp_get_thread_num (void); int omp_get_num_threads (void); int omp_target_is_present (const void *, int); int omp_get_cancellation (void); #ifdef __cplusplus } #endif void f1 (int *a) { int i; #pragma omp simd order(concurrent) for (i = 0; i < 64...
ChooserDemandCalculator.h
#pragma once #include <cassert> #include <fstream> #include <iostream> #include <random> #include <string> #include "DataStructures/Graph/Graph.h" #include "Tools/CommandLine/ProgressBar.h" #include "Tools/OpenMP.h" #include "Tools/Timer.h" // A travel demand calculator based on repeatedly choosing random sources an...
utils.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 ...
loopct_r6.c
/* * Input: ntabs nchannels padded_size * Output: ntabs ntimes -nchannels ; ntimes < padded_size * * We process a finished tab directly, so no need to build up the full ntabs array */ void deinterleave(const char *page, char *transposed, const int ntabs, const int nchannels, const int ntimes, const int padd...
parallelJacobi_mp.c
/************************************************************ * Program to solve a finite difference * discretization of the screened Poisson equation: * (d2/dx2)u + (d2/dy2)u - alpha u = f * with zero Dirichlet boundary condition using the iterative * Jacobi method with overrelaxation. * * RHS (source) function...
fold.c
/* * minimum free energy * RNA secondary structure prediction * * c Ivo Hofacker, Chrisoph Flamm * original implementation by * Walter Fontana * g-quadruplex support and threadsafety * by Ronny Lorenz * * ...
Trap_Gian_A01638108.c
/** * @file Trap_Gian_A01638108.c * @author Giancarlo Franco Carrillo * @brief Trapezoidal aproximation for integral calculation using omp library. * @date 2021-12-3 */ #include <stdio.h> #include <omp.h> #include <math.h> // Function to compute integral #define f(x) sin(x) int main(){ // main variables ...
im2collifted.c
#include <stdlib.h> #include "im2collifted.h" void im2collifted(float* x,float* w,int RR,int W,int K,int B,int A,float*output){ float* tmp2 = (float*) calloc(1,(W) * (RR) * sizeof (float)); for (int H10 = 0; H10 < W; H10++) { for (int H11 = 0; H11 < RR; H11++) { if (H10 + H11 < K) { tmp2[(RR) * (H10) + H11]...
rankmatrix.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...
raytracer.h
#pragma once #include "resource.h" #include <linalg.h> #include <memory> #include <omp.h> #include <random> #include <time.h> using namespace linalg::aliases; namespace cg::renderer { struct ray { ray(float3 position, float3 direction) : position(position) { this->direction = normalize(direction); } float3 po...
GB_unaryop__lnot_uint16_fp64.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
task_codegen.c
// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -x c -emit-llvm %s -o - | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -x c -triple x86_64-apple-darwin10 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s // RUN: %cl...
uts_shm.c
/* * ---- The Unbalanced Tree Search (UTS) Benchmark ---- * * Copyright (c) 2010 See AUTHORS file for copyright holders * * This file is part of the unbalanced tree search benchmark. This * project is licensed under the MIT Open Source license. See the LICENSE * file for copyright and licensing i...
taskdep_taskwait_untied_scheduling.c
// RUN: %libomp-compile && env KMP_ABT_NUM_ESS=4 %libomp-run // REQUIRES: abt #include "omp_testsuite.h" #include "bolt_scheduling_util.h" #include <stdio.h> #include <stdlib.h> #include <string.h> int calc_seq(int n) { int i, j, *buffer = (int *)malloc(sizeof(int) * n * n); for (i = 0; i < n; i++) { for (j = ...
17_primes-par3.c
#include <stdio.h> #include <stdlib.h> #include <math.h> int main(int argc, char **argv) { // quantos numeros primos entre 1 e N ? unsigned long n = 99999; unsigned long aux = 2; unsigned long primes = 0; #pragma omp parallel for firstprivate(aux) reduction(+:primes) schedule(guided) for (unsigned long i = ...
trmv_x_csr_u_hi.c
#include "alphasparse/kernel.h" #include "alphasparse/util.h" #include "alphasparse/opt.h" #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t trmv_x_csr_u_hi_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_CSR *A, const ALPHA_Number *x, const ...
GB_iso_check_template.c
//------------------------------------------------------------------------------ // GB_iso_check_template: check if all entries in a matrix are identical //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // S...
residual_based_pseudo_static_displacement_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ \. // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Main authors: Vicente Mataix Ferrandiz // #if !defined(KRATOS_RESIDUAL_PSEUDO_STATIC_DISPLACEMENT_SCHEME ) #de...
integrate.c
#include<stdio.h> #include<math.h> #include<string.h> #include<stdlib.h> /* Include Ian Bush's timing routines */ #include<timer.h> /* Include OpenMP library routines */ #include<omp.h> /* The constant M_PI isn't included in the C89 standard, so we define it here - checking first to see if it has already been define...
3d25pt.c
/* * Order-2, 3D 25 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)...
valid.mob7.src.h
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_512_14_14_512_3_3.h" #include "gen_ukr_A4B2gemm_1_512_14_14_512_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...
Sema.h
//===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
attribute.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
heated_plate_openmp.c
# include <stdlib.h> # include <stdio.h> # include <math.h> # include <omp.h> int main ( int argc, char *argv[] ); /******************************************************************************/ /* Michael: when I use CIVL-C input qualifiers the OMP2CIVL transformer breaks $input int M=5; // originally 500 $input ...
cpu_ctx.h
#ifndef MOBULA_INCLUDE_CONTEXT_CPU_CTX_H_ #define MOBULA_INCLUDE_CONTEXT_CPU_CTX_H_ #define MOBULA_KERNEL void #define MOBULA_DEVICE #include <algorithm> #include <cmath> #include <cstring> #include <mutex> #include <thread> #include "../ctypes.h" #include "./common.h" namespace mobula { #if USING_CBLAS #include <...
Graph.h
/* * Graph.h * * Created on: 01.06.2014 * Author: Christian Staudt (christian.staudt@kit.edu), Klara Reichard (klara.reichard@gmail.com), Marvin Ritter (marvin.ritter@gmail.com) */ #ifndef GRAPH_H_ #define GRAPH_H_ #include <algorithm> #include <vector> #include <stack> #include <queue> #include <utility> ...
erodr.c
#include <time.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <stdio.h> #include "vector.h" #include "io.h" #include "image.h" #include "params.h" #include "util.h" /* * Particle type. */ typedef struct particle { vec2 pos; vec2 dir; double vel; double sediment; double water; } particle; ...
c-parser.c
/* Parser for C and Objective-C. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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...
connector_base.h
/* * connector_base.h * * This file is part of NEST. * * Copyright (C) 2004 The NEST Initiative * * NEST 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, or * (...
GB_unaryop__lnot_int32_int32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
vec_add.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define N (30) int main(int argc, char *argv[]) { int nthreads, tid, idx; float a[N], b[N], c[N]; nthreads = omp_get_num_threads(); printf("Number of threads = %d\n", nthreads); // init #pragma omp parallel for for(idx=0; idx<N; ++id...
GB_unaryop__lnot_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...
qops.c
#include <stdlib.h> #include <stdio.h> #include <math.h> #include <omp.h> #include "platform.h" #include "qstate.h" #include "arraylist.h" #include "qgate.h" #include "qops.h" REAL_TYPE get_global_phase(struct state_vector *state) { NATURAL_TYPE i; REAL_TYPE phase; COMPLEX_TYPE val; if (state->fcarg...
GB_binop__isne_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-...
C_pp.c
// this is autogenerated file, do not edit it. #include "ficus/ficus.h" struct _fx_N14K_form__ktyp_t_data_t; static void _fx_free_N14K_form__ktyp_t(struct _fx_N14K_form__ktyp_t_data_t** dst); struct _fx_N14C_form__ctyp_t_data_t; static void _fx_free_N14C_form__ctyp_t(struct _fx_N14C_form__ctyp_t_data_t** dst); st...
GB_binop__bor_int16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
lbp.c
#include <stdlib.h> // for malloc #include <math.h> #include <string.h> // for memset #include "private/iocore_private.h" // for getopt #include "private/cvcore_private.h" // count the 0->1 and 1->0 flips in the code static int lbp_numflip(int code, int neighbors) { int numflip = 0; int current = code%2; // ge...
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...
fibonacci.h
#include <iostream> #include <chrono> #include <omp.h> #include "xitao.h" using namespace std; // enable a known trick to avoid redundant recursion for evaluated cases //#define MEMOIZE // the maximum number of Fibonacci terms that can fit in unsigned 64 bit const uint32_t MAX_FIB = 92; // a global variable to manage...
singleModificado2.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num() 0 #define omp_get_num_threads() 1 #endif int main(int argc, char ** argv) { int n = 9, i, a, b[n]; for (i=0; i<n; i++) b[i] = -1; #ifdef _OPENMP #pragma omp parallel #endif { #ifdef _OPENMP...
trmv_x_dia_u_lo_conj.c
#include "alphasparse/kernel.h" #include "alphasparse/opt.h" #include "alphasparse/util.h" #include <string.h> #ifdef _OPENMP #include <omp.h> #endif static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha, const ALPHA_SPMAT_DIA* A, const ALPHA_Number* x, ...
omp_task_imp_firstprivate.c
<ompts:test> <ompts:testdescription> Test to see if implied private works properly</ompts:testdescription> <ompts:ompversion>3.0</ompts:ompversion> <ompts:directive>omp task</ompts:directive> <ompts:dependences>omp single</ompts:dependences> <ompts:testcode> #include <stdio.h> #include <math.h> #include "omp_testsuite....
GB_binop__bset_uint64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
nr_incore.c
/* Copyright 2014-2018 The PySCF Developers. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless requi...
3d25pt.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-2, 3D 25 point stencil * Adapted from PLUTO and Pochoir test bench * * Tar...
GB_binop__isne_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...
Fdtd.h
#pragma once #include "Constants.h" #include "FieldSolver.h" #include "Grid.h" #include "PmlFdtd.h" #include "Vectors.h" #include <algorithm> namespace pfc { class FDTD : public RealFieldSolver<YeeGridType> { public: FDTD(YeeGrid* grid, FP dt); void updateFields(); void set...
cell_division_gpu.h
// ----------------------------------------------------------------------------- // // Copyright (C) The BioDynaMo Project. // All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // // See the LICENSE file distrib...
GB_binop__land_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...
task-taskgroup-unrelated.c
/* * task-taskgroup-unrelated.c -- Archer testcase */ //===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // // See tools/archer/LICENSE.txt for details. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-e...
GB_binop__pair_uint8.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
omp_task.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <math.h> #include "omp_testsuite.h" #include "omp_my_sleep.h" int test_omp_task() { int tids[NUM_TASKS]; int i; #pragma omp parallel { #pragma omp single { for (i = 0; i < NUM_TASKS; i++) { /* First we have to store the value of...
GB_binop__minus_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...
ConvolutionRules.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 CONVOLUTIONRULES_H #define CONVOLUTIONRULES_H #include "RectangularRegions.h" template <Int dimension> void C...
solver.c
//======================================================================================================================================================150 // UPDATE //======================================================================================================================================================1...
nbody-block.c
#include <math.h> #include <stdio.h> #include <stdlib.h> #include "timer.h" #define CACHELINE 64 // size of cache line [bytes] #define SOFTENING 1e-9f typedef struct { float *x, *y, *z, *vx, *vy, *vz; } BodySystem; void randomizeBodies(float *data, int n) { for (int i = 0; i < n; i++) { data[i] = 2.0f * (rand(...
kpoint.c
/* kpoint.c */ /* Copyright (C) 2008 Atsushi Togo */ #include <stdio.h> #include <stdlib.h> #include "mathfunc.h" #include "symmetry.h" #include "kpoint.h" #include "debug.h" /* #define GRID_ORDER_XYZ */ /* The addressing order of mesh grid is defined as running left */ /* element first. But when GRID_ORDER_XYZ is d...
convolution_1x1.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. // // 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 ...
swapit.h
#ifndef _SWAPIT_H_ #define _SWAPIT_H_ #include <sys/types.h> // u_int32_t, etc #include <unistd.h> // read() #include <stdexcept> // std::runtime_error #include <cstring> // memcpy() #include <vector> #include <cassert> namespace p_bin { // NO NUMTHREADS!!! inline void swap16(void* buf, ssize_t numWords)...
target-10.c
/* { dg-do run } */ #pragma omp declare target extern int v; #pragma omp end declare target int v; int main () { #pragma omp target update to(v) return 0; }
GB_unaryop__identity_uint16_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...
utils.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 ...
exp3_omp_v1.c
#include <stdio.h> #include <omp.h> int main() { int ii; #pragma omp parallel private(ii) { for(ii=0;ii<10;ii++) { printf("Iteration: %d from %d\n",ii,omp_get_thread_num()); } } printf("\n"); return 0; }
3d25pt.c
/* * Order-2, 3D 25 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)...
core_zttlqt.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> c d s * **/ #include "core_blas.h" #include "plasma_types.h" #include "plasma_internal.h" #include "core_lapack.h" #include <omp.h> // This will be swapp...
GB_positional_op_ip.c
//------------------------------------------------------------------------------ // GB_positional_op_ip: C = positional_op (A), depending only on i //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
fill_nr_3c.c
/* * Author: Qiming Sun <osirpt.sun@gmail.com> */ #include <stdlib.h> #include "config.h" #include "cint.h" #define NCTRMAX 72 static void dcopy_s1(double *out, double *in, int comp, int ni, int nij, int nijk, int di, int dj, int dk) { const size_t dij = di * dj; int ...
linear_tree_learner.h
/*! * Copyright (c) 2020 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_TREELEARNER_LINEAR_TREE_LEARNER_H_ #define LIGHTGBM_TREELEARNER_LINEAR_TREE_LEARNER_H_ #include <string> #include <cmath> #include ...
CH4-15step.c
#include <math.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #if defined(BL_FORT_USE_UPPERCASE) #define CKINDX CKINDX #define CKINIT CKINIT #define CKFINALIZE CKFINALIZE #define CKXNUM CKXNUM #define CKSYME CKSYME #define CKSYMS CKSYMS #define CKRP CKRP #define CKPX CKPX #define CKPY CKPY #define CKPC...
deconvolution_pack8to1.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2022 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 ...
matmul.c
//------------------------------------------------------------------------------------------------------------------------------ // Samuel Williams // SWWilliams@lbl.gov // Lawrence Berkeley National Lab //------------------------------------------------------------------------------------------------------------------...
GB_unop__identity_fp32_uint32.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...
FrameBuffer.h
// -------------------------------------------------------------------------- // Binary Brain -- binary neural net framework // // Copyright (C) 2018 by Ryuji Fuchikami // https://github.com/ryuz // ryuji.fuch...
contact_utilities.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
omp_parallel_for_firstprivate.c
<ompts:test> <ompts:testdescription>Test which checks the omp parallel for firstprivate directive.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp parallel for firstprivate</ompts:directive> <ompts:dependences>omp parallel for reduction,omp parallel for private</ompts:dependences> ...
declare_simd_aarch64_complex.c
// REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -fopenmp -x c -std=c11 -emit-llvm %s -o - -femit-all-decls | FileCheck %s // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +sve -fopenmp -x c -std=c11 -emit-llvm %s -o - -femit-all-decls | FileCheck %s...
wgs64.c
#include <stdio.h> #include <omp.h> int n =64; int main(void) { int fail = 0; int a = -1; // #if 1 #pragma omp target { //nothing } #endif #pragma omp target teams distribute thread_limit(64) for (int k =0; k < n; k++) { // nothing } #pragma omp target teams distribute parallel for thread_l...
26_omp_heap.c
// clang-format off // RUN: %run %s --omp 2>&1 | %filecheck %s --check-prefix=CHECK-TSAN // RUN: %run %s --omp 2>&1 | %filecheck %s // REQUIRES: openmp && softcounter // clang-format on #include <stdlib.h> void repeat_alloc_free(unsigned n) { for (int i = 0; i < n; i++) { double* d = (double*)malloc(sizeof(doub...