source stringlengths 3 92 | c stringlengths 26 2.25M |
|---|---|
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... |
CBasedTraversal.h | /**
* @file CBasedTraversal.h
* @author C. Menges
* @date 26.04.2019
*/
#pragma once
#include "autopas/containers/cellPairTraversals/CellPairTraversal.h"
#include "autopas/utils/ArrayMath.h"
#include "autopas/utils/DataLayoutConverter.h"
#include "autopas/utils/ThreeDimensionalMapping.h"
namespace autopas {
/**... |
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) ... |
main.c | #include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <omp.h>
#include <assert.h>
#include <math.h>
#include "mkl.h"
#include "helper.h"
#include "filehandling.h"
#include "eigenvalues.h"
#include "backtransformation.h"
void showHelp();
int main (int argc, char **argv)
{
/*******... |
LRUCache_Prefetch.h | #include <iostream>
#include<stdint.h>
#include <unordered_map>
#include <vector>
using namespace std;
vector<int64_t>List_offset;
struct AIOReadInfo
{
int64_t readlength;
int64_t readoffset;
int64_t listlength;
int64_t offsetForenums;
int64_t memoffset;
int64_t curSendpos;
uint8_t *list_data;
... |
omp_task_nest_tied.c | // RUN: %libomp-compile-and-run
#include <stdio.h>
#include "omp_testsuite.h"
int fib(int n) {
int a, b;
if (n < 2) {
return n;
} else {
if(n < 4) {
return fib(n - 1) + fib(n - 2);
} else {
#pragma omp task shared(a)
{
a = fib(n - 1);
}
#pragma omp task shared(b)... |
bml_normalize_ellpack_typed.c | #include "../../macros.h"
#include "../../typed.h"
#include "../bml_allocate.h"
#include "../bml_normalize.h"
#include "../bml_parallel.h"
#include "../bml_types.h"
#include "bml_add_ellpack.h"
#include "bml_allocate_ellpack.h"
#include "bml_normalize_ellpack.h"
#include "bml_scale_ellpack.h"
#include "bml_types_ellpac... |
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... |
c_jacobi01.c | /* ***********************************************************************
This program is part of the
OpenMP Source Code Repository
http://www.pcg.ull.es/ompscr/
e-mail: ompscr@etsii.ull.es
Copyright (c) 2004, OmpSCR Group
All rights reserved.
Redistribution and use in source and ... |
fourier.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
diffusion.c | /*
* ======================= PGF ====================
* Integrate forward (advection only) by one time step.
* ATMS 502 / CSE 566, Spring 2016
*
* Arguments:
*
* q1 real array values at current step
* q2 real array values at next step
* c real true speed of wave
* dx real grid spacing
* dt real time step
... |
weno5js_impl_c_.c | #include <stdlib.h>
#include <math.h>
static double eps;
static int size;
static double c00 = 1.0/3.0;
static double c01 = -7.0/6.0;
static double c02 = 11.0/6.0;
static double c10 = -1.0/6.0;
static double c11 = 5.0/6.0;
static double c12 = 1.0/3.0;
static double c20 = 1.0/3.0;
static double c21 = 5.0/6.0;
static ... |
conv_kernel_x86.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... |
ast-dump-openmp-target-parallel.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() {
#pragma omp target parallel
;
}
// CHECK: TranslationUnitDecl {{.*}} <<invalid sloc>> <invalid sloc>
// CHECK: `-FunctionDecl {{.*}} <{{.*}}ast-dump-ope... |
GB_binop__rdiv_fp32.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX... |
conjugate_gradient.c | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include "nb/memory_bot.h"
#include "nb/solver_bot/sparse/sparse.h"
#include "nb/solver_bot/sparse/solvers/conjugate_gradient.h"
#include "../sparse_struct.h"
int nb_sparse_solve_conjugate_gradient
(const nb_sparse_t *co... |
GB_msort_3.c | //------------------------------------------------------------------------------
// GB_msort_3: sort a 3-by-n list of integers, using A[0:2][ ] as the key
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// ... |
idaFoodWeb_bnd_omp.c | /*
* -----------------------------------------------------------------
* Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU
* Based on idaFoodWeb_bnd.c and parallelized with OpenMP
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2021, Lawr... |
point_outlier.h | /****************************************************************************
* VCGLib o o *
* Visual and Computer Graphics Library o o *
* _ O _ *
* Co... |
wand-view.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% W W AAA N N DDDD ... |
timing.c | #include <omp.h>
#include <stdio.h>
#include <stdlib.h>
double start_time;
double end_time;
float *dirty;
float ressss;
int flushsz=100000000;
int num_of_core=8;
void get_time(int flag){
float tttmp[num_of_core];
if (flag == 1){
dirty = (float *)malloc(flushsz * sizeof(float));
#pragma omp parallel for
f... |
GB_binop__iseq_int64.c | //------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-... |
rawMD4_fmt_plug.c | /*
* This file is part of John the Ripper password cracker,
* Copyright (c) 2010 by Solar Designer
* Copyright (c) 2011, 2012 by magnum
*
* Use of Bartavelle's mmx/sse2/intrinsics and reduced binary size by
* magnum in 2011-2012.
*
* OMP added May 2013, JimF
*/
#if FMT_EXTERNS_H
extern struct fmt_main fmt_raw... |
image_random-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 may no... |
expected_output.c | #include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#include <polybench.h>
#include "covariance.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
*/... |
clipperz_srp_fmt_plug.c | /* This software was repurposed by Dhiru Kholia (dhiru at openwall.com)
* in 2012.
*
* This software was written by Jim Fougeron jfoug AT cox dot net
* in 2012. No copyright is claimed, and the software is hereby
* placed in the public domain. In case this attempt to disclaim
* copyright and place the software in... |
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)
#... |
Mapping.h | //===--------- Mapping.h - OpenMP device runtime mapping helpers -- 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
//
//===---------------------------... |
activation.h | // Copyright 2018 Xiaomi, Inc. 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 applicab... |
parallel_sort.c | /*
parallel_sort.c: A parallel version of sort, not stable
*/
#include<stdlib.h>
#include<string.h>
#include<stdbool.h>
#include <parallel_sort.h>
void serial_merge(void *src1, void *src2,
void *dest,
size_t nmemb1, size_t nmemb2, size_t size,
int (*compar ) (const void *, const void * )){
register v... |
mxv_omp_mpi.c | /**
* Program to multiply a matrix times a vector using both
* MPI to distribute the computation among nodes and OMP
* to distribute the computation among threads.
*/
#include "mpi.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "mat.h"
#define min(x, y) ((x)<(y)?(x):(y))
int m... |
parallel.c | //Potential Solution
#include <stdlib.h>
#include <stdio.h>
#include <omp.h>
#include <time.h>
#include "utils.h"
double work_it_par(long* old, long* new, long* super, long* simple, long* fibonacci) {
int i, j, k;
int u;
int ton = 0;
long compute_it, moving_average;
double pi, pi2, x, y, sum, step = 0.0;
... |
DRB070-simd1-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... |
q1.c | #include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <omp.h>
//static long int num_steps = 10000000;
double f(double x) {
double ans = 4.0/(1+x*x);
return(ans);
}
int main() {
int j;
for(j=3;j<=8;j++){
long int num_steps = pow(10,j);
double dx = 1.0/(double)num_steps;
double sum = 0;
double ... |
GB_split_sparse_template.c | //------------------------------------------------------------------------------
// GB_split_sparse_template: split a single tile from a sparse matrix
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
core_dtsmqr.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_ztsmqr.c, normal z -> d, Fri Sep 28 17:38:24 2018
*
**/
#include <plasma_core_blas.h>
#include "pla... |
16_primes-par2.c | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char **argv) {
// quantos numeros primos entre 1 e N ?
unsigned long n = 99999;
unsigned long aux = 2;
unsigned long primes = 0;
//Escalonamento dinamico: cada thread executa uma iteração (fcfs)
#pragma omp parallel for firstprivate(a... |
core_ctsmlq.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_ztsmlq.c, normal z -> c, Fri Sep 28 17:38:24 2018
*
**/
#include <plasma_core_blas.h>
#include "pla... |
sorgqr.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/zungqr.c, normal z -> s, Fri Sep 28 17:38:04 2018
*
**/
#include "plasma.h"
#include "plasma_async.h"
#inc... |
functionparameter-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... |
jacobi_float_avx2.c | #include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/timeb.h>
#include <malloc.h>
#include <math.h>
#define REAL float
static double read_timer_ms() {
struct timeb tm;
ftime(&tm);
return (double) tm.time * 1000.0 + (double) tm.millitm;
}
/************************************************... |
trans.c | /*Daala video codec
Copyright (c) 2013 Daala project contributors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this
list o... |
base_serialized.h | #include "callback.h"
#include <omp.h>
int main()
{
unsigned int i;
#pragma omp parallel for num_threads(1) schedule(SCHEDULE)
for (i = 0; i < 1; i++) {
}
// CHECK: 0: NULL_POINTER=[[NULL:.*$]]
// CHECK: {{^}}[[MASTER_ID:[0-9]+]]: ompt_event_parallel_begin: parent_task_id=[[PARENT_TASK_ID:[0-9]+]], paren... |
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... |
test-zrocks.c | #include <omp.h>
#include <stdint.h>
#include <stdlib.h>
#include <libzrocks.h>
#include <xztl.h>
#include "CUnit/Basic.h"
/* Number of Objects */
#define TEST_N_BUFFERS 2
/* Number of random objects to read */
#define TEST_RANDOM_ID 2
/* Object Size */
#define TEST_BUFFER_SZ (1024 * 1024 * 16) /* 16 MB */
static u... |
concurrent_unordered_map.cuh.h | /*
* Copyright (c) 2017-2018, NVIDIA CORPORATION. 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 ... |
target_enter_data_map_messages.c | // RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - %s
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 -o - -x c++ %s
int main(int argc, char **argv) {
int r;
#pragma omp target enter data // expected-error {{expected at least one map ... |
saber_avx512_funcs.h |
#ifndef ANAKIN_SABER_FUNCS_IMPL_X86_SABER_AVX512_FUNCS_H
#define ANAKIN_SABER_FUNCS_IMPL_X86_SABER_AVX512_FUNCS_H
#if defined(__AVX512F__)
#include "saber_normal_activation.h"
namespace anakin {
namespace saber {
void avx512_vector_sigmoid(const float* in, int length, float* out) {
const int simd_length = 16;
... |
command_dist.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... |
hermv_c_csc_n_hi_trans.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include <memory.h>
#include "alphasparse/opt.h"
#ifdef _OPENMP
#include <omp.h>
#endif
static alphasparse_status_t
hermv_csc_n_hi_trans_unroll(const ALPHA_Number alpha,
const ALPHA_SPMAT_CSC *A,
const ALPHA_Number *x,
... |
GB_emult_04.c | //------------------------------------------------------------------------------
// GB_emult_04: C<M>= A.*B, M sparse/hyper, A and B bitmap/full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
// SPDX-Licen... |
omp-not-thrdprvt.c | #include <stdio.h>
int x, y;
int main() {
#pragma omp parallel
{
x = omp_get_thread_num();
}
#pragma omp parallel
{
if(x % 2 == 0)
y = x + 1;
else
y = 0;
}
#pragma omp parallel
{
printf("%d, %d %d\n", x, y, omp_get_thread_num());
}
#pra... |
Mapping.h | //===--------- Mapping.h - OpenMP device runtime mapping helpers -- 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
//
//===---------------------------... |
draw.c | /*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% ... |
omp-low.c | /* Lowering pass for OMP directives. Converts OMP directives into explicit
calls to the runtime library (libgomp), data marshalling to implement data
sharing and copying clauses, offloading to accelerators, and more.
Contributed by Diego Novillo <dnovillo@redhat.com>
Copyright (C) 2005-2017 Free Software... |
simd_loop_linear.c | /* Example of the linear clause on the simd construct
The linear clause defines how the j index variable relates to the
loop variable i that is used as an index into some of the arrays.
*/
void simd_loop_linear(double *a, double *b, double *c, int n,
int offset)
{
int i, j = 0;
... |
cpu.h | // Copyright (C) 2016 Gernot Riegler
// Institute for Computer Graphics and Vision (ICG)
// Graz University of Technology (TU GRAZ)
// 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 m... |
GB_binop__minus_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... |
GB_unaryop__ainv_uint8_fp64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
NETLMv2_fmt_plug.c | /*
* NETLMv2_fmt.c -- LMv2 Challenge/Response
*
* Written by JoMo-Kun <jmk at foofus.net> in 2008
* and placed in the public domain.
*
* Performance fixes, OMP and utf-8 support by magnum 2010-2011
*
* This algorithm is designed for performing brute-force cracking of the LMv2
* challenge/response sets exchange... |
atomic-4.c | /* PR middle-end/35611 */
/* { dg-options "-O2" } */
extern void abort (void);
int
main (void)
{
long double d = .0L;
int i;
#pragma omp parallel for shared (d)
for (i = 0; i < 1000; i++)
#pragma omp atomic
d += 1.0L;
if (d != 1000.0L)
abort ();
return 0;
}
|
GxB_UnaryOp_ztype_name.c | //------------------------------------------------------------------------------
// GxB_UnaryOp_ztype_name: return the type_name of z for z=f(x)
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX-Licen... |
munit.c | /* Copyright (c) 2013-2017 Evan Nemerson <evan@nemerson.com>
*
* 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, copy... |
assumes_messages_attr.c | // RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp -fopenmp-version=51 -std=c99 -fms-extensions -fdouble-square-bracket-attributes -Wno-pragma-pack %s
// RUN: %clang_cc1 -triple=x86_64-pc-win32 -verify -fopenmp-simd -fopenmp-version=51 -std=c99 -fms-extensions -fdouble-square-bracket-attributes -Wno-pragma-pac... |
GB_unaryop__abs_uint16_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... |
structure_factors_direct.h | #ifndef CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_H
#define CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_H
#include <cctbx/xray/scattering_type_registry.h>
#include <cctbx/xray/hr_ht_cache.h>
#include <cctbx/math/cos_sin_table.h>
#include <omptbx/omp_or_stubs.h>
//#define CCTBX_XRAY_STRUCTURE_FACTORS_DIRECT_NO_PRAGMA_OMP
namespace... |
Matrix_Add_ColumnMajor.c | #include<stdio.h>
#include<stdlib.h>
#include <sys/time.h>
double rtclock()
{
struct timezone Tzp;
struct timeval Tp;
int stat;
stat = gettimeofday (&Tp, &Tzp);
if (stat != 0) printf("Error return from gettimeofday: %d",stat);
return(Tp.tv_sec + Tp.tv_usec*1.0e-6);
}
#define size 10000
#define NT 8
int A[size][size];
i... |
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) ... |
data.c | #include "data.h"
#include "utils.h"
#include "image.h"
#include "opencl.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
list *get_paths(char *filename)
{
if (filename) filename[strcspn(filename, "\n\r")] = 0;
char *pos;
if ((pos=strchr(filena... |
omp_rr.c | /*
Ubuntu:
-------
gcc -I/home/heiland/dev/libRR_1.3/include/rr/C -fopenmp omp_rr.c -L/home/heiland/dev/libRR_1.3/lib -lroadrunner_c_api -o omp_rr
OSX:
-----
#CFLAGS := -march=$(ARCH) -g -fomit-frame-pointer -Xpreprocessor -fopenmp -m64 -std=c++11
clang -Xpreprocessor -fopenmp -m64 -I/Users/heiland/dev/roadrunner-... |
iSENSE_MEX.c | /**************************************************************************
MEX function to compute the approximate gradient of the absolute value
Author: R. Marc Lebel
Contact: mlebel@gmail.com
Date: 11/2010
Useage: imgS = absgradMEX(img,sens)
Input:
img: numeric array (single/double; real/complex)
sens:... |
DRB040-truedepsingleelement-var-yes.c | /*
Copyright (c) 2017, Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
Written by Chunhua Liao, Pei-Hung Lin, Joshua Asplund,
Markus Schordan, and Ian Karlin
(email: liao6@llnl.gov, lin32@llnl.gov, asplund1@llnl.gov,
schordan1@llnl.gov, karlin1@llnl.gov)
LLNL-CODE-73214... |
VolumetricMaxUnpooling.c | #ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/VolumetricMaxUnpooling.c"
#else
static void nn_(VolumetricMaxUnpooling_updateOutput_frame)(real *input_p, real *output_p,
real *ind_p,
long nslices,
... |
TRPO_CG.c | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include "omp.h"
#include "TRPO.h"
double CG(TRPOparam param, double *Result, double *b, size_t MaxIter, double ResidualTh, size_t NumThreads){
//////////////////// Conjugate Gradient ////////////////////
// ... |
20_omp_priv_combi_nested.c | // clang-format off
// RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %apply-typeart -typeart-alloca -call-filter -typeart-filter-pointer-alloca=false -S 2>&1 | %filecheck %s
// RUN: %c-to-llvm -fno-discard-value-names %omp_c_flags %s | %opt -O2 -S | %apply-typeart -typeart-alloca -call-filter -typeart-filt... |
Diffusion_core.c | /*
* This work is part of the Core Imaging Library developed by
* Visual Analytics and Imaging System Group of the Science Technology
* Facilities Council, STFC
*
* Copyright 2017 Daniil Kazantsev
* Copyright 2017 Srikanth Nagella, Edoardo Pasca
*
* Licensed under the Apache License, Version 2.0 (the "License")... |
GB_unaryop__ainv_int32_uint32.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
diagmm_x_csr_n_col.c | #include "alphasparse/kernel.h"
#include "alphasparse/util.h"
#include "memory.h"
#include "alphasparse/opt.h"
alphasparse_status_t ONAME(const ALPHA_Number alpha, const ALPHA_SPMAT_CSR *mat, const ALPHA_Number *x, const ALPHA_INT columns, const ALPHA_INT ldx, const ALPHA_Number beta, ALPHA_Number *y, const ALPHA_INT ... |
ch_ompss.c |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
#include "ch_common.h"
#include "../timing.h"
void cholesky_mpi(const int ts, const int nt, double *A[nt][nt], double *B, double *C[nt], int *block_rank)
{
INIT_TIMING(omp_get_max_threads());
#pragm... |
GB_unaryop__lnot_bool_bool.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http... |
convolution_pack4to1.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 ... |
GB_binop__minus_int16.c |
//------------------------------------------------------------------------------
// GB_binop: hard-coded functions for each built-in binary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2022, All Rights Reserved.
// SPDX... |
struct-enter-exit-data-1.c | /* Check 'GOMP_MAP_STRUCT' mapping, and in particular that it gets removed from
OpenACC 'exit data' directives. */
/* { dg-additional-options "-fdump-tree-gimple" } */
struct str {
int a;
int *b;
int *c;
int d;
int *e;
int f;
};
#define N 1024
void
test (int *b, int *c, int *e)
{
struct str s = { ... |
util.c | #include "util.h"
#include <stdio.h>
inline void set_vector_double(double *v, int c, double val)
{
#pragma omp parallel for
for (int i = 0; i < c; i++)
v[i] = val;
}
inline void print_vector(double *y, const matrix_info_t mi)
{
// Write the results to standard output.
for (int i = 0; i < MIN(PRIN... |
blackscholes.c | // Copyright (c) 2007 Intel Corp.
// Black-Scholes
// Analytical method for calculating European Options
//
//
// Reference Source: Options, Futures, and Other Derivatives, 3rd Edition, Prentice
// Hall, John C. Hull,
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#ifdef ENABLE_PARSEC_H... |
GB_unop__identity_uint16_bool.c | //------------------------------------------------------------------------------
// GB_unop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2020, All Rights Reserved.
// http://... |
main.c | /* $Id: main.c,v 1.4 2004/04/21 04:23:43 pohlt Exp $ */
/*############################################################################*/
#include "main.h"
#include "lbm.h"
#include <stdio.h>
#include <stdlib.h>
#if defined(SPEC)
# include <time.h>
#else
# include <sys/times.h>
# include <unistd.h>
#endif
#inc... |
GB_unaryop__lnot_int32_uint64.c | //------------------------------------------------------------------------------
// GB_unaryop: hard-coded functions for each built-in unary operator
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2019, All Rights Reserved.
// http... |
sort-1.c | /* Test and benchmark of a couple of parallel sorting algorithms.
Copyright (C) 2008-2017 Free Software Foundation, Inc.
GCC 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, or (at yo... |
for_misc_messages.c | // RUN: %clang_cc1 -fsyntax-only -fopenmp -triple x86_64-unknown-unknown -verify %s
// RUN: %clang_cc1 -fsyntax-only -fopenmp-simd -triple x86_64-unknown-unknown -verify %s
// expected-error@+1 {{unexpected OpenMP directive '#pragma omp for'}}
#pragma omp for
// expected-error@+1 {{unexpected OpenMP directive '#prag... |
idaFoodWeb_bnd_omp.c | /*
* -----------------------------------------------------------------
* Programmer(s): Daniel R. Reynolds and Ting Yan @ SMU
* Based on idaFoodWeb_bnd.c and parallelized with OpenMP
* -----------------------------------------------------------------
* SUNDIALS Copyright Start
* Copyright (c) 2002-2021, Lawr... |
levelset_convection_process.h | // | / |
// ' / __| _` | __| _ \ __|
// . \ | ( | | ( |\__ \.
// _|\_\_| \__,_|\__|\___/ ____/
// Multi-Physics
//
// License: BSD License
// Kratos default license: kratos/license.txt
//
// Main authors: Riccardo Rossi
// Ruben Zorril... |
utilityGraphPartitioner.h | // ***********************************************************************
//
// Grappolo: A C++ library for graph clustering
// Mahantesh Halappanavar (hala@pnnl.gov)
// Pacific Northwest National Laboratory
//
// *************************************************************... |
Parser.h | //===--- Parser.h - C Language Parser ---------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... |
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.
//
//===-------------------------------------------------------... |
cpu_ctc.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 ... |
tagger.c | #include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <strings.h>
#include "../dictionary/dictionary_generator.h"
#include "../lib/hashmap.h"
#include "../corpus/corpus_io.h"
#include "../rules/rules.h"
#include "tags.h"
#include "tagger.h"
void apply_initial_tags(corpus_t corpus, hashmap_t map){
#pra... |
omp_parallel_if.c | <ompts:test>
<ompts:testdescription>Test which checks the if option of the parallel construct.</ompts:testdescription>
<ompts:ompversion>3.0</ompts:ompversion>
<ompts:directive>omp parallel if</ompts:directive>
<ompts:testcode>
#include <stdio.h>
#include <unistd.h>
#include "omp_testsuite.h"
int <ompts:testcode:func... |
distance.h | #pragma once
#include <utils.h>
#ifdef _WINDOWS
#include <immintrin.h>
#include <smmintrin.h>
#include <tmmintrin.h>
#include <intrin.h>
#else
#include <immintrin.h>
#endif
#include <cosine_similarity.h>
#include <iostream>
namespace {
static inline __m128 _mm_mulhi_epi8(__m128i X) {
__m128i zero = _mm_setzero... |
GB_unaryop__minv_uint32_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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.