source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
spikefit.c | /* C library for spike fitting, a re-implementation of Matlab fitting.
See spikefit.mw for any missing documentation, and MEX calling setup.
Barnett 2/12/15 start.
*/
#include "spikefit.h"
//----------------------------------------------------------------------------
void spikemod(double* W, int M, int T, int K... |
quantize.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
LAGraph_ConnectedComponents.c | //------------------------------------------------------------------------------
// LAGraph_ConnectedComponents: connected components
//------------------------------------------------------------------------------
// LAGraph, (c) 2021 by The LAGraph Contributors, All Rights Reserved.
// SPDX-License-Identifier: BSD-2... |
ompt.h | /*
* include/45/ompt.h.var
*/
#ifndef __OMPT__
#define __OMPT__
/*****************************************************************************
* system include files
*****************************************************************************/
#include <stdint.h>
/********************************************... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
hermv_c_bsr_n_lo_trans.c | #include<string.h>
#ifdef _OPENMP
#include<omp.h>
#endif
#include"alphasparse/opt.h"
#include "alphasparse/kernel.h"
#include "alphasparse/util.h"
alphasparse_status_t
ONAME(const ALPHA_Number alpha,
const ALPHA_SPMAT_BSR *A,
const ALPHA_Number *x,
const ALPHA_Numb... |
ast-dump-openmp-teams-distribute-simd.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 target
#pragma omp teams distribute simd
for (int i = 0; i < x; i++)
;
}
void test_two(int x, int y) {
#pragma omp target
#prag... |
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)
#... |
parallel_block.c | #include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <time.h>
#define T 1000
#define NULL 0
long Kol_block_v_stroke,Kol_block_v_stolbce;
char *String1,*String2;
long M,N;
typedef struct
{
int BLOCKI;
int BLOCKJ;
int maxi;
int maxj;
struct MaxElement* next;
}MaxElement,*PMaxElement;
typedef struct
... |
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... |
ttables.h | // Copyright 2013 by Chris Dyer
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to i... |
demos.h | //------------------------------------------------------------------------------
// GraphBLAS/Demo/Include/demos.h: include file for all demo programs
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2018, All Rights Reserved.
// http... |
nndes.h | /*
Copyright (C) 2010,2011 Wei Dong <wdong.pku@gmail.com>. All Rights Reserved.
DISTRIBUTION OF THIS PROGRAM IN EITHER BINARY OR SOURCE CODE FORM MUST BE
PERMITTED BY THE AUTHOR.
*/
#ifndef WDONG_NNDESCENT
#define WDONG_NNDESCENT
#include "nndes-common.h"
namespace nndes {
using std::cerr;
usi... |
index.h | #ifndef GBWTGRAPH_CONSTRUCTION_H
#define GBWTGRAPH_CONSTRUCTION_H
#include <cstdlib>
#include <functional>
#include <omp.h>
#include <gbwtgraph/gbwtgraph.h>
#include <gbwtgraph/minimizer.h>
/*
index.h: Minimizer index construction from GBWTGraph.
*/
namespace gbwtgraph
{
//--------------------------------------... |
GB_unaryop__minv_uint32_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... |
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 ... |
sections.c | #include <stdio.h>
#include <unistd.h>
#include <omp.h>
#define N 20
int main() {
int tid;
omp_set_num_threads(4);
#pragma omp parallel private(tid)
{
tid = omp_get_thread_num();
printf("Hello %d\n", tid);
#pragma omp sections
{
#pragma omp section
{
printf("SeΓ§Γ£o 1 - thread %d\n", tid);
sl... |
7942.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])... |
homomorphic_comparison_modified.c | struct plaintext_keyword
{
int bits[TABLE_CONTENT_SIZE][1024];
};
struct plaintext_keyword init_keyword(struct plaintext_keyword ptext)
{
int i, j;
for(j=0; j<TABLE_CONTENT_SIZE; j++)
for(i=0; i<1024; i++)
ptext.bits[j][i]=0;
return(ptext);
}
struct plaintext
{
int bits[TABLE_CONTENT_SIZE][1024];
};
struct... |
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... |
semantics.c | /* Perform the semantic phase of parsing, i.e., the process of
building tree structure, checking semantic consistency, and
building RTL. These routines are used both during actual parsing
and during the instantiation of template functions.
Copyright (C) 1998-2018 Free Software Foundation, Inc.
Written ... |
linear_master_slave_constraint.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Aditya Ghantasala
//
#if !defined(LINEAR_MASTER_... |
talesf.c | /*
Copyright (c) 2011-2012, Daniel S. Standage <daniel.standage@gmail.com> and
Erin Doyle <edoyle@iastate.edu> with modifications by Nick Booher <njbooher@gmail.com>.
See README for license details.
*/
// System libraries
#include <getopt.h>
#include <math.h>
#include <omp.h>
#include <stdio.h>
#include <zlib.h>
#in... |
nr_numint.c | /* Copyright 2014-2020 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 required ... |
mdatom.c | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team,
* check out http://www.gromacs.org for more information.
* Copyright (c) 2012,2013, by the GROMACS development team, l... |
queue.h | // -*- C++ -*-
// Copyright (C) 2007-2020 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software
// Foundation; either version 3... |
Searching.202002250815.buckets_equal_width.h | //
// Created by Zhen Peng on 02/25/2020.
//
#ifndef BATCH_SEARCHING_SEARCHING_H
#define BATCH_SEARCHING_SEARCHING_H
#include <vector>
#include <boost/dynamic_bitset.hpp>
#include <iostream>
#include <fstream>
#include <unordered_map>
#include <immintrin.h>
#include <cstring>
#include <unordered_set>
#include <set>
#... |
LAGraph_matrix_extract_keep_dimensions.c | //------------------------------------------------------------------------------
// LAGraph_matrix_extract_keep_dimensions: extract submatrix but keep the
// dimensions of the original matrix
// ------------------------------------------------------------------------------
/*
LAGraph: graph algorithms based on Gr... |
GB_binop__bshift_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... |
openssl_enc_fmt_plug.c | /* OpenSSL "enc" cracker for JtR.
*
* This software is Copyright (c) 2013, Dhiru Kholia <dhiru at openwall.com>
*
* $ openssl enc -aes-256-cbc -p -e -a -salt -in hello.txt -out hello.txt.enc
* enter aes-256-cbc encryption password:
* Verifying - enter aes-256-cbc encryption password:
* salt=305CEDC2A0521011
* k... |
pvector.h | // Copyright (c) 2015, The Regents of the University of California (Regents)
// See LICENSE.txt for license details
#ifndef PVECTOR_H_
#define PVECTOR_H_
#include <algorithm>
#include <cstdlib>
/*
GAP Benchmark Suite
Class: pvector
Author: Scott Beamer
Vector class with ability to not initialize or do initialize ... |
GB_binop__isgt_int32.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
GB_unop__trunc_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... |
serial_tree_learner.h | #ifndef LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#define LIGHTGBM_TREELEARNER_SERIAL_TREE_LEARNER_H_
#include <LightGBM/tree_learner.h>
#include <LightGBM/utils/random.h>
#include <LightGBM/utils/array_args.h>
#include <LightGBM/dataset.h>
#include <LightGBM/tree.h>
#include <LightGBM/feature_histogram.h>
#includ... |
GB_unop__identity_int32_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... |
bml_export_ellsort_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_allocate.h"
#include "../bml_logger.h"
#include "../bml_types.h"
#include "bml_allocate_ellsort.h"
#include "bml_export_ellsort.h"
#include "bml_types_ellsort.h"
#include <complex.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#ifdef _O... |
app_baseline.c | /**
* @file app.c
* @brief Template for a Host Application Source File.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <getopt.h>
#include <assert.h>
#include <stdint.h>
#include <omp.h>
#include "../../support/timer.h"
static int32_t *A;
static int32... |
GB_unaryop__ainv_bool_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... |
Square.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/Square.c"
#else
void THNN_(Square_updateOutput)(
THNNState *state,
THTensor *input,
THTensor *output)
{
THTensor_(resizeAs)(output, input);
if (input->nDimension == 1 || !THTensor_(isContiguous)(input) || !THTensor_(isContigu... |
evaluation.c | #include "common.h"
static void clear_buffers(uint64_t* restrict A, uint64_t* restrict B, const int s)
{
#ifdef _OPENMP
#pragma omp parallel for
#endif
for(int i=0;i<s;i++)
A[i] = B[i] = 0;
}
#ifdef _OPENMP
static int top_down_step(const int level, const int nodes, const int num_frontier, const int max_degree,
... |
sptensor.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "sptensor.h"
#include "matrix.h"
#include "sort.h"
#include "io.h"
#include "timer.h"
#include <math.h>
/*****************************... |
sstruct_vector.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... |
sevnlog.h | //
// Created by Giuliano on 29/11/19.
// Header to store logging functions and definitions (mostly for debug)
//
#ifndef SEVN_SEVNLOG_H
#define SEVN_SEVNLOG_H
#include <string>
#include <sstream>
#include <omp.h>
#include <iostream>
#include "errhand.h"
//TODO Remove this and correctly use SevnLogging
//GI291119: ... |
sort.c |
/******************************************************************************
* INCLUDES
*****************************************************************************/
#include "sort.h"
#include "timer.h"
#include "io.h"
#include "thd_info.h"
/********************************************************************... |
iochain.c | /*
* IOchain - Distribute a chain of dependant IO events amoung threads.
*
* This file is part of Bitshuffle
* Author: Kiyoshi Masui <kiyo@physics.ubc.ca>
* Website: http://www.github.com/kiyo-masui/bitshuffle
* Created: 2014
*
* See LICENSE file for details about copyright and rights to use.
*
*/
#include "... |
trsm_x_bsr_u_hi_row.c | #include "alphasparse/opt.h"
#include "alphasparse/kernel.h"
#include "alphasparse/util.h"
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_BSR *A, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, ALPHA_Number *y, const ALPHA_INT ldy)
{
const ALPHA_INT num_thread = alpha_g... |
omp_ex_19.c | #include <stdio.h>
#include <stdlib.h>
#include <omp.h>
/*
MIT License
Copyright (c) 2019 NOUREDDINE DAGHBOUDJ
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 witho... |
nested_thread_num.c | // RUN: %libomp-compile-and-run | FileCheck %s
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck --check-prefix=THREADS %s
// REQUIRES: ompt
// UNSUPPORTE: gcc-4, gcc-5, gcc-6, gcc-7
#define TEST_NEED_PRINT_FRAME_FROM_OUTLINED_FN
#include "callback.h"
#include <omp.h>
#include <unistd.h>
int main() {
int c... |
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) ... |
layerramdistancetransform.h | /*********************************************************************************
*
* Inviwo - Interactive Visualization Workshop
*
* Copyright (c) 2017 Inviwo Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that th... |
images_mormalize.h | #ifndef _IMAGES_NORMALIZE_H
#define _IMAGES_NORMALIZE_H
namespace cpp_torch
{
namespace test
{
// mean 0 and variance 1
/*
* @param image [in/out] image data
* @param image [out] image data mean
* @param stddiv [out] image data variance
*/
void images_normalize(tiny_dnn::vec_t& image, float& mean,... |
omp_num_teams_SPMD.c | #include <stdio.h>
#include <omp.h>
int main()
{
int N = 1024;
int NN = N*N;
int Res[NN];
for (int i=0; i < NN; i++) Res[i] = -1;
#pragma omp target teams thread_limit(1024) num_teams(N)
#pragma omp distribute parallel for
for (int j=0; j < NN; j++) {
if (j==12) printf("teams %d threads %d\n",omp_ge... |
re_model_template.h | /*!
* This file is part of GPBoost a C++ library for combining
* boosting with Gaussian process and mixed effects models
*
* Copyright (c) 2020 Fabio Sigrist. All rights reserved.
*
* Licensed under the Apache License Version 2.0. See LICENSE file in the project root for license information.
*/
#ifndef GPB_RE_MODEL_TEM... |
dynamic.c | #include <stdio.h>
#include <omp.h>
int main()
{
omp_set_dynamic(9);
omp_set_num_threads(4);
printf("%d\n", omp_get_dynamic( ));
#pragma omp parallel
#pragma omp master
{
printf("%d\n", omp_get_dynamic( ));
}
}
|
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... |
O2VertIntegration.c | #include <mpi.h>
#include "grid.h"
extern struct {
char *name;
int loc;
int dim;
union {
GVAL *restrict * restrict p2;
GVAL *restrict * restrict * restrict p3;
} data_pointer;
} *gv_temp;
extern struct {
char *name;
int loc;
int dim;
union {
GVAL *restrict * ... |
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
*/... |
zpbtrf.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 ... |
geometric_transform.c | #include <stdlib.h>
#include <string.h>
#include "private/core_private.h"
#include "private/imcore_private.h"
#include "private/lacore_private.h"
return_t imcrop(matrix_t *in, struct rectangle_t crop_region, matrix_t *out)
{
int cond1 = is_image(in) & is_image(out);
check_condition(cond1, ERROR_NOT_IMAGE, "in... |
omp_cgemm_batch.c | /**
* @file omp_cgemm_batch.c
*
* @brief BBLAS gemm_batch float _Complex routine.
*
* BBLAS is a software package provided by Univ. of Manchester,
* Univ. of Tennessee.
*
* @version 1.0.0
* @author Samuel D. Relton
* @author Pedro V. Lara
* @author Mawussi Zounon
* @date 2016-02-20
*
**/
#ifnd... |
Example_nested_loop.1.c | /*
* @@name: nested_loop.1c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
*/
void work(int i, int j) {}
void good_nesting(int n)
{
int i, j;
#pragma omp parallel default(shared)
{
#pragma omp for
for (i=0; i<n; i++) {
#pragma omp parallel shared(i, n)
{
#pragma ... |
GB_kroner.c | //------------------------------------------------------------------------------
// GB_kroner: Kronecker product, C = kron (A,B)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http://suitesparse.com S... |
GB_binop__max_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-... |
par_lr_interp.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... |
GB_bitmap_AxB_saxpy_A_sparse_B_bitmap_template.c | //------------------------------------------------------------------------------
// GB_bitmap_AxB_saxpy_A_sparse_B_bitmap: C<#M>+=A*B, C bitmap, M any format
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
... |
Cycle.c | /*
* The MIT License
*
* Copyright 2020 The OpenNARS authors.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use,... |
softmax_ref.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
tree-pretty-print.c | /* Pretty formatting of GENERIC trees in C syntax.
Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
Adapted from c-pretty-print.c by Diego Novillo <dnovillo@redhat.com>
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of ... |
GB_unaryop__minv_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... |
lighting.c | #include "image.h"
#include <stdlib.h>
#include <assert.h>
#include <memory.h>
#include <kazmath/vec3.h>
static float _occlusion_scale = 1.0f;
void heman_lighting_set_occlusion_scale(float s)
{
_occlusion_scale = s;
}
heman_image* heman_lighting_compute_normals(heman_image* heightmap)
{
assert(heightmap->nba... |
relu_kernel_arm.c | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
GB_binop__bget_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:... |
colormap.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
residualbased_predictorcorrector_velocity_bdf_scheme_turbulent.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Jordi Cotela
//
#if !defined(KRATOS_RESIDUALBASE... |
mandelbrot.c | /*
To compile:
gcc -O3 -o mandelbrot mandelbrot.c -lm
To create an image with 4096 x 4096 pixels (last argument will be used to set number of threads):
./mandelbrot 4096 4096 1
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <omp.h>
int writeMandelbrot(const char *f... |
6558.c | /* POLYBENCH/GPU-OPENMP
*
* This file is a part of the Polybench/GPU-OpenMP suite
*
* Contact:
* William Killian <killian@udel.edu>
*
* Copyright 2013, The University of Delaware
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
/* Include polybench common header. */
#include <po... |
selection_move_generator.h | /*****************************************************************************/
// Copyright (c) 2020-2021 Yuji KOGUMA
// Released under the MIT license
// https://opensource.org/licenses/mit-license.php
/*****************************************************************************/
#ifndef PRINTEMPS_NEIGHBORHOOD_SELEC... |
rvsTimeCpmlFor2dAw_openmp_mex.c | /* ======================================================================
*
* rvsTimeCpmlFor2dAw_mex.c
*
* Simulates 2-d acoustic wave reverse propagation using finite difference
* in time domain with partial differential equation (PDE)
*
* This C source file is free for use in academic research.
* All rights r... |
SegmentationUtil.h | /**
* spaint: SegmentationUtil.h
* Copyright (c) Torr Vision Group, University of Oxford, 2016. All rights reserved.
*/
#ifndef H_SPAINT_SEGMENTATIONUTIL
#define H_SPAINT_SEGMENTATIONUTIL
#include <boost/mpl/identity.hpp>
#include <itmx/base/ITMImagePtrTypes.h>
namespace spaint {
/**
* \brief This class provid... |
GB_unop__identity_bool_bool.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_binop__min_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-... |
polybench.c | /**
* 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
*/
/* polybench.c: this file is part of PolyBench/C */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#in... |
4419.c | /* POLYBENCH/GPU-OPENMP
*
* This file is a part of the Polybench/GPU-OpenMP suite
*
* Contact:
* William Killian <killian@udel.edu>
*
* Copyright 2013, The University of Delaware
*/
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
/* Include polybench common header. */
#include <po... |
nr_incore.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... |
01_array_sum.c |
/* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ *
β β
β This file is part of the exercises for the Lectures on β
β "Foundations of High Performance Computing" β... |
miner.c | //VF CASH - Standalone Miner - August 2019
//James William Fletcher
#include <omp.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include "ecc.h"
#include "base58.h"
uint8_t rpriv[ECC_BYTES];
uint8_t rpub[ECC_BYTES+1];
int autoclaim = 0;
float approx_sqrt(float n)
... |
GB_unaryop__identity_uint64_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
cpu_code.c | #include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <omp.h>
void advect_flow_fields_c(double*, double*, double*, double*, double*, double* , double*, double*,double*, double*, double, double,int, int, int, int, int, int, int);
void advect_u_flow_field_c(double*, double*, double*, double* , double*, d... |
master.c | /*
$ gcc -fopenmp -O2 src/master.c -o bin/master
master lo ejecuta solo la hebra 0
diferencias entre single y master:
- single se parece a master, pero en single es la primera que llegue y la master la ejecuta la hebra 0
- master no tiene barrera, single si
$ export OMP_NUM_THREADS=3
$ ./bin/master 6
thread ... |
Parallelizer.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2010 Gael Guennebaud <gael.guennebaud@inria.fr>
//
// Eigen 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 Fr... |
1.c | #include <stdio.h>
int main()
{
#pragma omp parallel
{
printf(" Hello ");
}
printf("\n\n GoodBye β Team Destroyed β Exiting Program \n\n");
}
|
distort.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
test6.c | void foo () {
0;
l1:
#pragma omp barrier
1;
}
int main() {
#pragma omp parallel
{
2;
if (3) {
4;
foo ();
5;
} else {
6;
l2:
#pragma omp barrier
7;
}
if (8) {
9;
foo();
10;
} else {
11;
l3:
#pragma omp barrier
12;
}
13;
}
}
|
GB_binop__bxnor_uint16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
LU_omp.c | /**********************************************************************
Modify the code-Add OpenMP directives to parallelize the LU kernel
***********************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <omp.h>
#include "utils.h"
int ma... |
Clustering.h | //
// Copyright (C) 2015-2020 Yahoo Japan Corporation
//
// 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 applicab... |
Stmt.h | //===- Stmt.h - Classes for representing statements -------------*- 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
//
//===---------------------------... |
fwk_system.h | // system framework utils
// - rlyeh, public domain.
//
// Note: Windows users add `/Zi` compilation flags, else add `-g` and/or `-ldl` flags
// Note: If you are linking your binary using GNU ld you need to add --export-dynamic
#ifndef SYSTEM_H
#define SYSTEM_H
int os_argc();
char* os_argv(int);
const ... |
myMultiFactorial.c | #include <omp.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char *argv[]) { /* sequential code */
int i, N=7,ans, numThreads = omp_get_max_threads();
int ress[numThreads]; //Array to store pre answers (before joining)...
//Initialize the array to 1s
for(i = 0; i < numThreads; i++){
ress[i] = 1;
}
... |
timer.h | #pragma once
#include <iostream>
#include <chrono>
#include <time.h>
#include <sys/time.h>
#include "config.h"
#include "utils.h"
using namespace std;
using namespace std::chrono;
/* ----------------------------- timer resource ------------------------------------ */
#define SEC_PER_DAY 86400
#define SEC_PER_HOU... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.