source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
Prepare.h | #ifndef RANDOM_H
#define RANDOM_H
#include <random>
#include "Coor.h"
void prepare (double* m, double* b, Coor* c, size_t N){
std::default_random_engine generator;
std::normal_distribution<double> m_dist(0.5,0.2);
std::normal_distribution<double> b_dist(1.0,0.2);
std::normal_distribution<double> x_dist(... |
pt_to_pt_haloexchange.c | /*****************************************************************************
* *
* Mixed-mode OpenMP/MPI MicroBenchmark Suite - Version 1.0 *
* *
* ... |
enhance.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
image_random-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 may no... |
omp_for_lastprivate_nothreadprivate.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
int test_omp_for_lastprivate()
{
int sum = 0;
int known_sum;
int i0;
i0 = -1;
#pragma omp parallel
{
int sum0 = 0;
{ /* Begin of orphaned block */
int i;
#pragma omp for schedule(static,7)... |
vertex_coloring.c | #include <stdio.h>
#include <omp.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include "ompdist/tree_gen.h"
#include "ompdist/utils.h"
#include "config.h"
int ROOT;
typedef struct {
int color;
int recv;
int again;
int parent;
} payload;
/**
* num_digits - Number of digits (in bin... |
detector.c | #include "darknet.h"
#include <stdio.h>
#include <dirent.h>
#include <unistd.h>
#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,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,6... |
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... |
kwallet_fmt_plug.c | /* KDE KWallet cracker patch for JtR. Written by Narendra Kangralkar
* <narendrakangralkar at gmail.com> and Dhiru Kholia <dhiru at openwall.com>.
*
* Also see https://github.com/gaganpreet/kwallet-dump ;)
*
* This software is Copyright (c) 2013 by above authors and it is hereby
* released to the general public u... |
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) >... |
effect.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__ainv_fp64_fp64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
host_function.c | #include <stdio.h>
#include <omp.h>
#pragma omp declare target
void hostrpc_fptr0(void* fun_ptr);
#pragma omp end declare target
// A host function will synchronously call from a device as a function pointer
void myfun() {
fprintf(stderr, " This is myfun writing to stderr \n");
}
int main()
{
int N = 10;
int a... |
constitute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
3d25pt.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tar... |
cpd_omp.c | /*
This file is part of ParTI!.
ParTI! 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 (at your option) any later version.
ParTI! is distributed... |
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)
#... |
feature.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
fox_floats_timer_caching_omp.c | /* fox_floats_timer_caching_omp.c -- uses Fox's algorithm to multiply two square matrices
*
* Input:
* n: global order of matrices
* A,B: the factor matrices
* Output:
* C: the product matrix
*
* Notes:
* 1. Assumes the number of processes is a perfect square
* 2. The array member of t... |
convolution_sgemm_pack8to4_int8.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a ... |
fibonacci_series.c | #include <stdio.h>
#include <omp.h>
int arr[999];
int fib(int n)
{
int i, j;
if (n<2)
return n;
else
{
#pragma omp task shared(i) firstprivate(n)
i=fib(n-1);
#pragma omp task shared(j) firstprivate(n)
j=fib(n-2);
#pragma omp taskwait
arr[n-1] = (i+j);
re... |
GB_binop__rminus_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... |
GB_binop__rdiv_fc64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
TBBHashmap.h | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// The MIT License (MIT)
//
// Copyright (c) 2018 www.open3d.org
//
// Permissio... |
GB_binop__bor_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... |
Example_target_data.3.c | /*
* @@name: target_data.3c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_4.0
*/
#include <math.h>
#define COLS 100
void gramSchmidt(float Q[][COLS], const int rows)
{
int cols = COLS;
#pragma omp target data map(Q[0:rows][0:cols])
for(int k=0; k < cols; k++)
{
... |
SpatialConvolutionMM.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "THNN/generic/SpatialConvolutionMM.c"
#else
#include <ATen/div_rtn.h>
static inline void THNN_(SpatialConvolutionMM_shapeCheck)(
THTensor *input, THTensor *gradOutput,
THTensor *weight, THTensor *bias,
int kH, int kW, int dH, int dW, int padH, in... |
GB_unaryop__abs_uint64_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... |
GB_binop__land_uint64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
GB_unaryop__ainv_int16_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_binop__bor_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
prog.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <omp.h>
#include "timer.h"
unsigned char ** cleanBoard(unsigned int rows, unsigned int columns)
{
unsigned char **board;
unsigned int i;
board = malloc(rows * sizeof(*board));
for (i = 0; i < rows; +... |
prefixspan.h | //########################################################################
//## Copyright 2019 Da Yan http://www.cs.uab.edu/yanda
//##
//## 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
/... |
coriolis.c | /*
This source file is part of the Geophysical Fluids Modeling Framework (GAME), which is released under the MIT license.
Github repository: https://github.com/OpenNWP/GAME
*/
/*
In this file, everything that is needed for calculating the vorticity flux term is prepared.
*/
#include <stdlib.h>
#include <stdio.h>
#inc... |
dis-ok.c | #include <omp.h>
#include <stdio.h>
/*
for(i=4;i<100;i++){
S1: a[i] = b[i-2] + 1;
S2: c[i] = b[i-1] + f[i];
S3: b[i] = a[i-1] + 2;
S4: d[i] = d[i+1] + b[i-1];
}
*/
#define Iter 10000
int a[Iter],b[Iter],c[Iter],d[Iter],f[Iter];
int a1[Iter],b1[Iter],c1[Iter],d... |
threadPrivate.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int a, b, i, tid;
float x;
int z[10];
#pragma omp threadprivate(a, x, z)
int main (int argc, char * argv[]){
/* Explicitly turn off dynamic threads */
//omp_set_dynamic(0);
//z[0] = 0;
printf("1st Parallel Region:\n");
#pragma omp parallel private(b,... |
TimeCluster.h | /******************************************************************************
** Copyright (c) 2015, Intel Corporation **
** All rights reserved. **
** **
... |
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
//
//===---------------------------... |
XT_ICD_update.c | /* ===========================================================================
* Copyright (c) 2013 K. Aditya Mohan (Purdue University)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistri... |
cpu.c | /*
* Copyright 2012 INRIA Paris-Rocquencourt
* Copyright 2012 Ecole Normale Superieure
*
* Use of this software is governed by the MIT license
*
* Written by Tobias Grosser, INRIA Paris-Rocquencourt,
* Domaine de Voluceau, Rocquenqourt, B.P. 105,
* 78153 Le Chesnay Cedex France
* and Sven Verdoolaege,
* Ecole... |
dnn.c | //------------------------------------------------------------------------------
// LAGraph/Test/DNN/dnn: run all neural networks from http://graphchallenge.org
//------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on GraphBLAS
Copyright 2019 LAGr... |
split.h | // Copyright 2018 Xiaomi, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicab... |
oneWayFunction.c | // Copyright (c) 2016-2018 The Ulord Core Foundation
#include "oneWayFunction.h"
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#ifndef MAC_OSX
#include <omp.h>
#endif
#include "my_time.h"
#include "common.h"
// OpenSSL Library
#include "c_sha1.h"
#include "c_sha25... |
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... |
matrix_multiply_omp.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
Good Weblinks:
1. Unified Memory : https://devblogs.nvidia... |
contact_utilities.h | // KRATOS ___| | | |
// \___ \ __| __| | | __| __| | | __| _` | |
// | | | | | ( | | | | ( | |
// _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
//
// License: BSD License
// ... |
yescrypt-simd_c.h | /*-
* Copyright 2009 Colin Percival
* Copyright 2012-2014 Alexander Peslyak
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copy... |
GB_binop__lt_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... |
ublas_space.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
// Collaborator: Vicente Matai... |
array_args.h | #ifndef LIGHTGBM_UTILS_ARRAY_AGRS_H_
#define LIGHTGBM_UTILS_ARRAY_AGRS_H_
#include <vector>
#include <algorithm>
#include <LightGBM/utils/openmp_wrapper.h>
namespace LightGBM {
/*!
* \brief Contains some operation for a array, e.g. ArgMax, TopK.
*/
template<typename VAL_T>
class ArrayArgs {
public:
inline static s... |
tlr_example_util.h | #ifndef __TLR_EXAMPLE_UTIL_H__
#define __TLR_EXAMPLE_UTIL_H__
#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <functional>
#include <h2opus/util/error_approximation.h>
#include <h2opus/core/tlr/tlr_gemv.h>
#include <h2opus/core/tlr/tlr_trsm.h>
template <class T, int hw> class T... |
5969.c |
/*
* Compile using the command:
* `cc 27Stencil.c -o oa -fopenmp -lm`
*/
#include <math.h>
#include <omp.h>
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENACC
#include <openacc.h>
#endif
#define DEFAULT_DATASIZE 1048576 /* Default datasize. */
#define DEFAULT_REPS 10 ... |
piMP.c | #include <omp.h>
static long num_steps=100000;
void int main(int argc, char const *argv[]) {
int i;
double x, pi, sum=0.;
step=1.0/(double) num_steps;
#pragma omp parallel for reduction(+:sum) private(x)
for (i=0; i<=num_steps; i++) {
x=(i-0.5)*step;
sum+=4.0/(1.0+x*x);
}
pi step*sum;
return 0;
}
|
GB_unaryop__minv_bool_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... |
opencl_DES_bs_f_plug.c | /*
* This software is Copyright (c) 2012-2015 Sayantan Datta <std2048 at gmail dot 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.
* Based on Solar Designer implementation of DES_bs_b.... |
Psatd.h | #pragma once
#include "Constants.h"
#include "FieldSolver.h"
#include "Grid.h"
#include "Vectors.h"
#include "PmlPsatd.h"
namespace pfc {
class PSATDTimeStraggered : public SpectralFieldSolver<PSATDGridType>
{
public:
PSATDTimeStraggered(PSATDGrid * grid);
void updateFields();
v... |
BFEgg_fmt_plug.c | /*
* This file is part of Eggdrop blowfish patch for John The Ripper.
* Copyright (c) 2002 by Sun-Zero <sun-zero at freemail.hu>
* This is a free software distributable under terms of the GNU GPL.
*
* This format has collisions for repeated patterns (eg. "1" vs. "11",
* or "hey" vs. "heyheyheyhey") - you can run ... |
ex1.c | #include <stdio.h>
int main(void)
{
#pragma omp parallel
{
printf("Hello, world!\n");
}
return 0;
}
|
generator_gemm_common.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
ch_ompss.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include "ch_common.h"
#include "../extrae.h"
#include "../timing.h"
//#ifdef _OMPSS
//#warning "Compiling for OMPSS"
//#endif
//TODO: adjust wait() for timing
static int depth;
#pragma omp threadp... |
common.h | /*
* Copyright 2018-2021 Kyle Berney, Ben Karsin
*
* 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 o... |
evaluation.c | #include "common.h"
static void clear_buffers(uint64_t* restrict A, uint64_t* restrict B, const int s)
{
#ifdef _OPENMP
#pragma omp parallel for
#endif
for(int i=0;i<s;i++)
A[i] = B[i] = 0;
}
#ifdef _OPENMP
static int top_down_step(const int level, const int nodes, const int num_frontier,
... |
core_ztrmm.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c d s
*
**/
#include "core_blas.h"
#include "plasma_types.h"
#include "core_lapack.h"
/*******************************************************************... |
s_aatritemp.h | /*
* Mesa 3-D graphics library
*
* Copyright (C) 1999-2007 Brian Paul 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 in the Software without restriction, including without l... |
triplet_kpoint.c | /* triplet_kpoint.c */
/* Copyright (C) 2015 Atsushi Togo */
#include <stdio.h>
#include <stdlib.h>
#include "mathfunc.h"
#include "kpoint.h"
#include "triplet_kpoint.h"
static void grid_point_to_address_double(int address_double[3],
const int grid_point,
const int mesh[3],
const int is_shift[3]);
... |
StreamTriad.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <mpi.h>
#include <omp.h>
#include "timer.h"
#include "place_report_mpi_omp.h"
#define NTIMES 50
// large enough to force into main memory
#define STREAM_ARRAY_SIZE 20000000
int main(int argc, char *argv[]){
int provided;
MPI_Init_thread(&argc, &... |
copy.c | /*******************************************************************************
* Copyright 2021 UChicago Argonne, LLC.
* (c.f. AUTHORS, LICENSE)
*
* This file is part of the NRM Benchmarks project.
* For more info, see https://github.com/anlsys/nrm-benchmarks
*
* SPDX-License-Identifier: BSD-3-Clause
********... |
T01.c | // Rafael Amauri Diniz Augusto -- 651047
#include <stdio.h>
#include <omp.h>
int main()
{
int i;
#pragma omp parallel num_threads(2) // seta o número de threads em 2
{
int tid = omp_get_thread_num(); // lê o identificador da thread
#pragma omp for ordered schedule(dynamic)
for(i = 1; i <= 3; i++)
... |
GB_binop__gt_uint32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_unaryop__abs_uint64_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
fft.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... |
GB_unop__identity_int16_bool.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
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... |
TemporalMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/TemporalMaxPooling.c"
#else
static int nn_(TemporalMaxPooling_updateOutput)(lua_State *L)
{
THTensor *input = luaT_checkudata(L, 2, torch_Tensor);
int kW = luaT_getfieldcheckint(L, 1, "kW");
int dW = luaT_getfieldcheckint(L, 1, "dW");
THTensor *indices =... |
full_buffer_variabe_size.c | #include "correctness-checking-partitioned-impl.h"
#include "mpi.h"
#include <stdio.h>
#include <stdlib.h>
#define TOTAL_SIZE 4000
#define ITERATIONS 10
#define TAG 42
//buffer:
// RECV SEND LOCAL SEND RECV
// TOTAL_SIZE must be at least 4 times STENCIL_SIZE
void debug_function(long a, long b) {
printf(" %ld,%ld\n... |
distribute_parallel_for_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp -verify=expected,omp50 %s -Wuninitialized
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -fopenmp-version=45 -verify=expected,omp45 %s -Wuninitialized
// RUN: %clang_cc1 -fs... |
GB_unaryop__ainv_int64_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... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
decorate.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
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... |
residualbased_elimination_builder_and_solver.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
//
//
... |
convolution_sgemm_pack4.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2022 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 ... |
treecode.c | /****************************************************************************/
/* TREECODE.C: new hierarchical N-body code. */
/* Copyright (c) 2001 by Joshua E. Barnes, Honolulu, Hawai`i. */
/****************************************************************************/
#in... |
silly.c | /*
Tempo sequencial
real 0m4.492s
user 0m4.488s
sys 0m0.000s
real 0m4.405s
user 0m4.402s
sys 0m0.000s
real 0m4.431s
user 0m4.385s
sys 0m0.000s
real 0m4.651s
user 0m4.385s
sys 0m0.004s
real 0m4.616s
user 0m4.415s
sys 0m0.008s
Tempo paralelo com scheduler(static)
real 0m2.648s
user 0m4.920s
sys 0m0.000s
real 0m2... |
a.31.1.c | /* { dg-do compile } */
void
a31_1 (float *x, int *y, int n)
{
int i, b;
float a;
a = 0.0;
b = 0;
#pragma omp parallel for private(i) shared(x, y, n) \
reduction(+:a) reduction(^:b)
for (i = 0; i < n; i++)
{
a += x[i];
b ^= y[i];
}
}
|
make_i.c | /*
Make an identity matrix.
*/
#include <stdlib.h>
#include <stdio.h>
#include "declarations.h"
void make_i(A)
struct blockmatrix A;
{
int blk,i,j;
double *p;
for (blk=1; blk<=A.nblocks; blk++)
{
switch (A.blocks[blk].blockcategory)
{
case DIAG:
p=A.blocks[blk].data.vec;
for (i=1; i<... |
level.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
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) >... |
mainRT.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
#include "blake.h"
#include "createRT.h"
int main(int argc, char **argv) {
size_t rainbow_size = (argc == 2) ? atoi(argv[1]) : RAINBOW_SIZE;
rainbow_size = (rainbow_size > 0) ? rainbow_size : RAINBOW_SIZE;
srand((unsigned) time(NULL... |
kvstore_local.h | /**
* Copyright (c) 2015 by Contributors
* @file kvstore_local.h
* @brief local implementation
*/
#ifndef MXNET_KVSTORE_KVSTORE_LOCAL_H_
#define MXNET_KVSTORE_KVSTORE_LOCAL_H_
#include <mxnet/kvstore.h>
#include <unordered_map>
#include <bitset>
#include <vector>
#include <utility>
#include <algorithm>
namespa... |
GB_subassign_12_and_20.c | //------------------------------------------------------------------------------
// GB_subassign_12_and_20: C(I,J)<M or !M,repl> += A ; using S
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Licens... |
GB_helper.c | //------------------------------------------------------------------------------
// GB_helper.c: helper functions for @GrB interface
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifie... |
CBbackproject_c.c | /*
MEX Function to perform cone beam back projection of Nikon XTek Custom Bay data.
Published as part of the SophiaBeads Datasets project.
*/
/*
References:
David Szotten, Limited Data Problems in X-ray and Polarized Light Tomography. PhD Thesis, School of Mathematics, University of Manchester. 2011.
William Mic... |
GB_binop__atan2_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
physics.c | #include "physics.h"
void physics__lattice_populate(vec r_[], vec v_[], const int n, const float box_radius, const float energy) {
vec * restrict r = __builtin_assume_aligned(r_, 64);
vec * restrict v = __builtin_assume_aligned(v_, 64);
assert(box_radius > 0);
assert(n >= 0);
const int m = (int)... |
strip_fmt_plug.c | /* STRIP cracker patch for JtR. Hacked together during September 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 source ... |
FiniteElementMesh.h | #pragma once
#include <omp.h>
#include "AnimatedMesh.h"
#include "CGVectorWrapper.h"
#include "CGSystemWrapper.h"
#include "ConjugateGradient.h"
#include <Eigen/Dense>
//#define USE_LINEAR_ELASTICITY
#define USE_ST_VENANT_KIRCHHOFF
template<class T>
struct FiniteElementMesh : public AnimatedMesh<T, 3>
{
using... |
eam.c | /// \file
/// Compute forces for the Embedded Atom Model (EAM).
///
/// The Embedded Atom Model (EAM) is a widely used model of atomic
/// interactions in simple metals.
///
/// http://en.wikipedia.org/wiki/Embedded_atom_model
///
/// In the EAM, the total potential energy is written as a sum of a pair
/// potential a... |
l7_setup.c | /*
* Copyright (c) 2011-2019, Triad National Security, LLC.
* All rights Reserved.
*
* CLAMR -- LA-CC-11-094
*
* Copyright 2011-2019. Triad National Security, LLC. This software was produced
* under U.S. Government contract 89233218CNA000001 for Los Alamos National
* Laboratory (LANL), which is operated... |
VolumetricConvolutionMM.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "THNN/generic/VolumetricConvolutionMM.c"
#else
#include <ATen/div_rtn.h>
#define CONV3D_OMP_THRESHOLD 20
static void inline THNN_(VolumetricConvolutionMM_shapeCheck)(
THNNState *state,
THTensor *input,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.