source
stringlengths
3
92
c
stringlengths
26
2.25M
GB_unop__sqrt_fc64_fc64.c
//------------------------------------------------------------------------------ // GB_unop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX-Li...
concat_ref.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...
omp_hello.c
/****************************************************************************** * * FILE: omp_hello.c * * DESCRIPTION: * * OpenMP Example - Hello World - C/C++ Version * * In this simple example, the master thread forks a parallel region. * * All threads in the team obtain their unique thread number and prin...
omp-matmat-static-parallel.c
/***************************************************************************** Example : omp-matmat-static-parallel.c Objective : Matrix - Matrix Multiplication using OpenMP one PARALLEL for directive with Schedule(static) and Private Clause Input ...
band.h
// Copyright (c) 2013-2017 Anton Kozhevnikov, Thomas Schulthess // All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, are permitted provided that // the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, ...
par_interp.c
/*BHEADER********************************************************************** * Copyright (c) 2008, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * This file is part of HYPRE. See file COPYRIGHT for details. * * HYPRE is free software; you can redistribute...
team.c
/* Copyright (C) 2005-2017 Free Software Foundation, Inc. Contributed by Richard Henderson <rth@redhat.com>. This file is part of the GNU Offloading and Multi Processing Library (libgomp). Libgomp is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
raytracer.h
#pragma once #include "resource.h" #include <iostream> #include <linalg.h> #include <memory> #include <omp.h> #include <random> using namespace linalg::aliases; namespace cg::renderer { struct ray { ray(float3 position, float3 direction) : position(position) { this->direction = normalize(direction); } ...
test2.c
#include <stdio.h> #include <omp.h> #define N (10000000) int A[N]; int B[N/2]; void g() { int i=0; for (i = 0; i<N; i++) A[i] ++; } void h() { int i; for (i = 0; i<N/2; i++) B[i]++; } void f() { g(); } int main() { #pragma omp parallel num_threads(2) { #pragma omp sections { #pragma omp section { f();...
validate_yolo8.src.h
#pragma once #include "ukr.h" #include "omp.h" #include "transpose.h" #include "gen_ukr_A6B2gemm_1_256_68_68_128_3_3.h" #include "gen_ukr_A4B2gemm_1_256_68_68_128_3_3.h" void testrun(float* A ,float*B, float*C, float*oriB ){ int tid = omp_get_thread_num(); int Nx = 68; int Ny = 68; int Nh = 3; long long...
distributed_pFMM_matrix.h
/* Copyright (c) 2020, VSB - Technical University of Ostrava and Graz University of Technology 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 copyr...
convolution_winograd_transform.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 ...
issue_002.c
#include <stdio.h> #include "assert.h" #include <unistd.h> // 920 fails #define TRIALS 452 // 6000 fails #define N 64*5000 int main() { int fail = 0; double A[N], B[N], C[N]; for (int i = 0; i < N; i++) { A[i] = 0.0; B[i] = 0.0; C[i] = 1.0; } int nte = 32; int tl = 64; int blockSize = tl; ...
GB_unop__log10_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...
omp_getEnvInfo.c
/****************************************************************************** * FILE: omp_getEnvInfo.c * DESCRIPTION: * OpenMP Example - Get Environment Information - C/C++ Version * The master thread queries and prints selected environment information. * AUTHOR: Blaise Barney 7/06 * LAST REVISED: 05/18/16 *****...
affinuma.c
#include "affinuma.h" struct numa_node_bw * numa_node_list = NULL; struct numa_node_bw * numa_list_head = NULL; int mem_types; int max_node; int numt; int total_numa_nodes = 0; int * numa_node_ids; struct bitmask * numa_nodes; char ** mem_tech; long double * means; int * cluster_sizes; char classes[3][8] = {"fast", "s...
GB_binop__fmod_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-...
mask.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...
backward_euler_monolithic_ale_scheme.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Miguel Maso // #ifndef KRATOS_BACKWARD_EULER_MO...
ssyrk.c
#include "blas.h" #include "error.h" #include <stdio.h> #include "handle.h" #include "config.h" #include "ssyrk.fatbin.c" static inline size_t min(size_t a, size_t b) { return (a < b) ? a : b; } static inline size_t max(size_t a, size_t b) { return (a > b) ? a : b; } static inline CUresult cuMemcpyHtoD2DAsync(CUdevic...
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...
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...
many_transfers.c
#include <stdio.h> #define N 17 #define M 100 void init(int* array, int size, int scale) { for (int i = 0; i < size; i++) array[i] = i*scale; } int main() { int tab[N][M]; /* The schedule(static, 1) enforces each iteration to be executed in a different thread, whatever the number of CPU is: */ #pragma...
distort.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
psd.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
vect-simd-clone-11.c
/* { dg-require-effective-target vect_simd_clones } */ /* { dg-additional-options "-fopenmp-simd" } */ /* { dg-additional-options "-mavx" { target avx_runtime } } */ #include "tree-vect.h" #ifndef N #define N 1024 #endif int a[N] __attribute__((aligned (32))); #pragma omp declare simd linear(a) linear(b:3) linear(c...
GB_unop__log_fc64_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...
hmacSHA256_fmt_plug.c
/* * This software is Copyright (c) 2012 magnum, 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. * * Based on hmac-md5 by Bartavelle * * SIMD added Feb, 2015, JimF. */ #if FMT_EXTERNS...
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...
wf3cte.c
/* WFC3 -- CTE loss correction for UVIS M. sosey Aug-2014 Adapted for the pipeline from Jay Andersons CTE correction code for wfc3 UVIS raw2raz_wfc3uv.F , an edited file was delivered december 2014, and both are different from the fortran code currently served on the wfc3 website. M. Sosey Aug-2016 Adap...
libSHCITools.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...
PlasticStrainMapping.h
/****************************************************************************** * SOFA, Simulation Open-Framework Architecture, development version * * (c) 2006-2017 INRIA, USTL, UJF, CNRS, MGH * * * ...
private-clause.c
#include <stdio.h> #ifdef _OPENMP #include <omp.h> #else #define omp_get_thread_num()0 #endif main(){ int i,n=7; int a[n], suma; for(i=0;i<n;i++) a[i]=i; #pragma omp parallel private(suma) { suma=0; #pragma omp for for(i=0; i<n; i++){ suma=suma+a[i]; printf ("thread %d suma a[%d...
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...
wshfl.c
/* Copyright 2018-2019. Massachusetts Institute of Technology. * All rights reserved. Use of this source code is governed by * a BSD-style license which can be found in the LICENSE file. * * Authors: * 2018-2019 Siddharth Iyer <ssi@mit.edu> * * Tamir J, Uecker M, Chen W, Lai P, Alley MT, Vasanawala SS, Lustig M...
kmp_csupport.c
/* * kmp_csupport.c -- kfront linkage support for OpenMP. */ //===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE....
no_omp_cpu.c
/* * Copyright (c) 2015 - 2022, 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 condition...
omp_section_firstprivate.c
<ompts:test> <ompts:testdescription>Test which checks the omp section firstprivate directive by adding a variable which is defined before the parallel region.</ompts:testdescription> <ompts:ompversion>2.0</ompts:ompversion> <ompts:directive>omp firstprivate</ompts:directive> <ompts:testcode> #include <stdio.h> #include...
sparselu-task.c
/**********************************************************************************************/ /* This program is part of the Barcelona OpenMP Tasks Suite */ /* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */ /* Copyright (C) 2009 Univer...
original_block_store_diff_jacobi_omp.c
/* * Copyright (c) 2008, BSC (Barcelon Supercomputing Center) * 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,...
_CPULingo.c
/* C implementation of SIML LINGOs on CPUs #============================================================================================= # COPYRIGHT NOTICE # # Written by Imran S. Haque (ihaque@cs.stanford.edu) # # Copyright (c) 2009-2010 Stanford University. # All rights reserved. # # Redistribution and use in sou...
HDF5SubdomainDumperMPI.h
// // HDF5SubdomainDumperMPI.h // Cubism // // Created by Fabian Wermelinger 2018-08-03 // Copyright 2018 ETH Zurich. All rights reserved. // #ifndef HDF5SUBDOMAINDUMPERMPI_H_UAFPTNPL #define HDF5SUBDOMAINDUMPERMPI_H_UAFPTNPL #include <cassert> #include <iostream> #include <vector> #include <string> #include <sstr...
vecmul.c
#include "stdio.h" #define N 1024 int main() { int i; float p[N], v1[N], v2[N]; for(i=0; i<N; i++) { v1[i] = 2.0; v2[i] = 3.0; } #pragma omp target map(to:v1, v2) map(from:p) #pragma omp parallel for for(i=0; i<N; i++) { p[i] = v1[i] * v2[i]; } printf("output: p[0]=%f\n", p[0]); printf("output: p[1]=%f\...
schur_eliminator_impl.h
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2010, 2011, 2012 Google Inc. All rights reserved. // http://code.google.com/p/ceres-solver/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // ...
chi2float.c
// fast chi-squared distance function in x86 compiler intrinsics // (C) 2007-2008 Christoph Lampert <christoph.lampert@gmail.com> #include <stdio.h> #include <values.h> // for FLT_MIN /* We calculate calculate chi2=(a-b)**2/(a+b+FLT_MIN) to avoid division-by-zero: If a+b != 0, then (a+b+FLT_MIN)==(a+b) and nothing ...
sgetri_aux.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/zgetri_aux.c, normal z -> s, Fri Sep 28 17:38:09 2018 * **/ #include "plasma.h" #include "plasma_async.h" ...
graphProcessing.h
/* FINISH TEMPFLATPATH CODE AS WRITTEN, THESE FUNCTIONS WILL ONLY WORK WITH GRAPHS THAT ARE IMPLEMENTED IN THE boost NAMESPACE. */ #define LP 1 #define PERFDEBUG 0 //#define FULLDEBUG 1 #ifdef _OPENMP #include <omp.h> #endif #include <boost/regex.hpp> #include <iostream> #include <fstream> #include <string> #inc...
convolution_5x5.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 copy ...
do_kahan_sum_omp.c
double do_kahan_sum_omp(double* restrict var, long ncells) { struct esum_type{ double sum; double correction; }; double sum = 0.0; #pragma omp parallel reduction(+:sum) { double corrected_next_term, new_sum; struct esum_type local; local.sum = 0.0; local.correction = 0...
csr_block_matvec.c
/****************************************************************************** * Copyright 1998-2019 Lawrence Livermore National Security, LLC and other * HYPRE Project Developers. See the top-level COPYRIGHT file for details. * * SPDX-License-Identifier: (Apache-2.0 OR MIT) **************************************...
setfeenv.c
#ifndef CRAY # ifdef NOUNDERSCORE # define SETFEENV setfeenv # else # ifdef F2CSTYLE # define SETFEENV setfeenv__ # else # define SETFEENV setfeenv_ # endif # endif #endif #include <fenv.h> #include <stdio.h> void SETFEENV() { fenv_t envp; int stat; #ifdef _OPENMP stat = fegetenv(&envp); /...
TGV_core.c
/* * This work is part of the Core Imaging Library developed by * Visual Analytics and Imaging System Group of the Science Technology * Facilities Council, STFC * * Copyright 2019 Daniil Kazantsev * Copyright 2019 Srikanth Nagella, Edoardo Pasca * * Licensed under the Apache License, Version 2.0 (the "License")...
phpassMD5_fmt_plug.c
/* * This software was written by Jim Fougeron jfoug AT cox dot net in 2009. * 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 * (c) 2...
oddeven.h
#ifndef ODDEVEN_H #define ODDEVEN_H typedef int numeric; int compare_exchange(numeric *a, numeric *b){ numeric tmp; if (*a > *b) { tmp = *a; *a = *b; *b = tmp; return 1; } return 0; } int oddeven(numeric *a, int n){ for (size_t i = 0; i < n; i++) { if (i%2...
GB_binop__eq_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...
mkldnn_common.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__identity_fp32_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http...
displacement_lagrangemultiplier_contact_criteria.h
// KRATOS ___| | | | // \___ \ __| __| | | __| __| | | __| _` | | // | | | | | ( | | | | ( | | // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS // // License: BSD License // ...
GB_binop__max_uint16.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved. // SPDX...
openmp-ex00.c
/* Hello threads: adapted from Edmond Chow's OpenMP notes */ #include <stdio.h> int main(void) { printf ("You're all individuals!\n"); /* create a team of threads for the following structured block */ #pragma omp parallel { printf("Yes, we're all individuals!\n"); } /* team of threads join master thread ...
lsh_index.h
/*********************************************************************** * Software License Agreement (BSD License) * * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. * * THE BSD LICENSE * * Redistribution an...
enforcer.c
int foo () { return 3; } int main () { int x = 10; #pragma omp parallel x++; #pragma omp for for (x = 0; x < 10; x++) x = x; #pragma omp sections { #pragma omp section x++; #pragma omp section x+=2; } #pragma omp single #pragma omp task #pragma omp parallel for for (x = 0; x < 12; x++) x = x + 0; #pragm...
stencil.h
#include "multicore.h" #define index1D(i) (i) #define index2D(i,j) (((j)*(core->coreArrayNeighborhoodSizes_2D[1][1][0]))+(i)) // I think this should be in terms of the size for X and Y, not X, Y, and Z! // #define index3D(i,j,k) (((k)*core->coreArrayNeighborhoodSizes_3D[1][1][1][2]*core->coreArrayNeighborhoodSiz...
paint_stroke.c
/* * ***** BEGIN GPL LICENSE BLOCK ***** * * 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, or (at your option) any later version. * * This program is d...
par_relax.c
/*BHEADER********************************************************************** * Copyright (c) 2017, Lawrence Livermore National Security, LLC. * Produced at the Lawrence Livermore National Laboratory. * Written by Ulrike Yang (yang11@llnl.gov) et al. CODE-LLNL-738-322. * This file is part of AMG. See files READ...
bfs_simple.c
/* Copyright (C) 2010-2011 The Trustees of Indiana University. */ /* */ /* Use, modification and distribution is subject to the Boost Software */ /* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */ /* http:...
GB_cumsum.c
//------------------------------------------------------------------------------ // GB_cumsum: cumlative sum of an array //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http://suitesparse.com See Graph...
nodes.c
#include <stddef.h> #ifdef __cplusplus extern "C" { #endif extern void CXX_Walk_Double(char *l, const char *h, const size_t sz, double *b); #ifdef __cplusplus } #endif #include <stdio.h> #include <stdint.h> #include <omp.h> #include "allocator.h" #include "geometry.h" //#include "fio.h" #include "mesh.h" size_t nma...
special_ops.h
#pragma once #include <ops/ops.h> #include <loops/reduce.h> #include <loops/scalar.h> #include <loops/indexreduce.h> #include <loops/broadcasting.h> namespace functions { namespace broadcast { template <typename T> class Broadcast; } namespace transform { template <typename T> class Transform; } namespa...
GrB_Monoid_wait.c
//------------------------------------------------------------------------------ // GrB_Monoid_wait: wait for a user-defined GrB_Monoid to complete //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Li...
HelloOMP.c
#include <stdio.h> #include <omp.h> int main (void) { #pragma omp parallel printf("(%d:!!!Hello world!!!)", omp_get_thread_num()); return (0); }
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 <parallel/algorithm> #include <cinttypes> #include <fstream> #include <functional> #include <type_traits> #include <utility> #include ...
conv_kernel_x86.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...
target-critical-1.c
/* { dg-do run } */ #include <omp.h> #include <stdlib.h> #define N 2000 #pragma omp declare target int foo () { int A[N]; int i, nthreads; int res = 0; #pragma omp parallel shared (A, nthreads) { #pragma omp master nthreads = omp_get_num_threads (); #pragma omp for for (i = 0; i < N; i++)...
ab-totient-omp-4.c
// Distributed and parallel technologies, Andrew Beveridge, 03/03/2014 // To Compile: gcc -Wall -O -o ab-totient-omp -fopenmp ab-totient-omp.c // To Run / Time: /usr/bin/time -v ./ab-totient-omp range_start range_end #include <stdio.h> #include <omp.h> /* When input is a prime number, the totient is simply the prim...
filter.h
#ifndef OPENMC_TALLIES_FILTER_H #define OPENMC_TALLIES_FILTER_H #include <cstdint> #include <memory> #include <string> #include <unordered_map> #include <vector> #include <gsl/gsl> #include "openmc/hdf5_interface.h" #include "openmc/particle.h" #include "pugixml.hpp" namespace openmc { //=========================...
Bvh.h
#ifndef GAME_ENGINE_BVH_H #define GAME_ENGINE_BVH_H #include "CoreLib/Basic.h" #include "CoreLib/Graphics/BBox.h" #include "Ray.h" namespace GameEngine { using namespace CoreLib::Basic; const int nBuckets = 16; class BvhNode { public: CoreLib::Graphics::BBox Bounds; unsigned ...
IBKMKC_vector_operations.c
/* IBK Math Kernel Library Copyright (c) 2001-today, Institut fuer Bauklimatik, TU Dresden, Germany Written by A. Nicolai, A. Paepcke, H. Fechner, St. Vogelsang All rights reserved. This file is part of the IBKMK Library. Redistribution and use in source and binary forms, with or without modification, are perm...
ConvexLS.h
/////////////////////////////////////////////////////////////////////////////// // Dem Bones - Skinning Decomposition Library // // Copyright (c) 2019, Electronic Arts. All rights reserved. // /////////////////////////////////////////////////////////////////////////////// ...
omp_alloc_null_fb.c
// RUN: %libomp-compile-and-run #include <stdio.h> #include <omp.h> int main() { omp_alloctrait_t at[2]; omp_allocator_handle_t a; void *p[2]; at[0].key = omp_atk_pool_size; at[0].value = 2 * 1024 * 1024; at[1].key = omp_atk_fallback; at[1].value = omp_atv_null_fb; a = omp_init_allocator(omp_large_cap...
convolution_3x3_pack1to8_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 ...
pi-v6.c
/* * Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x) * between 0 and 1. * * parallel version using OpenMP */ #include <stdio.h> #include <stdlib.h> #include <omp.h> /* OpenMP */ #if _DEBUG_ #define _DEBUG_ 1 #else #define _DEBUG_ 0 #include "extrae_user_events.h" #define PROG...
GB_unop__identity_int8_fp32.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...
c-tree.h
/* Definitions for C parsing and type checking. Copyright (C) 1987-2015 Free Software Foundation, Inc. This file is part of GCC. GCC 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, or (at yo...
3d7pt_var.lbpar.c
#include <omp.h> #include <math.h> #define ceild(n,d) ceil(((double)(n))/((double)(d))) #define floord(n,d) floor(((double)(n))/((double)(d))) #define max(x,y) ((x) > (y)? (x) : (y)) #define min(x,y) ((x) < (y)? (x) : (y)) /* * Order-1, 3D 7 point stencil with variable coefficients * Adapted from PLUTO and Po...
gm_map.h
#ifndef GM_MAP_H_ #define GM_MAP_H_ #include <map> #include "gm_internal.h" #include "gm_limits.h" #include "gm_lock.h" using namespace std; //map-interface template<class Key, class Value> class gm_map { public: virtual ~gm_map() { } ; virtual bool hasKey_seq(const Key key) =...
main.c
// // main.c // omp_sections // // Created by Vicente Cubells Nonell on 06/11/14. // Copyright (c) 2014 Vicente Cubells Nonell. All rights reserved. // #include <stdio.h> #include <omp.h> #define N 100000 int main(int argc, const char * argv[]) { int suma[N], resta[N], A[N], B[N]; int i; om...
GB_bitmap_assign_M_col_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_M_col_template: traverse M for GB_COL_ASSIGN //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-Lic...
cg_aux.c
//#include <vector> //#include "exblas/exdot.hpp" #include "cg_aux.h" //static inline void __attribute__((always_inline)) bblas_dcopy(int bm, int m, double *X, double *Y) void bblas_dcopy(int bm, int m, double *X, double *Y) { int i; for ( i=0; i<m; i+=bm ) { int cs = m - i; int c = cs < bm ? cs : bm; #pra...
stream.c
/*-----------------------------------------------------------------------*/ /* Program: STREAM */ /* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */ /* Original code developed by John D. McCalpin */ /* Programm...
TemporalRowConvolution.c
#ifndef TH_GENERIC_FILE #define TH_GENERIC_FILE "THNN/generic/TemporalRowConvolution.c" #else static inline void THNN_(TemporalRowConvolution_shapeCheck)( THNNState *state, THTensor *input, THTensor *gradOutput, THTensor *weight, THTensor *bias, int kW, int dW, int padW) { THArgCheck(kW > 0, 5, "...
main.c
#include <stdio.h> #if defined(_OPENMP) #include <omp.h> #endif int main() { #if defined(_OPENMP) omp_set_num_threads(4); #endif #pragma omp parallel { #if defined(_OPENMP) printf("Thread ID: %d\n", omp_get_thread_num()); #endif } printf("Done!\n"); return 0; }
clean.h
/**************************************************************************** * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * * Copyri...
GeometryConverter.h
/* -*-c++-*- IfcQuery www.ifcquery.com * MIT License Copyright (c) 2017 Fabian Gerold Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
tzetar.c
//-------------------------------------------------------------------------// // // // This benchmark is an OpenMP C version of the NPB SP code. This OpenMP // // C version is developed by the Center for Manycore Programming at Seoul // // Nati...
Cycle.c
/* * The MIT License * * Copyright 2020 The OpenNARS authors. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use,...
hybrid-hello.c
#include <stdio.h> #include <mpi.h> #include <omp.h> int main(int argc, char *argv[]) { int my_id, omp_rank; int provided, required=MPI_THREAD_FUNNELED; MPI_Init_thread(&argc, &argv, required, &provided); MPI_Comm_rank(MPI_COMM_WORLD, &my_id); #pragma omp parallel private(omp_rank) { omp_...
SE1P_rsrc_cell_force.c
#include "mex.h" #include "mex_compat.h" #include "math.h" #include "cell_list.h" #ifdef INTEL_MKL #include "mkl.h" #endif #define X prhs[0] // Source locations #define F prhs[1] // Source strengths #define RC prhs[2] // cutoff #define XI prhs[3] // Ewald Param #define P prhs[4] // Periodic wrap #define BOX ...
queue.h
// -*- C++ -*- // Copyright (C) 2007-2015 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...
reader.h
#ifndef __READER_H__ #define __READER_H__ #include <fstream> #include <random> #include <cstring> #include <iostream> #include <sstream> #include <iterator> #include <algorithm> #ifdef _OPENMP #include <omp.h> #endif template<typename T> void splitData(const std::vector<T>& A, const std::vector<T>& b, const std::ve...