source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
matrix_multiply_omp.c | /* --- File matrix_multiply_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 **)mall... |
GB_unop__sqrt_fc32_fc32.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
ZQ_CNN_MTCNN.h | #ifndef _ZQ_CNN_MTCNN_H_
#define _ZQ_CNN_MTCNN_H_
#pragma once
#include "ZQ_CNN_Net.h"
#include "ZQ_CNN_BBoxUtils.h"
#include <omp.h>
namespace ZQ
{
class ZQ_CNN_MTCNN
{
public:
using string = std::string;
ZQ_CNN_MTCNN()
{
min_size = 60;
thresh[0] = 0.6;
thresh[1] = 0.7;
thresh[2] = 0.7;
nms_thr... |
GB_unaryop__ainv_fp64_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... |
bml_transpose_ellsort_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_allocate.h"
#include "../bml_parallel.h"
#include "../bml_transpose.h"
#include "../bml_types.h"
#include "bml_allocate_ellsort.h"
#include "bml_transpose_ellsort.h"
#include "bml_types_ellsort.h"
#include <complex.h>
#include <math.h>
#include <stdli... |
GB_unop__identity_uint32_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... |
CorotateFEMConstraint.h | #ifndef __COROTATE_FEM_CONSTRAINT_H__
#define __COROTATE_FEM_CONSTRAINT_H__
#include "Constraint.h"
#include "Tensor.h"
#include <Eigen/Core>
#include <Eigen/Sparse>
#include <Eigen/Geometry>
#include <Eigen/SVD>
#include <Eigen/Eigenvalues>
#include <iostream>
namespace FEM
{
template <typename TinyScalar, typename T... |
mlp_mnist.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
alignment.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include <libgen.h>
int readseqs(int first_seq, char *filename);
int ktup, window, signif;
int prot_ktup, prot_window, prot_signif;
int gap_pos1, gap_pos2, mat_avscore;
int nseqs, max_aa;
#define MAX_ALN_LENGTH 5000
#d... |
GB_bitmap_assign_M_row_template.c | //------------------------------------------------------------------------------
// GB_bitmap_assign_M_row_template: traverse M for GB_ROW_ASSIGN
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Lic... |
PhysicalSystemFEM.h | //Design Notes:
//Physical System:
//MultiVector<ElementTypes>
//MultiVector<DOFType>
//Store DOFs in continguous memory
//Each element
// Quadrature
// Energy(ShapeFunction, Energy, position) -> Energy(ShapeFunction(position));
// ShapeFunction + Kinematics (DOF + gradients I might need ....)
// Gradient
/... |
convolution_3x3_pack4to1_bf16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy ... |
black_scholes.c | #include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <Random123/philox.h>
#include <bp_util.h>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
typedef union philox2x32_as_1x64 {
philox2x32_ctr_t orig;
uint64_t combined;
} philox2x32_as_1x64_t;
double* model(int64_t ... |
papi.c | #include "XSbench_header.h"
void counter_init( int *eventset, int *num_papi_events )
{
char error_str[PAPI_MAX_STR_LEN];
// int events[] = {PAPI_TOT_INS,PAPI_BR_INS,PAPI_SR_INS};
int events[] = {PAPI_TOT_CYC,PAPI_L3_TCM};
int stat;
int thread = omp_get_thread_num();
if( thread == 0 )
printf("Initializing PAP... |
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... |
pssytrf_aasen.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/pzhetrf_aasen.c, normal z -> s, Fri Sep 28 17:38:12 2018
*
**/
#include <math.h>
#include "plasma_async.h"... |
VerletClusterCellsTraversal.h | /**
* @file VerletClusterCellsTraversal.h
* @author jspahl
* @date 25.3.19
*/
#pragma once
#include <algorithm>
#include <vector>
#include "VerletClusterTraversalInterface.h"
#include "autopas/containers/cellPairTraversals/CellPairTraversal.h"
#include "autopas/options/DataLayoutOption.h"
#include "autopas/pairw... |
find_ellipse.c | #include "find_ellipse.h"
#include <sys/time.h>
// The number of sample points per ellipse
#define NPOINTS 150
// The expected radius (in pixels) of a cell
#define RADIUS 10
// The range of acceptable radii
#define MIN_RAD RADIUS - 2
#define MAX_RAD RADIUS * 2
// The number of different sample ellipses to try
#define... |
loops_test.c | #include <stdio.h>
#include <math.h>
#include <malloc.h>
#include <string.h>
#define N 729
#define reps 1000
#include <omp.h>
double a[N][N], b[N][N], c[N];
int jmax[N];
void init1(void);
void init2(void);
void runloop(int);
void loop1chunk(int, int);
void loop2chunk(int, int);
void valid1(void);
void valid2(v... |
create_density_map.c | /* Generated by Cython 0.26 */
#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 < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
#error Cython re... |
threshold.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unop__identity_fc64_uint8.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
j3d27pt.gold.h | #include <cstring>
using std::memcpy;
template <class T>
void jacobi_gold(T *fout, const T *fin, double h2inv, double a, double b, int L, int M, int N) {
double (*out)[M][N] = (double (*)[M][N]) fout;
double (*in)[M][N] = (double (*)[M][N]) fin;
auto ftemp1 = new T[L * M * N];
auto ftemp2 = new T[L * M * N];
mems... |
fx.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_unaryop__minv_uint16_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... |
Example_cancellation.2.c | /*
* @@name: cancellation.2c
* @@type: C
* @@compilable: yes
* @@linkable: no
* @@expect: success
* @@version: omp_4.0
*/
#include <stddef.h>
typedef struct binary_tree_s {
int value;
struct binary_tree_s *left, *right;
} binary_tree_t;
binary_tree_t *search_tree(binary_tree_t *tree, int value, int level) {
... |
Grad.h | #ifndef GRAD_H_INCLUDED
#define GRAD_H_INCLUDED
int WIDTH=1280;
int HEIGHT=720;
double HWIDTH=640.0;
double HHEIGHT=360.0;
int pb[21],pg[21],pr[21],dpr[20]= {0},dpg[20]= {0},dpb[20]= {0},point=0,preset=0,dpr1[20]= {0},dpg1[20]= {0},dpb1[20]= {0},dpr2[20]= {0},dpg2[20]= {0},dpb2[20]= {0};
char polator=0;
unsigne... |
fill_int2c.c | /*
*
*/
#include <stdlib.h>
#include <complex.h>
#include "config.h"
#include "cint.h"
#include "np_helper/np_helper.h"
#define PLAIN 0
#define HERMITIAN 1
#define ANTIHERMI 2
#define SYMMETRIC 3
int GTOmax_cache_size(int (*intor)(), int *shls_slice, int ncenter,
i... |
kmp_stats.h | #ifndef KMP_STATS_H
#define KMP_STATS_H
/** @file kmp_stats.h
* Functions for collecting statistics.
*/
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license... |
scheduled-clauseModificado.c | /*
* sheduled-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 = 200, chunk, hebras = 1, a[n], suma = 0;
if (argc < 4) {
if ... |
test76.c | int main () {
int x = 2;
#pragma omp parallel num_threads(2), if(x > 2) default(shared)
{
}
}
|
omp_wtime.c | #include <omp.h>
#include <stdio.h>
int main()
{
double time0, time1;
#pragma omp target map(from: time0, time1)
{
// calls to wtime should not be folded together
time0 = omp_get_wtime();
#if defined(__AMDGCN__)
// nvptx has a nanosleep, but only for >= sm_70
__builtin_amdgcn_s_sleep(1000);
#endif
... |
WaveFunctionComponent.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2020 QMCPACK developers.
//
// File developed by: Ken Esler, kpesler@gmail.c... |
GB_unaryop__lnot_uint8_fp32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
bins_dynamic_objects.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ `
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Nelson Lafontaine
// ... |
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)... |
GB_binop__bshift_int8.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
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) ... |
flip_compute.h | // Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required... |
t004.c | #include<stdint.h>
#include<stdlib.h>
#include<stdio.h>
#include<omp.h>
typedef struct {int64_t nteam; int64_t nthread; int64_t team_n; int64_t thread_n;} tinfo;
int
main(int argc, char **argv)
{
const int64_t narr = 1 << 10;
tinfo tinit = {-1, -1, -1, -1};
tinfo *t = aligned_alloc(1 << 22, sizeof(tinfo)*narr);
fo... |
dtrsm.c | #include "blas.h"
#include "error.h"
#include <stdio.h>
#include "handle.h"
#include "config.h"
#include "dtrsm.fatbin.c"
static inline size_t min(size_t a, size_t b) { return (a < b) ? a : b; }
static inline size_t max(size_t a, size_t b) { return (a > b) ? a : b; }
static inline CUresult cuMemcpyHtoD2DAsync(CUdevic... |
cityblock.c | #include <math.h>
void cbdm(double *a, double *b, double *r, int num_rows, int num_cols) {
double _r = 0.0;
#pragma omp parallel for reduction (+:_r)
for(int i = 0; i < num_rows; i++) {
for(int j = 0; j < num_rows ; j++) {
_r = 0.0;
for(int k = 0; k < num_cols ; k++) {
... |
stokeslet_direct.c | #include "mex.h"
#include "math.h"
#define X prhs[0] // Source locations
#define F prhs[1] // Source strengths
#define U plhs[0] // Output
#ifndef VERBOSE
#define VERBOSE 0
#endif
#define PI 3.141592653589793
inline double dot(double * a,double * b)
{
return ( a[0]*b[0] + a[1]*b[1] + a[2]*b[2] );
}
/* no... |
GB_unop__identity_fp32_fp64.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... |
Segmentation_private.h | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <cmath>
#include <list>
#include <cstdio>
#include <fstream>
#include <string>
#include <iostream>
#define SQUARE(a) ((a) * (a))
namespace ImgClass {
// ----- Constructor -----
template <class T>
Segmentation<T>::Segmentation(void)
{
_size = ... |
GB_unop__acos_fp32_fp32.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... |
3d7pt.lbpar.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
/*
* Order-1, 3D 7 point stencil
* Adapted from PLUTO and Pochoir test bench
*
* Tare... |
GB_binop__rminus_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-... |
task_untied4.c | // Contributed by Allan Porterfield
// 1/26/2010
void sparselu_par_call(float **BENCH)
{
int ii, jj, kk;
#pragma omp parallel
{
#pragma omp single nowait
#pragma omp task untied
{
for (kk=0; kk<100; kk++)
{
lu0(BENCH[kk]);
for (jj=kk+1; jj<100; jj++)
{
#pragma omp ... |
test.c |
#include <stdio.h>
#include <omp.h>
#pragma omp requires unified_shared_memory
#include "../utilities/check.h"
#include "../utilities/utilities.h"
#define N (992)
#define INIT() INIT_LOOP(N, {C[i] = 1; D[i] = i; E[i] = -i;})
int main(void){
check_offloading();
int fail;
double A[N], B[N], C[N], D[N], E[N];... |
_sample.c | /* Generated by Cython 0.24.1 */
#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 < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
#error Cython ... |
co2mco.c | // Copyright 2019 Huiguang Yi. All Rights Reservered.
//
// 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 applica... |
declare_variant_ast_print.c | // RUN: %clang_cc1 -verify -fopenmp -x c -std=c99 -ast-print %s -o - | FileCheck %s
// RUN: %clang_cc1 -verify -fopenmp-simd -x c -std=c99 -ast-print %s -o - | FileCheck %s
// expected-no-diagnostics
int foo(void);
#pragma omp declare variant(foo) match(xxx={}, yyy={ccc})
#pragma omp declare variant(foo) match(xxx=... |
GB_unop__identity_fc64_uint64.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Li... |
ompcritical.c | #include <stdio.h>
#include <stdlib.h>
int main(int argc, char* argv[]) {
int thread_count = 0;
#pragma omp parallel shared(thread_count)
{
#pragma omp critical
{
thread_count = thread_count + 1;
}
}
printf("Counted: %d threads.\n", thread_count);
}
|
J2OrbitalSoA.h | //////////////////////////////////////////////////////////////////////////////////////
// This file is distributed under the University of Illinois/NCSA Open Source License.
// See LICENSE file in top directory for details.
//
// Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
//
// File developed by: Jeongnim ... |
tasks.c | #include <stdio.h>
#include <omp.h>
#define NUM 10
void do_it(){
int id = omp_get_thread_num();
int cont = 0;
printf("%d\n",id);
while (cont < NUM){
cont++;
}
}
void end_it(){
int id = omp_get_thread_num();
int cont = 0;
printf("Single: %d\n",id);
while (cont < NUM){
printf("%d\t", cont++);
}
printf("\... |
operation.h | #ifndef MATH_LINEAR_ALGEBRA_OPERATION_H
#define MATH_LINEAR_ALGEBRA_OPERATION_H
#include "vector.h"
#include "matrix.h"
#include <math.h> // Included this for sqrt
// NOTE(Nabil/htmlboss): Going to try to use the built in OpenMP to speed up Matrix operations
#include <omp.h>
namespace math
{
// vector geometric ... |
window.c | /********************************************************************[libaroma]*
* Copyright (C) 2011-2015 Ahmad Amarullah (http://amarullz.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 Lic... |
atomic-16.c | /* { dg-do compile } */
/* { dg-options "-fopenmp" } */
int x = 6;
void
foo ()
{
int v;
#pragma omp atomic seq_cst read
v = x;
#pragma omp atomic seq_cst, read
v = x;
#pragma omp atomic seq_cst write
x = v;
#pragma omp atomic seq_cst ,write
x = v;
#pragma omp atomic seq_cst update
x += v;
#pra... |
race.c | #include<omp.h>
#include<stdlib.h>
int main()
{
srand (0);
int i;
int N=20;
int my_rand[N];
int best_cost=RAND_MAX;
for (i=0; i<N; i++)
{
my_rand[i] = rand();
}
#pragma omp parallel shared(best_cost)
{
#pragma omp for nowait
for (i=0; i<N; i++)
{
... |
swapCheck2.c | int main() {
int A = 5;
int B = 10;
int C;
int D = 0;
#pragma omp parallel
{
#pragma omp atomic
D = D + 1;
int x = 11;
while (1) {
#pragma omp master
{
l4: D = D + A + B;
}
#pragma omp barrier
#pragma omp single nowait
{
l1: C = A;
l2: A = B;
l3: B = C;
}
#pragma omp barrier
#prag... |
livenessCheck.c | int main () {
int shared;
int dummy;
#pragma omp parallel
{
int local;
if (1 > 2) {
local = 2;
#pragma omp atomic write
shared = 1;
local = local + 5;
#pragma omp barrier
} else {
int local1;
#pragma omp barrier
#pragma omp atomic read
local1 = shared;
local = 14;
local = local + 1;
}
}... |
GB_unaryop__minv_int16_uint8.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
omp-nested-1.c | // { dg-do run }
extern void abort(void);
#define N 1000
int foo()
{
int i = 0, j;
#pragma omp parallel for num_threads(2) shared (i)
for (j = 0; j < N; ++j)
{
#pragma omp parallel num_threads(1) shared (i)
{
#pragma omp atomic
i++;
}
}
return i;
}
int main()
{
if (foo() != N)... |
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
//
//===---------------------------... |
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... |
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)... |
trmv_x_dia_u_hi_trans.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,
... |
convolutiondepthwise_3x3_pack4.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 ... |
par_mgr.c | /******************************************************************************
* Copyright 1998-2019 Lawrence Livermore National Security, LLC and other
* HYPRE Project Developers. See the top-level COPYRIGHT file for details.
*
* SPDX-License-Identifier: (Apache-2.0 OR MIT)
**************************************... |
transform.h | /*!
* Copyright 2018 tsooBGX contributors
*/
#ifndef TSOOBGX_COMMON_TRANSFORM_H_
#define TSOOBGX_COMMON_TRANSFORM_H_
#include <dmlc/omp.h>
#include <tsoobgx/data.h>
#include <utility>
#include <vector>
#include <type_traits> // enable_if
#include "host_device_vector.h"
#include "common.h"
#include "span.h"
#if de... |
MinGrid.c | #include "Python.h"
#include "numpy/arrayobject.h"
#include <fcntl.h>
#include <omp.h>
#include <sys/param.h>
#define VERSION "0.1"
void
GridMinimum(double *zmg, int *idz,
const double *xb, const unsigned int xbn,
const double *yb, const unsigned int ybn,
const double *x, const dou... |
profile.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
matvec_double.c | //matvec.c
//Multiplies a matrix by a vector
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/timeb.h>
#include <malloc.h>
#define N_RUNS 1000
#define N 1200
// read timer in second
double read_timer() {
struct timeb tm;
ftime(&tm);
return (double) tm.time + (double) tm.millitm / 100... |
api.c | // RUN: %libomptarget-compile-run-and-check-generic
// XFAIL: nvptx64-nvidia-cuda
// XFAIL: nvptx64-nvidia-cuda-newRTL
// Fails on amdgcn with error: GPU Memory Error
// XFAIL: amdgcn-amd-amdhsa
// XFAIL: amdgcn-amd-amdhsa-newRTL
#include <stdio.h>
#include <omp.h>
// ------------------------------------------------... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
GB_binop__ge_fp64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
parallel_for_simd_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -verify %s
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}}
#pragma omp parallel for simd
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for simd'}}
#pragm... |
carray_element.c | /* ---------------------------------------------------------------------------
carray_element.c
This file is part of Ruby/CArray extension library.
Copyright (C) 2005-2020 Hiroki Motoyoshi
---------------------------------------------------------------------------- */
#include "ruby.h"
#include "carray.h"
/... |
seidel_2d-p.pluto.c | #include <omp.h>
#include <math.h>
#define ceild(n,d) ceil(((double)(n))/((double)(d)))
#define floord(n,d) floor(((double)(n))/((double)(d)))
#define max(x,y) ((x) > (y)? (x) : (y))
#define min(x,y) ((x) < (y)? (x) : (y))
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/time.h>
#includ... |
Exercice1.c | #include <stdio.h>
#include <stdlib.h>
#include "stdbool.h"
int main(int argc, char **argv){
int n_iter = 1000;
bool is_prime[n_iter];
#pragma omp parallel for
for(int index=0; index < n_iter; index++){
long potential_prime = rand() % (4000000000 + 1);
for (long multiple = 2; multiple ... |
compare.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
polybench.c | /**
* polybench.c: This file is part of the PolyBench/C 3.2 test suite.
*
*
* Contact: Louis-Noel Pouchet <pouchet@cse.ohio-state.edu>
* Web address: http://polybench.sourceforge.net
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include <time.h>
#include <s... |
nmt_mask.c | #include "config.h"
#include "utils.h"
static void apodize_mask_CX(long nside,flouble *mask_in,flouble *mask_out,flouble aposize,char *apotype)
{
long npix=he_nside2npix(nside);
double aporad=aposize*M_PI/180;
double x2_thr=1-cos(aporad);
double inv_x2_thr=1./x2_thr;
flouble *vec=my_malloc(3*npix*sizeof(flou... |
paint.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
FBGemmFPTest.h | /*
* Copyright (c) Meta Platforms, Inc. and its affiliates.
* All rights reserved.
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <gtest/gtest.h>
#include <random>
#ifdef _OPENMP
#include <omp.h>
#endif
#in... |
GB_binop__land_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-... |
DataGen.h | // Copyright (C) 2019-2020 Zilliz. 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 l... |
R_naomit.c | /* Copyright (c) 2016-2017 Drew Schmidt
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list o... |
relic_core.c | /*
* RELIC is an Efficient LIbrary for Cryptography
* Copyright (C) 2007-2015 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... |
convolution_3x3_pack4_bf16s.h | // Tencent is pleased to support the open source community by making ncnn available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a ... |
Data.h | /*
MIT License
Copyright (c) 2017 FMI Open Development / Markus Peura, first.last@fmi.fi
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 rig... |
main.c | // C Compiler flag: -fopenmp
#include <stdio.h>
#include <omp.h>
#define N 20
int main(int argc, char *argv[])
{
int myid;
omp_set_dynamic(0); // запретить библиотеке openmp менять число потоков во время исполнения
omp_set_num_threads(3); // установить число потоков в 2
int threadsCount = omp_get_max_threads... |
GB_unop_transpose.c | //------------------------------------------------------------------------------
// GB_unop_transpose: C=op(cast(A')), transpose, typecast, and apply op
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SP... |
shape.h | /*
* shape.h
*
* Created on: Dec 28, 2015
* Author: agibsonccc
*/
#ifndef SHAPE_H_
#define SHAPE_H_
#include <cstring>
#include <cstdio>
#include "../dll.h"
#include "../nd4jmalloc.h"
#include "../templatemath.h"
#include "../helpers/logger.h"
#include "../pointercast.h"
#include "../cnpy/cnpy.h"
#include ... |
SpatialFractionalMaxPooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/SpatialFractionalMaxPooling.c"
#else
static long* THNN_(SpatialFractionalMaxPooling_generateIntervals)(
real sample,
long inputSize,
long outputSize,
int poolSize) {
real alpha = (real) (inputSize - poolSize) / (real) (outputSize - 1);
long* sequence... |
GB_binop__bxnor_uint32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
mlp_mnist_f32.c | /******************************************************************************
* Copyright (c) Intel Corporation - All rights reserved. *
* This file is part of the LIBXSMM library. *
* *
... |
THTensorMath.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/THTensorMath.c"
#else
#define TH_OMP_OVERHEAD_THRESHOLD 100000
void THTensor_(fill)(THTensor *r_, real value)
{
TH_TENSOR_APPLY(real, r_,
THVector_(fill)(r__data, value, r__size); break;);
}
void THTensor_(zero)(THTensor *r_)
{
TH_TENSOR_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.