source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
copenmp.c | #define N (1 << 29)
volatile long count;
void fn()
{
count++;
}
void loop()
{
long i;
for(i = 0; i < N; i++) fn();
}
int
main(int argc, char **argv)
{
#pragma omp parallel num_threads(1)
loop();
#pragma omp parallel num_threads(1)
loop();
return 0;
}
|
CALPHADFreeEnergyFunctionsBinary.h | #ifndef included_CALPHADFreeEnergyFunctionsBinary
#define included_CALPHADFreeEnergyFunctionsBinary
#include "CALPHADSpeciesPhaseGibbsEnergy.h"
#include "InterpolationType.h"
#include "Phases.h"
#include "datatypes.h"
#include "functions.h"
#include <boost/property_tree/ptree.hpp>
#include <cassert>
#include <fstrea... |
trmv_x_csr_u_lo.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t
trmv_x_csr_u_lo_omp(const ALPHA_Number alpha,
const ALPHA_SPMAT_CSR *A,
const ALPHA_Number *x,
const ... |
setup.c | /* Setup routines for heat equation solver */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "heat.h"
#include "pngwriter.h"
#define NSTEPS 500 // Default number of iteration steps
/* Initialize the heat equation solver */
void initialize(int argc, char *argv[], field *curr... |
zlange.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> s d c
*
**/
#include "plasma.h"
#include "plasma_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include ... |
vector.c | #include <stdio.h>
#include <omp.h>
int main()
{
int i,n;
double a[1000],b[1000],result;//define double vectors
n=1000;
result = 0.0;
for (i = 0;i<n;i++)//assign for vectors
{
a[i] = i*2.0;
b[i] = i*3.0;
}
double start = omp_get_wtime();
#pragma omp parallel for private(i) reduction(+:result)
for (i = 0... |
2mm.c | /**
* 2mm.c: This file was adapted from PolyBench/GPU 1.0 test suite
* to run on GPU with OpenMP 4.0 pragmas and OpenCL driver.
*
* http://www.cse.ohio-state.edu/~pouchet/software/polybench/GPU
*
* Contacts: Marcio M Pereira <mpereira@ic.unicamp.br>
* Rafael Cardoso F Sousa <rafael.cardoso@students.ic.... |
GB_unaryop__minv_fp32_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... |
common.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_UTILS_COMMON_H_
#define LIGHTGBM_UTILS_COMMON_H_
#if ((defined(sun) || defined(__sun)) && (defined(__SVR4) || defined(__svr4__)))
#... |
RACIPELIB.c | /***********************************************************************
Random Circuit Perturbation (RACIPE) menthod
Copyright 2016 BIN HUANG <bh14@rice.edu>
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 ... |
ranksort-openmp.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#define N 100000
#define NUM_THREADS 2
int main(int argc, char *argv[])
{
double start,stop;
int x[N], y[N];
int i, j, my_num, my_place,tid;
start = omp_get_wtime();
for (i=0; i<N; i++) {
x[i] = N - i;
}
omp_set_num_threads(... |
tinyexr.h | /*
Copyright (c) 2014 - 2017, Syoyo Fujita
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the followi... |
mandel_reduction.c | /*
** PROGRAM: Mandelbrot area (solution)
**
** PURPOSE: Program to compute the area of a Mandelbrot set.
** The correct answer should be around 1.510659.
**
** USAGE: Program runs without input ... just run the executable
**
** ADDITIONAL EXERCISES: Experiment with the schedule clause to fix ... |
Network.h | /*
* Network.h
*
* Created by Guido Novati on 30.10.18.
* Copyright 2018 ETH Zurich. All rights reserved.
*
*/
#pragma once
#include "Layers.h"
struct Network
{
std::mt19937 gen;
// Vector of layers, each defines a forward and bckward operation:
std::vector<Layer*> layers;
// Vector of parameters of... |
simde-diagnostic.h | /* SPDX-License-Identifier: MIT
*
* 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, copy,
* modify, merge, publish, ... |
target_implicit_partial_map.c | // RUN: %libomptarget-compile-generic
// RUN: %libomptarget-run-generic 2>&1 \
// RUN: | %fcheck-generic
// END.
#include <omp.h>
#include <stdio.h>
int main() {
int arr[100];
#pragma omp target data map(alloc: arr[50:2]) // partially mapped
{
// CHECK: arr[50] must present: 1
fprintf(stderr, "arr[50] ... |
multi_bspline_create.c | /////////////////////////////////////////////////////////////////////////////
// einspline: a library for creating and evaluating B-splines //
// Copyright (C) 2007 Kenneth P. Esler, Jr. //
// Released under the BSD-3-clause license //
////////... |
GB_binop__ne_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-... |
gemm.c | #include "gemm.h"
#include "utils.h"
#include "cuda.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
// > Mixed precision functions
#ifdef GPU
extern void parse_output_conv_layer_gpu(int TA, int TB, int M, int N, int K, float *C);
void gemm_gpu(int TA, int TB, int M, int N, int K, float ALPHA, float *... |
convolution_sgemm_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 copy ... |
_phonopy.c | /* Copyright (C) 2011 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... |
chap_fmt_plug.c | /*
* iSCSI CHAP authentication cracker. 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 i... |
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-2021, All Rights Reserved.
// SPDX-Licens... |
rose_firstprivate.c | int g;
void foo()
{
int i;
int x;
int y = 1;
int a[100];
int b[100];
#pragma omp parallel for private (y,i) firstprivate (x)
for (i = 0; i <= 99; i += 1) {
y = x + 1 + g;
b[i] = x + 1 + g;
// x=...
// ... =x
}
x = g;
}
int a[100];
void foo2()
{
int i;
int tmp;
tmp = 10;
// It would be... |
AtomicUF.h | /// \ingroup base
/// \class ttk::AtomicUF
/// \author Charles Gueunet <charles.gueunet@lip6.fr>
/// \date June 2016.
///
///\brief TTK processing package that efficiently computes the contour tree of
/// scalar data and more (data segmentation, topological simplification,
/// persistence diagrams, persistence curves, ... |
spacetime_kernel_antiderivative.h | /*
Copyright (c) 2020, VSB - Technical University of Ostrava and Graz University of
Technology
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyr... |
ccl_core.c | #include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <math.h>
#include <string.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_odeiv.h>
#include <gsl/gsl_spline.h>
#include <gsl/gsl_interp2d.h>
#include <gsl/gsl_spline2d.h>
#include <gsl/gsl_integration.h>
#include "ccl.h"
//
// Macros for replacing r... |
mmul.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... |
GB_unaryop__lnot_fp64_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... |
GB_unaryop__lnot_uint16_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
lrn_kernel_arm.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... |
matmul_tiled.c | #include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/time.h>
#include <unistd.h>
#include <math.h>
#include <float.h>
#include <omp.h>
#ifdef DP
#define REAL double
#else
#define REAL float
#endif
//int NB= BSIZE;
int BSIZE;
#define HACKFOR 128
#define max(a,b)( ((a) > (b)) ? (a) : (b) )
doubl... |
threading.h | #ifndef LIGHTGBM_UTILS_THREADING_H_
#define LIGHTGBM_UTILS_THREADING_H_
#include <LightGBM/utils/openmp_wrapper.h>
#include <vector>
#include <functional>
namespace LightGBM {
class Threading {
public:
template<typename INDEX_T>
static inline void For(INDEX_T start, INDEX_T end, const std::function<void(int, I... |
Example_doacross.3.c | /*
* @@name: doacross.3c
* @@type: C
* @@compilable: no
* @@linkable: no
* @@expect: failure
* @@version: omp_4.5
*/
#define N 100
void work_wrong(double p[][N][N])
{
int i, j, k;
#pragma omp parallel for ordered(2) private(i,j,k)
for (i=1; i<N-1; i++)
{
for (j=1; j<N-1; j++)
{
#pragma omp ordered depen... |
flush.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int data, flag = 0;
#pragma omp parallel num_threads(2)
{
if (omp_get_thread_num() == 0) {
data = 42;
#pragma omp flush(flag, data)
flag = 1;
#pragma omp flush(flag)
} else if (omp_get_thread_num(... |
utils.h | #ifndef _UTILS_
#define _UTILS_
#include "common.h"
#include "cusparse.h"
// print 1D array
template<typename T>
void print_1darray(T *input, int length)
{
for (int i = 0; i < length; i++)
printf("%i, ", input[i]);
printf("\n");
}
/*
__forceinline__ __device__
static double atomicAdd(double *addr, dou... |
ep.c | //-------------------------------------------------------------------------//
// //
// This benchmark is a serial C version of the NPB EP code. This C //
// version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
imginputfileconn.h | /**
* DeepDetect
* Copyright (c) 2014 Emmanuel Benazera
* Author: Emmanuel Benazera <beniz@droidnik.fr>
*
* This file is part of deepdetect.
*
* deepdetect 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 F... |
SpatialDepthWiseConvolution.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialDepthWiseConvolution.c"
#else
static inline void THNN_(SpatialDepthWiseConvolution_shapeCheck)(
THTensor *input, THTensor *gradOutput,
THTensor *weight, THTensor *bias,
int kH, int kW, int dH, int dW, int padH, int padW) {
THArgCheck(kW > 0 && kH > ... |
3d25pt.c | /*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b)... |
requantize_relu_pack4.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 ... |
ast-dump-openmp-target-data.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(int x) {
#pragma omp target data map(x)
;
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-... |
backtransformation.c | #include "backtransformation.h"
#include <stdlib.h>
#include <assert.h>
#include <omp.h>
void initEVRepNode(EVRepNode* r) {
r->taskid = -1;
r->n = 0;
r->Q = NULL;
r->L = NULL;
r->D = NULL;
r->z = NULL;
r->N = NULL;
r->G = NULL;
r->C = NULL;
r->S = NULL;
r->P = NULL;
r->b... |
symm.c | /* POLYBENCH/GPU-OPENMP
*
* This file is a part of the Polybench/GPU-OpenMP suite
*
* Contact:
* William Killian <killian@udel.edu>
*
* Copyright 2013, The University of Delaware
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
/* Include polybench common header. */
#include <po... |
expected_output.c | #include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include <polybench.h>
#include "ludcmp.h"
/**
* This version is stamped on May 10, 2016
*
* Contact:
* Louis-Noel Pouchet <pouchet.ohio-state.edu>
* Tomofumi Yuki <tomofumi.yuki.fr>
*
* Web address: http://polybench.sourceforge.net
*/
/*l... |
ceil_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... |
OmpForBodyLink.c | int main() {
int i;
#pragma omp for
for (i = 0; i < 10; i++) {
int x;
}
#pragma omp for
for (i = 0; i < 10; i++) {
int y;
}
}
|
factorize.c | #include "factorize.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
static void squareRootCeil(mpz_t n, mpz_t *r);
static void factorBase(mpz_t n, mpz_t **factorbase, int *factorbaselen );
static void sieveInterval(mpz_t n, mpz_t *min, mpz_t *max);
static void sieve(mpz_t n, mpz_t* fa... |
Euclid_apply.c | /*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute... |
openMPIntergal.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#define precision 10
struct func {
double a, b, c;
};
double f(struct func* func, double x) {
return func->a * x * x + func->b * x + func->c;
}
double integral(struct func* func, double lb, double ... |
machinedeps.c | /*
Copyright © INRIA 2010-2011.
Authors: Matthijs Douze & Herve Jegou
Contact: matthijs.douze@inria.fr herve.jegou@inria.fr
This software is a computer program whose purpose is to provide
efficient tools for basic yet computationally demanding tasks,
such as find k-nearest neighbors using exhaustive search
and k... |
GB_unop__exp2_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
parallel.c | #include "parallel.h"
#include <stdlib.h>
#include <math.h>
#if TCI_USE_OPENMP_THREADS
int tci_parallelize(tci_thread_func func, void* payload,
unsigned nthread, unsigned arity)
{
if (nthread <= 1)
{
tci_comm comm;
tci_comm_init_single(&comm);
func(&comm, payload);... |
GB_unop__identity_uint16_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
Mat_dh.c | /*BHEADER**********************************************************************
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* This file is part of HYPRE. See file COPYRIGHT for details.
*
* HYPRE is free software; you can redistribute... |
Concat.h | #ifndef CONCAT
#define CONCAT
/*
* Concat.h:
* concatenatation operation.
*
* Created on: Apr 22, 2017
* Author: mszhang
*/
#include "MyLib.h"
#include "Node.h"
#include "Graph.h"
class ConcatNode : public Node {
public:
vector<int> inDims;
vector<PNode> ins;
public:
ConcatNode() : Node() {
... |
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... |
GB_binop__land_int64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
update.c | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team,
* check out http://www.gromacs.org for more information.
* Copyright (c) 2012,2013, by the GROMACS development team, l... |
kvstore_dist_server.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 ... |
GB_binop__gt_fp64.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_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-... |
DRB085-threadprivate-orig-no.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
serial_tree_learner.h | /*!
* Copyright (c) 2016 Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#include <LightGBM/dataset.h>
#include <Ligh... |
scheduling_loops.c | #include <stdio.h>
#include <stdlib.h>
#include "stdbool.h"
int main(int argc, char **argv){
int n_iter = 1000;
bool is_prime[n_iter];
#pragma omp parallel for schedule(dynamic)
for(int index=0; index < n_iter; index++){
long potential_prime = rand() % (4000000000 + 1);
for (long mult... |
main.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
double wtime()
{
struct timeval t;
gettimeofday(&t, NULL);
return (double)t.tv_sec + (double)t.tv_usec * 1E-6;
}
void matrix_vector_product(double* a, double* b, double* c, int m, int n)
{
for (int i = 0; i < m; i++)
{
... |
atomic_ops.h | /**
* @file atomic_ops.h
* @author Yibo Lin
* @date Apr 2020
*/
#include <type_traits>
#include "utility/src/utils.h"
DREAMPLACE_BEGIN_NAMESPACE
/// @brief A class generalized scaled atomic addition for floating point number
/// and integers. For integer, we use it as a fixed point number with the LSB
/// par... |
deprecate.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__identity_uint64_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... |
NETNTLM_bs_fmt_plug.c | /*
* NETNTLM_fmt.c -- NTLM Challenge/Response
*
* Written by JoMo-Kun <jmk at foofus.net> in 2007
* and placed in the public domain.
*
* Modified for performance, support for Extended Session Security, OMP
* and UTF-8, by magnum 2010-2011.
* Modified for using Bitsliced DES by Deepika Dutta Mishra
* <dipikadu... |
matrix_multiply.c | #include "q_incs.h"
#include "matrix_multiply.h"
#include "_rdtsc.h"
int
mm_simple(
double ** x,
double ** y,
double ** z,
int m,
int k,
int n
)
{
int status = 0;
printf("multiplying simple\n");
uint64_t t_start, t_stop;
t_start = RDTSC();
int num_ops = 0;
for ( int i = 0; ... |
SMM_NT_thread.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <math.h>
#include "LibShalom.h"
int Tm, Tn, T;
void SGEMM_NT_KERNEL_MP(float *C, float *A, float *B, long M, long N, long K,
long LN, long LK, float *SB, long k_tag)
{
asm volatile(
".macro PACK_KERNEL5x4_BEGIN_K \n"
" ... |
dds.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... |
GB_unop__identity_fc64_int32.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... |
ten_tusscher_2004_epi_S3_12.c | //Original Ten Tusscher
#include <assert.h>
#include <stdlib.h>
#include "ten_tusscher_2004_epi_S3_12.h"
GET_CELL_MODEL_DATA(init_cell_model_data) {
assert(cell_model);
if(get_initial_v)
cell_model->initial_v = INITIAL_V;
if(get_neq)
cell_model->number_of_ode_equations = NEQ;
}
//TODO... |
IPB2_fmt_plug.c | /*
* IPB2_fmt.c (version 4)
*
* Invision Power Board 2.x salted MD5 module for Solar Designer's JtR
* Uses Solar Designer's MD5 implementation.
* regenrecht at o2.pl, Jan 2006
*
* Hashes list should have form of username:$IPB2$salt$hash
* Values to be taken from IPB database, where:
* salt = bin2hex(ibf_member... |
mat_mul.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
void readMatrix(double** m, FILE* file, int rows, int cols);
void printMatrix(double** m, FILE* file, int rows, int cols);
void matrixMul(double** m1, double** m2, double** m3, int m, int p);
/*
* The file which contains a matrix has in its ... |
GB_compiler.h | //------------------------------------------------------------------------------
// GB_compiler.h: handle compiler variations
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apac... |
primes.c | #include <stdio.h>
#include <stdlib.h>
int start = 1, end = 400000;
// TODO 1: Start testing for primes up to 4000 numbers. Compile a serial version with: gcc -o prime-ex primes.c
// TODO 2: Increase the number of prime numbers tested to 400000 (test at least 40000 / 100000 / 200000 / 300000 / 400000). You might test ... |
LISAgeometry.c | /**
* \author Sylvain Marsat, University of Maryland - NASA GSFC
*
* \brief C code for the geometric coefficients entering the response for LISA-like detectors.
*
*/
#define _XOPEN_SOURCE 500
#ifdef __GNUC__
#define UNUSED __attribute__ ((unused))
#else
#define UNUSED
#endif
#include <stdio.h>
#include <stdlib... |
nr_direct.c | /*
*
*/
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
//#include <omp.h>
#include "config.h"
#include "cint.h"
#include "optimizer.h"
#include "nr_direct.h"
int GTOmax_shell_dim(const int *ao_loc, const int *shls_slice, int ncenter);
int GTOmax_cache_size(int (*intor)(), int *shls_sl... |
cpd.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "base.h"
#include "cpd.h"
#include "matrix.h"
#include "mttkrp.h"
#include "timer.h"
#include "thd_info.h"
#include "util.h"
#include <m... |
debug_so8_acoustic.c | #define _POSIX_C_SOURCE 200809L
#include "stdlib.h"
#include "math.h"
#include "sys/time.h"
#include "xmmintrin.h"
#include "pmmintrin.h"
#include <stdio.h>
#include "omp.h"
#define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b))
struct dataobj
{
void *restrict data;
int *size;
in... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
core_ssyrk.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @generated from /home/luszczek/workspace/plasma/bitbucket/plasma/core_blas/core_zsyrk.c, normal z -> s, Fri Sep 28 17:38:23 2018
*
**/
#include <plasma_core_blas.h>
#include "plas... |
ahuja_orlin_segment.h | /*
* Parallel implementation of Ahuja-Orlin's algorithm, divides the network into multiple segments.
*/
#ifndef MAXFLOW_AHUJA_ORLIN_SEGMENT_H
#define MAXFLOW_AHUJA_ORLIN_SEGMENT_H
#include "../../common_types.h"
#include "../../data_structures/linked_list.h"
#include "../../data_structures/thread_local_buffer_pool... |
GB_unop__identity_uint8_uint16.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_unop__identity_fc64_uint32.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... |
pmtv-OpenMP.c | #include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <omp.h>
int main(int argc, char** argv){
int i, j, f, c, intkind, chunk;
double t1, t2, total;
srand(time(NULL));
omp_sched_t kind;
//Leer argumento de entrada (no de componentes del vector)
if (argc<4){
printf("Formato: programa tamaño... |
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)
**************************************... |
copyin-2.c | /* { dg-do run } */
/* { dg-require-effective-target tls_runtime } */
#include <omp.h>
#include <stdlib.h>
struct { int t; char buf[64]; } thr = { 32, "" };
#pragma omp threadprivate (thr)
int
main (void)
{
int l = 0;
omp_set_dynamic (0);
omp_set_num_threads (6);
#pragma omp parallel copyin (thr) reduction (... |
common.h | #ifndef DEPTH_SEGMENTATION_COMMON_H_
#define DEPTH_SEGMENTATION_COMMON_H_
#ifdef _OPENMP
#include <omp.h>
#endif
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <glog/logging.h>
#include <opencv2/highgui.hpp>
#include <opencv2/rgbd.hpp>
#include <opencv2/viz/vizcore.hpp>
namespace de... |
image.h | #ifndef IMAGE_H
#define IMAGE_H
typedef unsigned char uchar;
typedef unsigned int uint;
typedef struct __attribute__((__aligned__(8)))
{
unsigned int x, y;
}
uint2;
typedef struct __attribute__((__aligned__(4)))
{
unsigned char x, y, z;
}
uchar3;
typedef struct __attribute__((__aligned__(4)))
{
unsigned char ... |
TRPO_CG_FPGA.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include "omp.h"
#include "TRPO.h"
#include "Maxfiles.h"
#include "MaxSLiCInterface.h"
double CG_FPGA (TRPOparam param, double *Result, double *b, size_t MaxIter, double ResidualTh, size_t NumThreads){
///////////... |
GB_unaryop__abs_int8_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... |
comm.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 ... |
GB_unaryop__ainv_fp32_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... |
omp_loop.h | // -*- C++ -*-
// Copyright (C) 2007-2018 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3... |
reduction-clauseModificado2.c | /*
* reduction-clause.c
*
* Created on: 09/04/2014
* Author: Carlos de la Torre
*/
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(int argc, char **argv) {
int i, n = 20, a[n], suma = 10;
if (argc < 2) {
fprintf(stderr,"Falta ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.