source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GrB_Descriptor_wait.c | //------------------------------------------------------------------------------
// GrB_Descriptor_wait: wait for a user-defined GrB_Descriptor to complete
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
//... |
GB_binop__rminus_fc64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
NonlocalMarching_Inpaint_core.c | /*
* This work is part of the Core Imaging Library developed by
* Visual Analytics and Imaging System Group of the Science Technology
* Facilities Council, STFC
*
* Copyright 2017 Daniil Kazantsev
* Copyright 2017 Srikanth Nagella, Edoardo Pasca
*
* Licensed under the Apache License, Version 2.0 (the "License")... |
conversions.h | #ifndef CONVERSIONS_H
#define CONVERSIONS_H
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <float.h>
#include "omp.h"
#include "loewner_declaration.h"
#include "morph_color_matrix.h"
/*
*=============================================================================================================... |
GB_unop__identity_int16_int64.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... |
sections-3.c |
// { dg-do compile }
extern void bar (void);
int main (void)
{
#pragma omp parallel sections nowait /* { dg-error "'nowait'" } */
{
#pragma omp section
{ bar(); }
#pragma omp section
{ bar(); }
}
}
|
GB_unaryop__minv_uint8_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
GB_binop__plus_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
protocol.h | #ifndef __PROTOCOL_H_
#define __PROTOCOL_H_
#include "gwasiter.h"
#include "mpc.h"
#include "util.h"
#include <vector>
#include <NTL/mat_ZZ_p.h>
#include <NTL/mat_ZZ.h>
#include <NTL/ZZ.h>
#include <NTL/BasicThreadPool.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
#include <chrono>... |
cp-tree.h | /* Definitions for C++ parsing and type checking.
Copyright (C) 1987-2017 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
... |
c-tree.h | /* Definitions for C parsing and type checking.
Copyright (C) 1987-2014 Free Software Foundation, Inc.
This file is part of GCC.
GCC 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, or (at yo... |
HashFactory.c |
/* Copyright (C) 1991-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library 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 2.1 of the... |
MD5_fmt.c | /*
* This file is part of John the Ripper password cracker,
* Copyright (c) 1996-2001,2008,2010-2012 by Solar Designer
*
* ...with changes in the jumbo patch, by bartavelle and magnum.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* There's ABSOLUTELY N... |
DistanceTableData.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Jeremy Mc... |
rose_example2_refactored_OpenMP.c | #include <omp.h>
#include <stdio.h>
#include <sys/time.h>
#define N 30000
int main()
{
int i;
int j;
double x[30002UL][30002UL];
double y[30002UL][30002UL];
double tmp[30002UL][30002UL];
double sum = 0;
//for timing the code section
struct timeval start;
struct timeval end;
float delta;
for (i = 0... |
DRB060-matrixmultiply-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... |
cpu_solver.c |
/** \file cpu_solver.c
* \brief Codice host degli algoritmo del solver.
*
*
*/
#ifndef MAX_THREADS
#define MAX_THREADS 16
#endif
#ifndef CHUNK_SIZE
#define CHUNK_SIZE 4
#endif
#include "cpu_solver.h"
#include <omp.h>
extern char* str;
extern int counter_nodi;
extern int counter_nodi0;
//extern int counter_nodi... |
omp_task.c | /* OpenMP TASK Construct Example */
#include <stdio.h>
#include <omp.h>
int main () {
#pragma omp parallel
{
#pragma omp single
{
printf("A ");
#pragma omp task
{printf("race ");}
#pragma omp task
{printf("car ");}
}
} // End of parallel region
printf... |
GB_binop__lt_fp32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
DRB010-lastprivatemissing-var-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
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... |
3d7pt.c | /*
* Order-1, 3D 7 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) ... |
gm_dfs_template.h | #ifndef GM_DFS_TEMPLATE_H
#define GM_DFS_TEMPLATE_H
#include <omp.h>
#include <string.h>
#include <set>
#include <vector>
#include "gm_graph.h"
//-----------------------------------------------
// template for DFS
// Note that recursion-base DFS will surely crash due to
// stack overflow, when appli... |
diagsm_x_csr_n_col.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#include <memory.h>
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_CSR *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy)
{
ALPHA_Number dia... |
CPhotoconsistencyOdometryBiObjective.h | /*
* Photoconsistency-Visual-Odometry
* Multiscale Photoconsistency Visual Odometry from RGBD Images
* Copyright (c) 2012-2013, Miguel Algaba Borrego
*
* http://code.google.com/p/photoconsistency-visual-odometry/
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or with... |
viter.c |
#include "libimagequant.h"
#include "pam.h"
#include "viter.h"
#include "nearest.h"
#include <stdlib.h>
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_max_threads() 1
#define omp_get_thread_num() 0
#endif
/*
* Voronoi iteration: new palette color is computed from weighted average of color... |
kmp_taskloop.c | // RUN: %libomp-compile-and-run
// RUN: %libomp-compile && env KMP_TASKLOOP_MIN_TASKS=1 %libomp-run
// REQUIRES: openmp-4.5
#include <stdio.h>
#include <omp.h>
#include "omp_my_sleep.h"
#define N 4
#define GRAIN 10
#define STRIDE 3
// globals
int th_counter[N];
int counter;
// Compiler-generated code (emulation)
ty... |
column_matrix.h | /*!
* Copyright 2017 by Contributors
* \file column_matrix.h
* \brief Utility for fast column-wise access
* \author Philip Cho
*/
#ifndef XGBOOST_COMMON_COLUMN_MATRIX_H_
#define XGBOOST_COMMON_COLUMN_MATRIX_H_
#include <dmlc/timer.h>
#include <limits>
#include <vector>
#include "hist_util.h"
namespace xgboost {... |
bd_fast.c | #include <stdlib.h>
#include <stdio.h>
#include <unistd.h> // access
#include <math.h>
#include <assert.h>
#include "timer.h"
#include "bd.h"
#include <omp.h>
#define NTHREADS 36
#define M_PI 3.14159265358979323846
#define my_EPS 0.000000001
void get_indices(int index, int *i, int *j, int *k, int b){
int ib, ib2;... |
space.h | #ifndef MATH_SPACE_H
#define MATH_SPACE_H
namespace math {
namespace space {
inline
arma::uword
indices_to_index(const arma::uvec & indices, const arma::uvec & table) {
assert(indices.n_elem == table.n_elem);
const arma::uword dims = table.n_elem;
arma::uword index = 0;
for (arma::uword i = 0; i < dims; i... |
reduce3.h | /*
* reduce3.h
*
* Created on: Dec 28, 2015
* Author: agibsonccc
*/
#ifndef REDUCE3_H_
#define REDUCE3_H_
#define EXTRA_PARAMS_LENGTH 10
#include <templatemath.h>
#include <helper_cuda.h>
#include <helpers/sharedmem.h>
#ifdef _OPENMP
#include <omp.h>
#endif
#include <pairwise_util.h>
#include <dll.h>
#inc... |
GB_binop__times_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
SizeField.h | #pragma once
#include <ScalarField/ScalarField.h>
#include "MeshHeader.h"
#include "HelperFunctions.h"
#include <nanoflann.hpp>
class SizeField
{
struct MeshPointsNN
{
using kd_tree_t = nanoflann::KDTreeSingleIndexAdaptor<nanoflann::L2_Simple_Adaptor<float, MeshPointsNN >, MeshPointsNN, 3>;
std::unique_ptr<kd_t... |
dft.c | // Copyright Naoki Shibata and contributors 2010 - 2020.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <assert.... |
diagmm_x_bsr_n_col.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include <memory.h>
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number ... |
gimplify.c | /* Tree lowering pass. This pass converts the GENERIC functions-as-trees
tree representation into the GIMPLE form.
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Major work done by Sebastian Pop <s.pop@laposte.net>,
Diego Novillo <dnovillo@redhat.com> a... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
kernel_parallel.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
fx.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
triad.h | #ifndef TRIAD_H
#define TRIAD_H
#include <iostream>
#include <vector>
#include <random>
#include <set>
namespace TSnap {
/////////////////////////////////////////////////
// Triads and clustering coefficient
/// Computes the average clustering coefficient as defined in Watts and Strogatz, C... |
ttables.h | // Copyright 2013 by Chris Dyer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
image.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__isle_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... |
fx.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__times_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... |
GB_unop__identity_int16_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... |
core_ztrsm.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"
/*******************************************************************... |
GridInit.c | #include "XSbench_header.h"
SimulationData grid_init_do_not_profile( Inputs in, int mype )
{
// Structure to hold all allocated simuluation data arrays
SimulationData SD;
// Keep track of how much data we're allocating
size_t nbytes = 0;
// Set the initial seed value
uint64_t seed = 42;
////////////////////... |
looptc_c4.c | #include <string.h>
void deinterleave(char *page, char *transposed, const int ntabs, const int nchannels, const int ntimes, const int padded_size) {
int tab;
for (tab = 0; tab < ntabs; tab++) {
// unroll time dimension 4x
int time;
for (time = 0; time < ntimes; time+=4) {
// build temporary arr... |
issue_001.c | #include <stdio.h>
#include "assert.h"
#include <unistd.h>
// 920 fails
#define TRIALS 600 //#919
// 6000 fails
#define N 64*5000
int main() {
int fail = 0;
double A[N], B[N], C[N];
for (int i = 0; i < N; i++) {
A[i] = 0.0;
B[i] = 0.0;
C[i] = 1.0;
}
int nte = 32;
int tl = 64;
int blockSize ... |
SymbolicDerivatives.h | #ifndef _SymbolicDerivatives_H_
#define _SymbolicDerivatives_H_
#ifdef _OPENMP
#include <omp.h>
#endif
// #define SYMBDER_WITH_MMVII true
#define SYMBDER_WITH_EIGEN false
#if SYMBDER_WITH_EIGEN
#include "ExternalInclude/Eigen/Dense" // TODO => replace with standard eigen file
#define EIGEN_ALLIGNMENT_IN_MMVII EIG... |
auction_cpu.h | /**
* @file auction_cpu.h
* @author Jiaqi Gu, Yibo Lin
* @date Apr 2019
*/
#ifndef _DREAMPLACE_GLOBAL_MOVE_AUCTION_CPU_H
#define _DREAMPLACE_GLOBAL_MOVE_AUCTION_CPU_H
#include <iostream>
#include <cstring>
#include <cassert>
DREAMPLACE_BEGIN_NAMESPACE
#define AUCTION_MAX_EPS 10.0 // Larger values mean soluti... |
racey_tasks.c | //
// This is a very simple program to play with tasks.
//
// the idea is to print one of two strings
//
// I think race cars are fun.
// I think car races are fun
//
// This is a race condition since depending on how the
// threads are scheduled, you will get a different answer.
// We aren't writing any var... |
declare-target-4.c | /* { dg-do compile } */
/* { dg-options "-fopenmp" } */
#pragma omp declare target device_type (any) /* { dg-warning "directive with only 'device_type' clauses ignored" } */
void f1 (void) {}
void f2 (void);
#pragma omp declare target to (f1) device_type (any) to (f2)
void f3 (void) {}
void f4 (void) {}
#pragma omp... |
GB_binop__isgt_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... |
6.datarace.c | #include <stdio.h>
#include <omp.h>
#define N 1 << 10
#define NUM_THREADS 8
/* Execute several times before answering the questions */
/* Q1: Is the program always executing correctly? Add two */
/* alternative directives to make it correct. */
int main()
{
int i, x=0;
omp_set_num_threads(NUM_... |
BSSNScalar_Field.c | // Part P0: Set the number of ghost cells, from NRPy+'s FD_CENTDERIVS_ORDER
#define NGHOSTS 3
// Step P1a: Import needed header files
#include "stdio.h"
#include "stdlib.h"
#include <stdint.h>
#include "math.h"
#include "time.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
// Step P1b: Import necessary... |
GB_unop__trunc_fc64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
pooling_hcl_arm.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 ma... |
threadprivate2.c | #include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int counter=0;
#ifdef _OPENMP
#pragma omp threadprivate(counter)
#endif
int main(void)
{
int i;
#pragma omp parallel for
for(i=0;i<10000;i++)
counter++;
#pragma omp parallel for
for(i=0;i<10000;i++)
counter+=3;
#pragma omp parallel
printf("counte... |
psd.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
sicm_low.c | #include "sicm_low.h"
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <numa.h>
#include <numaif.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <sys/mman.h>
// https://www.mail-archive.com/devel@lists.o... |
decorate.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
solvers.h | #ifndef SOLVERS_H
#define SOLVERS_H
#include "loss.h"
#include "regul.h"
#include "list.h"
#define USING_SOLVER \
typedef typename loss_type::variable_type D; \
typedef typename loss_type::value_type T; \
typedef typename loss_type::index_type I;\
typedef loss_type LT; \
using Solver<loss_type>::_L; \
... |
GB_unop__identity_uint32_uint64.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... |
convolution_sgemm.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 ... |
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... |
THTensorConv.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/THTensorConv.c"
#else
/*
2D Input, 2D kernel : convolve given image with the given kernel.
*/
void THTensor_(validXCorr2Dptr)(real *r_,
real alpha,
real *t_, long ir, long ic,
... |
conv_dw_kernel_x86.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... |
GB_unaryop__lnot_bool_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_unop__identity_uint8_uint16.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
vectorOps.c |
/*=======================
C Program Template
Evan William Gretok
Month D, YEAR
=======================*/
// Inclusions
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
// Definitions
#define DEBUG 0
#define SIZE 100000000
// Main
int main( int argc, ... |
Example_tasking.3.c | /*
* @@name: tasking.3c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_3.0
*/
typedef struct node node;
struct node {
int data;
node * next;
};
void process(node * p)
{
/* do work here */
}
void increment_list_items(node * head)
{
#pragma omp parallel
{
... |
C04Traversal.h | /**
* @file C04Traversal.h
* @author C.Menges, based on tchipevn (original source:
* ls1-mardyn/src/particleContainer/LinkedCellTraversals/C04CellPairTraversal.h)
* @date 15.06.2019
*/
#pragma once
#include "autopas/containers/cellPairTraversals/C08BasedTraversal.h"
#include "autopas/containers/linkedCells/trave... |
signalMachine.c | #include <getopt.h>
#include <string.h>
#include "signalMachineUtils.h"
#include "pairwiseAligner.h"
#include "fasta_handler.h"
#define ESTIMATE_PARAMS 1
#define ASSIGNMENT_THRESHOLD 0.1
typedef enum {
full = 0,
variantCaller = 1,
assignments = 2,
both = 3
} OutputFormat;
void usage() {
fprintf(... |
sph_compute.c | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <sys/time.h>
#include <inttypes.h>
#include <omp.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include <gsl/gsl_heapsort.h>
#include "sph_data_types.h"
#include "sph_linked_list.h"
#include "sph... |
thapi.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
#include "thnets.h"
static int lasterror;
static short TB_YUR[256], TB_YUB[256], TB_YUGU[256], TB_YUGV[256], TB_Y[256];
static unsigned char TB_SAT[1024 + 1024 + 256];
int th_debug, th_profil... |
1.c | #include <stdlib.h>
#include <stdio.h>
#include <omp.h>
int main() {
FILE *in = fopen("1_in.txt", "r");
FILE *out = fopen("1_out.txt", "w");
int n, p, q;
fscanf(in, "%d %d %d", &n, &p, &q);
double *A, *B, *C;
A = (double*) calloc(n * n, sizeof(double));
B = (double*) calloc(n * n, siz... |
ark_analytic_nonlin_ompdev.c | /*-----------------------------------------------------------------
* Programmer(s): Shelby Lockhart @ LLNL
*---------------------------------------------------------------
* This code is based on the serial code found in
* ark_analytic_nonlin.c developed by Daniel R. Reynolds
*------------------------------------... |
OMP-Jacobi-1D-Naive-Parallel.test.c | #include <stdio.h>
#include <omp.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <ctype.h>
#include <stdbool.h>
#include <stdio.h>
#include <omp.h>
#include <time.h>
#include <stdlib.h>
#include <assert.h>
bool initedJacobi = false;
int globalSeed = -1;
int cores = -1;
int pr... |
ConstraintsContainerDms-impl.h | /**********************************************************************************************************************
This file is part of the Control Toolbox (https://adrlab.bitbucket.io/ct), copyright by ETH Zurich, Google Inc.
Authors: Michael Neunert, Markus Giftthaler, Markus Stäuble, Diego Pardo, Farbod Farshi... |
dvjsvd.c | #include "dvjsvd.h"
#include "dnormx.h"
#include "dscale.h"
#include "dnorm2.h"
#include "dznrm2.h"
#include "ddpscl.h"
//#include "dgsscl.h"
#include "dbjac2.h"
#include "djrotf.h"
#include "djrot.h"
#include "dswp.h"
#include "vecdef.h"
#include "defops.h"
#ifdef JTRACE
#include "timer.h"
#endif /* JTRACE */
#ifde... |
game_openmp.c | // To compile: make openmp
// To run: mpiexec -n [x] -f machines ./a.out [width] [height] [input_file]
#define _DEFAULT_SOURCE
#define GEN_LIMIT 1000
#define CHECK_SIMILARITY
#define SIMILARITY_FREQUENCY 3
#define THREADS 4
#define true 1
#define false 0
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
... |
gene_bin.c | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <mpi.h>
#include "../headers/gene_bin.h"
#include <sys/types.h>
#ifndef __USE_MISC
#define __USE_MISC
#endif
#include <dirent.h>
#include <string.h>
#include <sys/stat.h>
#include <errno.h>
#include <nmmintrin.h>
#include <immintrin.h>
int output;
... |
GB_unop__identity_uint16_uint16.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... |
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... |
Tanh.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/Tanh.c"
#else
void THNN_(Tanh_updateOutput)(
THNNState *state,
THTensor *input,
THTensor *output)
{
THTensor_(tanh)(output, input);
}
void THNN_(Tanh_updateGradInput)(
THNNState *state,
THTensor *gradOutput,
... |
GB_unop__sinh_fc64_fc64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
dense_pairwise.c | /* Copyright (c) 2016 Drew Schmidt
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 list of conditions ... |
main-omp.c | /* SPMD Single Program Multiple Data
* TransDNA com openMP
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <omp.h>
#include "transcription.h"
#include "io.h"
// Constantes
#define TAMANHO_CODON 3
#define NUM_THREADS 4 // Constante para numero Threads de ressalva
int main(int... |
wpapsk.h | /*
* This software is Copyright (c) 2012 Lukas Odzioba <lukas dot odzioba at gmail dot com>
* and Copyright (c) 2012-2014 magnum
* 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.
*
* hccap ... |
hellomem.c | //
//
// hellomem
//
// A simple example that measures copy memory bandwidth on
// Intel(r) processors using openmp to scale
//
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <omp.h>
#include <sys/time.h>
// dtime - utility routine that returns the current wall clock time
double dtime()
{
d... |
GB_unop__identity_uint8_int16.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... |
wand-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% W W AAA N N DDDD ... |
morn_matrix.c | /*
Copyright (C) 2019-2020 JingWeiZhangHuai <jingweizhanghuai@163.com>
Licensed under the Apache License, Version 2.0; you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in wri... |
hypergeometric_distribution.c | #include <stdio.h>
#include <stdlib.h>
#include <gmp.h>
#define TOLERANCE 0.000000001
#define MALICIOUS_RATE 0.9
void factorial(mpf_t res, int n)
{
int i;
mpf_t p;
mpf_init_set_ui(p,1);
for (i=1; i <= n ; ++i){
mpf_mul_ui(p,p,i);
}
mpf_set(res, p);
mpf_clear(p);
}
// Combination: factorial(... |
core_dgeqrt.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_zgeqrt.c, normal z -> d, Fri Sep 28 17:38:20 2018
*
**/
#include <plasma_core_blas.h>
#include "pla... |
example_04-StructOfArrays-Naive-Omp-SIMD-Tiled.c | /*
* SPDX-License-Identifier: BSD-3-Clause
*
* example_04-StructOfArrays-Naive-Omp-SIMD-Tiled.c :
* Example of SPH Density Calculation using a
* naive implementation of the main density loop,
* no neighbours earch, and Struct of Arrays (SoA)
* data layout, OpenMP parallelization ... |
GB_binop__min_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... |
GB_AxB_saxpy3_cumsum.c | //------------------------------------------------------------------------------
// GB_AxB_saxpy3_cumsum: finalize nnz(C(:,j)) and find cumulative sum of Cp
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.