source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
render.h | #ifndef RENDER_H
#define RENDER_H
#include <stdio.h>
#include <omp.h>
#include <algorithm>
#include <ctime>
#include "bitmap.h"
#include "model.h"
class Render;
class FrameBuffer
{
public:
uint32_t *fb_;
int w_, h_;
std::vector<float *> z_buffers; // hierarchical z_buffer
std::vector<int> z_buffer_w... |
DRACC_OMP_025_MxV_Partially_Missing_Enter_Data_yes.c | /*
Matrix Vector multiplication with partially Matrix missing on Accelerator. Using the target enter data construct.
*/
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#define C 512
int *a;
int *b;
int *c;
int init(){
for(int i=0; i<C; i++){
for(int j=0; j<C; j++){
b[j+i*C]=1;
... |
data.c | // SPDX-License-Identifier: BSD-2-Clause
/*
Copyright 1999-2016 Bernard Parent
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
condit... |
GB_unaryop__ainv_uint32_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... |
cpotrs.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/compute/zpotrs.c, normal z -> c, Fri Sep 28 17:38:02 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
matmult.c | /******************************************************************************
* OpenMp Example - Matrix Multiply - C Version
* Demonstrates a matrix multiply using OpenMP.
*
* Modified from here:
* https://computing.llnl.gov/tutorials/openMP/samples/C/omp_mm.c
*
* For PAPI_FP_INS, the exclusive coun... |
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-... |
trmv_x_dia_u_hi.c | #include "alphasparse/kernel.h"
#include "alphasparse/opt.h"
#include "alphasparse/util.h"
#include <string.h>
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t ONAME_omp(const ALPHA_Number alpha,
const ALPHA_SPMAT_DIA* A,
const ALPHA_Number* x,
const ALPHA_N... |
linear_master_slave_constraint.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Aditya Ghantasala
//
#if !defined(LINEAR_MASTER_... |
GB_concat_sparse.c | //------------------------------------------------------------------------------
// GB_concat_sparse: concatenate an array of matrices into a sparse matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
//... |
GB_unop__one_fp32_fp32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
mxnet_op.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 ... |
core_dtrssq.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_ztrssq.c, normal z -> d, Fri Sep 28 17:38:24 2018
*
**/
#include <plasma_core_blas.h>
#include "pla... |
parallel_iter.c | #include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<omp.h>
#include<math.h>
#include<string.h>
#define constant 6.28318530718
#define CLK CLOCK_MONOTONIC
struct timespec diff(struct timespec start, struct timespec end){
struct timespec temp;
if((end.tv_nsec-start.tv_nsec)<0){
temp.tv_sec = end.tv_sec-st... |
core_dsyrk_blasfeo.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @generated from core_blas/core_zsyrk.c, normal z -> d, Thu Aug 8 17:24:59 2019
*
**/
#include <plasma_core_blas.h>
#include "plasma_types.h"
#include "core_lapack.h"
#include "bl... |
GB_binop__eq_fc32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
quantized_conv2d.h | /* Copyright 2018 The Blueoil 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 agre... |
GB_unop__identity_uint32_uint8.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... |
GB_concat_sparse.c | //------------------------------------------------------------------------------
// GB_concat_sparse: concatenate an array of matrices into a sparse matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
//... |
GB_dense_subassign_25_template.c | //------------------------------------------------------------------------------
// GB_dense_subassign_25_template: C<M> = A where C is empty and A is dense
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
/... |
main.c | /**************************************************************
The program reads a BMP image file and creates a new
image that is the negative or desaturated of the input file.
**************************************************************/
// To compile: gcc -c qdbmp.c && gcc -c -fopenmp main.c && gcc -fopenmp ... |
dis-ok.c | #include <omp.h>
#include <stdio.h>
/*
for(i=4;i<100;i++){
S1: a[i] = b[i-2] + 1;
S2: c[i] = b[i-1] + f[i];
S3: b[i] = a[i-1] + 2;
S4: d[i] = d[i+1] + b[i-1];
}
*/
#define Iter 10000
int a[Iter],b[Iter],c[Iter],d[Iter],f[Iter];
int a1[Iter],b1[Iter],c1[Iter],d... |
nanopore_hdp.c | //
// nanopore_hdp.c
//
//
// Created by Jordan Eizenga on 1/8/16.
//
//
// in 0-based index
#define ALIGNMENT_KMER_COL 9
#define ALIGNMENT_STRAND_COL 4
#define ALIGNMENT_SIGNAL_COL 13
#define NUM_ALIGNMENT_COLS 15
#define MODEL_ROW_HEADER_LENGTH 0
#define MODEL_MEAN_ENTRY 0
#define MODEL_NOISE_ENTRY 1
#define MO... |
GB_binop__land_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... |
OMPIRBuilder.h | //===- IR/OpenMPIRBuilder.h - OpenMP encoding builder for LLVM IR - 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
//
//===---------------------------... |
main.c | // Copyright (c) 2017 ORPECOMP Project
// Fabian Schuiki <fschuiki@iis.ee.ethz.ch>
#include "oprecomp.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <omp.h>
int main(int argc, char **argv) {
// Parse the parameters that determine the benchmark's execution.
if (argc != 3) {
fprintf(stderr, ... |
GB_binop__max_int64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
AutoRelease.c | /**
* C Object System
* COS Autorelease pool
*
* Copyright 2006+ Laurent Deniau <laurent.deniau@gmail.com>
*
* 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.... |
GB_unop__identity_int32_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... |
nbody.c | #include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "timer.h"
#define SOFTENING 1e-9f
typedef struct { float x, y, z, vx, vy, vz; } Body;
void randomizeBodies(float *data, int n) {
for (int i = 0; i < n; i++) {
data[i] = 2.0f * (rand() / (float)RAND_MAX) - 1.0f;
}
}
void bodyForce(Body *p, flo... |
target_update.c | // --------------------------------------------------
// Check 'to'
// --------------------------------------------------
// RUN: %libomptarget-compile-generic \
// RUN: -fopenmp-version=51 -DCLAUSE=to
// RUN: %libomptarget-run-fail-generic 2>&1 \
// RUN: | %fcheck-generic
// ---------------------------------------... |
gsrb.omptask.c | //------------------------------------------------------------------------------------------------------------------------------
// Samuel Williams
// SWWilliams@lbl.gov
// Lawrence Berkeley National Lab
//------------------------------------------------------------------------------------------------------------------... |
starrynight-montecarlo-core.c | /* Starry Night - a Monte Carlo code to simulate ferroelectric domain formation
* and behaviour in hybrid perovskite solar cells.
*
* By Jarvist Moore Frost
* University of Bath
*
* File begun 16th January 2014
*/
// Prototypes...
static int rand_int(int SPAN);
static void gen_neighbour();
static double site_en... |
valid.mob7.src.h | #pragma once
#include "ukr.h"
#include "omp.h"
#include "transpose.h"
#include "gen_ukr_A6B2gemm_1_512_14_14_512_3_3.h"
#include "gen_ukr_A4B2gemm_1_512_14_14_512_3_3.h"
void testrun(float* A ,float*B, float*C, float*oriB ){
int tid = omp_get_thread_num();
int Nx = 14;
int Ny = 14;
int Nh = 3;
long long... |
kCDensestMem.c | /*
Info:
This program corresponds to the exact algorithm in the PVLDB 2020 paper.
Feel free to use these lines as you wish.
This program enumerates all k-cliques, store them in main memory, and apply
the "++" operator repeatedly to find the k-clique densest subgraph, until the
suspected k-clique densest sub... |
test_omp.c | #include <stdio.h>
#include <assert.h>
#define N 100
int A[N];
int B[N];
int main() {
for(int i=0; i<N; i++){
A[i] =0;
B[i] =i;
}
#pragma omp target map(A,B)
for(int i=0; i<N; i++){
A[i] = B[i];
}
for(int i=0; i<N; i++){
assert(A[i] == B[i]);
}
printf("PASSED\n");
r... |
remarks_parallel_in_multiple_target_state_machines.c | // RUN: %clang_cc1 -verify=host -Rpass=openmp -fopenmp -x c++ -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
// RUN: %clang_cc1 -verif... |
GB_unaryop__abs_uint8_int32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
9847.c | // this source is derived from CHILL AST originally from file '/uufs/chpc.utah.edu/common/home/u1142914/lib/ytopt_vinu/polybench/polybench-code/stencils/heat-3d/kernel.c' as parsed by frontend compiler rose
void kernel_heat_3d(int tsteps, int n, double A[200 + 0][200 + 0][200 + 0], double B[200 + 0][200 + 0][200 + 0])... |
common.h | #ifndef LIGHTGBM_UTILS_COMMON_FUN_H_
#define LIGHTGBM_UTILS_COMMON_FUN_H_
#include <LightGBM/utils/log.h>
#include <LightGBM/utils/openmp_wrapper.h>
#include <cstdio>
#include <string>
#include <vector>
#include <sstream>
#include <cstdint>
#include <algorithm>
#include <cmath>
#include <functional>
#include <memory>... |
Grid.h | #pragma once
#include "GridTypes.h"
#include "ScalarField.h"
#include "Vectors.h"
namespace pfc {
enum InterpolationType {
Interpolation_CIC, Interpolation_TSC,
Interpolation_SecondOrder, Interpolation_FourthOrder, Interpolation_PCS
};
template<typename Data, GridTypes gridType>
class Grid
{
public:
G... |
GB_unop__cos_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_unaryop__one_fp32_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... |
10 - MP+MPI.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <omp.h>
#include </usr/include/openmpi/mpi.h>
#define SIZE_GAU 8
#define SIZE_JVL 15
int JAVA_COUNT = SIZE_JVL;
int tag = 0;
/*
void gaules(void* g)
{
while(1)
{
//takeJavali(g);
sleep(1);
}
}
*/
void main(int argc, c... |
GB_binop__rdiv_fc64.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
rawMD5_fmt_plug.c | /*
* Raw-MD5 (thick) based on Raw-MD4 w/ mmx/sse/intrinsics
* This software is Copyright (c) 2011 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.
*
* OMP added May 2013, JimF
*/... |
blas_server_omp.c | /*********************************************************************/
/* Copyright 2009, 2010 The University of Texas at Austin. */
/* All rights reserved. */
/* */
/* Redistribution and use in sou... |
ast-dump-openmp-begin-declare-variant_decl_1.c | // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s -x c++| FileCheck %s
// expected-no-diagnostics
// FIXME: We have to improve the warnings here as nothing is impacted by the declare varian... |
pr96867.c | /* PR c++/96867 */
int *v;
void
foo (int x)
{
#pragma omp target update to (x, v[:]) /* { dg-error "for pointer type length expression must be specified" } */
}
|
LAGraph_Sort3.c | //------------------------------------------------------------------------------
// LAGraph_Sort3: sort a 3-by-n list of integers, using A[0:2][ ] as the key
//------------------------------------------------------------------------------
// LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
// SPDX-L... |
splibmp.c | /*
* Copyright (c) 2017 ltlollo
* Licensed under the MIT license <LICENSE-MIT or
* http://opensource.org/licenses/MIT>. This file may not be copied,
* modified, or distributed except according to those terms.
*/
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <err.h>
#inclu... |
parallel_macros.h | // ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2010, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and us... |
GB_unaryop__abs_int64_uint16.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
psicov21.c | /* PSICOV - Protein Sparse Inverse COVariance analysis program */
/* by David T. Jones August 2011 - Copyright (C) 2011 University College London */
/* This code is licensed under the terms of GNU General Public License v2 or later */
/* Version 2.1beta3 - Last Edit 27/4/14 */
#include <stdio.h>
#include <stdlib.h>... |
diffusion3d.mic.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <time.h>
#include <sys/time.h>
#include <omp.h>
#include <assert.h>
#define REAL float
#define NX (256)
#ifndef M_PI
#define M_PI (3.1415926535897932384626)
#endif
void init(REAL *buff, const int nx, const int ny, const int nz,
... |
3d7pt_var.c | /*
* Order-1, 3D 7 point stencil with variable coefficients
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#... |
axpby.c | #include "axpby.h"
DLL_EXPORT int saxpby(float * x, float * y, float * out, float a, float b, long size, int nThreads){
long i = 0;
int nThreads_initial;
threads_setup(nThreads, &nThreads_initial);
#pragma omp parallel
{
#pragma omp for
for (i=0; i < size; i++)
{
*(out + i ) = a * ( *(x + i... |
convolution_1x1_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 ... |
convolution_sgemm_int8.h | // BUG1989 is pleased to support the open source community by supporting ncnn available.
//
// Copyright (C) 2019 BUG1989. 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 of the License at
//
//... |
ccl_massfunc.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <gsl/gsl_integration.h>
#include <gsl/gsl_interp.h>
#include <gsl/gsl_spline.h>
#include <gsl/gsl_errno.h>
#include "ccl.h"
/*----- ROUTINE: dc_NakamuraSuto -----
INPUT: cosmology, scale factor
TASK: Computes the peak threshold: d... |
VerletClusterCells.h | /**
* @file VerletClusterCells.h
* @author jspahl
* @date 25.3.19
*/
#pragma once
#include <algorithm>
#include <cmath>
#include <cstdlib>
#include <vector>
#include "autopas/cells/FullParticleCell.h"
#include "autopas/containers/CellBasedParticleContainer.h"
#include "autopas/containers/CellBorderAndFlagManager... |
omp_sections.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
void funcA();
void funcB();
int main()
{
#pragma omp parallel
{
#pragma omp sections
{
#pragma omp section
(void) funcA();
#pragma omp section
(void) funcB();
} /*-- End of sections block --*/
} /*-- End of parallel regio... |
queue.h | // -*- C++ -*-
// Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either ve... |
IPCComm.h | /*! @brief Flag for checking if this header has already been included. */
#ifndef YGGIPCCOMM_H_
#define YGGIPCCOMM_H_
// OpenSimRoot has a conflicting definition for 'msg'
#ifdef USE_OSR_YGG
#undef IPCINSTALLED
#endif
#ifdef IPCINSTALLED
#include <fcntl.h> /* For O_* constants */
#include <sys/stat.h> ... |
cifradoHill.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
typedef struct text
{
int size;
char * restrict body;
}Text;
typedef struct node
{
int data;
struct node * restrict next;
struct node * restrict prev;
}Node;
typedef struct queue
{
int size;
Node * restrict bottom... |
O3Indirect2D.c | #include <mpi.h>
extern int *cn_c;
extern int *ce_c;
extern int *ec_c;
extern int *cn_crem;
extern int *ce_crem;
extern int *ec_crem;
extern int *neighbor_map;
extern int *cedge_map;
extern int *ecell_map;
extern int *neighbor_maprem;
extern int *cedge_maprem;
extern int *ecell_maprem;
extern GVAL **neighbor_2Dbuf;
ex... |
fixit.c | /******************************************************************************
* FILE: fixit.c
*
* This very simple program contains errors. Find them and fix.
*
******************************************************************************/
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define... |
openmp-ex06.c | #include <stdio.h>
#include <unistd.h>
#include <omp.h>
int main(void)
{
int num_threads, my_thread;
num_threads = omp_get_num_threads();
my_thread = omp_get_thread_num();
printf ("\"You're all individuals!\" said %d of %d.\n", my_thread, num_threads);
/* You can also declare private variable(s) that sha... |
DRB064-outeronly2-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... |
dynamic_smagorinsky_utilities.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
// System inc... |
fixed_version2.c | #include<math.h>
#include <stdio.h>
#include <stdlib.h>
int main(){
int sum = 0;
int DATA_MAG = 100;
int H[100];
int LUT[100];
int scale_factor = 10;
// Gets the number of OpenMP threads used
char *str_omp_threads = getenv("OMP_NUM_THREADS");
int omp_threads = atoi(str_omp_threads);
... |
if-clause.c | /*
* if-clause.c
*
* Created on: 28/04/2014
* Author: Carlos de la Torre
*/
#include <stdio.h>
#include <stdlib.h>
#ifdef _OPENMP
#include <omp.h>
#else
#define omp_get_thread_num() 0
#endif
int main(int argc, char **argv) {
int i, n = 20, tid;
int a[n], suma = 0, sumalocal;
if (argc < 2) {
fprintf(s... |
GB_unop__identity_fc32_uint32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Li... |
expected_output.c | #include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include <polybench.h>
#include "gemm.h"
/**
* This version is stamped on May 10, 2016
*
* Contact:
* Louis-Noel Pouchet <pouchet.ohio-state.edu>
* Tomofumi Yuki <tomofumi.yuki.fr>
*
* Web address: http://polybench.sourceforge.net
*/
/*gem... |
GB_AxB_flopcount.c | //------------------------------------------------------------------------------
// GB_AxB_flopcount: compute flops for C=A*B, C<M>=A*B, or C<!M>=A*B
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
3d25pt.c | /*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b)... |
muxers.c | /*****************************************************************************
* muxers.c: h264 file i/o plugins
*****************************************************************************
* Copyright (C) 2003-2008 x264 project
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Loren Merritt <lorenm@u.wa... |
flog.c | /*
Support for logging to file. Logging is made to a file called
matilda_YYMMDD_XXXXXX.log where YYMMDD is the date and XXXXXX is a random
string. When logging a mask of log categories specifies the types of messages to
be written to file. Having a very high degree of detail in very fast matches
actively hurts the perf... |
a.33.2.c | /* { dg-do compile } */
#include <stdio.h>
#include <stdlib.h>
float
read_next ()
{
float *tmp;
float return_val;
#pragma omp single copyprivate(tmp)
{
tmp = (float *) malloc (sizeof (float));
} /* copies the pointer only */
#pragma omp master
{
scanf ("%f", tmp);
}
#pragma omp barrier
return_... |
blas_dh.c | /******************************************************************************
* Copyright (c) 1998 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)
***************************************... |
matrixstrassen.h | /**
* @file matrixstrassen.h matrix strassen 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 provided tha... |
par_add_cycle.c | /*BHEADER**********************************************************************
* Copyright (c) 2017, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* Written by Ulrike Yang (yang11@llnl.gov) et al. CODE-LLNL-738-322.
* This file is part of AMG. See files READ... |
Sema.h | //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
GB_unaryop__identity_fp64_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... |
dcrtpoly.h | /**
* @file dcrtpoly.h Represents integer lattice elements with double-CRT
* @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 perm... |
sspr_fmt_plug.c | /*
* Format for cracking NetIQ SSPR hashes.
*
* This software is Copyright (c) 2017, Dhiru Kholia <dhiru [at] openwall.com>,
* and it is hereby released to the general public under the following terms:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted.
*
* Spe... |
GB_binop__pow_int16.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
kernel_cpu.c |
#ifdef __cplusplus
extern "C" {
#endif
//========================================================================================================================================================================================================200
// DEFINE/INCLUDE
//====================================================... |
avx512vnni_gemm.h | #pragma once
#include "intgemm_config.h"
#ifdef INTGEMM_COMPILER_SUPPORTS_AVX512VNNI
#include "avx512_gemm.h"
#include "types.h"
namespace intgemm {
// Workaround extra vmovdqa64 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94663
INTGEMM_AVX512VNNI static inline void VNNI8(__m512i &c, __m512i a, __m512i b) {
#if de... |
seidel.base.pluto.par.c | #include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <math.h>
double A[N][N+13];
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);
return... |
GB_unaryop__lnot_int64_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... |
PoissonSolverMixed.h | //
// Cubism3D
// Copyright (c) 2018 CSE-Lab, ETH Zurich, Switzerland.
// Distributed under the terms of the MIT license.
//
// Created by Guido Novati (novatig@ethz.ch).
//
#ifndef CubismUP_3D_PoissonSolverMixed_h
#define CubismUP_3D_PoissonSolverMixed_h
#include "PoissonSolver.h"
CubismUP_3D_NAMESPACE_BEGIN
c... |
ft_ao.c | /*
* Fourier transformed AO pair
* \int e^{-i Gv \cdot r} i(r) * j(r) dr^3
*
* eval_gz, b, gxyz, gs:
* - when eval_gz is GTO_Gv_uniform_orth
* > b (reciprocal vectors) is diagonal 3x3 matrix
* > Gv k-space grids = dot(b.T,gxyz)
* > gxyz[3,nGv] = (kx[:nGv], ky[:nGv], kz[:nGv])
* > gs[3]: The number ... |
core_zhessq.c | /**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> c
*
**/
#include "core_blas.h"
#include "plasma_types.h"
#include "core_lapack.h"
#include <math.h>
/****************************************************... |
activations.c | #include "activations.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <float.h>
char *get_activation_string(ACTIVATION a)
{
switch(a){
case LOGISTIC:
return "logistic";
case LOGGY:
return "loggy";
case RELU:
retur... |
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... |
3d25pt.c | /*
* Order-2, 3D 25 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tareq Malas
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#ifdef LIKWID_PERFMON
#include <likwid.h>
#endif
#include "print_utils.h"
#define TESTS 2
#define MAX(a,b) ((a) > (b) ? a : b)
#define MIN(a,b) ((a) < (b)... |
chat.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/epoll.h>
#include <fcntl.h>
#include <omp.h>
#include "myqueue.h"
#define IP "127.0.0.1"
#define PORT 3000
#define MAX_CLIENT 2
#defin... |
simple_particle_filter.h | // -*- mode: c++ -*-
/*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2015, JSK Lab
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the ... |
mandelcpu.c |
#include "mandelmain.h"
void mandelbrotCPU(struct RenderSettings rs) {
double x1 = rs.xoffset - 2.0 / rs.zoom * rs.width / rs.height;
double x2 = rs.xoffset + 2.0 / rs.zoom * rs.width / rs.height;
double y1 = rs.yoffset + 2.0 / rs.zoom;
double pixel_pitch = (x2 - x1) / rs.width;
#pragma omp paralle... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.