source
stringlengths
3
92
c
stringlengths
26
2.25M
draw.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
ab-totient-omp-13.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...
GB_binop__first_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-...
actionAngleStaeckel.c
/* C code for Binney (2012)'s Staeckel approximation code */ #ifdef _WIN32 #include <Python.h> #endif #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include <gsl/gsl_math.h> #include <gsl/gsl_errno.h> #include <gsl/gsl_roots.h> #include <gsl/gsl_min.h> #include <gsl/gsl_integration.h> ...
IO.h
// This code is part of the project "Ligra: A Lightweight Graph Processing // Framework for Shared Memory", presented at Principles and Practice of // Parallel Programming, 2013. // Copyright (c) 2013 Julian Shun and Guy Blelloch // // Permission is hereby granted, free of charge, to any person obtaining a // copy of t...
app.c
/** * Christina Giannoula * cgiannoula: christina.giann@gmail.com */ #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> #include <dpu.h> #include <dpu_log.h> #include <unistd.h> #include <getopt.h> #include <assert.h> #include <math.h> #include <omp.h> #include "../support/common.h" #i...
cryptbreaker.c
#define _GNU_SOURCE /* See feature_test_macros(7) */ #include <crypt.h> #include <omp.h> #include <mpi.h> #include <crypt.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define byte unsigned char #define HASH_SIZE 14 #define VOCABULARY " ./0123456789ABCDEFGHIJKLMNOPQRSTUVW...
parallel.c
/* * Copyright (c) 2014 ETH Zurich. * All rights reserved. * * This file is distributed under the terms in the attached LICENSE file. * If you do not find this file, copies can be found by writing to: * ETH Zurich D-INFK, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group. */ #include <bomp_internal.h> ...
variational_distance_calculation_process.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: Riccardo Rossi // Ruben Zorrill...
barrDownFork.c
int main() { int X, Y; X = 0; Y = 0; #pragma omp parallel { int diff; diff = 9; while (X < 10) { // while (1) { X = X + 2; #pragma omp barrier if (diff < 10) { break; } Y = Y + 1; X = X + 1; #pragma omp barrier Y = Y + 2; #pragma omp barrier } X = Y + 10; } } //int main() { // int ...
Utilities.h
// // Utilities.h // Gauss // // Created by David Levin on 1/31/17. // // #ifndef Utilities_h #define Utilities_h #ifdef GAUSS_OPENMP #include <omp.h> #endif #include "State.h" //Eigen Stuff #include <Eigen/Dense> #include <Eigen/Sparse> #define STRINGIFY(s) #s #define DataDir(s) STRINGIFY(s) #define Vert(f,...
fused_rowwise_nbit_conversion_ops.h
#pragma once #include <algorithm> #include <vector> #ifdef _OPENMP #include <omp.h> #endif #include "caffe2/core/context.h" #include "caffe2/core/logging.h" #include "caffe2/core/operator.h" // for param_search_greedy #include "caffe2/operators/fused_rowwise_nbitfake_conversion_ops.h" #include "caffe2/perfkernels/fu...
elementwise_add_arm_func.h
/* Copyright (c) 2018 PaddlePaddle Authors. 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 required by applicable law or...
test.c
#include <stdio.h> #include <omp.h> #pragma omp requires unified_shared_memory #include "../utilities/check.h" #include "../utilities/utilities.h" #define TRIALS (1) #define N (992) #define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;}) #define ZERO(X) ZERO_ARRAY(N, X) // // TODO: Add the following runti...
implicit_blender.c
/* * 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 distributed in the hope that it will be use...
aggregate_ops.h
// // @author raver119@gmail.com // #ifndef LIBND4J_AGGREGATE_OPS_H #define LIBND4J_AGGREGATE_OPS_H #include <ops/ops.h> #include <templatemath.h> #define HS_MAX_EXP 6.0f #ifdef __CUDACC__ #define aggregate_def __device__ inline static #else #include <ops/gemm.h> #define aggregate_def inline static #endif /* * * ...
shear.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
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...
Parser.h
//===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
GB_binop__copysign_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-...
pi-v3.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 #endif int main(int argc, char *argv[]) { do...
DRB029-truedep1-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
threshold.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
pngquant.c
/* pngquant.c - quantize the colors in an alphamap down to a specified number ** ** © 2009-2019 by Kornel Lesiński. ** © 1989, 1991 by Jef Poskanzer. ** © 1997-2002 by Greg Roelofs; based on an idea by Stefan Schneider. ** ** See COPYRIGHT file for license. */ #define PNGQUANT_VERSION LIQ_VERSION_STRING " (January 201...
select_ci.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...
remarks_parallel_in_target_state_machine.c
// RUN: %clang_cc1 -verify=host -Rpass=openmp-opt -Rpass-analysis=openmp-opt -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc // RUN: %clang_cc1 -verify -Rpass=openmp-opt -Rpas...
zunmlq.c
/** * * @file * * PLASMA is a software package provided by: * University of Tennessee, US, * University of Manchester, UK. * * @precisions normal z -> s d c * **/ #include "plasma.h" #include "plasma_async.h" #include "plasma_context.h" #include "plasma_descriptor.h" #include "plasma_internal.h" #include ...
Gemm_MT_Loop5_MRxNRKernel_ver2.c
#include <stdio.h> #include <stdlib.h> #include <omp.h> #include<immintrin.h> #define alpha( i,j ) A[ (j)*ldA + (i) ] // map alpha( i,j ) to array A #define beta( i,j ) B[ (j)*ldB + (i) ] // map beta( i,j ) to array B #define gamma( i,j ) C[ (j)*ldC + (i) ] // map gamma( i,j ) to array C #define min( x, y ) (...
GB_unaryop__ainv_int8_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...
gemm.c
#include "gemm.h" #include "utils.h" #include "cuda.h" #include <stdlib.h> #include <stdio.h> #include <math.h> void gemm_bin(int M, int N, int K, float ALPHA, char *A, int lda, float *B, int ldb, float *C, int ldc) { int i,j,k; for(i = 0; i < M; ++i){ for(k = 0; k < K; ++k){...
ballAlg.c
#include "ballAlg.h" #include "../lib/genPoints.h" #include "../lib/msort.h" #include "pointArith.h" #include <mpi.h> #include <omp.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> int nProcesses; int myRank; int nDims; int nNodes = 0; int nid = 1; int nodesCapacity; Node *nodes; MPI_Datatype mpiMedianIn...
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...
DataTypeConversions.h
/******************************************************************************* * Copyright (c) 2015-2018 Skymind, Inc. * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * *...
gi_topological_gradient_using_algorithms.h
/* * * Copyright (C) 2018 Attila Gyulassy <jediati@sci.utah.edu> * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ #ifndef TOPOLOGICAL_GRADIENT_USING_ALGORITHMS_H #define TOPOLOGICAL_GRADIENT_USING_ALGORITHMS_H #include...
segment.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
test_dma.c
/******************************************************************************* * Copyright 2019 UChicago Argonne, LLC. * (c.f. AUTHORS, LICENSE) * * This file is part of the AML project. * For more info, see https://github.com/anlsys/aml * * SPDX-License-Identifier: BSD-3-Clause ******************************...
2218.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <po...
2013.c
/* POLYBENCH/GPU-OPENMP * * This file is a part of the Polybench/GPU-OpenMP suite * * Contact: * William Killian <killian@udel.edu> * * Copyright 2013, The University of Delaware */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <math.h> /* Include polybench common header. */ #include <...
oyranos_cmm_oyra_image_scale.c
/** @file oyranos_cmm_oyra_image.c * * Oyranos is an open source Color Management System * * @par Copyright: * 2013-2016 (C) Kai-Uwe Behrmann * * @brief modules for Oyranos * @internal * @author Kai-Uwe Behrmann <ku.b@gmx.de> * @par License: * new BSD <http://www.opensource....
eltwise.h
// Copyright 2018 Xiaomi, Inc. 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 required by applicab...
coll.h
#ifndef G24_LIB_COLL #define G24_LIB_COLL /********************************************** * * * BIBLIOTECA DE FUNÇÕES MULTI-DIMENSIONAIS * * * * Por: Gonçalo Vaz (87321) * * Nuno Fernandes (87342) ...
mem_managerRACBVH.h
#ifndef MEM_NANAGER_RACBVH_H #define MEM_NANAGER_RACBVH_H #include "App.h" #include "VDTActiveList.h" #include <math.h> #include "memory_map.h" // Application specific part template <class T> class RACBVH; template <class T> extern bool loadCluster(RACBVH<T> *pBVH, unsigned int CN, T* posCluster, long diskClusterOff...
common.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_UTILS_COMMON_H_ #define LIGHTGBM_UTILS_COMMON_H_ #if ((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__))) #...
nested_targ.c
#include <stdio.h> #include "assert.h" #include <unistd.h> #pragma omp declare target int foo(); #pragma omp declare target int bar(); #pragma omp end declare target #pragma omp end declare target int main() { return 0; }
alloca-1.c
#define size 10 int i, j, k; int main () { char *s = __builtin_malloc (size + 1); #pragma omp target teams { #pragma omp distribute parallel for default(none) private(i) shared(s) for (i = 0; i < size; ++i) { char *buffer = __builtin_alloca (10); buffer[5] = 97 + i; s[i] = buffer[5]; } } f...
cblas_wrapper.c
/* # # * The source code in this file is developed independently by NEC Corporation. # # # NLCPy License # # # Copyright (c) 2020-2021 NEC Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
GB_binop__isle_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-...
structure_factors_direct.h
#ifndef CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_H #define CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_H #include <cctbx/xray/scattering_type_registry.h> #include <cctbx/xray/hr_ht_cache.h> #include <cctbx/math/cos_sin_table.h> #include <omptbx/omp_or_stubs.h> #define CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_NO_PRAGMA_OMP namespace c...
computeP_mex.c
#include "mex.h" #include "omp.h" #include "math.h" #include "string.h" void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { // Inputs double *E; // relabelled ensemble matrix long long M, N; long long nClust, maxElem; // Outputs double *P; double *nElemInCls; // Internal long long...
GB_binop__times_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http:...
taus88.h
// copyright 2016 john howard (orthopteroid@gmail.com) // MIT license // // Homebrew OpenMP threadsafe Tausme88 PRNG // http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme.ps #ifndef PSYCHICSNIFFLE_TAUS88_H #define PSYCHICSNIFFLE_TAUS88_H #include <omp.h> namespace util { /* // instance only one of these in th...
GB_unop__identity_uint64_int32.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...
test1.c
/* program main implicit none integer :: a = 10 !$omp target data map(tofrom: a) !$omp target map(tofrom: a) a = a + 1 !$omp end target !$omp target update from(a) !$omp end target data a = -15 !$omp target update from(a) print *, a !<-- expect -15; actual 11 end p...
DRB067-restrictpointer1-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...
if-2.c
/* { dg-do compile } */ /* { dg-options "-fopenmp" } */ void foo (int a, int b, int *p, int *q, int task) { int i; #pragma omp parallel if (a) if (b) /* { dg-error "too many .if. clauses without modifier" } */ ; #pragma omp parallel if (a) if (parallel: b) /* { dg-error "if any .if. clause has modifier, then...
saturnin-linear-trail-weight-three-rounds.c
#include "saturnin-common.h" #include "../global-common.h" #include "../convolution.h" #include <math.h> #include <stdbool.h> #include <omp.h> #define NUMBER_OF_CANDIDATES 349 #define NUMBER_OF_ELEMENTS (1 << BOX_WIDTH) #define DT_SIZE (NUMBER_OF_ELEMENTS*NUMBER_OF_ELEMENTS) #define NUM_THREADS 36 #define BOUND 36 st...
For_Paralelo.c
#include <stdio.h> #include <stdlib.h> #ifdef _OPENMP #include <omp.h> #define TRUE 1 #define FALSE 0 #else #define omp_get_thread_num() 0 #endif int main() { #ifdef _OPENMP (void) omp_set_dynamic(FALSE); if (omp_get_dynamic()) {printf("Warning: dynamic adjustment of threads has been set\n");} ...
omp.c
/* * Copyright 2019-2020 SALMON developers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
GB_unop__atan_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://...
ROF_TV_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 2017 Daniil Kazantsev * Copyright 2017 Srikanth Nagella, Edoardo Pasca * * Licensed under the Apache License, Version 2.0 (the "License")...
nn_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...
GB_binop__bclr_int64.c
//------------------------------------------------------------------------------ // GB_binop: hard-coded functions for each built-in binary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-...
layerramsubset.h
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2018-2020 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
ASTMatchers.h
//===- ASTMatchers.h - Structural query framework ---------------*- 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 // //===---------------------------...
workshare2.c
#include <omp.h> #include <stdio.h> #include <stdlib.h> #define N 50 int main (int argc, char *argv[]) { int i, nthreads, tid; float a[N], b[N], c[N], d[N]; /* Some initializations */ for (i=0; i<N; i++) { a[i] = i * 1.5; b[i] = i + 22.35; c[i] = d[i] = 0.0; } #pragma omp parallel shared(a,b,c,d,nthread...
coordinate_transformation_utilities.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // // #ifndef KRATOS_COORDINATE_TRANSFORMATION_UTI...
omptough.c
#include <pthread.h> #include <stdlib.h> #include <malloc.h> #include <unistd.h> #include <stdio.h> #include <omp.h> #include "papi_test.h" #define NITER (100000) int main( int argc, char *argv[] ) { int i; int ret; int nthreads; int *evtset; int *ctrcode; nthreads = omp_get_max_threads( ); evtset = ( int * ...
openmp_wrapper.h
/*! * Copyright (c) 2017 Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE file in the project root for license information. */ #ifndef LIGHTGBM_OPENMP_WRAPPER_H_ #define LIGHTGBM_OPENMP_WRAPPER_H_ #ifdef _OPENMP #include <omp.h> #include <LightGBM/utils/log.h> #include <exc...
simd-clones-5.c
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-fopenmp -w" } */ /* ?? The -w above is to inhibit the following warning for now: a.c:2:6: warning: AVX vector argument without AVX enabled changes the ABI. */ #pragma omp declare simd notinbranch simdlen(4) void foo (int *a) { *a = 555;...
convolution_1x1_pack1to4_int8.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
GB_unaryop__lnot_bool_uint32.c
//------------------------------------------------------------------------------ // GB_unaryop: hard-coded functions for each built-in unary operator //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved. // http...
nbody.c
// // Torbert, 3.12.2009 // // OpenGL Demo, 3-D Example // #include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> #include <GL/glut.h> #include <time.h> #include <ctype.h> #define N 3000//N is the max amount of bodies #define G .005 /////////////////////////////// double pi=3.1415926; int ...
element_data_sensitivity_builder.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: // #if !defined(KRATOS_ELEMENT_SENSITIVITY_BUIL...
bcnn_mat.c
/* * Copyright (c) 2016-present Jean-Noel Braun. * * 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, copy, modify, m...
fc_kernel_int8_arm.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...
GB_unop__cosh_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...
utils.h
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. #pragma once #include <fcntl.h> #include <algorithm> #include <cassert> #include <cstdlib> #include <cstring> #include <fstream> #include <iostream> #include <string> #include <memory> #include <random> #include <set> #ifd...
pr68960.c
/* PR middle-end/68960 */ /* { dg-do run } */ int main () { int temp[257] __attribute__ ((aligned (256))) = { 0 }; #pragma omp parallel private (temp) num_threads (2) { int *p = &temp[0]; asm volatile ("" : "+g" (p)); if (((__UINTPTR_TYPE__) p) & 255) __builtin_abort (); } #pragma omp paral...
GB_binop__iseq_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...
matrix.c
/****************************************************************************** * INCLUDES *****************************************************************************/ #include "base.h" #include "matrix.h" #include "util.h" #include "timer.h" #include "splatt_lapack.h" #include <math.h> /*********************...
wave_energy.c
/*********************************************************************************/ /* */ /* Animation of wave equation in a planar domain */ /* ...
GB_bitmap_assign_IxJ_template.c
//------------------------------------------------------------------------------ // GB_bitmap_assign_IxJ_template: iterate over all of C(I,J) //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPDX-License-...
GB_unop__identity_uint64_uint16.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...
Searching.202002250815.buckets_equal_width.h
// // Created by Zhen Peng on 02/25/2020. // #ifndef BATCH_SEARCHING_SEARCHING_H #define BATCH_SEARCHING_SEARCHING_H #include <vector> #include <boost/dynamic_bitset.hpp> #include <iostream> #include <fstream> #include <unordered_map> #include <immintrin.h> #include <cstring> #include <unordered_set> #include <set> #...
DRB095-doall2-taskloop-orig-yes.c
/* Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund, Markus Schordan, and Ian Karlin (email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov, schordan1@llnl.gov, karlin1@llnl.gov) LLNL-CODE-73214...
GB_binop__bget_int8.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_5x5_pack8_fp16s.h
// Tencent is pleased to support the open source community by making ncnn available. // // Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. // // Licensed under the BSD 3-Clause License (the "License"); you may not use this file except // in compliance with the License. You may obtain a copy ...
LoadSubgraph.h
#ifndef __GPU_COMMON_LOAD_SUBGRAPH_H__ #define __GPU_COMMON_LOAD_SUBGRAPH_H__ #include <future> #include <thread> #include "CPUGraph.h" #include "Task.h" static uintV* LoadSubgraph(Graph* cpu_relation, size_t load_vertex_count, size_t load_edge_count, uintV* load_vertex_ids, ...
Kmeans.c
#include <stdio.h> #include <stdlib.h> #include "kmeans.h" void addPixelCluster(cluster* cl, pixel* px){ if(cl->size==cl->nbPixel){ realloc(cl->list,cl->size*2); cl->size*=2; } cl->list[cl->nbPixel]=*px; cl->nbPixel++; } pixel randomPixel(pixel** matrix,unsigned int height,unsigned int length){ i...
GrB_Semiring_wait.c
//------------------------------------------------------------------------------ // GrB_Semiring_wait: wait for a user-defined GrB_Semiring to complete //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved. // SPD...
declare_simd_aarch64.c
// REQUIRES: aarch64-registered-target // -fopemp and -fopenmp-simd behavior are expected to be the same. // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -fopenmp -x c -emit-llvm %s -o - -femit-all-decls | FileCheck %s --check-prefix=AARCH64 // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-featu...
GB_AxB_dot3.c
//------------------------------------------------------------------------------ // GB_AxB_dot3: compute C<M> = A'*B in parallel //------------------------------------------------------------------------------ // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved. // http://suitesparse.com S...
evolve_kepler.c
/* * The Kepler solver evolves the two-body problem, using standard Huayno sys structures. * TODO add warning when using the kepler solver with softening? */ #include <stdio.h> #include <stdlib.h> #include "evolve.h" #include "universal_kepler_solver.h" #ifdef _OPENMP #include <omp.h> #endif static void evolve_kep...
conv_dw_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...
hello.c
#include <stdio.h> #include <omp.h> int main(int argc, char **argv) { #pragma omp parallel { printf("Hello, multithreaded world: thread %d of %d\n", omp_get_thread_num(), omp_get_num_threads()); } return 0; }
A1_3.c
// gcc -std=c99 -Wall -lm -fopenmp -o go A1_3.c #include <stdio.h> #include <omp.h> #include <stdlib.h> #include <time.h> void display(int, int *); void swap(int *, int *); unsigned long long tick(void) { unsigned long long d; __asm__ __volatile__("rdtsc": "=A"(d)); return d; } int main(int argc, char *...
MinCostFlow.h
#ifndef _MINCostFlow #define _MINCostFlow #include "strPrint.h" #include <algorithm> #include <vector> #include <queue> #include <assert.h> /** * @brief Min-Cost Flow algorithm for simple bipartite graph * */ class MinCostFlow { public: /** * @brief An edge is represented as a struct * destina...
morphology.c
/* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % ...
openmp_kernels.c
#include "pcg_basic.h" #include "openmp_kernels.h" #include <stdio.h> #define SIMD 8 void sg_omp( sgData_t* restrict target, sgIdx_t* restrict ti, sgData_t* restrict source, sgIdx_t* restrict si, size_t n) { #pragma omp parallel for s...
GB_binop__bclr_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...