source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
ast-dump-openmp-distribute-parallel-for.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_one(int x) {
#pragma omp distribute parallel for
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp distribute parallel for
for... |
q2.c | #include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include "common.h"
const i32 REPEAT_COUNT = 512;
const i32 ARRAY_SIZE = 8192;
const i32 RECURSION_SIZE_LIMIT = 32;
const i32 FILE_ARRAY_SIZE = 100000;
i32* get_random_array(i32 size) {
i32* arr = malloc(sizeof(i32) * size);
for (i32 i ... |
fill_int2e.c | /*
* Author: Qiming Sun <osirpt.sun@gmail.com>
*/
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "config.h"
#include "cint.h"
#define MAX(I,J) ((I) > (J) ? (I) : (J))
#define MIN(I,J) ((I) < (J) ? (I) : (J))
int GTOmax_shell_dim(int *ao_loc, int *shls_slice, int ncenter)
{
... |
loss_mat.h | #ifndef LOSS_MAT_H
#define LOSS_MAT_H
#include "../loss.h"
template <typename M, typename L>
class LinearLossMat : public Loss< M, L, Matrix<typename M::value_type> > {
public:
typedef Loss< M, L, Matrix<typename M::value_type> > loss_type;
typedef typename M::value_type T;
LinearLossMat(DataMa... |
BaseDetector.h | #pragma once
#include <memory>
#include "defines.h"
///
/// \brief The BaseDetector class
///
class BaseDetector
{
public:
///
/// \brief BaseDetector
/// \param frame
///
BaseDetector(const cv::UMat& frame)
{
m_minObjectSize.width = std::max(5, frame.cols / 100);
m_minObjectSi... |
GB_binop__lxor_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-... |
tinyexr.h | /*
Copyright (c) 2014 - 2018, Syoyo Fujita and many contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this l... |
jacobi-block-task.c | #include "hclib.h"
#ifdef __cplusplus
#include "hclib_cpp.h"
#include "hclib_system.h"
#ifdef __CUDACC__
#include "hclib_cuda.h"
#endif
#endif
# include "poisson.h"
/* #pragma omp task/taskwait version of SWEEP. */
typedef struct _pragma26_omp_task {
int (*it_ptr);
int block_x;
int block_y;
int (*max_b... |
idasFoodWeb_bnd_omp.c | /*
* -----------------------------------------------------------------
* Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU
* Based on idaFoodWeb_bnd.c and parallelized with OpenMP
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2022, Lawr... |
utils.h | /* Copyright (C) 2010 The Trustees of Indiana University. */
/* */
/* Use, modification and distribution is subject to the Boost Software */
/* License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at */
/* http:... |
update_ops_named_Y.c |
#include "constant.h"
#include "update_ops.h"
#include "utility.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#ifdef _MSC_VER
#include <intrin.h>
#else
#include <x86intrin.h>
#endif
//void Y_gate_old_single(UINT target_qubit_index, CTYPE *state, ITYPE dim);
//void Y_gate_old_parallel(UINT target_qubit_index, CTYPE *stat... |
csr.c | /*!
* \file
*
* \brief Various routines with dealing with CSR matrices
*
* \author George Karypis
* \version\verbatim $Id: csr.c 13437 2013-01-11 21:54:10Z karypis $ \endverbatim
*/
#include <GKlib.h>
#define OMPMINOPS 50000
/*************************************************************************/
/*... |
stencil2d_cpu_omp_kernel.c | #include <homp.h>
#include "stencil2d.h"
void stencil2d_cpu_omp_wrapper(omp_offloading_t *off, int start, int len, long n, long m, int u_dimX, int u_dimY, REAL *u, REAL *uold, int radius, int coeff_dimX, REAL *coeff)
{
#if CORRECTNESS_CHECK
BEGIN_SERIALIZED_PRINTF(off->devseqid);
printf("udev: dev: %d, %dX%d\... |
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) ... |
matvec.c | #include <stdio.h>
#include <math.h>
#include <float.h>
#include <stdlib.h>
#include <omp.h>
#include "ctimer.h"
main(int argc, char**argv)
{
////// PRODUCTO MATRIZ-VECTOR x=A*b //////
// DECLARACION DE VARIABLES // // DECLARACION DE VARIABLES //
double t1,t2,tucpu,tscpu;
const int TALLA= 4;
const l... |
openmp-test.c | /*
Copyright (c) 1997-2019 OpenMP Architecture Review Board.
All rights reserved.
Permission to redistribute and use without fee all or part of the source
codes and the associated document (the Software), with or without
modification, is granted, provided that the following conditions are met:
* Redistributions of... |
cryptocontext.h | // @file cryptocontext.h -- Control for encryption operations.
// @author TPOC: contact@palisade-crypto.org
//
// @copyright Copyright (c) 2019, New Jersey Institute of Technology (NJIT))
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provide... |
GB_binop__lt_bool.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__lnot_uint32_bool.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__lxor_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... |
convolution_3x3_pack8to4_int8.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 ... |
GB_unop__identity_uint64_uint64.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... |
heat_2d-a.pluto.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))
/*
* Discretized 2D heat equation stencil with non periodic boundary conditions
* Adapt... |
task-taskwait-nested.c | /*
* task-taskwait-nested.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-excep... |
task-taskgroup-unrelated.c | /*
* task-taskgroup-unrelated.c -- Archer testcase
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
//
// See tools/archer/LICENSE.txt for details.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-ex... |
convdw3x3s2_sse.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2017 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 ... |
questao02.c | #include <stdio.h>
#include <stdlib.h>
#include "omp.h"
int main() {
int num_threads;
printf("\nquantidade de threads: ");
scanf("%d", &num_threads);
if(num_threads < 1) {
printf("numero invalido");
return 1;
}
omp_set_num_threads(num_threads);
#pragma omp parallel
{... |
snoop.c | /*
* compute the duplex structure of two RNA strands,
* allowing only inter-strand base pairs.
* see cofold() for computing hybrid structures without
* restriction.
*
* Ivo Hofacker
* Vienna RNA package
*/
#if... |
patch-dcraw__indi.c | $NetBSD: patch-dcraw__indi.c,v 1.2 2020/06/01 00:14:21 gdt Exp $
Drop default(none), because the OPENMP specification is unstable;
some versions prohibit declaring constants as shared and some require it.
--- dcraw_indi.c.orig 2015-06-16 03:58:38.000000000 +0000
+++ dcraw_indi.c
@@ -142,7 +142,6 @@ void CLASS wavelet... |
convolution_1x1_bf16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
GB_unop__identity_uint16_fc32.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... |
kthread_test.c | #include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <pthread.h>
#if HAVE_CILK
#include <cilk/cilk.h>
#include <cilk/cilk_api.h>
#endif
typedef struct {
int max_iter, w, h;
double xmin, xmax, ymin, ymax;
int *k;
} global_t;
static void compute(void *_g, int i, int tid)
{
global_t *... |
convolution_7x7_pack1to4.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 ... |
omp_task_final.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include <math.h>
#include "omp_testsuite.h"
#include "omp_my_sleep.h"
int test_omp_task_final()
{
int tids[NUM_TASKS];
int includedtids[NUM_TASKS];
int i;
int error = 0;
#pragma omp parallel
{
#pragma omp single
{
for (i = 0; i < NUM_TASKS;... |
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... |
GB_unaryop__abs_int32_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... |
core_cherk.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_zherk.c, normal z -> c, Fri Sep 28 17:38:21 2018
*
**/
#include <plasma_core_blas.h>
#include "plas... |
GB_unaryop__lnot_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_unop__signum_fc32_fc32.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... |
seidel.pluto.par.c |
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <math.h>
double A[N][N+17];
void init_arrays()
{
int i, j;
for (i=0; i<N; i++)
for (j=0; j<N; j++)
A[i][j] = i*i+j*j;
}
double rtclock()
{
struct timezone tzp;
struct timeval tp;
int stat;
gettimeofday (&tp, &tzp);
retur... |
gen_fffc.c | /******************************************************************************
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
**************************************... |
GB_unop__identity_uint16_fc32.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... |
fc_kernel_fp16_arm82.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); ... |
stencil.c | /*
* Simple Stencil example
* Main program example
*
* Brian J Gravelle
* gravelle@cs.uoregon.edu
*
*/
#include "mesh.h"
#ifdef USE_CALI
#include <caliper/cali.h>
#endif
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#ifndef X_SIZE
#define X_SIZE 10000
#endif
#ifndef Y_SIZE
#define Y_SIZE 20000
#en... |
zgetri.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 ... |
loop-12.c | /* { dg-do run } */
#include <omp.h>
extern void abort (void);
#define LLONG_MAX __LONG_LONG_MAX__
#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
#define INT_MAX __INT_MAX__
int arr[6 * 5];
void
set (int loopidx, int idx)
{
#pragma omp atomic
arr[loopidx * 5 + idx]++;
}
#define check(var, val, loopidx, idx) \
if (... |
parallelMain.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <omp.h>
#define TOL 10e-3
void printMatrix(double *matrix, int xDim, int yDim, FILE* fout) {
int i = 0, j = 0;
for (i = 0; i < xDim; i++) {
for (j = 0; j < yDim; j++) {
fprintf(fout, "%lf ", *(matrix + i * y... |
bucle-for-modificado.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char **argv) {
int i, n = 9;
if(argc < 2) {
fprintf(stderr,"\n[ERROR] - Falta no iteraciones \n");
exit(-1);
}
n = atoi(argv[1]);
#pragma omp parallel for
for (i=0; i<n; i++)
printf("thread %d ejecuta la iteración %d del bucle\n", om... |
ddot_kahan_omp_avx_intrin.c | #ifdef __AVX__
#include <stdio.h>
#include <math.h>
#include <omp.h>
#include "immintrin.h"
double ddot_kahan_avx_intrin(int, const double*, const double*, double*);
void ddot_kahan_omp_avx_intrin(int N, const double *a, const double *b, double *r) {
double *sum;
double *c;
int nthreads;
#pragma omp para... |
NewTimer.h | //////////////////////////////////////////////////////////////////
// (c) Copyright 2008- by Ken Esler
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
// Ken Esler
// National Center for Supercomputing Applications &
// Universi... |
DRB065-pireduction-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... |
GB_unaryop__lnot_fp32_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
LevelElimination.h | /*
* LevelElimination.h
*
* Created on: 10.01.2015
* Author: Michael
*/
#ifndef LEVELELIMINATION_H_
#define LEVELELIMINATION_H_
#include "Level.h"
#include "EliminationStage.h"
namespace NetworKit {
/**
* @ingroup numerics
*/
template<class Matrix>
class LevelElimination : public Level<Matrix> {
privat... |
InfomapGreedyCommon.h | /**********************************************************************************
Infomap software package for multi-level network clustering
Copyright (c) 2013, 2014 Daniel Edler, Martin Rosvall
For more information, see <http://www.mapequation.org>
This file is part of Infomap software package.
Infomap s... |
blackscholes.c | #include "BullMoose_4.h"
// Copyright (c) 2007 Intel Corp.
// Black-Scholes
// Analytical method for calculating European Options
//
//
// Reference Source: Options, Futures, and Other Derivatives, 3rd Edition,
// Prentice
// Hall, John C. Hull,
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <strin... |
SpatialMaxPooling.c | #include <math.h>
#include "../thnets.h"
static void nnfree_SpatialMaxPooling(struct module *mod)
{
THFloatTensor_free(mod->SpatialMaxPooling.indices);
}
int nnload_SpatialMaxPooling(struct module *mod, struct nnmodule *n)
{
struct table *t = n->table;
mod->type = MT_SpatialMaxPooling;
mod->updateOutput = nn_Spat... |
GB_binop__div_uint16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http:... |
dotp.c | #include <math.h>
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define REPEAT 100
int array_size = 10000000;
double *gen_array(int n) {
double *array = malloc(sizeof(*array) * n);
for (int i = 0; i < n; i++) array[i] = drand48();
return array;
}
double dotp_naive(double *x, doub... |
nn.c | #include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include <omp.h>
#define MAX_ARGS 10
#define REC_LENGTH 49 // size of a record in db
#define REC_WINDOW 10 // number of records to read at a time
#define LATITUDE_POS 28 // location of latitude coordinates in input r... |
lis_precon_jacobi.c | /* Copyright (C) 2002-2012 The SSI Project. 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 condition... |
libdecimate.c | /*
* This file is part of the libdecimate library
* (https://github.com/zindy/libdecimate)
* Copyright (c) 2017 Egor Zindy
*
* libdecimate 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 Foun... |
convolution_1x1_pack8_fp16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
sections-2.c | /* { dg-do run } */
#include <stdlib.h>
#include <unistd.h>
__attribute__((noinline, noclone, noreturn))
void
foo ()
{
sleep (4);
exit (0);
}
int
main ()
{
#pragma omp parallel
{
#pragma omp sections
{
foo ();
#pragma omp section
foo ();
#pragma omp section
foo (... |
memBw.c | /** $lic$
* Copyright (C) 2016-2017 by The Board of Trustees of Cornell University
* Copyright (C) 2013-2016 by The Board of Trustees of Stanford University
*
* This file is part of iBench.
*
* iBench is free software; you can redistribute it and/or modify it under the
* terms of the Modified BSD-3 Lice... |
exchange_boundary.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
HYPRE_parcsr_pcg.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... |
attribute.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
fill_r_3c.c | /*
* Author: Qiming Sun <osirpt.sun@gmail.com>
*/
#include <stdlib.h>
#include <stdio.h>
#include "config.h"
#include "cint.h"
int GTOmax_shell_dim(int *ao_loc, int *shls_slice, int ncenter);
int GTOmax_cache_size(int (*intor)(), int *shls_slice, int ncenter,
int *atm, int natm, int *bas, int ... |
matmult_openmp.c | /*
Matrix multiplication example
OpenMP version
Jim Teresco, CS 338, Williams College, CS 341, Mount Holyoke College
Mon Feb 10 10:55:31 EST 2003
Updated for CSIS-335, Siena College, Fall 2021
*/
/* header files needed for printf, gettimeofday, struct timeval */
#include <stdio.h>
#include <stdli... |
Stmt.h | //===--- Stmt.h - Classes for representing statements -----------*- C++ -*-===//
//
// The LLVM37 Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-----------------------------------------------------... |
zlantr.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 ... |
kgraph-data.h | #ifndef WDONG_KGRAPH_DATA
#define WDONG_KGRAPH_DATA
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <fstream>
#include <stdexcept>
#include <boost/assert.hpp>
#ifdef __GNUC__
#ifdef __AVX__
#define KGRAPH_MATRIX_ALIGN 32
#else
#ifdef __SSE2__
#define KGRAPH_MATRIX_ALIGN 16
#else
#def... |
grad.c |
/*
Author: Mohammed Al Farhan
Email: mohammed.farhan@kaust.edu.sa
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <omp.h>
#include "inc/ktime.h"
#include "inc/geometry.h"
#include "inc/ker/phy.h"
/*
Calculates the residual
*/
void
compute_grad(struct grad *restrict grad)
{
struct ktim... |
ASTMatchers.h | //===- ASTMatchers.h - Structural query framework ---------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... |
GB_unop__identity_uint8_uint8.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... |
pairwise_transform.h | /*
* pairwise_transform.h
*
* Created on: Dec 28, 2015
* Author: agibsonccc
*/
#ifndef PAIRWISE_TRANSFORM_H_
#define PAIRWISE_TRANSFORM_H_
#ifdef _OPENMP
#include <omp.h>
#endif
#include <templatemath.h>
#include <helper_cuda.h>
#include <helpers/shape.h>
#include <pairwise_util.h>
#include <dll.h>
#include... |
omp_sections_nowait.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
/*
* This test will hang if the nowait is not working properly
*
* It relies on a thread skipping to the second sections construct to
* release the threads in the first sections construct
*
* Also, since scheduling of sections is imple... |
GB_binop__ge_bool.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
block_matrix.h |
#ifndef _BLOCK_MATRIX_H
#define _BLOCK_MATRIX_H
#include <Eigen/Dense>
#include <Eigen/Sparse>
namespace BlockMatrix
{
// Types
template<class Type, int RowsSize, int ColsSize>
class Matrix : public Eigen::Matrix<Type, RowsSize, ColsSize>
{
protected:
Eigen::VectorXi rows_size_;
Eigen::VectorXi cols_size_... |
SE3P_direct_fd.c | #include "math.h"
#include "mex.h"
#define IDX prhs[0]
#define X prhs[1] // Source locations
#define Q prhs[2] // Source strengths
#define OPT prhs[3] // Parameters
#define PHI plhs[0] // Output
#ifndef VERBOSE
#define VERBOSE 0
#endif
#define PI 3.141592653589793
typedef struct
{
double box[3];
doub... |
GB_unop__minv_int64_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... |
yada.c | /* =============================================================================
*
* yada.c
*
* =============================================================================
*
* Copyright (C) Stanford University, 2006. All Rights Reserved.
* Author: Chi Cao Minh
*
* ===========================================... |
trmv_x_csc_u_hi_trans.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
#include <string.h>
#include <memory.h>
static alphasparse_status_t
trmv_csc_u_hi_trans_unroll4(const ALPHA_Number alpha,
const ALPHA_SPMAT_CSC* A,
co... |
QLA_D3_r1_veq_norm2_V.c | /**************** QLA_D3_r_veq_norm2_V.c ********************/
#include <stdio.h>
#include <qla_config.h>
#include <qla_types.h>
#include <qla_random.h>
#include <qla_cmath.h>
#include <qla_d3.h>
#include <math.h>
static void start_slice(){
__asm__ __volatile__ ("");
}
static void end_slice(){
__asm__ __volatile... |
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_unaryop__ainv_bool_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... |
convolution_1x1_pack4to1_bf16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
acado_integrator.c | /*
* This file was auto-generated using the ACADO Toolkit.
*
* While ACADO Toolkit is free software released under the terms of
* the GNU Lesser General Public License (LGPL), the generated code
* as such remains the property of the user who used ACADO Toolkit
* to generate this code. In partic... |
GB_binop__isgt_int8.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
implicit_blender.c | /*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be use... |
DRB114-if-orig-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
version1_2.c | // Compile with:
//
//
// To specify the number of bodies in the world, the program optionally accepts
// an integer as its first command line argument.
#include <time.h>
#include <sys/times.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <X11/Xlib.h>
#include <unistd.h>
#inclu... |
pool_ut.h | // Copyright (c) 2019 PaddlePaddle Authors. 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... |
GB_kroner.c | //------------------------------------------------------------------------------
// GB_kroner: Kronecker product, C = kron (A,B)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier: A... |
feature.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GxB_Vector_serialize.c | //------------------------------------------------------------------------------
// GxB_Vector_serialize: copy a vector into a serialized array of bytes
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SP... |
inputParallelFor.c | #include <stdio.h>
#ifdef _OPENMP
#include "omp.h"
#endif
static long num_steps=10000000;
double step;
int main()
{
int i;
double x,pi, sum=0.0;
step=1.0/(double)num_steps;
#pragma omp parallel for reduction (+:sum) private (x)
for(i=1;i<=num_steps;i++)
{
x=(i-0.5)*step;
sum=sum+ 4.0/(1.0+x*x);
}
pi=... |
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... |
libimagequant.c | /*
** © 2009-2018 by Kornel Lesiński.
** © 1989, 1991 by Jef Poskanzer.
** © 1997, 2000, 2002 by Greg Roelofs; based on an idea by Stefan Schneider.
**
** See COPYRIGHT file for license.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.