source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
axmy.c |
/*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
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 ... |
FrameBuffer.h | // --------------------------------------------------------------------------
// Binary Brain -- binary neural net framework
//
// Copyright (C) 2018 by Ryuji Fuchikami
// https://github.com/ryuz
// ryuji.fuch... |
mp.c | /**
** @file mp.c
** @author Hugh S. Myers
** @brief This is the primary source file for mp.exe
** @date Mon Aug 14 10:25:06 2017
**
** @section DESCRIPTION
**
** This is both the location of main() as well as the central file for the executable. Mp.exe is an
** OpenMP Mandelbrot image generator. It is ... |
fib.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int fib(int n) {
int i, j;
if (n<2)
return n;
else {
#pragma omp task shared(i)
i=fib(n-1);
#pragma omp task shared(j)
j=fib(n-2);
#pragma omp taskwait
return i+j;
}
}
int main(int argc, char **argv){
int n, result;
char *a = argv[1];... |
9.c | /* Написать программу, в которой объявить и присвоить начальные значения элементам
двумерного массива d[6][8], для инициализации значений использовать генератор случайных
чисел. Используя конструкцию директивы omp parallel for и omp critical определить
минимальное и максимальное значения элементов двумерного массива. К... |
convolution_1x1_packn_fp16s.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 ... |
fastmarching_tree.h | //last change: by PHC, 2013-02-13. adjust memory allocation to make it more robust
/*****************************************************************
* file : fastmarching_tree.h, Hang Xiao, Jan 18, 2012
*
* fastmarching_tree
* fastmarching_tracing
*
* ***********************************************************... |
omp_ex_27.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... |
GB_binop__plus_fc32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
aarch64_vfabi_NarrowestDataSize.c | // RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -fopenmp -x c -emit-llvm %s -o - -femit-all-decls | FileCheck %s
// RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -fopenmp-simd -x c -emit-llvm %s -o - -femit-all-decls | FileCheck %s
// REQUIRES: aarch64-registered-target
// Not... |
builder.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef BUILDER_H_
#define BUILDER_H_
#include <algorithm>
#include <cinttypes>
#include <fstream>
#include <functional>
#include <type_traits>
#include <utility>
#include "command_line.h"
#include "ge... |
GraphBLAS.h | //------------------------------------------------------------------------------
// GraphBLAS.h: definitions for the GraphBLAS package
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identif... |
ChainCollectionLearner.h | /**
* @file ChainCollectionLearner.h
* @brief header file of the CRF chain model learner
*
* .. invisible:
* _ _ _____ _ _____ _____
*
* | | | | ___| | | ___/ ___|
*
* | | | | |__ | | | |__ \ `--.
*
* | | | | __|| | | __| `--. \
*
* \ \_/ / |___| |___| |___/\__/ /
*
* ... |
GB_subassign_15.c | //------------------------------------------------------------------------------
// GB_subassign_15: C(I,J)<!M> += scalar ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier... |
spmm.h | /*!
* Copyright (c) 2020 by Contributors
* \file array/cpu/spmm.h
* \brief SPMM CPU kernel function header.
*/
#ifndef DGL_ARRAY_CPU_SPMM_H_
#define DGL_ARRAY_CPU_SPMM_H_
#include <dgl/array.h>
#include <dgl/bcast.h>
#include <dgl/runtime/parallel_for.h>
#include <math.h>
#include <algorithm>
#include <limits>
#i... |
GB_binop__isge_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
DRACC_OMP_032_MxV_outdated_Data_yes.c | /*
Matrix Vector multiplication without copying back the result c.
*/
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#define C 512
int *a;
int *b;
int *c;
int init(){
for(int i=0; i<C; i++){
for(int j=0; j<C; j++){
b[j+i*C]=1;
}
a[i]=1;
c[i]=0;
}
... |
GradientStrengthImageFilter.h | /*
* MIT License
*
* Copyright (c) 2018-2019 Benjamin Köhler
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, c... |
THSTensorMath.c | #ifndef THS_GENERIC_FILE
#define THS_GENERIC_FILE "generic/THSTensorMath.c"
#else
#define ROW_PTR2(t, r) (THTensor_(data)(t) + (r) * (t)->stride[0])
#define COL_PTR2(t, c) (THTensor_(data)(t) + (c) * (t)->stride[1])
void THSTensor_(zero)(THSTensor *self) {
if (self->indices->nDimension) {
THLongTensor_resizeNd(... |
gpg_fmt_plug.c | /* GPG 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>
* and is based on,
*
* pgpry - PGP private key recovery
* Copyright (C) 2010 Jonas Gehring
*
* This program is f... |
Homography.h | #pragma once
#include "saiga/vision/VisionTypes.h"
#include "saiga/vision/util/Ransac.h"
// This code here is inspired (and partially copied) from Colmap.
// https://github.com/colmap/colmap
namespace Saiga
{
/**
* Calculates a 3x3 homography matrix H so that
* targetPoints[i] = H * sourcePoints[i]
* This mapping i... |
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)
**************************************... |
GB_binop__bset_uint64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
omp-master.c | #include <stdio.h>
int main() {
#pragma omp parallel
{
#pragma omp master
printf("this should be thread 0: %d\n", omp_get_thread_num());
printf("all threads: %d\n", omp_get_thread_num());
}
return 0;
}
|
GB_binop__plus_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-... |
convolutiondepthwise_5x5_pack4_bf16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
GB_binop__lxor_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... |
imag_self_energy_with_g.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... |
lock-nested.c | /*
* lock-nested.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
/... |
pr5.c | //Write an OpenMP program to print all the letters of the alphabet A-Z using threads.
#include <stdio.h>
#include <omp.h>
int main(void)
{
int i;
omp_set_num_threads(4);
#pragma omp parallel private(i)
{
int LettersPerThread = 26 / omp_get_num_threads();
int ThisThreadNum = omp_get_... |
nstream-alloc-target.c | ///
/// Copyright (c) 2019, Intel Corporation
///
/// Redistribution and use in source and binary forms, with or without
/// modification, are permitted provided that the following conditions
/// are met:
///
/// * Redistributions of source code must retain the above copyright
/// notice, this list of conditions ... |
dataPar.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <float.h>
#include <limits.h>
#include <math.h>
#include <omp.h>
#define BUFFFER_SIZE 1024
#define DELIMITERS ","
#define DELIMITERS_WITH_END_LINE ",\n"
#define INPUT_SAMPLE_DATA_FILE_NAME "sample_data.csv"
#define INPUT_FINAL_DATA_F... |
dsDoubleVector.c | #include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <math.h>
#ifdef USE_OPENMP
#include <omp.h>
#endif
#include "ds.h"
char dtoa(int d) {
if (d == 0) {
return '0';
} else if (d == 1) {
return '1';
} else if (d == 2) {
return '2';
} else if (d == 3) {
return '3';
} else if (d =... |
GB_unaryop__ainv_fp64_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
mst.c | #include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#include <limits.h>
#include "ompdist/vector.h"
#include "ompdist/queues.h"
#include "ompdist/graph.h"
#include "ompdist/graph_gen.h"
#include "ompdist/utils.h"
#include "ompdist/msr.h"
#include "config.h"
typedef struct {
int from;
} message;
typedef struc... |
pr36790.c | /* PR middle-end/36790 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
void
foo (char b)
{
}
void
bar (char b)
{
foo (b);
#pragma omp task default (shared)
b = 0;
}
int
main ()
{
bar (0);
return 0;
}
|
Searching.202006222053.subsearch.h | //
// Created by Zhen Peng on 6/22/2020.
//
#ifndef BATCH_SEARCHING_SEARCHING_H
#define BATCH_SEARCHING_SEARCHING_H
#include <vector>
#include <boost/dynamic_bitset.hpp>
//#include <boost/sort/sort.hpp>
#include <iostream>
#include <fstream>
#include <unordered_map>
#include <immintrin.h>
#include <cstring>
#include ... |
fs_strategy.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
#ifndef KRATOS_FS_STRATEGY_H
#d... |
flush1.c | //Transpose without locks or critical
#include<stdio.h>
#include<time.h>
#include<omp.h>
void main()
{
int a[5][5],b[5][5],c[5][5],temp=0,ch;
printf("Menu\n1.Express Mode\n2.Custom Mode\n");
printf("Enter your choice:");
scanf("%d",&ch);
if(ch == 1)
{
int l = 1;
for(int i=0;i<5;i++)
{
for(int j=0;j<5... |
GB_binop__bshift_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
LRUCache.h | #include <iostream>
#include<stdint.h>
#include <unordered_map>
#include <vector>
using namespace std;
vector<int64_t>List_offset;
struct AIOReadInfo
{
int64_t readlength;
int64_t readoffset;
int64_t listlength;
int64_t offsetForenums;
int64_t memoffset;
int64_t curSendpos;
uint8_t *list_data;
uint32_t termid... |
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... |
Atomic.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <omp.h>
#define TOTAL 500000000
int main(int argc, char* argv[]){
if (argc!=2) return 1;
const int threads_num=atoi(argv[1]);
long sum=0;
#pragma omp parallel num_threads(threads_num)
{
long localsum=0;
unsigned int seed=t... |
offload_hello.c | #include <stdio.h>
#include <omp.h>
#include <offload.h>
int main()
{
int nthreads, tid;
int ndevices;
#pragma omp parallel private(nthreads, tid)
{
tid = omp_get_thread_num();
printf("Hello, world! I am thread %d on host\n", tid);
#pragma omp barrier
if (tid == 0)
{
nthreads = omp... |
ccl_correlation.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <gsl/gsl_integration.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_roots.h>
#include <gsl/gsl_spline.h>
#include <gsl/gsl_sf_bessel.h>
#include <gsl/gsl_sf_legendre.h>
#include "ccl.h"
/*--------ROUTINE: taper_cl ------
TASK:n Ap... |
elkan_kmeans.c | #include "elkan_kmeans.h"
#include "kmeans_utils.h"
#include "../../utils/matrix/csr_matrix/csr_to_vector_list.h"
#include "../../utils/matrix/vector_list/vector_list_math.h"
#include "../../utils/matrix/csr_matrix/csr_math.h"
#include "../../utils/vector/common/common_vector_math.h"
#include "../../utils/vector/spars... |
LAGraph_1_to_n.c | //------------------------------------------------------------------------------
// LAGraph_1_to_n.c
//------------------------------------------------------------------------------
// LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
// SPDX-License-Identifier: BSD-2-Clause
//
// See additional ackn... |
omp_simd_linear1.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)
{
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++,j++)
{
a[i]=b[i]+j;
... |
geometric_distortion.h | /*
* Software License Agreement
*
* Point to plane metric for point cloud distortion measurement
* Copyright (c) 2016, MERL
*
* All rights reserved.
*
* Contributors:
* Dong Tian <tian@merl.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted pro... |
composite.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
pol.c | /*-
* Copyright (c) 2012-2017 Ilya Kaliman
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the fol... |
H2ERI-DFT-JK.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <omp.h>
#include "TinyDFT.h"
#include "H2ERI.h"
void TinyDFT_copy_shells_to_H2ERI(TinyDFT_p TinyDFT, H2ERI_p h2eri)
{
h2eri->natom = TinyDFT->natom;
h2eri->nshell = TinyDFT->nshell;
h2e... |
nodal_two_step_v_p_strategy_for_FSI.h | //
// Project Name: KratosPFEMFluidDynamicsApplication $
// Last modified by: $Author: AFranci $
// Date: $Date: June 2018 $
// Revision: $Revision: 0.0 $
//
//
#ifndef KRATOS_NODAL_TWO_STEP_V_P_STRATEGY_FOR_FSI_H
#defi... |
GB_unop__sinh_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
problem.c | /*---------------------------------------------------------------------------------
PROBLEM.C
-Read and store problem-specific parameters from parameter file
-Initialize Fishbone-Moncrief torus (FM)
-Seed it with a SANE or MAD poloidal magnetic field
---------------------------------------------------------... |
kernel.h | #include "types.h"
#include "core.h"
class Kernel {
public:
int maxLevel;
int maxGlobLevel;
int numBodies;
int numImages;
int numCells;
int numLeafs;
int numGlobCells;
int numPartition[10][3];
int globLevelOffset[10];
int numSendBodies;
int numSendCells;
int numSendLeafs;
int MPISIZE;
int M... |
utility.h | /* ************************************************************************
* Copyright (C) 2016-2022 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* ... |
erotima_2a-i.c | #include <stdio.h>
#include <math.h>
#include <getopt.h>
#include <stdlib.h>
#include <sys/time.h>
#include <omp.h>
#include <string.h>
#define MIN_NUM_OF_NEURONS (1L)
#define DEF_NUM_OF_NEURONS (1000L)
#define MIN_NUM_OF_NEIGHBORS (0L)
#define DEF_NUM_OF_NEIGHBORS (300L)
#define DEF_DT (1.0e-04)
#define DE... |
ASTMatchers.h | //===- ASTMatchers.h - Structural query framework ---------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
ordering_op-inl.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 ... |
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-2017 Free Software... |
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) >... |
GB_unaryop__identity_int32_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... |
merge_sort.h | /* BSD 3-Clause License
* Copyright (c) 2019-2021, 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:
* 1. Redistributions of source code must retain the above copyright notice, this
* ... |
discretizeMT.c | #include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <mpi.h>
#include "compearth.h"
#include "parmt_mtsearch.h"
#ifdef PARMT_USE_INTEL
#include <mkl_lapacke.h>
#include <mkl_cblas.h>
#else
#include <lapacke.h>
#include <cblas.h>
#endif
#include "is... |
axpy_ompacc.c | #include "axpy.h"
#include "homp.h"
#if 0
/* v1: explicit distribution of both data and loop:
* the y[0:n], and x[0:n] will be evenly distributed among the ndev devices,
* scalars such as a and n will each have a mapped copy in all the devices, loop will also be evenly distributed */
void axpy_mdev_v1(REAL* x, REAL*... |
vulnerability_map.c | /*
Usage: <program.exe> <file with circuit> <output file> <iteration number>
Example: reliablity.exe "c432.txt" "out.txt" 10000
if <iteration number> == -1 then check all possible input vectors
Example: reliablity.exe "c432.txt" "out.txt" -1
Circuit format example:
5 N1 N2 N3 N6 N7
2 N22 N23
6
NAND N1 N3 N10
... |
sw-post.c | /*
* In this module, we are given the results of a full SW run,
* and we compute two things:
*
* 1. The probability the location produced the read (over all possible alignments).
* Currently, we only sum over all alignments respecting the current gaps.
* As a result, this is useless to do in letter space, w... |
dynmat.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... |
aux_cnn.h |
#include <dirent.h>
#include <sys/types.h>
#include <cvpp/containers/matrix.h>
#include <cvpp/containers/vector.h>
#include <cvpp/containers/image.h>
#include <cvpp/properties/pose.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
using namespace cvpp;
Seq<String>
get_files( const String& dir , co... |
psd.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
graph-gen.c | /*
* This file is part of an experimental software implementation for solving the
* single-source shortest path problem in edge-weighted graphs. The algorithm
* considered for the implementation is Dijkstra's algorithm for the shortest
* path problem and it runs in linear time with respect to the size of the host
... |
bfs.c | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include "BenchmarksUtil.h"
#include <sys/time.h>
//#define NUM_THREAD 4
#define OPEN
int no_of_nodes;
int edge_list_size;
FILE *fp;
// Structure to hold a node information
typedef stru... |
GB_unop__identity_int32_int32.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... |
myFunc.h | #ifndef USE_CUDA
#define __device__
#endif
#define restrict
#define __declspec(x)
// Rob Farber
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <malloc.h>
#include <math.h>
#include <omp.h>
#define MIC_DEV 0
#define ALLOC alloc_if(1) free_if(0)
#define FREE alloc_if(0) free_if(1)
#define REUSE al... |
GB_unaryop__abs_uint32_int16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
fdtd2d.c | /**
* fdtd2d.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.... |
GB_unop__identity_int32_uint32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
GB_binop__rminus_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
openmp_reduction_template.h | #pragma omp parallel for reduction(%REDUCTION_OPERATOR%:%REDUCTION_DESTINATION%)
for (size_t i = offsets[0]; i < offsets[0] + slice_sizes[0]; ++i)
%REDUCTION_DESTINATION% %REDUCTION_OPERATOR%= %INPUT_BUFFER_NAME%[i]; |
GB_binop__div_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
task_codegen.c | // RUN: %clang_cc1 -verify -triple x86_64-apple-darwin10 -fopenmp -fopenmp-version=50 -x c -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -x c -triple x86_64-apple-darwin10 -emit-pch -o %t %s
// RUN: %clang_cc1 -fopenmp -fopenmp-version=50 -x c -triple x86_64-apple-darwin10 -include-p... |
channel.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
pr39154.c | /* PR middle-end/39154 */
/* { dg-do compile } */
/* { dg-additional-options "-std=gnu99" } */
extern void abort (void);
int n = 20;
int
main (void)
{
int a[n], b[n][n];
#pragma omp parallel for
for (int i = 0; i < n; i++)
{
a[i] = i + 1;
#pragma omp parallel for
for (int j = 0; j < n; j++)
b[i][j]... |
pi_mc.c | /*
NAME:
Pi_mc: PI Monte Carlo
Purpose:
This program uses a Monte Carlo algorithm to compute PI as an
example of how random number generators are used to solve problems.
Note that if your goal is to find digits of pi, there are much
better algorithms you could use.
Usage:
To keep the ... |
GB_binop__isgt_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
vt_comp_pgi.c | /**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2008, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the pa... |
deconvolution_packn_fp16s.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 ... |
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... |
outputdep-orig-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
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 ... |
TaskDispatcher.h |
#include "nvtt.h"
// OpenMP
// http://en.wikipedia.org/wiki/OpenMP
#if defined(HAVE_OPENMP)
#include <omp.h>
#endif
// Gran Central Dispatch (GCD/libdispatch)
// http://developer.apple.com/mac/library/documentation/Performance/Reference/GCD_libdispatch_Ref/Reference/reference.html
#if NV_OS_DARWIN && defined(HAVE_DI... |
convdw3x3s1_pack4_neon.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2019 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 ... |
image.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
nonmonotonic-1.c | /* { dg-do run } */
#ifndef NONMONOTONIC_TYPE
#include <omp.h>
#include <stdlib.h>
#define NONMONOTONIC_TYPE int
#define NONMONOTONIC_END(n) n
#endif
int a[73];
int
main ()
{
NONMONOTONIC_TYPE i;
#pragma omp parallel for schedule(nonmonotonic: dynamic)
for (i = 0; i < NONMONOTONIC_END (73); i++)
a[i]++;
... |
collective_scatterGather.c | /*****************************************************************************
* *
* Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 *
* *
* ... |
GB_emult_04.c | //------------------------------------------------------------------------------
// GB_emult_04: C<M>= A.*B, M sparse/hyper, A and B bitmap/full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Licen... |
impact_acc.c | /* impact_acc.c
A Basilisk script to model the impact of a droplet of water impacting onto a
moving plate. The domain is set to be in an accelerating frame with the
plate, so an additional body force is added.
*/
#include "parameters.h" // Includes all defined parameters
#include "axi.h" // Axisymmetric c... |
GB_unaryop__lnot_int16_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... |
prime_count_par.c | #include <stdlib.h>
#include <math.h>
#include <omp.h>
int IsPrime(unsigned long test_num)
{
int is_prime;
if(test_num != 1)
{
is_prime = 1;
float k_max = sqrtf(test_num);
for(unsigned long k = 2; k <= k_max; k++)
{
if(test_num % k == 0)
{
is_prime = 0;
break;
}
}
}
else
{
is_prime... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.