source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
GB_binop__bshift_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... |
begin_declare_variant_range_withouth_end.c | // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -x c -std=c99 -fms-extensions -Wno-pragma-pack %s
// TODO: Issue an eror message as the end is missing
// expected-no-diagnostics
#pragma omp be... |
A1_2.c | // gcc -std=c99 -Wall -lm -fopenmp -o go A1_2.c
#include <stdio.h>
#include <omp.h>
int main(int argc, char *argv[])
{
int count = 0;
// parallelize this chunk of code
#pragma omp parallel
{
// parallelize this for loop
#pragma omp for
for (int i = 0; i < 10; ++i)
{
... |
atomic.h | /* Atomic operations (v1)
* Portable Snippets - https://gitub.com/nemequ/portable-snippets
* Created by Evan Nemerson <evan@nemerson.com>
*
* To the extent possible under law, the authors have waived all
* copyright and related or neighboring rights to this code. For
* details, see the Creative Commons Zer... |
proc_bind.c | // RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES='{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0}' %libomp-run | %python %S/check.py -c 'CHECK' %s
// REQUIRES: affinity && !abt
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main(int argc, char** argv) {
omp_set_affinity_format(... |
parte2.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
#include <unistd.h>
static unsigned long num_steps;
double step;
int main (int argc, char **argv)
{
unsigned long int i, cores;
double x, pi, sum = 0.0;
cores = sysconf( _SC_NPROCESSORS_ONLN );
num_steps = atol(argv[1]);
step = 1.0/(double) num_steps;
om... |
GB_binop__isge_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-... |
truedeplinear-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... |
rose_foo.c | #if 1
#include "omp.h"
void foo1(double o1[],double c[],int len)
{
int i;
#pragma omp parallel for private (i) firstprivate (len)
for (i = 0; i <= len - 1; i += 1) {
double volnew_o8 = 0.5 * c[i];
o1[i] = volnew_o8;
}
}
#endif
#if 1
void goo(double *o1,double *o2,double *a,double *b,double *c,int **... |
DRB029-truedep1-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... |
OpenMPClause.h | //===- OpenMPClause.h - Classes for OpenMP clauses --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
cholesky.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <mpi.h>
#include <string.h>
#include <omp.h>
//param
/*#define RUN_SERIAL*/
#define RUN_PARALLEL
#define N 100
#define WEAK_SCALING
// if weak_scaling is defined, n = N * np * omp_get_num_threads()
//debug
/*#define DEBUG*/
/*#defin... |
MatrixMul.c | #include "../include/MatrixOp.h"
// reference implementation without any optimization;
struct Matrix * testMul(struct Matrix *mata, struct Matrix *matb) {
struct Matrix *resMat = NULL;
if(mata->n != matb->m) {
return resMat;
} else {
resMat = new_mat(mata->m, matb->n, 1);
}
for(int... |
part1.c |
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
int main (int argc, char *argv[])
{
int nthreads, tid, procs, maxt, inpar, dynamic, nested;
/* Start parallel region */
#pragma omp parallel private(nthreads, tid)
{
/* Obtain thread number */
tid = omp_get_thread_num();
/* Only master thread does th... |
wbb3_fmt_plug.c | /* WoltLab Burning Board 3 (WBB3) cracker patch for JtR. Hacked together during
* May 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... |
matrix_sum_omp.c | /* --- File matrix_sum_omp.c --- */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
int main(int argc, char **argv)
{
struct timespec ts_start, ts_end;
int size = 1e4;
int **a, *c;
int i, j;
float time_total;
/* Allocate memory */
c = malloc(size * sizeof(int));
a = (int **)malloc(si... |
pi_mc.c |
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
//#include "random.h"
int main (int argc, char** argv)
{
long Ncirc = 0;
double pi, x, y;
double rmax = RAND_MAX;
long num_trials = atoi(argv[1]);
// seed(-1, 1); // The circle and square are centered at the origin
double start = omp_get_w... |
ace.c | /**
* @file ace.c
* @brief ACE automatic color enhancement
* @author Pascal Getreuer <getreuer@gmail.com>
*
* Copyright (c) 2012, Pascal Getreuer
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under, at your option, the terms of the GNU General Public Licen... |
rf_classify_parallel.c | /* Generated by Cython 0.18 on Fri Aug 2 12:49:17 2013 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
#error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02040000
#error Cython requires Python 2.4+.
#else
#include <s... |
monte_pi_omp.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
int main (int argc, char *argv[])
{
unsigned long long int i, num_points, count;
double x, y, pi;
double t_start, t_end;
unsigned int seed;
num_points=300000000;
count=0;
t_start = omp_get_wtime();
#pragma omp parallel default(none) private(x,y,... |
transform.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unaryop__ainv_bool_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
MergeTreeTemplate.h | /// \ingroup base
/// \class ttk::MergeTree
/// \author Charles Gueunet <charles.gueunet@lip6.fr>
/// \date June 2016.
///
///\brief TTK processing package that efficiently computes the
/// sublevel set tree of scalar data and more
/// (data segmentation, topological simplification,
/// persistence diagrams, persistenc... |
ft_ao.c | /* Copyright 2014-2018 The PySCF Developers. 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 requi... |
GB_binop__gt_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-... |
exchange_boundary.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
relic_multi.h | /*
* RELIC is an Efficient LIbrary for Cryptography
* Copyright (c) 2020 RELIC Authors
*
* This file is part of RELIC. RELIC is legal property of its developers,
* whose names are not listed here. Please refer to the COPYRIGHT file
* for contact information.
*
* RELIC is free software; you can redistribute it a... |
KDTree.h | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
#ifndef _SPTAG_COMMON_KDTREE_H_
#define _SPTAG_COMMON_KDTREE_H_
#include <vector>
#include <string>
#include <shared_mutex>
#include "../VectorIndex.h"
#include "CommonUtils.h"
#include "QueryResultSet.h"
#include "WorkS... |
SpatialSubSampling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialSubSampling.c"
#else
static inline void THNN_(SpatialSubSampling_shapeCheck)(
THTensor *input,
THTensor *gradOutput,
THTensor *weight,
int kW, int kH) {
... |
graph_khop_sampler_op.h | /* Copyright (c) 2022 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 by applicable law or... |
GB_unop__sinh_fc64_fc64.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_AxB_colscale_meta.c | //------------------------------------------------------------------------------
// GB_AxB_colscale_meta: C=A*D where D is a square diagonal matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http://... |
lap.h | #include <cassert>
#include <cstdio>
#include <limits>
#include <memory>
#ifdef __GNUC__
#define always_inline __attribute__((always_inline)) inline
#define restrict __restrict__
#elif _WIN32
#define always_inline __forceinline
#define restrict __restrict
#else
#define always_inline inline
#define restrict
#endif
tem... |
GB_binop__lxor_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-... |
convolution_5x5.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 ... |
GB_unaryop__minv_int32_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
ex03.c | /* Copyright (c) 2019 CSC Training */
/* Copyright (c) 2021 ENCCS */
#include <stdio.h>
#ifdef _OPENMP
#include <omp.h>
#endif
int main()
{
int num_devices = omp_get_num_devices();
printf("Number of available devices %d\n", num_devices);
#pragma omp target
#pragma omp teams num_teams(2) thread_limit(3)
#... |
bml_multiply_ellpack_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_add.h"
#include "../bml_allocate.h"
#include "../bml_logger.h"
#include "../bml_multiply.h"
#include "../bml_parallel.h"
#include "../bml_types.h"
#include "bml_add_ellpack.h"
#include "bml_allocate_ellpack.h"
#include "bml_multiply_ellpack.h"
#include... |
mSortParaDebug.c | #include<stdlib.h>
#include<stdio.h>
#include<string.h>
#include "omp.h"
#define MAX_SIZE 10000//number of elements
// function to generate an array
void generate_list(int * x, int n) {
int i,j = MAX_SIZE;
for (i = 0; i < n; i++){
x[i] = j;
j--;
}
}
// merge function
void merge(i... |
GB_unaryop__minv_int32_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... |
pr27388-3.c | /* PR middle-end/27388 */
/* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-omplower" } */
extern void bar (int);
void
foo (void)
{
int i = 0, j = 0;
#pragma omp parallel firstprivate (i) private (j)
{
#pragma omp for
for (i = 0; i < 2; i++)
bar (i);
#pragma omp for
for (j = 0; j < 2; j+... |
GB_unop__identity_uint64_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... |
compare.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_emult_02.c | //------------------------------------------------------------------------------
// GB_emult_02: C = A.*B where A is sparse/hyper and B is bitmap/full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
GB_unaryop__abs_uint8_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... |
reproject.c | /**
* reproject.c
* Authors: Yizhao Gao <ygao29@illinois.edu>
* Date: {12/06/2017}
* Muqun Yang<myang6@hdfgroup.org> (adapted for python wrapper)
* Date: {05/21/2019}
*/
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <omp.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
/**
* str... |
nco_omp.c | /* $Header$ */
/* Purpose: OpenMP utilities */
/* Copyright (C) 1995--present Charlie Zender
This file is part of NCO, the netCDF Operators. NCO is free software.
You may redistribute and/or modify NCO under the terms of the
3-Clause BSD License with exceptions described in the LICENSE file */
#include "nc... |
call_snobal.c | /*
* call_snobal.c takes input from a Python function and calls all the necessary C functions
*/
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <omp.h>
#include "snobal.h"
#include "envphys.h"
#include "pysnobal.h"
int call_snobal (
int N,
int nthreads,
int first_step,
TSTEP_REC tstep[4]... |
GB_binop__div_int32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
producer_wfq.c | //
// Created by ax4 on 7/31/19.
//
#include <stdbool.h>
#include "producer_wfq.h"
#define Ad(wfq) wfq.aptr
#define Ap(wfq) wfq->aptr
void
producer_wfq_init
(
producer_wfq_t *wfq
)
{
atomic_store(&Ad(wfq->head), 0);
atomic_store(&Ad(wfq->tail), 0);
}
void
producer_wfq_ptr_set
(
producer_wfq_element_ptr_t *e... |
Naive.h | // Copyright 2015 Christina Teflioudi
//
// 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 ap... |
c_perfect.c | #include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <omp.h>
#define UNCHECKED 0
#define NON_PRIME 1
#define PRIME 2
#define RUNTIME 30
#define RANGE 10
#define NUM_THREADS 32
#define LIMIT 100000000L
unsigned long *primes;
unsigned long ready_limit;
unsigned long last_printed;
unsigned long prime_... |
ThreadsafetyTest.h | #ifndef DASH_DASH_TEST_THREADSAFETYTEST_H_
#define DASH_DASH_TEST_THREADSAFETYTEST_H_
#include "../TestBase.h"
#ifdef DASH_ENABLE_OPENMP
#include <omp.h>
#endif // DASH_ENABLE_OPENMP
/**
* Test fixture for onesided operations provided by DART.
*/
class ThreadsafetyTest : public dash::test::TestBase {
protected:
... |
nestedfn-4.c | /* PR middle-end/25261 */
/* { dg-do run } */
#include <omp.h>
extern void abort (void);
int
main (void)
{
int i = 5, j, l = 0;
int foo (void)
{
return i == 6;
}
int bar (void)
{
return i - 3;
}
omp_set_dynamic (0);
#pragma omp parallel if (foo ()) num_threads (2)
if (omp_get_num_threads ... |
GB_compiler.h | //------------------------------------------------------------------------------
// GB_compiler.h: handle compiler variations
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-License-Identifier: Apac... |
DRB054-inneronly2-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... |
GB_unaryop__identity_int32_int8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
flexGradientOperator.h | #ifndef flexGradientOperator_H
#define flexGradientOperator_H
#include <vector>
#include "flexLinearOperator.h"
#ifdef __CUDACC__
template<typename T>
__global__ void dxp2dCUDA(T* output, const T* input, const size_t sizeX, const size_t sizeY, mySign s)
{
const size_t x = threadIdx.x + blockIdx.x * blockDim.x;
cons... |
os_cpu.c | int cpu_pid(void);
int cpu_cores(void);
double cpu_usage(void);
#ifdef CPU_DEMO
#pragma once
#ifdef _WIN32
#include <windows.h>
static ULONGLONG cpu_diff_time_(const FILETIME one, const FILETIME two) {
LARGE_INTEGER a, b;
a.LowPart = one.dwLowDateTime;
a.HighPart = one.dwHighDateTime;
b.LowPart... |
GB_binop__first_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
softmax-inl.h | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
Lyra2.c | /**
* Implementation of the Lyra2 Password Hashing Scheme (PHS). SSE-oriented implementation.
*
* Author: The Lyra PHC team (http://www.lyra2.net/) -- 2015.
*
* This software is hereby placed in the public domain.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING,... |
convolution_sgemm_pack1to4_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 ... |
threshold.c | /* Copyright 2014. The Regents of the University of California.
* Copyright 2015-2017. Martin Uecker.
* All rights reserved. Use of this source code is governed by
* a BSD-style license which can be found in the LICENSE file.
*
* Authors:
* 2013-2017 Martin Uecker <martin.uecker@med.uni-goettingen.de>
* 2015-20... |
gs_csr_executor.h |
void gs_csr_executor(int n, int *rowptr, int *colidx,int *idiag, double *values, double *y, const double *b,
int levels, int *levelPtr, int *levelSet, int chunk){
for (int l = 0; l < levels; ++l) {
int li=0;
#pragma omp parallel for default(shared) private(li) schedule(auto)
for ( li = levelPtr... |
assign_scalar_variable_to_entities_process.h | //
// | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Josep Maria Carbonell
// Vic... |
GB_unaryop__ainv_uint32_int64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
top_k_op.h | /* Copyright (c) 2016 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 by applicable law or... |
for-23.c | /* { dg-do compile } */
/* { dg-options "-fopenmp -fdump-tree-ompexp" } */
extern void bar(unsigned long long);
void foo (unsigned long long n)
{
unsigned long long i;
#pragma omp for schedule (nonmonotonic : dynamic)
for (i = 0; i < n; ++i)
bar(i);
}
/* { dg-final { scan-tree-dump-times "GOMP_loop_ull_no... |
sstruct_matrix.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... |
test.c |
#include <stdio.h>
#include <omp.h>
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define TRIALS (1)
#define N (1024*3)
#define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i+1;})
#define ZERO(X) ZERO_ARRAY(N, X)
#define DUMP_SUCCESS9() { \
DUMP_SUCCESS(gpu_threads-max_threads); \
... |
c-tree.h | /* Definitions for C parsing and type checking.
Copyright (C) 1987, 1993, 1994, 1995, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
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 Gener... |
lcs.c | /*
Tempo Sequencial:
Length of Longest Common Substring is 14
real 0m3,049s
user 0m2,584s
sys 0m0,459s
Length of Longest Common Substring is 14
real 0m3,047s
user 0m2,704s
sys 0m0,336s
Length of Longest Common Substring is 14
real 0m3,046s
user 0m2,618s
sys 0m0,423s
Length of Longest Common Substring is 14
real... |
dpado.202001130915.no_batch_id.h | //
// Created by Zhen Peng on 1/6/20.
//
#ifndef PADO_DPADO_H
#define PADO_DPADO_H
#include <vector>
//#include <unordered_map>
#include <map>
#include <algorithm>
#include <iostream>
#include <limits.h>
//#include <xmmintrin.h>
#include <immintrin.h>
#include <bitset>
#include <math.h>
#include <fstream>
#include <o... |
deconvolution_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 copy ... |
triplet_iw.c | /* Copyright (C) 2016 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... |
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
//
//===---------------------------... |
mt-dgemm.c | /*
* Copyright (c) 2017, Cray Inc. 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 and ... |
cache.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
tree-vect-loop.c | /* Loop Vectorization
Copyright (C) 2003-2020 Free Software Foundation, Inc.
Contributed by Dorit Naishlos <dorit@il.ibm.com> and
Ira Rosen <irar@il.ibm.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... |
3d25pt_var.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 25 point stencil with axis-symmetric ariable coefficients
* Adapted fr... |
threshold.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GxB_stats.c | //------------------------------------------------------------------------------
// GxB_stats: return memory usage and other statistics
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2018, All Rights Reserved.
// http://suitesparse.... |
dataset.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_DATASET_H_
#define LIGHTGBM_DATASET_H_
#include <LightGBM/config.h>
#include <LightGBM/feature_group.h>
#include <LightGBM/meta.h>
... |
diagmm_x_sky_n_row.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "alphasparse/opt.h"
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_SKY *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ldy)
{
ALPHA_INT... |
sample_nested.c | /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
/*
* See LICENSE.txt in top-level directory.
*/
#include <omp.h>
#include <stdio.h>
#include <sys/time.h>
#include <stdlib.h>
int main(int argc, char * argv[]) {
int size=(argc>1)?atoi(argv[1]):100;
int i,j,k=0;
int nthreads;
struct... |
subCycleHex3D.c | /*
The MIT License (MIT)
Copyright (c) 2017 Tim Warburton, Noel Chalmers, Jesse Chan, Ali Karakus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation t... |
pngquant.c | /* pngquant.c - quantize the colors in an alphamap down to a specified number
**
** © 2009-2019 by Kornel Lesiński.
** © 1989, 1991 by Jef Poskanzer.
** © 1997-2002 by Greg Roelofs; based on an idea by Stefan Schneider.
**
** See COPYRIGHT file for license.
*/
#define PNGQUANT_VERSION LIQ_VERSION_STRING " (January 201... |
coarsen.c | /*
Program to combine particles in a gadget-file.
Number of particles combined is dependent on the distance from a given center
icc -lm -openmp -o coarsen coarsen.c libgad.o
icc -lm -lgad-altix-nopot -openmp -o ../bin/altix/coarsen coarsen.c -DNOPOT
gcc -fopenmp -lm -lgad coarsen.c -o ~/bin/coarsen
*/
#include <st... |
GB_unaryop__lnot_int32_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... |
axpy4.orio.c | #include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <omp.h>
double getClock()
{
struct timezone tzp;
struct timeval tp;
gettimeofday (&tp, &tzp);
return (tp.tv_sec + tp.tv_usec*1.0e-6);
}
int main(int argc, char *argv[])
{
double *y;
double *x1;
double *x2;
double *x3... |
ocp_nlp_sqp.c | /*
* Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
* Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
* Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
* Jonas Koenemann, Yutao Chen, Tobias Schöls, Jonas Schlagenhauf, Moritz Diehl
*
* This file is part o... |
GB_unop__ainv_int16_int16.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
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... |
matrix_base.h | #pragma once
#include "adabs/tools/ptr_divider.h"
namespace adabs {
namespace distributed {
class matrix_base {
int delete_flag;
int use_flag;
int reuse_all_remote_counter;
public:
virtual bool remove(const bool local)=0;
void set_use_flag_start () {
__sync_lock_test_and_set (&use_flag, 0);
}
... |
stacks.c | // -*-Mode: C++;-*- // technically C99
// * BeginRiceCopyright *****************************************************
//
// $HeadURL$
// $Id$
//
// --------------------------------------------------------------------------
// Part of HPCToolkit (hpctoolkit.org)
//
// Information about sources of support for research an... |
omp_taskloop_grainsize.c | // RUN: %libomp-compile-and-run
// RUN: %libomp-compile && env KMP_TASKLOOP_MIN_TASKS=1 %libomp-run
/*
* Test for taskloop
* Method: caculate how many times the iteration space is dispatched
* and judge if each dispatch has the requested grainsize
* It is possible for two adjacent chunks are executed by the sam... |
jacobi-collapse.c | // test the collapse clause
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#endif
// Add timing support
#include <sys/time.h>
double time_stamp()
{
struct timeval t;
double time;
gettimeofday(&t,(struct timezone*)NULL);
time = t.tv_sec + 1.0e-6*t.t... |
map_to_from_prob.c | #include <stdio.h>
#include <omp.h>
int main(void) {
double vectors[120];
double blocks[120];
double * vector_base = &vectors[0];
double * __restrict__ vector_grid = vector_base;
#pragma omp target map(to:blocks[0:120], vector_base[0:120]) //map(from:vector_grid[50:20])
#pragma omp teams distribute
for (int i = 0 ... |
convolution_sgemm_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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.