source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
mxnet_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 ... |
Gemm_MT_Loop5_MRxNRKernel_ver3.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 ) (... |
profile.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
sparselu-task-dep.c | /**********************************************************************************************/
/* This program is part of the Barcelona OpenMP Tasks Suite */
/* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */
/* Copyright (C) 2009 Univer... |
zscale.c | #include "zscale.h"
#include "dzscal.h"
fint zscale_(const fnat m[static restrict 1], const fnat n[static restrict 1], double Ar[static restrict VDL], const fnat ldAr[static restrict 1], double Ai[static restrict VDL], const fnat ldAi[static restrict 1], const fint e[static restrict 1])
{
#ifndef NDEBUG
if (IS_NOT_... |
gen_fffc.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)
**************************************... |
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... |
GB_unaryop__minv_uint32_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
memcpy-tutorial.c | // -----------------------------------------------------------------------------
//
// "CAPIPrecis"
//
// -----------------------------------------------------------------------------
// Copyright (c) 2014-2019 All rights reserved
// -----------------------------------------------------------------------------
// ... |
GB_binop__plus_fp32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
GB_unaryop__abs_int16_uint16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
convolution_bf16s.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 ... |
par_grid_list.c | #include "par_grid_list.h"
int main(int argc, char* argv[]){
char* file; /**< Input data file name */
int generations = 0; /**< Number of generations to proccess */
int cube_size = 0; /**< Size of the 3D space */
GraphNode*** graph; /**< Graph representatio... |
matrix-puzzle.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void clear_stream(FILE *in)
{
int ch;
clearerr(in);
do
ch = getc(in);
while (ch != '\n' && ch != EOF);
clearerr(in);
}
int main(int argc, char *argv[])
{
int rows, cols;
int i, j, r;
... |
simd_utils_avx_int32.h | /*
* Project : SIMD_Utils
* Version : 0.2.2
* Author : JishinMaster
* Licence : BSD-2
*/
#pragma once
#include <stdint.h>
#include "immintrin.h"
#ifdef __AVX2__
static inline void add256s(int32_t *src1, int32_t *src2, int32_t *dst, int len)
{
int stop_len = len / AVX_LEN_INT32;
stop_len *= AVX_LEN_INT32... |
GB_binop__bclr_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
md5test.c | /***
* How to compile:
* GCC 4.6.3: mpicc md5test.c -o md5test -fopenmp -lcrypto -lssl -std=c99
* GCC 6.3.0: mpicc md5test.c -o md5test -fopenmp -lcrypto -lssl
*
* 5 nodos no máximo
* - 1 mestre
* - O mestre só envia a mensagem para os escravos dizendo encontre essa linha e me digam se encontrar ou não.
... |
FG_vector.h | #ifndef __FG_VECTOR_H__
#define __FG_VECTOR_H__
/*
* Copyright 2014 Open Connectome Project (http://openconnecto.me)
* Written by Da Zheng (zhengda1936@gmail.com)
*
* This file is part of FlashGraph.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compli... |
matmul.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <unistd.h>
#include <sys/time.h>
#define M 2048
#define N 2048
#define K 2048
/*#define M 1000
#define N 1000
#define K 1000*/
#define alpha 1
#define bet... |
detector.c | #include "darknet.h"
#include <stdio.h>
#ifdef WIN32
#include "unistd\dirent.h"
#else
#include <dirent.h>
#endif
#ifdef WIN32
#include "unistd\unistd.h"
#else
#include <unistd.h>
#endif
#include <sys/stat.h>
#define class temp
struct stat st;
static int coco_ids[] = {1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,2... |
ParFriends.h | /****************************************************************/
/* Parallel Combinatorial BLAS Library (for Graph Computations) */
/* version 1.6 -------------------------------------------------*/
/* date: 6/15/2017 ---------------------------------------------*/
/* authors: Ariful Azad, Aydin Buluc --------------... |
atomic-12.c | /* { dg-do run } */
extern void abort (void);
_Bool v, x1, x2, x3, x4, x5, x6;
void
foo (void)
{
#pragma omp atomic capture
v = ++x1;
if (!v)
abort ();
#pragma omp atomic capture
v = x2++;
if (v)
abort ();
#pragma omp atomic capture
v = --x3;
if (v)
abort ();
#pragma omp atomic capture... |
SVRGUpdater.h | /*
* Copyright 2016 [See AUTHORS file for list of authors]
*
* 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 require... |
wdp.c | #include "wdp.h"
#include "dnormb.h"
#include "dnorme.h"
#include "dnormf.h"
#include "dnorms.h"
#include "d8sort.h"
double dnb(const fnat n, const double x[static restrict 1])
{
const fint incx = 1;
return dnormb_((const fint*)&n, x, &incx);
}
#ifndef USE_MKL
extern double BLAS_D(dot)(const fint n[static 1], con... |
fixed_version.c | #include<stdio.h>
int main(){
int sum = 1;
int i =1;
// increase sum by one each iteratiob using openmp
#pragma omp parallel for firstprivate(i) reduction( + : sum )
for (int j = i; j < 100; j++) {
sum +=1;
}
printf("sum is %d\n",sum);
}
|
double_reduction_plus.c |
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main()
{
double result = 0;
#pragma omp parallel reduction(+:result)
{
int rank = omp_get_thread_num();
result += rank;
}
printf("Result: %f\n", result);
}
|
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
//
//===---------------------------... |
DRB040-truedepsingleelement-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... |
OMPIRBuilder.h | //===- IR/OpenMPIRBuilder.h - OpenMP encoding builder for LLVM IR - 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__minv_uint8_uint8.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... |
fieldize.h | #include <Python.h>
#include "numpy/arrayobject.h"
#include <new>
#include <map>
class Summer
{
public:
Summer(double * field_i, int nx_i):
field(field_i), nx(nx_i)
{};
/* virtual void doSum(const double input, const int xoff, const int yoff); */
protected:
double * c... |
tinyexr.h | #ifndef TINYEXR_H_
#define TINYEXR_H_
/*
Copyright (c) 2014 - 2020, Syoyo Fujita and many contributors.
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 th... |
lensing.c | /** @file lensing.c Documented lensing module
*
* Simon Prunet and Julien Lesgourgues, 6.12.2010
*
* This module computes the lensed temperature and polarization
* anisotropy power spectra \f$ C_l^{X}, P(k), ... \f$'s given the
* unlensed temperature, polarization and lensing potential spectra.
*
* Follows Chal... |
GB_binop__bxnor_uint8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
3d7pt_var.c | /*
* Order-1, 3D 7 point stencil with variable 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) > (b) ? a : b)
#... |
station_stat.c | #include "station_stat.h"
void station_stat_init(station_stat_t* station_stat)
{
for (int i = 0; i < 2; i++) {
station_stat->num_door_opening[i] = 0;
station_stat->total_wait_time[i] = 0;
station_stat->min_wait_time[i] = 0;
station_stat->max_wait_time[i] = 0;
station_stat->l... |
omp_simd_safelen.c | //Variable examples of using simd directives
void foo (int n, double *a, double* b)
{
for (int i=0; i<n; i++)
a[i]=b[i];
}
void foo2 (int n, double *a, double* b)
{
#pragma omp simd safelen(16)
for (int i=0; i<n; i++)
a[i]=b[i];
}
void foo3 (int n, double *a, double* b)
{
int j=0;
for (int i=0; i<n; i... |
bucle-for.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
{
#pragma omp for
for (i=0; i<n; i++)
printf("th... |
GeneralMatrixMatrix.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008-2009 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You c... |
4099.c | // this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose
void kernel_heat_3d(int tsteps, int n, double A[200 + 0][200 + 0][200 + 0], double B[200 + 0][200 + 0][200 + 0])... |
passageMarker.c | /*
Copyright 2007, 2008 Daniel Zerbino (zerbino@ebi.ac.uk)
This file is part of Velvet.
Velvet 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 opt... |
omp-sumof-elements.c |
/*****************************************************************************
Example 1.4 : omp-sumof-elements.c
Objective : Write an OpenMP program to find Sum Of Elements
of One-Dimensional real array.
This example demonstrates the use ... |
reduction-3.c | #include <omp.h>
#include <stdlib.h>
int
main (void)
{
int i = 0, j = 0, k = ~0, l;
double d = 1.0;
#pragma omp parallel num_threads(4)
{
#pragma omp single
{
i = 16;
k ^= (1 << 16);
d += 32.0;
}
#pragma omp for reduction(+:i) reduction(*:d) reduction(&:k) nowait
for (l = 0; l < 4;... |
rc.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include "common.h"
/** abritrary maximum number of rules */
#define MAXRULES 10
/** represents a rule:
greater and lower are the colours you're targeting
factor is the factor which will grow one of the colours */
typedef struct {
RC_... |
common.h | #ifndef LIGHTGBM_UTILS_COMMON_FUN_H_
#define LIGHTGBM_UTILS_COMMON_FUN_H_
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <cstdio>
#include <string>
#include <vector>
#include <sstream>
#include <cstdint>
#include <algorithm>
#include <cmath>
#include <functional>
#include <memory>... |
bounds.c | /*---------------------------------------------------------------------------------
BOUNDS.C
-Implements physical boundary conditions
-Ensure no inflow at radial boundaries
-Ensure radial mass flux at radial boundaries is zero
-B2 flux at X1 and X3 faces at polar boundaries is reflected for ghost zones
-A... |
knapsack.c | /**********************************************************************************************/
/* This program is part of the Barcelona OpenMP Tasks Suite */
/* Copyright (C) 2009 Barcelona Supercomputing Center - Centro Nacional de Supercomputacion */
/* Copyright (C) 2009 Univer... |
m_area_auto_covariance.h | //
// Created by Harold on 2021/6/28.
//
#ifndef M_MATH_M_AREA_AUTO_COVARIANCE_H
#define M_MATH_M_AREA_AUTO_COVARIANCE_H
#include <opencv2/core.hpp>
#include <omp.h>
namespace M_MATH {
template<typename T>
cv::Mat_<T> AreaAutoCovariance(cv::Mat_<T> const& I) {
static_assert(std::is_floating_point<T>:... |
default_solvers.c | 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_equations = NEQ;
}
SOLVE_MODEL_ODES(solve_model_odes_cpu) {
uint32_t sv_id;
size_t num_cells_to_solve = ode_solver->num_cells_to_solve;
uint32_t * cells_... |
icd3d.c |
#include <math.h>
#include <stdio.h>
#include <time.h>
#include <omp.h>
#include "icd3d.h"
#include "allocate.h"
void ICDStep3DCone(struct Sino *sino, struct Image *img, struct SysMatrix *A, struct ICDInfo3DCone *icdInfo, struct ReconParams *reconParams, struct ReconAux *reconAux)
{
/**
* Updates one voxel. Vo... |
analyze.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% AAA N N AAA L Y Y ZZZZZ EEEEE ... |
omp_ex_16.c | #include <stdio.h>
#include <omp.h>
/*
MIT License
Copyright (c) 2019 NOUREDDINE DAGHBOUDJ
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 ri... |
21_omp_task_struct.c | // clang-format off
// RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | %filecheck %s
// RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %opt -O2 -S | %apply-typeart -typeart-alloca -call-filter -S 2>&1 | %filecheck %s --check-prefix=CHECK-opt
... |
omp_parallel_for_lastprivate.c | <ompts:test>
<ompts:testdescription>Test which checks the omp parallel for lastprivate directive.</ompts:testdescription>
<ompts:ompversion>2.0</ompts:ompversion>
<ompts:directive>omp parallel for lastprivate</ompts:directive>
<ompts:dependences>omp parallel for reduction,omp parallel for private</ompts:dependences>
<o... |
SpaceFrame v4.2.h | #include <Windows.h>
#include <ctype.h>
#include <iostream>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
using namespace std;
class SpaceFrame
{
private:
double EPS;
double MAXTS;
double MAXLV;
int TNN; // total number of nodes
... |
pr68128-1.c | /* PR tree-optimization/68128 */
/* { dg-do compile } */
/* { dg-options "-Ofast -fopenmp -fdump-tree-vect-details" } */
/* { dg-additional-options "-mavx" { target i?86-*-* x86_64-*-* } } */
/* Make sure the following loop is vectorized even when not using
firstprivate variables for scalar vars that are not modifi... |
heat.c | /*********************************************************************************/
/* */
/* Animation of heat equation in a planar domain */
/* ... |
pi-v11.c | /*
* Compute pi by approximating the area under the curve f(x) = 4 / (1 + x*x)
* between 0 and 1.
*
* parallel version using OpenMP
*/
#include <stdio.h>
#include <stdlib.h>
#include <omp.h> /* OpenMP */
#if _DEBUG_
#define _DEBUG_ 1
#else
#define _DEBUG_ 0
#include "extrae_user_events.h"
#define PROG... |
GxB_Monoid_terminal.c | //------------------------------------------------------------------------------
// GxB_Monoid_terminal: return the terminal of a monoid (if any)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Lice... |
GB_unaryop__identity_bool_uint64.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_tools.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "ui.h"
#include "nbody.h"
#include "nbody_tools.h"
#include "nbody_alloc.h"
extern node_t* root;
/* draw recursively the content of a node */
void draw_node(node_t* n) {
#ifndef DISPLAY
return;
#else
if(!n)
return;
#if D... |
pairwise_align.c | /*
This file is part of SSCA1.
Copyright (C) 2008-2015, UT-Battelle, LLC.
This product includes software produced by UT-Battelle, LLC under Contract No.
DE-AC05-00OR22725 with the Department of Energy.
This program is free software; you can redistribute it and/or modify
it under the terms of the Ne... |
Cone.h | #ifndef CONE_HEADER
#define CONE_HEADER
#ifdef DOPARALLEL
#include <omp.h>
#endif
#include "basic.h"
#include "PointCloud.h"
#include <GfxTL/HyperplaneCoordinateSystem.h>
#include <stdexcept>
#include <ostream>
#include <istream>
#include <stdio.h>
#include <MiscLib/NoShrinkVector.h>
#include "LevMarLSWeig... |
ConvexLS.h | ///////////////////////////////////////////////////////////////////////////////
// Dem Bones - Skinning Decomposition Library //
// Copyright (c) 2019, Electronic Arts. All rights reserved. //
///////////////////////////////////////////////////////////////////////////////
... |
ast-dump-openmp-flush.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() {
#pragma omp flush
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-openmp-flush.c:3:... |
bdd_sequential_base.h | #pragma once
#include <vector>
#include <array>
#include <Eigen/SparseCore>
#include "bdd_collection/bdd_collection.h"
#include "two_dimensional_variable_array.hxx"
#include <fstream>
#include <cstdlib>
#include <filesystem>
#include <unordered_set>
#include "time_measure_util.h"
#include "atomic_ref.hpp"
namespace L... |
matrix_multiply_omp_cache_optimized.c | /************************************************************
Author : Ali Snedden
Date : 8/21/18
License: MIT
Purpose:
This is a program that multiplies two matrices.
Debug :
Notes :
1. To run :
export OMP_NUM_THREADS=20
gcc -O3 -fopenmp src/matrix_multiply_omp.c ### -O3 is critical
Goo... |
test.c | #define N 1024
#define _GNU_SOURCE
#include <link.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
// If one of the libomptarget plugins has been loaded, it means we are running
// with libomptarget. libomptarget.so is also used by LOMP, so we need to check
// for libomptarget.rtl.*.
static int isLibompta... |
nukedclan_fmt_plug.c | /* Nuked-Klan CMS DB cracker patch for JtR. Hacked together during
* July of 2012 by Dhiru Kholia <dhiru.kholia at gmail.com>.
*
* This software is Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com>,
* and it is hereby released to the general public under the following terms:
* Redistribution and use in ... |
gbdt.h | #ifndef LIGHTGBM_BOOSTING_GBDT_H_
#define LIGHTGBM_BOOSTING_GBDT_H_
#include <LightGBM/boosting.h>
#include <LightGBM/objective_function.h>
#include <LightGBM/prediction_early_stop.h>
#include <LightGBM/json11.hpp>
#include "score_updater.hpp"
#include <cstdio>
#include <vector>
#include <string>
#include <fstream>
... |
image-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% IIIII M M AAA GGGG EEEEE ... |
openmp_2k.c | // C program for implementation of selection sort
#include <stdio.h>
#include <time.h>
#include "omp.h"
void swap(int *xp, int *yp)
{
int temp = *xp;
*xp = *yp;
*yp = temp;
}
void selectionSort(int arr[], int n)
{
int i=0, j=0, min_i=0;
// One by one move boundary of unsorted subarray
for (i = 0; i < n-1; ++i)
... |
GB_binop__first_uint8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
3d25pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted fr... |
oneWayFunction.c | #include "oneWayFunction.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#ifndef SYS_OS_MAC
#include <omp.h>
#endif
#include "my_time.h"
#include "common.h"
// OpenSSL Library
#include "sha1.h"
#include "sha256.h"
#include "sha512.h"
#include "sha3_256.h"
#inclu... |
2Dpfold.c | /*
* minimum free energy
* RNA secondary structure with
* basepair distance d_1 to reference structure 1 and distance d_2 to reference structure 2
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <string.h>
#include... |
sapB_fmt_plug.c | /*
* this is a SAP-BCODE plugin for john the ripper.
* tested on linux/x86 only, rest is up to you.. at least, someone did the reversing :-)
*
* please note: this code is in a "works for me"-state, feel free to modify/speed up/clean/whatever it...
*
* (c) x7d8 sap loverz, public domain, btw
* cheers: see test-ca... |
test.c | #define N 1024
#define _GNU_SOURCE
#include <link.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
// If one of the libomptarget plugins has been loaded, it means we are running
// w/ith libomptarget. libomptarget.so is also used by LOMP, so we need to check
// for libomptarget.rtl.*.
/*
static int isLib... |
optimizer.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... |
omp-single-2.c | #include <omp.h>
extern void abort (void);
struct X
{
int a;
char b;
int c;
};
main()
{
int i = 0;
struct X x;
int bad = 0;
#pragma omp parallel private (i, x) shared (bad)
{
i = 5;
#pragma omp single copyprivate (i, x)
{
i++;
x.a = 23;
x.b = 42;
x.c = 26;
}
if (i... |
GB_binop__cmplx_fp32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
yolov2.h | #ifndef YOLOV2_H
#define YOLOV2_H
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <math.h>
#include <fcntl.h>
#include <string.h>
#include <assert.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
//#incl... |
ocp_nlp_sqp.c | /*
* Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
* Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
* Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
* Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl
*
* This file is part o... |
diagmm_x_sky_u_row.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ldy)
{
ALPHA_INT... |
read_omp.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
#include <omp.h>
// module load gnu/9.3.0
// export OMP_NUM_THREADS=10
// # compiling: link header in stb folder
// gcc -fopenmp -std=gnu99 read_omp.c -o read_omp.x -Istb/ -lm
// # insida a computational no... |
false_sharing_correct.c | #include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
static void init_array(double a[], int start, int stop, int incr);
static void do_work(double a[], int nr_runs, int start, int stop, int incr);
#define N 1000
int main(void) {
const int nr_threads = 2;
const int n... |
par_map.h | #pragma once
#include "Defs.h"
#include <functional>
template <typename T>
void par_fill(T* dest, int w, int h, const T value) {
#pragma omp parallel for
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
const int idx = y * w + x;
dest[idx] = value;
}
}
}
template <typename T>
void par_map(T* s... |
omp_masked.c | <ompts:test>
<ompts:testdescription>Test which checks the omp masked directive by counting up a variable in a omp masked section.</ompts:testdescription>
<ompts:ompversion>5.1</ompts:ompversion>
<ompts:directive>omp masked</ompts:directive>
<ompts:dependences>omp critical</ompts:dependences>
<ompts:testcode>
#include <... |
GB_binop__max_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
test.c |
#include <stdio.h>
#include <omp.h>
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define HOST_MAX_TEAMS 128
#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 main(void) {
check_offloading();
double A[... |
selu_ref.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
testis.c |
/*[]*/
struct __sFILEX ;
/*[]*/
int printf(const char *restrict , ...);
/*[]*/
extern void timer_clear(int );
/*[]*/
extern void timer_start(int );
/*[]*/
extern void timer_stop(int );
/*[]*/
extern double timer_read(int );
/*[]*/
extern void c_print_results(char *name, char class , int n1 , int n2 , int n3 , int nite... |
mclib.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "hdf5.h"
#include <math.h>
#include <time.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_vector.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_sf_bessel.h>
#include "mcli... |
softmax.c | /*******************************************************************************
* Copyright 2017-2018 Intel 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.apa... |
bli_dotv_bgq_int.c | /*
BLIS
An object-based framework for developing high-performance BLAS-like
libraries.
Copyright (C) 2014, The University of Texas at Austin
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redist... |
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.
//
// And has the following additional copyright:
//
// (C) Cop... |
GB_unaryop__lnot_int32_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... |
stream.c | /*-----------------------------------------------------------------------*/
/* Program: STREAM */
/* Revision: $Id: stream.c,v 5.10 2013/01/17 16:01:06 mccalpin Exp mccalpin $ */
/* Original code developed by John D. McCalpin */
/* Programm... |
nest_lock.c | // RUN: %libomp-compile-and-run | FileCheck %s
// REQUIRES: ompt
#include "callback.h"
#include <omp.h>
int main()
{
//need to use an OpenMP construct so that OMPT will be initalized
#pragma omp parallel num_threads(1)
print_ids(0);
omp_nest_lock_t nest_lock;
printf("%" PRIu64 ": &nest_lock: %lli\n", ompt... |
14.c | #include<stdio.h>
#include<omp.h>
#include<stdlib.h>
int main()
{
double serial_sum, sum;
int n, i, threadid, tval, NoOfthreads;
printf("Enter number of threads: ");
scanf("%d", &NoOfthreads);
printf("array size: ");
scanf("%d", &n);
if ((NoOfthreads!=1) && (NoOfthreads!=2) && (NoOfthreads... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.