source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
apply_bcs_curvilinear.h |
// Declare boundary condition BC_UPDATE_OUTER macro,
// which updates a single outer boundary face
// of the 3D grid cube using quadratic polynomial
// extrapolation.
#define BC_UPDATE_OUTER(which_gf, i0,i1,i2, FACEX0,FACEX1,FACEX2) { \
const int idx3 = IDX3S(i0,i1,i2); ... |
utilityNestedDisectionMetis.h | // ***********************************************************************
//
// Grappolo: A C++ library for graph clustering
// Mahantesh Halappanavar (hala@pnnl.gov)
// Pacific Northwest National Laboratory
//
// *************************************************************... |
vect-simd-clone-4.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
float d[N];
int e[N];
unsigned short f[N];
#pragma omp declare simd simdlen(8) notinbranch unif... |
pr60823-3.c | /* PR tree-optimization/60823 */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp-simd -fno-strict-aliasing" } */
void bar (char *, double *);
#if __SIZEOF_DOUBLE__ >= 4
struct S { char c[sizeof (double)]; };
void baz (struct S, struct S);
union U { struct S s; double d; };
#pragma omp declare simd simdlen(4) ... |
rawBLAKE2_512_fmt_plug.c | /*
* This file is part of John the Ripper password cracker,
* Copyright (c) 2012 by Solar Designer
* based on rawMD4_fmt.c code, with trivial changes by groszek.
*
* Re-used for BLAKE2 by Dhiru Kholia (dhiru at openwall.com)
*/
#if FMT_EXTERNS_H
extern struct fmt_main fmt_rawBLAKE2;
#elif FMT_REGISTERS_H
john_re... |
mandel-omp-taskloop-row.c | /*
* Sequential Mandelbrot program
*
* This program computes and displays all or part of the Mandelbrot
* set. By default, it examines all points in the complex plane
* that have both real and imaginary parts between -2 and 2.
* Command-line parameters allow zooming in on a specific part of
* this range.
... |
FGT_fmt_plug.c | /*
* Fortigate (FortiOS) Password cracker
*
* This software is Copyright (c) 2012 Mat G. <mat.jtr at gmail.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 modification, are permitted.
*
* Passwords are located... |
ompcompress.c | #ifdef _OPENMP
#if defined(WITH_IPP)
/*
* This source code file was modified with Intel(R) Integrated Performance Primitives library content
*/
#endif
/* compress 1d contiguous array in parallel */
static void
_t2(compress_omp, Scalar, 1)(zfp_stream* stream, const zfp_field* field)
{
/* array metadata */
const Sc... |
copy-meet.c | int main() {
int X = 42;
int Y = 10;
int Z = 20;
#pragma omp parallel
{
int t1;
while (1) {
Z = Y;
if (X < 10) {
Y = Y + 1;
#pragma omp barrier
break;
}
t1 = 10;
#pragma omp barrier
X = Z + Y + 3;
#pragma omp barrier
}
}
}
|
pdf_fmt_plug.c | /* PDF cracker patch for JtR. Hacked together during Monsoon of 2012 by
* Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>
*
* Uses code from Sumatra PDF and MuPDF which are under GPL.
*
* Edited by Shane Quigley in 2013.
*/
#if FMT_EXT... |
GB_binop__plus_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-... |
SE_fg_int_extended_split_mex.c | #include "mex.h"
#include "../SE_fgg.h"
void SE_FGG_MEX_params(SE_FGG_params*, const mxArray*, int);
#define X prhs[0] // this arg is unused
#define HH prhs[1]
#define OPT prhs[2]
#define ZS prhs[3]
#define ZX prhs[4]
#define ZY prhs[5]
#define ZZ prhs[6]
#define IDX prhs[7]
#define PHI_OUT plhs[0] // Outp... |
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)
int check_results(double* A){
for... |
operators.h | /*
Project Name : OpenMEEG
© INRIA and ENPC (contributors: Geoffray ADDE, Maureen CLERC, Alexandre
GRAMFORT, Renaud KERIVEN, Jan KYBIC, Perrine LANDREAU, Théodore PAPADOPOULO,
Emmanuel OLIVI
Maureen.Clerc.AT.inria.fr, keriven.AT.certis.enpc.fr,
kybic.AT.fel.cvut.cz, papadop.AT.inria.fr)
The OpenMEEG software is a C++... |
GB_unaryop__lnot_int8_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
dftcommon.c | // Copyright Naoki Shibata 2010 - 2017.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <ctype.h>
#include... |
dds.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__ainv_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... |
zhesv.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 ... |
lcm2_profiler.c | /** @file lcm2_profiler.c
*
* @par Copyright:
* 2009-2018 (C) Kai-Uwe Behrmann
*
* @brief littleCMS CMM profile generator for Oyranos
* @internal
* @author Kai-Uwe Behrmann <ku.b@gmx.de>
* @par License:
* MIT <http://www.opensource.org/licenses/MIT>
* @since 2009/10/24
*/
... |
test_linear_algebra.c | /*
* test_linear_algebra.c
* a small program to test the linear algebra code
* Brian J Gravelle
* ix.cs.uoregon.edu/~gravelle
* gravelle@cs.uoregon.edu
* See LICENSE file for licensing information and boring legal stuff
* If by some miricale you find this software useful, thanks are accepted in
*... |
threading.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_THREADING_H_
#define LIGHTGBM_UTILS_THREADING_H_
#include <LightGBM/utils/openmp_wrapper.h>
#include <functional>
#include <... |
search.h | // -*- C++ -*-
// Copyright (C) 2007-2021 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... |
bucle-forModificado.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv) {
int i, n = 9;
if(argc < 2) {
fprintf(stderr,"\n[ERROR] - Falta nº iteraciones \n");
exit(-1);
}
n = atoi(argv[1]);
#pragma omp parallel for
for (i=0; i<n; i++)
printf("thread %d ejecuta la iteración %d del... |
unsharp.c | #include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
#include <math.h>
#ifdef TIME
#define IF_TIME(foo) foo;
#else
#define IF_TIME(foo)
#endif
#ifndef M
#define M 256
#endif
#ifndef B
#define B 32
#endif
#define in(k,x,y) IN[k][tx*B+x][ty*B+y]
#define blury(k,x,y) BLURY[k][tx*B+x][ty*B+y]
#define sharpen(... |
DRB110-ordered-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... |
GB_unop__acosh_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... |
pr44085.c | /* PR middle-end/44085 */
/* { dg-do compile } */
/* { dg-require-effective-target tls_native } */
/* { dg-options "-fopenmp" } */
int thr1, thr2;
#pragma omp threadprivate (thr1, thr2)
void
foo (void)
{
#pragma omp task untied /* { dg-error "enclosing task" } */
{
thr1++; /* { dg-error "used in untied task" }... |
millionaire.h | /*
Authors: Deevashwer Rathee, Mayank Rathee
Copyright:
Copyright (c) 2021 Microsoft Research
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 r... |
benchmark_tree_learner.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#pragma once
#include <LightGBM/dataset.h>
#include <LightGBM/tree.h>
#include <LightGBM/tree_learner.h>
#include <LightGBM/utils/array_args.h>
#incl... |
mrg8_vec.h | /*
* mrg8.h
*
* Created on: Apr 6, 2015
* Author: aghasemi
* Updated on: June 29, 2017
* Author: Yusuke
* Updated on: April 9, 2018
* Author: Yusuke
*/
#ifndef MRG8_VEC_H
#define MRG8_VEC_H
#include <vector>
#include <stdint.h>
#include <iostream>
#include <iomanip>
#include <fstream>
#incl... |
inference.c | #include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <sys/time.h>
#include <assert.h>
#include <string.h>
/* Optionally include OpenMP with the -fopenmp flag */
#if defined(_OPENMP)
#include <omp.h>
#endif
#include "include/lbfgs.h"
#include "include/plm.h"
#include "include/infere... |
zSchCompUdt-cuda.c | /*! \file
Copyright (c) 2003, The Regents of the University of California, through
Lawrence Berkeley National Laboratory (subject to receipt of any required
approvals from U.S. Dept. of Energy)
All rights reserved.
The source code is distributed under BSD license, see the file License.txt
at the top-level directory.
... |
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... |
parallel_master_taskloop_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 -triple x86_64-unknown-unknown %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=50 -verify=expected,omp50 -triple x86_64-unknown-unknown %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -f... |
rose_outer_only.c | /* Only the outmost loop can be parallelized
*/
#include "omp.h"
void foo()
{
int n = 100;
int m = 100;
double b[n][m];
int i;
int j;
#pragma omp parallel for private (i,j) firstprivate (n,m)
for (i = 0; i <= n - 1; i += 1) {
for (j = 0; j <= m - 1; j += 1) {
b[i][j] = b[i][j - 1];
}
}... |
sp.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... |
j3d27pt.gold.h | #include <cstring>
using std::memcpy;
template <class T>
void jacobi_gold(T *fout, const T *fin, double h2inv, double a, double b, int L, int M, int N) {
double (*out)[M][N] = (double (*)[M][N]) fout;
double (*in)[M][N] = (double (*)[M][N]) fin;
auto ftemp1 = new T[L * M * N];
auto ftemp2 = new T[L * M * N];
mems... |
GxB_Descriptor_get.c | //------------------------------------------------------------------------------
// GxB_Descriptor_get: get a field in a descriptor
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier... |
cpu_stream.h | /*
Copyright 2020 The OneFlow 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 agre... |
cpu_ctc.h | #pragma once
#include <tuple>
#include <cmath>
#include <limits>
#include <algorithm>
#include <numeric>
#if !defined(CTC_DISABLE_OMP) && !defined(APPLE)
#include <omp.h>
#endif
#include "ctc_helper.h"
template<typename ProbT>
class CpuCTC {
public:
// Noncopyable
CpuCTC(int alphabet_size, int minibatch, v... |
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... |
mpiCodeGenerator.h | /*
*
*
* V 0.2 using real frontend parser and dedicated OpenMP-like AST nodes for program representation
* This is necessary to parse complex extended map clause with dist_data info.
* The previous version's MPI_PragmaAttribute is no longer used.
*
* Liao 12/11/2015
*
* V 0.1
* Parsing pragmas and ge... |
ast-dump-openmp-target-parallel-for-simd.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -ast-dump %s | FileCheck --match-full-lines -implicit-check-not=openmp_structured_block %s
void test_one(int x) {
#pragma omp target parallel for simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target parallel for simd
f... |
spectral_sequence_reduction.h | /* Copyright 2013 IST Austria
Contributed by: Jan Reininghaus
This file is part of PHAT.
PHAT is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(... |
msgmerge.c | /* GNU gettext - internationalization aids
Copyright (C) 1995-1998, 2000-2010, 2012, 2015-2016 Free Software
Foundation, Inc.
This file was written by Peter Miller <millerp@canb.auug.org.au>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public... |
AttentionHelp.h | #ifndef ATTENTION_HELP
#define ATTENTION_HELP
/*
* AttentionHelp.h:
* attention softmax help nodes
*
* Created on: Apr 22, 2017
* Author: mszhang
*/
#include "MyLib.h"
#include "Node.h"
#include "Graph.h"
#include <memory>
class AttentionSoftMaxNode : public Node {
public:
vector<dtype> masks, mask_losse... |
GB_binop__ne_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
pi_omp_tasks.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 <sys/time.h>
#include <omp.h> /* OpenMP */
double getusec_() {
struct timeval time;
gettimeofday(&time, NULL... |
base.c | #define _DEFAULT_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <omp.h>
int NITER=100;
int N=100;
int main(){
for(int i = 0; i < NITER; ++i){
float counter = 0.0;
#pragma omp parallel for
for(int j = 0; j < N; ++j){
// Useful work here
counter = counter + 1;
usleep(1);
}
... |
mixed_tentusscher_myo_epi_2004_S1_11.c | // Scenario 1 - Mixed-Model TenTusscher 2004 (Myocardium + Epicardium)
// (AP + max:dvdt)
#include <stdio.h>
#include "mixed_tentusscher_myo_epi_2004_S1_11.h"
GET_CELL_MODEL_DATA(init_cell_model_data)
{
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode... |
mat_mul_p4a_8000.c | /*
* file for mat_mul.c
*/
#include "./mat_mul.h"
#include "./size.h"
void mat_mul(int *a, int *b, int *c);
void mat_mul(int *a, int *b, int *c)
{
int i, j, k, t;
#pragma omp parallel for private(j, t, k)
for(i = 0; i <= 7999; i += 1)
for(j = 0; j <= 7999; j += 1) {
c[i*8000+j] = 0;
for... |
veccopy-ompt-target-tracing.c | #include <stdio.h>
#include <assert.h>
#include <omp.h>
#include "callbacks.h"
static int start_trace();
static int flush_trace();
static int stop_trace();
int main()
{
int N = 100000;
int a[N];
int b[N];
int i;
for (i=0; i<N; i++)
a[i]=0;
for (i=0; i<N; i++)
b[i]=i;
start_trace();
#pra... |
Cylinder.h | #ifndef CYLINDER_HEADER
#define CYLINDER_HEADER
#include "basic.h"
#include <stdexcept>
#include <utility>
#include <MiscLib/Vector.h>
#include "PointCloud.h"
#include <ostream>
#include <istream>
#include <GfxTL/HyperplaneCoordinateSystem.h>
#include <stdio.h>
#include <MiscLib/NoShrinkVector.h>
#include "LevMarLSWeig... |
kernel2_wrapper.c | #include <stdio.h>
#include <string.h>
#include <omp.h>
#include "../common.h" // (in directory provided here)
#include "../util/timer/timer.h" // (in directory provided here)
#include "./kernel2_wrapper.h" // (in directory provided here)
//=================================================... |
matMult_SSE.c | /*
* File: matMult.c
* Author: Malcolm Davis
* Course: Computer Architecture II
* Created on Apr 20, 2018
* 4x4 matrix multiplication
*
* Usage:
* ./matMult for default parameters and random matrixes or;
* ./matMult v1.1.1 v1.1.2 ... v1.1.4 ... v1.2.1 v1.2.2 ... v1.2.4 ... v2.4.1 v2.4.2 ... v2.4.4
*/
#in... |
private.c | #include "private.h"
#define CG_BEST_TOL 1e-9
#define CG_MIN_TOL 1e-1
#define PRINT_INTERVAL 100
static idxint totCgIts;
static timer linsysTimer;
static pfloat totalSolveTime;
char * getLinSysMethod(Data * d, Priv * p) {
char * str = scs_malloc(sizeof(char) * 128);
sprintf(str, "sparse-indirect, nnz in A = %li, C... |
paint.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
mean.c | /******************************************************************
* Melissa *
*-----------------------------------------------------------------*
* COPYRIGHT (C) 2017 by INRIA and EDF. ALL RIGHTS RESERVED. *
* ... |
mergeOpenMP.c | #include <assert.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#include "timer.h"
#define TASK_SIZE 50
void merge(int *X, int n, int *tmp) {
int i = 0;
int j = n/2;
int ti = 0;
while (i<n/2 && j<n) {
if (X[i] < X[j]) {
tmp[ti] = X[i];
ti++; i++;
... |
omp_report_mask.c | /* Routine reports OpenMP process affinity information.
Get thread number and cpus (cpu_ids)
Create static space (proc_mask) to hold all masks (done in a single region)
Determine the mask for each thread (insert it in proc_mask)
print mask header (one thread in single region)
... |
omp-low.c | /* Lowering pass for OMP directives. Converts OMP directives into explicit
calls to the runtime library (libgomp), data marshalling to implement data
sharing and copying clauses, offloading to accelerators, and more.
Contributed by Diego Novillo <dnovillo@redhat.com>
Copyright (C) 2005-2020 Free Software... |
omp-parallel-if.c | #include <omp.h>
extern void abort (void);
int
foo (void)
{
return 10;
}
int
main ()
{
int A = 0;
#pragma omp parallel if (foo () > 10) shared (A)
{
A = omp_get_num_threads ();
}
if (A != 1)
abort ();
#pragma omp parallel if (foo () == 10) num_threads (3) shared (A)
{
A = omp... |
untied_tasks.c | // RUN: %libomp-compile-and-run
// REQUIRES: abt
#include "omp_testsuite.h"
int test_omp_untied_tasks()
{
// https://github.com/pmodels/bolt/issues/49
int val = 0;
#pragma omp parallel
#pragma omp master
{
#pragma omp task untied
{ val = 1; }
}
return val;
}
int test_omp_tied_tasks()
{
int val... |
bucle-forModificado.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv) {
int i, n = 9;
if(argc < 2) {
fprintf(stderr,"\n[ERROR] - Falta nº iteraciones \n");
exit(-1);
}
n = atoi(argv[1]);
#pragma omp parallel for
for (i=0; i<n; i++)
printf("thread %d ejecuta la iteración %d del bucle\n... |
DRB068-restrictpointer2-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... |
omp_mm.c | /******************************************************************************
* FILE: omp_mm.c
* DESCRIPTION:
* OpenMp Example - Matrix Multiply - C Version
* Demonstrates a matrix multiply using OpenMP. Threads share row iterations
* according to a predefined chunk size.
* AUTHOR: Blaise Barney
* LAST REVISE... |
3d25pt.c | /*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b)... |
GB_subassign_08s_and_16.c | //------------------------------------------------------------------------------
// GB_subassign_08s_and_16: C(I,J)<M or !M> += A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Id... |
DRB025-simdtruedep-var-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
stencil2d_itlmic_kernel.c | #include "stencil2d.h"
#include <offload.h>
#include <homp.h>
void stencil2d_itlmic_wrapper(omp_offloading_t *off, int start, int len, long n, long m, int u_dimX, int u_dimY, REAL *u, REAL *uold, int radius,int coeff_dimX, REAL *coeff)
{
int ix, iy, ir;
int count = 4*radius+1;
#ifdef SQUARE_SETNCIL
count = co... |
mathematigames.c | /*
Andi Farhan (2006521616)
Aryoshi Wicaksono (2006532140)
Gemilang Bagas Ramadhani (2006535205)
Nabil Mafaza (2006529133)
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include <time.h>
#include <ctype.h>
struct soal
{
char pertanyaan[100];
char opsiA[10];
char o... |
assign4_openmp.c | #include<stdio.h>
#include<omp.h>
int main()
{
int mat[3][3],i,j,m;
int det=0;
printf("\nInput elements:");
for(i=0;i<3;i++)
{
for(j=0;j<3;j++)
{
scanf("%d",&mat[i][j]);
}
}
printf("\nThe Original Matrix is :\n");
for(i=0;i<3;i++)
{
... |
par_gsmg.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)
**************************************... |
jump-openmp.c | /* { dg-do compile } */
/* { dg-options "-fcilkplus -fopenmp" } */
/* { dg-require-effective-target fopenmp } */
int *a, *b, c;
void foo()
{
#pragma simd
for (int i=0; i < 1000; ++i)
{
a[i] = b[i];
if (c == 5)
return; /* { dg-error "invalid branch to/from Cilk Plus structured block" } */
}
}
v... |
ccv_bbf.c | #include "ccv.h"
#include "ccv_internal.h"
#include <sys/time.h>
#ifdef HAVE_GSL
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#endif
#ifdef USE_OPENMP
#include <omp.h>
#endif
const ccv_bbf_param_t ccv_bbf_default_params = {
.interval = 5,
.min_neighbors = 2,
.accurate = 1,
.flags = 0,
.size = {
24,
2... |
expected_output.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
//---------------------------------------------------------------------
// program IS
//---------------------------------------------------------------------
//----------
// Class S:
//----------
//----------
// Cl... |
171. Qr Decompose.h | /**
* @file
* \brief Library functions to compute [QR
* decomposition] of a given matrix.
*
*/
#ifndef QR_DECOMPOSE_H
#define QR_DECOMPOSE_H
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif
/**
* function to display matrix on stdout
*/
void print_matrix(double ... |
par_relax_more.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... |
3d25pt_var.c | /*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) >... |
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
... |
lu.pluto_orio.par.c | #include <stdio.h>
#include <stdlib.h>
#include <sys/time.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))
double L[N][N];
double U[N][N];
double A[N][... |
GB_concat_bitmap_template.c | //------------------------------------------------------------------------------
// GB_concat_bitmap_template: concatenate a tile into a bitmap matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
GB_ewise_slice.c | //------------------------------------------------------------------------------
// GB_ewise_slice: slice the entries and vectors for an ewise operation
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SP... |
argsort_op.h | /* Copyright (c) 2016 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... |
elemwise_binary_op.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
secondorder_itSL_evo_omp.h | //- NEW SL ORDER 2 function: BASIC ORDER 1 SCHEME (OK)
void HJB_SL::secondorder_itSL_evo_omp(double t, double dt)
{
//- P=PARAMP of the data file.
int i,j,c,e,d,p,test;
#pragma omp parallel num_threads(OMP_NUM_THREADS) private(d,i,j,c,p,test,e) shared(t,dt) default(none)
{
#pragma omp for
//for(i=0; i<me... |
primo.c | #include <stdio.h>
#include <math.h>
int primo(long num)
{
long d;
if(num <= 1)
return 0;
if(num > 3) {
if(num % 2 == 0) return 0;
long max_divisor = sqrt(num);
for(d = 3; d <= max_divisor; d+=2) {
if(num % d == 0) return 0;
}
}
return 1;
}
int main()
{
long max_num = 5... |
par_nongalerkin.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)
**************************************... |
GB_unop__abs_fp32_fp32.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... |
mongodb_fmt_plug.c | /* Cracker for both MongoDB system and sniffed network hashes. Hacked together
* during November of 2012 by Dhiru Kholia <dhiru at openwall.com>.
*
* Based on https://github.com/cyberpunkych/attacking_mongodb
*
* Hash format for MongoDB system hashes: user:$mongodb$0$user$hash
* Hash format for MongoDB network ha... |
convolution_3x3_int8.h | // BUG1989 is pleased to support the open source community by supporting ncnn available.
//
// Copyright (C) 2019 BUG1989. 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 of the License at
//
//... |
rose_v1_jacobi_seq.c | /* An example code
*
* */
#include <stdio.h>
#include <math.h>
#include <omp.h>
void driver();
void initialize();
void jacobi();
void error_check();
#define MSIZE 200
int n;
int m;
int mits;
double tol;
double relax = 1.0;
double alpha = 0.0543;
double u[200][200];
double f[200][200];
double uold[200][200];
double ... |
archive_blake2sp_ref.c | /*
BLAKE2 reference source code package - reference C implementations
Copyright 2012, Samuel Neves <sneves@dei.uc.pt>. You may use this under the
terms of the CC0, the OpenSSL Licence, or the Apache Public License 2.0, at
your option. The terms of these licenses can be found at:
- CC0 1.0 Universal :... |
GB_unaryop__ainv_int32_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... |
GB_dense_ewise3_noaccum_template.c | //------------------------------------------------------------------------------
// GB_dense_ewise3_noaccum_template: C = A+B where all 3 matrices are dense
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
/... |
ten_tusscher_2004_epi_S3_11.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S3_11.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO... |
atomic.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... |
simulation.h | //! \file simulation.h
//! \brief Variables/functions related to a running simulation
#ifndef OPENMC_SIMULATION_H
#define OPENMC_SIMULATION_H
#include "openmc/particle.h"
#include <cstdint>
#include <vector>
namespace openmc {
constexpr int STATUS_EXIT_NORMAL {0};
constexpr int STATUS_EXIT_MAX_BATCH {1};
constexpr... |
pragma_example.c | /* To compile this program on Linux, try:
make CFLAGS='-std=c99 -Wall' pragma_example
To run:
./pragma_example; echo $?
It should print 0 if OK.
You can even compile it to run on multicore SMP for free with
make CFLAGS='-std=c99 -fopenmp -Wall' pragma_example
To verify there are really some cl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.