source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
LAGraph_cc_fastsv3.c | /*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2019 LAGraph Contributors.
(see Contributors.txt for a full list of Contributors; see
ContributionInstructions.txt for information on how you can Contribute to
this project).
All Rights Reserved.
NO WARRANTY. THIS MATERIAL IS FUR... |
Task1.h | #pragma once
#include <iostream>
#include <omp.h>
#include <vector>
typedef std::vector<std::vector<double> > matrix;
double matrices_multiplication(int n, bool is_parallel = false) {
double start, end;
std::vector<double> row(n, 0.0);
matrix a(n, row), b(n, row), c(n, row);
start = omp_get_wtime();
... |
facedetectcnn.h | /*
By downloading, copying, installing or using the software you agree to this license.
If you do not agree to this license, do not download, install,
copy or use the software.
License Agreement For libfacedetection
(3-clause BSD License)
Copyright (c) 2018-2019, Shiqi Yu, all ... |
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 ... |
DRB050-functionparameter-orig-no.c | /*
Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it andor
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the L... |
tcp_md5_fmt_plug.c | /*
* Cracker for TCP MD5 Signatures, http://www.ietf.org/rfc/rfc2385.txt
*
* This software is Copyright (c) 2013, Dhiru Kholia <dhiru [at] openwall.com>,
* and it is hereby released to the general public under the following terms:
*
* Redistribution and use in source and binary forms, with or without
* modificat... |
2222.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... |
@mropes.nim.c | /* Generated by Nim Compiler v1.0.11 */
/* (c) 2019 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 32
#include "nimbase.h"
#include <string.h>
#include <stdio.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef li... |
segment.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
graph.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef GRAPH_H_
#define GRAPH_H_
#include <cinttypes>
#include <iostream>
#include <type_traits>
#include "pvector.h"
#include "util.h"
/*
GAP Benchmark Suite
Class: CSRGraph
Author: Scott Beamer
... |
omp_reduce.c | /* Copyright 2014-2020 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... |
CGOpenMPRuntime.h | //===----- CGOpenMPRuntime.h - Interface to OpenMP Runtimes -----*- 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
//
//===---------------------------... |
GB_unop__identity_fc32_int8.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
graph.c | #include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#ifdef _OPENACC
#include "accelmath.h"
#define INFINITY __builtin_huge_valf()
#else
#include "math.h"
#endif
#include "graph.h"
static char src_key[CHARS_IN_KEY], dest_key[CHARS_IN_KEY];
float fmaxf(const float a, const float b) {
i... |
GB_unaryop__ainv_uint64_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... |
singlenode_spmspv.h | /******************************************************************************
* ** Copyright (c) 2016, Intel Corporation **
* ** All rights reserved. **
* ** ... |
SE3P_direct_self.c | #include <math.h>
#include "mex.h"
#define IDX prhs[0]
#define X prhs[1] // Source locations
#define Q prhs[2] // Source strengths
#define OPT prhs[3] // Parameters
#define PHI plhs[0] // Output
#ifndef VERBOSE
#define VERBOSE 0
#endif
#define PI 3.141592653589793
typedef struct
{
double box[3];
doub... |
serial_teams.c | // RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
// REQUIRES: ompt
// UNSUPPORTED: gcc
#include "callback.h"
int main() {
#pragma omp target teams num_teams(2) thread_limit(1)
#pragma omp parallel num_threads(1)
{ printf("In teams parallel\n"); }
return 0;
}
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
/... |
batched_inl.h | /*
* nvbio
* Copyright (c) 2011-2014, NVIDIA CORPORATION. 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,... |
GB_unop__identity_fp32_uint16.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... |
DRACC_OMP_019_Counter_wrong_lock_simd_Intra_yes.c | /*
Concurrent access on a counter with the wrong lock, by utilising OpenMP Lock Routines and simd. Atomicity Violation.
Two locks are used to ensure that addition and substraction cannot be interrupted by themselfes on other teams.
Although they are able to interrupt eachother leading to a wrong result. Intra Region.
... |
dem_structures_coupling_utilities.h | /*
* Author: Miguel Angel Celigueta
*
* maceli@cimne.upc.edu
*/
#ifndef KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H
#define KRATOS_STRUCTURES_DEM_COUPLING_UTILITIES_H
// /* External includes */
// System includes
// Project includes
#include "includes/variables.h"
/* System includes */
#include <limits>
#includ... |
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... |
DRB062-matrixvector2-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... |
VoxelSet.h | #pragma once
#include <functional>
#include <memory>
#include <vector>
#include <omp.h>
#include <glm/glm.hpp>
#include "../Util.h"
#include "../Math.h"
#include "SolidTest.h"
#include "VoxelStorage.h"
#include "VoxelView.h"
#define OBX_SOLID_TYPE bool
namespace obx {
///////////////////////////////////////////... |
mypaint-tiled-surface.c | /* libmypaint - The MyPaint Brush Library
* Copyright (C) 2007-2014 Martin Renold <martinxyz@gmx.ch> et. al.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in ... |
sort.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include <omp.h>
#include "sort.h"
#include "timer.h"
#include "util.h"
/**********************************************************************... |
GB_binop__bor_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-... |
DenseSegment.h | /******************************************************************************
* ** Copyright (c) 2016, Intel Corporation **
* ** All rights reserved. **
* ** ... |
costs.c | /* Generated by Cython 0.29.21 */
/* BEGIN: Cython Metadata
{
"distutils": {
"depends": [
"/home/matt/miniconda3/envs/dapy/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h",
"/home/matt/miniconda3/envs/dapy/lib/python3.7/site-packages/numpy/core/include/numpy/ufunc... |
BKTree.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_BKTREE_H_
#define _SPTAG_COMMON_BKTREE_H_
#include <iostream>
#include <stack>
#include <string>
#include <vector>
#include <shared_mutex>
#include "../VectorIndex.h"
#include "CommonUtils.h"
#inclu... |
EOBNRv2HMROM.c | /**
* \author Sylvain Marsat, University of Maryland - NASA GSFC
*
* \brief C code for EOBNRv2HM reduced order model (non-spinning version).
* See CQG 31 195010, 2014, arXiv:1402.4146 for details on the reduced order method.
* See arXiv:1106.1021 for the EOBNRv2HM model.
*
* Borrows from the SEOBNR ROM LAL code ... |
resample.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
gt.map2sam.c | /*
* PROJECT: GEM-Tools library
* FILE: gt.map2sam.c
* DATE: 02/02/2013
* AUTHOR(S): Santiago Marco-Sola <santiagomsola@gmail.com>
* DESCRIPTION: Converter from MAP to SAM
*/
#include <getopt.h>
#ifdef HAVE_OPENMP
#include <omp.h>
#endif
#include "gem_tools.h"
typedef struct {
/* I/O */
char* name_input_fi... |
enhance.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
convolution_7x7.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 ... |
array_sum.c | #include<stdio.h>
#include<omp.h>
#include<stdlib.h>
int main()
{
int a[] = {1, 2, 3, 4, 5};
int sum = 0;
#pragma omp parallel for reduction(+: sum)
for(int i=0;i<5;i++)
{
sum += a[i];
printf("sum = %d\ti = %d\tthreadno = %d\n", sum, i, omp_get_thread_num());
}
printf("sum =... |
A4 (1)_1627402193.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
#include <mpi.h>
#define PI 3.1415926535897932384626433832795029L
double f ( double a){
int j = 0;
double t = 1.0;
for(;j < a; j++)
t *= 2.0;
return t;
}
int main ( int argc , char * argv []){
int n , myid , numprocs , i;
... |
vms_fmt_plug.c | /*
* This file is part of John the Ripper password cracker.
*
* It comes from OpenVMS support 2.4(jtr_vms_2-4.zip) patch
* posted by David Jones.
*
* Converted to OpenVMS format module by David Jones
*
* Copyright (c) 2011 by David L. Jones <jonesd/at/columbus.rr.com>,
* Copyright (c) 2012 by Dhiru Kholia <dhi... |
otfft_avxdit16omp.h | /******************************************************************************
* OTFFT AVXDIT(Radix-16) of OpenMP Version 6.5
*
* Copyright (c) 2015 OK Ojisan(Takuya OKAHISA)
* Released under the MIT license
* http://opensource.org/licenses/mit-license.php
**********************************************************... |
test.c |
#include <stdio.h>
#include <omp.h>
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (1024*3)
#define M (65)
#define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;})
#define ZERO(X) ZERO_ARRAY(N, X)
double A[M][N], B[M][N], C[N], D[N], E[N];
double S[M];
doub... |
3.norace6.c | // RUN: clang %loadLLOV %s -o /dev/null 2>&1 | FileCheck %s
#include <omp.h>
#define N 20
int main() {
int A[N][N][N];
for (int i = 1; i < N; i++)
for (int j = 1; j < N; j++)
#pragma omp parallel for
for (int k = 1; k < N; k++)
A[i][j][k] = A[i][j - 1][k];
}
// CHECK: Region is Data Race Free.
//... |
fftw.h | #ifndef __FFTW_H__
#define __FFTW_H__
#include <fftw3.h>
#include <omp.h>
#include <cassert>
#include <iostream>
#include "types.h"
#include "index.h"
namespace Impl {
struct FFT {
int nx1_, nx2_, nb_batches_;
int nx1h_, nx2h_;
fftw_plan forward_c2c_plan_, forward_r2c_plan_;
fftw_plan backward_c2c_p... |
rhs.c | //-------------------------------------------------------------------------//
// //
// This benchmark is an OpenMP C version of the NPB LU code. This OpenMP //
// C version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
HybridCplxAdoptor.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Ye Luo, y... |
hellomem.c | //
//
// hellomem
//
// A simple example that measures copy memory bandwidth on
// Intel(r) processors using openmp to scale
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include <sys/time.h>
// dtime - utility routine that returns the current wall clock time
double dtime()
{
d... |
desktop-server.h | # pragma once
# include "./servers.h"
namespace uplink {
struct DesktopUI;
//------------------------------------------------------------------------------
struct DesktopServer : Server
{
public:
DesktopServer (const std::string& serviceName, int servicePort, objc_weak ServerDelegate* serverDelegate);
~De... |
GraphReconstructor.h | //
// Copyright (C) 2015-2018 Yahoo Japan Corporation
//
// 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... |
EmbeddingBag.h | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
prime.c | #include <stdio.h>
#include <math.h>
#include <time.h>
#include <omp.h>
int prime(int n)
{
int i = 2;
for (i; i <= sqrt(n); i++)
{
if (n%i == 0)
{
return 0;
}
}
return 1;
}
int main()
{
FILE *fpt;
time_t t_start, t_end;
int nthreads,tid,i = 0;
int count_ = 0;
clock_t t1,t2,t3,t4,t5,t6;
printf("====... |
lotus5_fmt_plug.c | //original work by Jeff Fay
//some optimisations by bartavelle at bandecon.com
/* OpenMP support and further optimizations (including some code rewrites)
* by Solar Designer */
#if FMT_EXTERNS_H
extern struct fmt_main fmt_lotus5;
#elif FMT_REGISTERS_H
john_register_one(&fmt_lotus5);
#else
#include <stdio.h>
#include... |
Fig_4.7_blockDist_full.c | #include <stdio.h>
#include <omp.h>
#define NTHREADS 4
static long num_steps = 100000000;
double step;
int main()
{
int i, j, actual_nthreads;
double pi, start_time, run_time;
double sum[NTHREADS] = {0.0};
step = 1.0 / (double) num_steps;
omp_set_num_threads(NTHREADS);
start_time = omp_get_... |
equil_helper.h | /*!
* Modifications Copyright 2017 H2O.ai, Inc.
*/
#ifndef EQUIL_HELPER_H_
#define EQUIL_HELPER_H_
#include <algorithm>
#include <cmath>
#include "gsl/gsl_blas.h"
#include "gsl/gsl_rand.h"
#include "gsl/gsl_vector.h"
#include "matrix/matrix.h"
#include "util.h"
namespace h2o4gpu {
namespace {
// Different norm ty... |
gemm.c | /**
* gemm.c: This file was adapted from PolyBench/GPU 1.0 test suite
* to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardoso@students.ic... |
gradb_mex.c | #include <inttypes.h>
#include <omp.h>
#include "mex.h"
void gradbf(float *dx, float *dy, float *dz,
const float *u, const double *h, const size_t *sz);
void gradbd(double *dx, double *dy, double *dz,
const double *u, const double *h, const size_t *sz);
void
mexFunction(int nlhs, mxArray *p... |
GxB_Vector_Option_get.c | //------------------------------------------------------------------------------
// GxB_Vector_Option_get: get an option in a vector
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifie... |
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:... |
r_direct_o1.c | /*
*
*/
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <complex.h>
//#include <omp.h>
#include "config.h"
#include "cint.h"
#include "optimizer.h"
#include "nr_direct.h"
#include "time_rev.h"
int GTOmax_shell_dim(const int *ao_loc, const int *shls_slice, int ncenter);
int GTO... |
GB_binop__minus_fc64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
residualbased_block_builder_and_solver.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
// ... |
avx512vnni_gemm.h | #pragma once
#include "intgemm/intgemm_config.h"
#ifdef INTGEMM_COMPILER_SUPPORTS_AVX512VNNI
#include "avx512_gemm.h"
#include "types.h"
namespace intgemm {
namespace avx512vnni {
// Workaround extra vmovdqa64 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94663
INTGEMM_AVX512VNNI static inline void VNNI8(__m512i &c,... |
task.c | /* Copyright (C) 2007-2018 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... |
openmp-ex14.c | #include <stdio.h>
#include <omp.h>
int main(void)
{
int N = 10;
int i;
/* Thus far the first thread has always received the start of the loop, but
* we can control this with the schedule() clause: schedule(runtime) means
* we can control the schedule with the OMP_SCHEDULE environment variable.
* */
#p... |
paint.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
Layer.h | // Created by Boris Vidolov on 02/14/2014
// Published under Apache 2.0 licence.
#pragma once
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int_distribution.hpp>
#include <time.h>
#include <sstream>
#include "File.h"
#include "FloatingPoint.h"
#include "Randomizer.h"
#include "AlignedMatri... |
rar5_fmt_plug.c | /* RAR 5.0 cracker patch for JtR. Hacked together during May of 2013 by Dhiru
* Kholia.
*
* http://www.rarlab.com/technote.htm
*
* This software is Copyright (c) 2013 Dhiru Kholia <dhiru at openwall.com> and
* it is hereby released to the general public under the
* following terms:
*
* Redistribution and use i... |
GB_unaryop__identity_int16_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
3d7pt.c | /*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b) ... |
Hamiltonian.h | const REAL invdx0 = 1.0/dxx[0];
const REAL invdx1 = 1.0/dxx[1];
const REAL invdx2 = 1.0/dxx[2];
#pragma omp parallel for
for(int i2=NGHOSTS; i2<NGHOSTS+Nxx[2]; i2++) {
const REAL xx2 = xx[2][i2];
for(int i1=NGHOSTS; i1<NGHOSTS+Nxx[1]; i1++) {
const REAL xx1 = xx[1][i1];
for(int i0=NGHOSTS; i0<NG... |
yescrypt-opt.c | /*-
* Copyright 2009 Colin Percival
* Copyright 2013,2014 Alexander Peslyak
* 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 copy... |
fft_omp.c | #include "fft.h"
/* precomputes coefficients, saves about a factor of N */
void precalc(complex_t **T, int_t len)
{
real_t angle0 = (real_t) -M_PI, angle, scale;
int_t M_2;
for(int_t M = 2, j = 0; M <= len; M <<= 1, ++j)
{
complex_t V = {(real_t) 1.f, (real_t) 0.f};
scale = 1 / (M - 1)... |
mat.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <omp.h>
#include "../include/mat.h"
#include "../include/helper.h"
#include "../include/parallel_for.h"
mat_t* new_mat(int m, int n, int mode)
{
mat_t *mat = (mat_t*)malloc(sizeof(mat_t));
mat->m = m, mat->n = n;
mat->mat = (vec_t*)malloc... |
openbsdsoftraid_fmt_plug.c | /*
* Copyright (c) 2014 Thiébaud Weksteen <thiebaud at weksteen dot fr>
*
* 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 v... |
barrier-2.c | /* { dg-do compile } */
void f1(void)
{
#pragma omp barrier a /* { dg-error "expected end of line" } */
}
/* OpenMP 2.5, section 2.7.3:
Note that because the barrier construct does not have a C language
statement as part of its syntax, there are some restrictions on its
placement within a program. The ba... |
DRB060-matrixmultiply-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... |
blackscholes.c | // Copyright (c) 2007 Intel Corp.
// Black-Scholes
// Analytical method for calculating European Options
//
//
// Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice
// Hall, John C. Hull,
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#ifdef ENABLE_PARSEC... |
main2.h | #pragma once
#include "geometrycentral/surface/halfedge_mesh.h"
#include "geometrycentral/surface/meshio.h"
#include "geometrycentral/surface/vertex_position_geometry.h"
//#include <boost/program_options.hpp>
//namespace po = boost::program_options;
#include "../deps/polyscope/deps/args/args/args.hxx"
#include <omp.... |
fista.h |
/* Software SPAMS v2.1 - Copyright 2009-2011 Julien Mairal
*
* This file is part of SPAMS.
*
* SPAMS 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 of the License, or
* (at your opti... |
utils.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 Kazanteev
* Copyright 2017 Srikanth Nagella, Edoardo Pasca
*
* Licensed under the Apache License, Version 2.0 (the "License")... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__islt_uint8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
GB_AxB_saxpy3_flopcount.c | //------------------------------------------------------------------------------
// GB_AxB_saxpy3_flopcount: compute flops for GB_AxB_saxpy3
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-... |
GB_binop__max_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-... |
atomic-13.c | /* PR middle-end/45423 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-gimple -g0 -O2 -Wno-deprecated" } */
/* atomicvar should never be referenced in between the barrier and
following #pragma omp atomic_load. */
/* { dg-final { scan-tree-dump-not "barrier\[^#\]*atomicvar" "gimple" } } */
/* { dg-s... |
error.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... |
threadloc.c | /* Fortran-callable routine for returning the MLD ("brick"?) where
this thread/process is located. */
#include <stdio.h>
#include <unistd.h>
#ifdef use_libMPI
#include <mpi.h>
#endif
int pe, npes;
#ifdef __sgi
#include <sys/pmo.h>
#include <sys/types.h>
#include <sys/stat.h>
extern pmo_handle_t *mpi_sgi_mld;
exter... |
GB_binop__gt_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-... |
openmp-ex14b.c | #include <stdio.h>
#include <omp.h>
int main(void)
{
int N = 10;
int i;
/* It is easier to see the way that schedulers work if we are able to print
* out the iterations in order. To do that, we need to add an `ordered`
* clause to the `for` directive, followed by an `ordered` directive
* specifying th... |
collatzDynamic.c | // test file to execute the collatz conjecture on 1 proc
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
typedef unsigned long long ullong;
ullong hotpo(ullong currn);
int main(int argc, char** argv) {
ullong n, // track current n
high, // highest number recorded
nmax = (argc > 1) ? atoi(... |
rbc_validator.c | //
// Created by cp723 on 2/7/2019.
//
#include <openssl/err.h>
#include <openssl/evp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#if defined(USE_MPI)
#include <mpi.h>
#else
#include <omp.h>
#endif
#include "crypto/cipher.h"
#include "crypto/ec.h"
#include "crypto/hash.h"
#include... |
loop_order.c | #include <stdio.h>
#include <omp.h>
#define N 1024
#define THREADS 8
int main(void) {
int errors = 0;
int total_wait_errors = 0;
int x[N];
int y[N];
int z[N];
int num_threads = -1;
int rand_indexes[8];
for (int i = 0; i < N; i++) {
x[i] = 1;
y[i] = i + 1;
z[i] = 2*(i + 1);
}
for (int ... |
summary.c | /*
perf-libs-tools
Copyright 2017 Arm Limited.
All rights reserved.
*/
#include "summary.h"
armpl_lnkdlst_t *listHead = NULL;
/* Routine to record log on standard program exits */
void armpl_summary_exit()
{
armpl_lnkdlst_t *listEntry = listHead;
armpl_lnkdlst_t *thisEntry = listHead;
armpl_lnkdl... |
par_csr_matrix.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)
**************************************... |
scs_matrix.c | /* contains routines common to direct and indirect sparse solvers */
#include "scs_matrix.h"
#include "linalg.h"
#include "linsys.h"
#include "util.h"
#define MIN_NORMALIZATION_FACTOR (1e-4)
#define MAX_NORMALIZATION_FACTOR (1e4)
#define NUM_RUIZ_PASSES (25) /* additional passes don't help much */
#define NUM_L2_PASSE... |
omp-taskloop.c | #include <omp.h>
#include <unistd.h>
#include <stdio.h>
#define THREADS 2
#define LEN 7
int main(void)
{
int j=0;
#pragma omp parallel num_threads(THREADS)
{
#pragma omp taskloop
for (j=0; j<LEN; j++)
{
usleep(30);
}
}
return 0;
}
|
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... |
_phono3py.c | /* Copyright (C) 2015 Atsushi Togo */
/* All rights reserved. */
/* This file is part of phonopy. */
/* Redistribution and use in source and binary forms, with or without */
/* modification, are permitted provided that the following conditions */
/* are met: */
/* * Redistributions of source code must retain the abo... |
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
//
//===---------------------------... |
l1b2l1c.c | /*--+----1----+----2----+----3----+----4----+----5----+----6----+----7----+--*/
/*
GRACE L1B to L1C & L2
Version: 20 Dec 2011
fixed and stochastic constraint solution
Copyright (c) 2011 Kun Shang (shang.34@osu.edu) All Right Reserved
*/
/*--+----1----+----2----+----3----+----4----+----5----+----6... |
VariableSizeMatrix.h | // Copyright (c) 2017, Lawrence Livermore National Security, LLC and
// UT-Battelle, LLC.
// Produced at the Lawrence Livermore National Laboratory and the Oak Ridge
// National Laboratory.
// LLNL-CODE-743438
// All rights reserved.
// This file is part of MGmol. For details, see https://github.com/llnl/mgmol.
// Plea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.