sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
8a745177a4e89c174e92adfbf29147bcd090e680aaba7fb5bb25c328d98f2bb5 | C/C++ | 200,000 | 5,542 | /* stb_image - v2.27 - public domain image loader - http://nothings.org/stb
no warranty implied; use at your own risk
Do this:
#define STB_IMAGE_IMPLEMENTATION
before you include this file in *one* C or C++ file to create the implementation.
// i.e. it should look like... |
924e75e5e4d622c655ff2f667324c067c8f3448c8d7fc8bbb8e8d21aeb366e0a | C/C++ | 200,000 | 4,114 | /*
Audio playback and capture library. Choice of public domain or MIT-0. See license statements at the end of this file.
miniaudio - v0.10.42 - 2021-08-22
David Reid - mackron@gmail.com
Website: https://miniaud.io
Documentation: https://miniaud.io/docs
GitHub: https://github.com/mackron/miniaudio
*/
/*
... |
a05fe3c4105ff15911318d3bd84e99caacef303ebd2fa6f12bcf6186f66e0491 | C/C++ | 200,000 | 3,532 | /**
* Loader generated by glad 2.0.0-beta on Sun Oct 17 18:39:09 2021
*
* Generator: C/C++
* Specification: gl
* Extensions: 110
*
* APIs:
* - gl:core=4.3
*
* Options:
* - ALIAS = False
* - DEBUG = False
* - HEADER_ONLY = True
* - LOADER = True
* - MX = False
* - MX_GLOBAL = False
* - ON_DEMAND... |
aa2f3ce93f642d52f40b5e87531342a02c9c8bfc9bda2a48eefae9ce149a8ea2 | C/C++ | 200,000 | 3,713 | /**
* Loader generated by glad 2.0.0-beta on Sun Apr 14 17:03:32 2019
*
* Generator: C/C++
* Specification: gl
* Extensions: 3
*
* APIs:
* - gl:compatibility=3.3
*
* Options:
* - MX_GLOBAL = False
* - LOADER = False
* - ALIAS = False
* - HEADER_ONLY = False
* - DEBUG = False
* - MX = False
*
* ... |
b18e3a4fb2059cc019775b09e69cb1b5e0ebf54e05a1655662a064250d3589e2 | C/C++ | 200,000 | 5,795 | /* stb_image - v2.08 - public domain image loader - http://nothings.org/stb_image.h
no warranty implied; use at your own risk
Do this:
#define STB_IMAGE_IMPLEMENTATION
before you include this file in *one* C or C++ file to create the implementation.
// i.e. it shoul... |
b265246527e4cb64ec18a0b57bbbf6b50283d0ba9bb0d35964314552c264402a | C/C++ | 200,000 | 5,053 | // Copyright 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions ... |
cad3c47c3c741eb698544fa1169500f3fb6b561db8ac7e6ffea255ebc571067b | C/C++ | 200,000 | 4,744 | /*
WAV audio loader and writer. Choice of public domain or MIT-0. See license statements at the end of this file.
dr_wav - v0.13.3 - TBD
David Reid - mackron@gmail.com
GitHub: https://github.com/mackron/dr_libs
*/
/*
Introduction
============
This is a single file library. To use it, do something like the following ... |
e6af0a4ab0c883330d68074e64c99a13cae3cc751ac5bba7798555ba7a82b78b | C/C++ | 200,000 | 4,084 | /* auto_assign_off.png - 20001 bytes */
const unsigned char icon_auto_assign_off_png[20001] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a,
0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x12,
0x08, 0x06, 0x00, 0x00, 0x00, 0xd6, 0xbd, 0xb9,
0x44, 0x00, 0x00, 0x00, 0x0... |
f3a2049c0d95d07cb6dfd535bd2513e1f366ff6fe25d7a8a17d5ba6f63f9574e | C/C++ | 200,000 | 5,816 | /*
* copyright (c) 2001 Fabrice Bellard
*
* This file is part of FFmpeg.
*
* FFmpeg 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 Free Software Foundation; either
* version 2.1 of the License, or (at your option) any l... |
293a13701ebca16c8640621a74346d8fdd6c459aa43cb5900256f886bf519afe | C/C++ | 200,001 | 3,794 | /*
#
# File : CImg.h
# ( C++ header file )
#
# Description : C++ Template Image Processing Toolkit.
# This file is the main component of the CImg Library project.
# ( http://cimg.eu )
#
# Project manager : David Tschumperlé
# ... |
7794cf94b738eb7964b9bbba3769f4808520d9875f5a515564c4c32e56324a82 | C/C++ | 200,001 | 804 | //========================================================================
// GLFW 3.4 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org>
//
// This software is provided 'as-is', without any express or implied
// warran... |
1db63f769c04c0b5845c5fdea5509f3b9a652eaf53590c8e4cebf2fcb4eb013a | C/C++ | 200,002 | 3,386 | /*****************************************************************************/
/*! \file uc480.h
* \date Date: 2016/03/09
* \version PRODUCTVERSION: 4.80
*
* \brief Library interface for uc480 - camera family.
* definition of exported API functions and constants
*//***************************... |
c47106b1facbd6e553494abcfca966dc7ef7fc78d56b1e289578920fded22805 | C/C++ | 200,003 | 5,487 | /*************************************************************************
* GLFW 3.4 - www.glfw.org
* A library for OpenGL, window and input
*------------------------------------------------------------------------
* Copyright (c) 2002-2006 Marcus Geelnard
* Copyright (c) 2006-2019 Camilla Löwy <elmindreda@glfw.o... |
5fa24ea11e879b8179ba22fc62c82112ca4b83f33efaaa943e5b9e2b57c3166f | C/C++ | 200,005 | 4,011 | /*******************************************************************************************
*
* raygui v3.0 - A simple and easy-to-use immediate-mode gui library
*
* DESCRIPTION:
*
* raygui is a tools-dev-focused immediate-mode-gui library based on raylib but also
* available as a standalone library, as long a... |
334be30e501fd0c279f1be580cc8c4f089b4e89d8e4b5e2d656dcbe597041df6 | C/C++ | 200,016 | 4,958 | /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright by The HDF Group. *
* All rights reserved. *
* *
* T... |
20e94fed587d02c614cff6a2a24175a7b2884301eefb040ee148381fc6546794 | CUDA | 560 | 19 | // __ _____ _____ _____
// __| | __| | | | JSON for Modern C++ (supporting code)
// | | |__ | | | | | | version 3.11.2
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2022 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#includ... |
6384ebad6e52804c1dfe58eed6b5c7dcac56c91baf805220f5cc3c78d5ce5dd6 | CUDA | 867 | 35 | #include <arbor/gpu/gpu_common.hpp>
#include <cstdint>
namespace arb {
namespace gpu {
template <typename T, typename I>
__global__
void fill_kernel(T* __restrict__ const v, T value, I n) {
auto tid = threadIdx.x + blockDim.x*blockIdx.x;
if(tid < n) {
v[tid] = value;
}
}
void fill8(uint8_t* v, ... |
5ea606fcbda18181c0ceb0d6b5a684619436cdeecd6ee2c1165853485780b018 | CUDA | 1,077 | 32 | #include "gpu_utils.h"
__global__ void gpu_ecg_integral_kernel(const real *beta_im, const real* distances, const real *volumes, int n, real *result);
__global__ void kernel_gpu_vec_div_vec(real *vec1, real *vec2, real *vec3, size_t n);
extern "C" void gpu_vec_div_vec(real *vec1, real *vec2, real *res, size_t n) {... |
d4f3e77bb6ad813f4081a3dbedd5a91c27325641b41e410dcb61990213427457 | CUDA | 1,338 | 59 | #include <arbor/fvm_types.hpp>
#include <arbor/gpu/gpu_api.hpp>
#include <arbor/gpu/gpu_common.hpp>
#include "fine.hpp"
namespace arb {
namespace gpu {
namespace kernels {
// to[i] = from[p[i]]
template <typename T, typename I>
__global__
void gather(const T* __restrict__ const from,
T* __restrict__ const... |
9bf49400fe2ac962a2bc1682c4df388fcafb68bcbc41529754c8c2dfb3f73958 | CUDA | 1,497 | 63 | // @file copy_gpu.cu
// @brief Copy and other data operations (GPU)
// @author Andrea Vedaldi
/*
Copyright (C) 2015-16 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "copy.hpp"
#include "../data... |
18e6e3e4e6b0c7af855b77b6eae67d13d0bdb177b9c833fbcb3344a979810381 | CUDA | 1,514 | 60 | #include <cmath>
#include <arbor/gpu/gpu_api.hpp>
#include <arbor/gpu/gpu_common.hpp>
#include <arbor/gpu/math_cu.hpp>
#include "stimulus.hpp"
namespace arb {
namespace gpu {
// TODO: Implement version with reproducibility-friendly accumulations.
// See Arbor issue #1059.
namespace kernel {
__global__
void istim... |
34c92388f7ea5977a2aa4154c69196993a6ea2536819d384d5afd7d0f338a7c3 | CUDA | 1,577 | 46 | /*!
* Copyright (c) 2021-2026 Microsoft Corporation. All rights reserved.
* Copyright (c) 2021-2026 The LightGBM developers. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#include "cuda_score_updater.hpp"
#ifdef USE_CUDA
namespace LightGBM... |
a67699bbab95b1ee2b951a0e1e3b3a7967b1ecdfbc4e6de8aa3c7a50aa0b9fb2 | CUDA | 1,581 | 38 | /*
This file is part of WhiskEras 2.0.
WhiskEras 2.0 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 of the License, or
(at your option) any later version.
WhiskEras 2.0 ... |
bfbf7cd6c5c6bd32f94eecb54a6af93deb2ba84f054ab6b6882a8f001b8e07c5 | CUDA | 1,748 | 51 | // GPU kernels and wrappers for shared state methods.
#include <backends/event.hpp>
#include <backends/event_stream_state.hpp>
#include <arbor/gpu/gpu_api.hpp>
#include <arbor/gpu/gpu_common.hpp>
namespace arb {
namespace gpu {
namespace kernel {
// Vector/scalar addition: x[i] += v ∀i
template <typename T>
__glob... |
3a5e0e6c8e2617975642626c0cfcae3e8df5038eaee693628250910e06f77b70 | CUDA | 1,904 | 62 | #include "cfunc_filter.cuh"
#include "kernels_filter.cuh"
#include<stdio.h>
cfunc_filter::cfunc_filter(size_t nproj, size_t nz, size_t n)
: nproj(nproj), nz(nz), n(n) {
//fft filter R<->C
cufftCreate(&plan_filter_fwd);
cufftCreate(&plan_filter_inv);
long long ffts[1] = {};
long long inembed... |
502fecc8618a86a7759a1bff18a37919cf9c3efa0f8d8d076521cfc31dd3e56f | CUDA | 2,007 | 79 | // @file copy_gpu.cu
// @brief Copy and other data operations (GPU)
// @author Andrea Vedaldi
/*
Copyright (C) 2015-16 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "copy.hpp"
#include "../data... |
55e70d8dfda8c4e521d771d2e402c7d0634801ba06ab1fc85c2eff8c999c2003 | CUDA | 2,221 | 69 | #include <vector>
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAGeneratorImpl.h>
#include <ATen/cuda/detail/IndexUtils.cuh>
#include <ATen/cuda/detail/TensorInfo.cuh>
#include <c10/cuda/CUDAMathCompat.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include <cuda_bf16.h>
#include <curand_kernel.h... |
7611bdb1d170e34f0cf23b6c8b46e096d2d71abc31525eb9266ee28100d09b6d | CUDA | 2,302 | 55 | #include "cfunc_linerec.cuh"
#include "kernels_linerec.cuh"
cfunc_linerec::cfunc_linerec(size_t nproj, size_t nz, size_t n,size_t ncproj, size_t ncz)
: nproj(nproj), nz(nz), n(n), ncproj(ncproj), ncz(ncz) {
}
// destructor, memory deallocation
cfunc_linerec::~cfunc_linerec() { free(); }
void cfunc_linerec... |
7ff67783be5ef7c9df8d3840b0a1d7465d11cdfa7ba61318db12e7651988450b | CUDA | 2,336 | 64 | #include <arbor/gpu/gpu_api.hpp>
#include <arbor/gpu/gpu_common.hpp>
#include "backends/rand_impl.hpp"
namespace arb {
namespace gpu {
namespace kernel {
__global__
void generate_random_numbers(
arb_value_type* __restrict__ dst,
std::size_t width,
std::size_t width_padded,
std::size_t num_rv,
arb... |
81b8e4d767c6075bab55a35653c466fe19a7f3e0507f8ff18ce991bc0c09a839 | CUDA | 2,441 | 86 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file,... |
f58cd88a9cd82541d7778064c6daa318908da1cf55600d87e74598142458d56e | CUDA | 2,489 | 69 | /*
* This file is part of NAStJA.
*
* Copyright 2016 - 2021 Marco Berghoff and the NAStJA Core Developers
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
* distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#inc... |
1408b28382bf63015d6a21c24da17bdb3f5852b6083e3d50059a4b8495b719a9 | CUDA | 2,499 | 79 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file,... |
5511046d678817b379d6e6a8346aabfc8c5981ef7f336bb0adf13b49e4348478 | CUDA | 2,654 | 78 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file,... |
f37c7f117704e9a416cf6d30247496222afdd53b6870867bd8b287e0bf56314f | CUDA | 2,729 | 81 | // Copyright (c) 2026 Rohit Jena. All rights reserved.
//
// This file is part of FireANTs, distributed under the terms of
// the FireANTs License version 1.0. A copy of the license can be found
// in the LICENSE file at the root of this repository.
//
// IMPORTANT: This code is part of FireANTs and its use, reproduct... |
430634aaa424b95b814f6439c10dd6301768500870307f5994924ebb6bef6dc5 | CUDA | 2,796 | 62 | /*!
* Copyright (c) 2021-2026 Microsoft Corporation. All rights reserved.
* Copyright (c) 2021-2026 The LightGBM developers. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifdef USE_CUDA
#include <LightGBM/cuda/cuda_column_data.hpp>
#defi... |
ecde8b9ad0c999d575a41d997badfadf8a7d66eecdea7cda5eff06459545b63b | CUDA | 2,854 | 63 | #include <stddef.h>
#include <stdint.h>
#include "stewart_aslanidi_noble_2009.h"
__global__ void kernel_set_model_initial_conditions(real *sv, int num_volumes, size_t pitch, bool use_adpt_dt, real min_dt) {
int threadID = blockDim.x * blockIdx.x + threadIdx.x;
if (threadID < num_volumes) {
*((real *... |
fe176323b7e21f8269dfd298cd736c2532c850bee1eba0a3dd90d731652118f7 | CUDA | 2,973 | 102 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file,... |
73d57922c6797cbce9ffe3b1f726e32e726d8139bca89e2ee9124e7cc55741c1 | CUDA | 3,239 | 72 | /*
* This file is part of NAStJA.
*
* Copyright 2016 - 2021 Marco Berghoff and the NAStJA Core Developers
*
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not
* distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#inc... |
144de8e20dbcf1d894d0a8be1aa54e4fbc3e96c9506a1658ea0b6a6c1c6a4e84 | CUDA | 3,261 | 143 | #include <gtest/gtest.h>
#include "backends/gpu/stack.hpp"
#include "backends/gpu/stack_cu.hpp"
#include "gpu_context.hpp"
using namespace arb;
TEST(stack, construction) {
using T = int;
auto context = make_gpu_context(0);
if (!context->has_gpu()) return;
gpu::stack<T> s(10, context);
EXPECT_E... |
68a8fc30244ae6f00de6d34c55f89b7ca2362bfb0c66d8894ce451ee7fd1e58a | CUDA | 3,292 | 108 | /*
* Example of how to use the mxGPUArray API in a MEX file. This example shows
* how to write a MEX function that takes a gpuArray input and returns a
* gpuArray output, e.g. B=mexFunction(A).
*
* Copyright 2012 The MathWorks, Inc.
*/
#include <stdio.h>
#include <stdlib.h>
#include <cuda.h>
#include <math.h>
#i... |
5da046ef7291563804bac89b23f480a6da6b80eb3e1fcb642556446f314a814a | CUDA | 3,406 | 117 | #include <arbor/fvm_types.hpp>
#include <arbor/gpu/gpu_common.hpp>
#include "matrix_common.hpp"
namespace arb {
namespace gpu {
namespace kernels {
/// GPU implementation of Hines Matrix solver.
/// Flat format
/// p: parent index for each variable. Needed for backward and forward sweep
template <typename T, typena... |
7bd8243f8facb83f5330e1e17553d6c7cd8ec7a4ba9b36e610b6f0e50ed6c323 | CUDA | 3,448 | 75 | #define EIGEN_USE_GPU
#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
#include "tensor_benchmarks.h"
// Simple functions
#define BM_FuncGPU(FUNC) \
static void BM_##FUNC(int iters, int N) { \
Sto... |
10f2b4541f2d60c639c37f8b5a5eb443e6927d809e40463c5b3179223e8a0a6a | CUDA | 3,458 | 77 | #define EIGEN_USE_GPU
#include <cuda.h>
#include <cuda_runtime.h>
#include <iostream>
#include "tensor_benchmarks.h"
// Simple functions
#define BM_FuncGPU(FUNC) \
static void BM_##FUNC(int iters, int N) { \
Sto... |
cbf1f15def0552253ffb6ee78bd2698c2ee2201c82b4ed78dc931cc68a3d96af | CUDA | 3,858 | 171 | #include <ATen/ATen.h>
#include <ATen/AccumulateType.h>
#include <ATen/cuda/CUDAContext.h>
#include <ATen/cuda/Exceptions.h>
#include <c10/cuda/CUDAGuard.h>
#include <cuda_bf16.h>
#include <assert.h>
#include "type_shim.h"
#include "multi_tensor_apply.cuh"
#define BLOCK_SIZE 512
#define ILP 4
template<typename T>
_... |
6d9a695c09eeb4333d2f2ff7df7bd32249ee91b9ab5bb119faab72d8f4fa8289 | CUDA | 3,904 | 129 | // Compare implementations of reduce by key
// u[key[i]] += v[i]
// where key is sorted in ascending order and may contain repeated keys
// Explicitly undef NDEBUG for assert below.
#undef NDEBUG
#include <iostream>
#include <vector>
#include <random>
#include <benchmark/benchmark.h>
#include <memory/memory.hpp>
... |
8dd8d69f3eea9fcf7623d40752b1f9366c967919e1788db2ff321ad44b75aea3 | CUDA | 4,005 | 139 | // @file nnbias.cu
// @brief Bias block
// @author Andrea Vedaldi
/*
Copyright (C) 2015-16 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "nnbias.hpp"
#include "impl/nnbias_blas.hpp"
#if ENABLE_... |
d239517b54eca10954877a72ea585ee3312ea06a5b65c9a9dc2e903f1d11eb61 | CUDA | 4,024 | 127 | #include <cmath>
#include <arbor/fvm_types.hpp>
#include <arbor/gpu/math_cu.hpp>
#include "backends/threshold_crossing.hpp"
#include "stack_cu.hpp"
namespace arb {
namespace gpu {
namespace kernel {
/// kernel used to test for threshold crossing test code.
/// params:
/// t : current time (ms)
/// t_... |
325b1a0c7bd9f451f0d5f7c7ea7f3bf680a6852128f23d24cb54d9ce907dff65 | CUDA | 4,107 | 137 | /** @file vl_cudatool.cu
** @brief Low-level CUDA tricks.
** @author Andrea Vedaldi
**/
/*
Copyright (C) 2016 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "bits/mexutils.h"
#include "gpu/m... |
954fe2ca55a5bce3f49aa003395b3f5e5a1cc46a8ed5ad1f56317ed43d953464 | CUDA | 4,222 | 128 | #include "../../gpu_utils/gpu_utils.h"
#include <stddef.h>
#include <stdint.h>
#include "mitchell_shaeffer_2003.h"
extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) {
log_info("Using Mitchell-Shaeffer 2003 GPU model\n");
uint32_t num_volumes = solver->original_num_cells;
// ex... |
cfe8d8178dc998b859f13ed92f358a20f80ead73837a95b15948755b672ab861 | CUDA | 4,234 | 145 | // @file nnnormalize.cu
// @brief Normalization block
// @author Andrea Vedaldi
/*
Copyright (C) 2014-16 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "nnnormalize.hpp"
#include "impl/normalize... |
6a33e075aa90ad45e606d7e68198f2b083e4e5319880bfae8aeeed6a71724cd4 | CUDA | 4,347 | 136 | #include "../../gpu_utils/gpu_utils.h"
#include <stddef.h>
#include <stdint.h>
#include "fhn_mod.h"
extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) {
log_info("Using modified FHN 1961 GPU model\n");
uint32_t num_volumes = solver->original_num_cells;
// execution configuratio... |
6afe2cd16d6dcd85d33821710389d9d83e74317220e0bd8c30903aa1c04c6ab9 | CUDA | 4,615 | 164 | // @file nnbilinearsampler.cu
// @brief Bilinear sampler block
// @author Ankush Gupta
// @author Andrea Vedaldi
/*
Copyright (C) 2016- Ankush Gupta and Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#in... |
0231227723a97786defe17734be55eb43f2be1462dcc81a9e5bd1292913c1023 | CUDA | 4,650 | 109 | /*!
* Copyright (c) 2021-2026 Microsoft Corporation. All rights reserved.
* Copyright (c) 2021-2026 The LightGBM developers. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*/
#ifdef USE_CUDA
#include <algorithm>
#include "cuda_multiclass_objec... |
1d7a48d70c87c8673aa027f82b2c5b2e8c5773fc151439563ce17d71b5b49e4e | CUDA | 4,802 | 151 | // @file nnroipooling.cu
// @brief roipooling block
// @author Hakan Bilen
// @author Abishek Dutta
// @author Andrea Vedaldi
/*
Copyright (C) 2016 Hakan Bilen, Abishek Dutta, and Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see... |
ab30f8a0d530252cfa1a9fe4542ae46311e5cdc021c006d507fabc8b0986127e | CUDA | 4,845 | 165 | #include <gtest/gtest.h>
#include <algorithm>
#include <vector>
#include <arbor/gpu/reduce_by_key.hpp>
#include "gpu_vector.hpp"
using namespace arb;
template <typename T, typename I>
__global__
void reduce_kernel(const T* src, T* dst, const I* index, int n) {
unsigned tid = threadIdx.x + blockIdx.x*blockDim.x... |
d2d17c51c00352943f4fd5c6b1f14fa7a997aa40d6371a512e0e3bba078c311e | CUDA | 4,868 | 169 | #include <gtest/gtest.h>
#include <limits>
#include <string_view>
#include <arbor/gpu/gpu_api.hpp>
#include <arbor/gpu/math_cu.hpp>
#include "gpu_vector.hpp"
namespace kernels {
template <typename T>
__global__
void test_atomic_add(T* x) {
arb::gpu::gpu_atomic_add(x, threadIdx.x+1);
}
t... |
25e6f7a2d46bd985ad7622af974b87c0b1324ee4844df3fa00f5f11bda6a9f7a | CUDA | 4,899 | 166 | // @file subsampling_gpu.cu
// @brief Subsampling block implementation (GPU)
// @author Andrea Vedaldi
// @author Karel Lenc
/*
Copyright (C) 2014-16 Andrea Vedaldi and Karel Lenc.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING fi... |
8b8ad8d51f0d69b8827c853e31aca9ba8bf7c209082ec16e1cd40968691eb81d | CUDA | 5,013 | 182 | // @file vl_nnnormalize.cu
// @brief Normalization block MEX wrapper
// @author Andrea Vedaldi
/*
Copyright (C) 2014-15 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "bits/mexutils.h"
#include ... |
a2d6d3beabc13b164f161522d5bb618d015ce63ebe8466d06ab93767a88c9ee9 | CUDA | 5,102 | 129 | #include "cfunc_fourierrec.cuh"
#include "kernels_fourierrec.cuh"
cfunc_fourierrec::cfunc_fourierrec(size_t nproj, size_t nz, size_t n)
: nproj(nproj), nz(nz), n(n) {
float eps = 1e-3;
mu = -log(eps) / (2 * n * n);
m = ceil(2 * n * 1 / PI * sqrt(-mu * log(eps) + (mu * n) * (mu * n) / 4));
... |
e3e463ad78c4d3daae59a22772fac54c0da9b284ba7990f45a69df350965f894 | CUDA | 5,243 | 172 | // @file nnsubsample_gpu.cu
// @brief Subsampling block implementation (GPU)
// @author Andrea Vedaldi
// @author Karel Lenc
/*
Copyright (C) 2014-16 Andrea Vedaldi and Karel Lenc.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING fi... |
0d76fb7e75b3ca397df53f0f9806cb9394efa2e8bb5b21176ae214df5baa89e1 | CUDA | 5,285 | 186 | // @file vl_nnnormalize.cu
// @brief Normalization block MEX wrapper
// @author Andrea Vedaldi
/*
Copyright (C) 2014-15 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "bits/mexutils.h"
#include ... |
e38d66f6b2bd029c79b0bf01fc3c9d4cc0815222f3b38474595767290802cb09 | CUDA | 5,322 | 128 | /*****************************************************************************
*
* Random Number Generator Algorithm and Initialization
*
****************************************************************************/
/*
* This file is part of GPUMCML.
*
* GPUMCML is free software: you can redistribute it and/or modi... |
41aa932bdd514a8234f8b9aecc69772c88cee72ac11bbea8a28de285ad1fd0f0 | CUDA | 5,345 | 85 | /*!
* Copyright (c) 2022-2026 Microsoft Corporation. All rights reserved.
* Copyright (c) 2022-2026 The LightGBM developers. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for
* license information.
* Modifications Copyright(C) 2023 Advanced Micro Devices, Inc. All righ... |
d353df9df55519d54748976424e803bb1c25d780b0c695450c9e9e614dfa1adb | CUDA | 5,449 | 181 | // @file nnnormalize_gpu.c
// @brief Normalize block implementation (GPU)
// @author Andrea Vedaldi
/*
Copyright (C) 2014-17 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "nnnormalize.hpp"
#inc... |
c0692619fef9e70e4eaa1280eeb0ff36a1aa56777d532dc9f622457e28899358 | CUDA | 5,502 | 217 | /** @file vl_taccummx.cu
** @brief VL_TACCUM MEX helper.
** @author Andrea Vedaldi
**/
/*
Copyright (C) 2016 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "bits/mexutils.h"
#include "bits/da... |
5431c633eeb7880caacd92b88668d6c3f7417889cb3c58176665aebab2548596 | CUDA | 5,537 | 197 | // @file normalize_gpu.c
// @brief Normalize block implementation (GPU)
// @author Andrea Vedaldi
/*
Copyright (C) 2014-16 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "normalize.hpp"
#include... |
4d1403c597d31880fcb8bf26bd76ab4f948aecbf2681d48b57f61f8d699655d8 | CUDA | 5,564 | 154 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2015 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file,... |
72c824a2f15914d3d3966e4df29d22b822c1c075ed74f2969b679678b070617e | CUDA | 5,590 | 201 | /* Compare implementations of the test:
* ∃i: a[i]<b[i]?
* for device-side arrays a and b.
*
* Four implementations are compared:
* 1. Copy both vectors to host, compare there.
* 2. Use the thrust library.
* 3. Use a small custom cuda kernel.
* 4. Same custom cuda kernel with once-off allocation of return va... |
f80f9ccf4e8b1c212ef2a5d74c950f8c119d95cf9edde6e963b303a9b0d22d0d | CUDA | 5,598 | 117 | #include "courtemanche_ramirez_nattel_1998.h"
#include <stddef.h>
#include <stdint.h>
__global__ void kernel_set_model_initial_conditions(real *sv, int num_volumes, size_t pitch, bool use_adpt_dt, real min_dt) {
int threadID = blockDim.x * blockIdx.x + threadIdx.x;
if (threadID < num_volumes) {
*((r... |
17cdf03eba825e9c5b5b3888ea4d0978b48202265fedf414c235098d3d6a6a40 | CUDA | 5,813 | 190 | // @file nnpooling.cu
// @brief Pooling block
// @author Andrea Vedaldi
/*
Copyright (C) 2014-16 Andrea Vedaldi and Karel Lenc.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "nnpooling.hpp"
#include "impl/pool... |
4d9b30fc191c40b73652c88c35c06c4123637a6278967825d2012bd3ed982f52 | CUDA | 5,861 | 152 | #include "ATen/ATen.h"
#include "ATen/cuda/CUDAContext.h"
#include "ATen/cuda/detail/IndexUtils.cuh"
#include <cuda.h>
#include <cuda_runtime.h>
#include <stdio.h>
#include <cmath>
#include "ATen/TensorUtils.h"
#include "ATen/AccumulateType.h"
#include <ATen/cuda/Exceptions.h>
#include <limits>
#include <cstdint>
#inc... |
316b5a8cca0a6e66da00e8b16e7027a0ec8c52a64ce2ce73c3e592e1420b98e8 | CUDA | 5,973 | 159 | // Copyright (c) 2026 Rohit Jena. All rights reserved.
//
// This file is part of FireANTs, distributed under the terms of
// the FireANTs License version 1.0. A copy of the license can be found
// in the LICENSE file at the root of this repository.
//
// IMPORTANT: This code is part of FireANTs and its use, reproduct... |
b27324e8d9909f9c5878fda5c3d09133a29816571c22aefcf8edc1e8c998c005 | CUDA | 6,408 | 165 | #include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_fp16.h>
#include <torch/extension.h>
#include <stdexcept>
template <typename T>
__global__ void cuda_kernel_snn_compute_potential_and_spike(const T *conv_psum
,T *potential
,T *spike
,T *smask
,int64_t single_batch_data_num
,int64_t single_time_data_... |
50d6b0d9876ef8097de2da9d5b737a6f8bcd0b7021446a1db7d1eddf19e92f59 | CUDA | 6,533 | 223 | // @file vl_nnbilinearsampler.cu
// @brief Bilinear Sampler MEX wrapper
// @author Ankush Gupta
// @author Andrea Vedaldi
/*
Copyright (C) 2016- Ankush Gupta and Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).... |
afe8c0c947a159bb4fa135cc6e4ffa82efde6943885aaca20517a45ae0b491e9 | CUDA | 6,622 | 173 | #include "../../gpu_utils/gpu_utils.h"
#include <stddef.h>
#include <stdint.h>
#include "ten_tusscher_2004_mixed_endo_mid_epi.h"
__constant__ size_t pitch;
size_t pitch_h;
extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) {
uint32_t num_volumes = solver->original_num_cells;
#ifdef... |
a70ff709232d8600987003b773c33af60c46f32d430b7cede7cf9cbdd1176071 | CUDA | 6,657 | 216 | // @file nnfullyconnected.cu
// @brief Fully-connected block
// @author Andrea Vedaldi
/*
Copyright (C) 2014-17 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "nnfullyconnected.hpp"
#include "im... |
0912d6fe6d1db2dba8a03dcab4f73c70e6229b7e716de8a7e4a07f8b78eabde5 | CUDA | 6,691 | 226 | // @file vl_nnbilinearsampler.cu
// @brief Bilinear Sampler MEX wrapper
// @author Ankush Gupta
// @author Andrea Vedaldi
/*
Copyright (C) 2016- Ankush Gupta and Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).... |
9904c2772389a37fbb68a773d3f8ad25bfc800bf3816f97d43f5af7d58d0c86a | CUDA | 6,822 | 186 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2016 Benoit Steiner <benoit.steiner.goog@gmail.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file,... |
b63baddb0d331c26d47cb49015e859f54681f1673873457b33cc463e570dde12 | CUDA | 6,872 | 210 | // @file nnbias.cu
// @brief Bias block
// @author Andrea Vedaldi
/*
Copyright (C) 2015-17 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "nnbias.hpp"
#include "impl/dispatcher.hpp"
#include "im... |
f8336f1890dac1c8ad93c52050e2a216c367d6dec1de50cc3f9ff6c056efabc9 | CUDA | 6,989 | 205 | #include <arbor/fvm_types.hpp>
#include <arbor/gpu/gpu_common.hpp>
#include "matrix_common.hpp"
namespace arb {
namespace gpu {
namespace kernels {
/// GPU implementatin of Hines matrix assembly
/// Flat layout
/// For a given time step size dt
/// - use the precomputed alpha and alpha_d values to construct the ... |
be6a757a24d3ae184768700ab40884cacd9d7b438a445148eca5f01a77b7b6b1 | CUDA | 7,161 | 235 | extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) {
size_t pitch_h;
uint8_t use_adpt_dt = (uint8_t)solver->adaptive;
//TODO: set a model name??
log_info("Using GPU model implemented in %s\n", __FILE__);
uint32_t num_volumes = solver->original_num_cells;
if(use_adpt... |
55c77c51df219fd4ee67e48835c1021c21367e979a15677a19cfc4dd0bab1728 | CUDA | 7,285 | 229 | // @file nnsubsample.cu
// @brief Subsampling block
// @author Andrea Vedaldi
/*
Copyright (C) 2014-16 Andrea Vedaldi and Karel Lenc.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "nnsubsample.hpp"
#include "i... |
07f8f0dea30674b3945c6713632b76391adf900c2ebeb7da1141cc0b485a47fd | CUDA | 7,509 | 162 | #include "cfunc_lprec.cuh"
#include "kernels_lprec.cuh"
#include<stdio.h>
cudaError_t copy3DDeviceToArray(cudaArray* dfa, real* df, cudaExtent ext, cudaStream_t stream)
{
cudaMemcpy3DParms param = { 0 };
param.srcPtr = make_cudaPitchedPtr((void*)df, ext.width*sizeof(real), ext.width, ext.height);
param.dstArray = ... |
20409d645c7a06510cb5b0396c6fabd1674d3dc71116083c9a2cbd2d58ebe83b | CUDA | 7,568 | 218 | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2014 Benoit Steiner <benoit.steiner.goog@gmail.com>
// Copyright (C) 2014 Navdeep Jaitly <ndjaitly@google.com>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. ... |
be953997ff1fd536fc160b8d30e5aaa2737cb5ba376f570591168643dccb60df | CUDA | 7,625 | 205 | #include "../../gpu_utils/gpu_utils.h"
#include "../../monodomain/constants.h"
#include "ten_tusscher_3_RS.h"
#include <stddef.h>
extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) {
char *cell_type;
#ifdef ENDO
cell_type = strdup("ENDO");
#endif
#ifdef EPI
ce... |
6c8fb4471ef7e574d012a9e8a5570cf70363c6e6d6e916a17ff06914cb3ca625 | CUDA | 7,680 | 135 | #include "Maleckar2008.h"
#include <stddef.h>
#include <stdint.h>
__global__ void kernel_set_model_initial_conditions(real *sv, int num_volumes, size_t pitch, bool use_adpt_dt, real min_dt) {
int threadID = blockDim.x * blockIdx.x + threadIdx.x;
if (threadID < num_volumes) {
*((real * )((char *) sv +... |
a5613c284f36cd2483b1de5977d15d63760b703fc85fa400ee03b0e34482681b | CUDA | 7,772 | 180 | #include "../../gpu_utils/gpu_utils.h"
#include "noble_1962.h"
#include <stddef.h>
#include <stdint.h>
extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) {
log_info("Using noble_1962 GPU model\n");
uint32_t num_volumes = solver->original_num_cells;
// execution configuration
... |
926c277e24f40609622bb4ce49912838d1c799e63edcccc1c75e65e701acd497 | CUDA | 7,808 | 289 | // Copyright (c) Meta Platforms, Inc. and affiliates.
// All rights reserved.
// This source code is licensed under the license found in the
// LICENSE file in the root directory of this source tree.
// adapted from https://github.com/zsef123/Connected_components_PyTorch
// with license found in the LICENSE_cctorch f... |
1bfd52cf4436d523c20ca38189d3f93cd294ab7554239a2d28a290e99d77d0ab | CUDA | 7,908 | 226 | //
// CUDA implementation of FIM (Fast Iterative Method) for Eikonal equations
//
// Copyright (c) Won-Ki Jeong (wkjeong@unist.ac.kr)
//
// 2016. 2. 4
//
#include <cstdio>
#include <assert.h>
#include "cuda_fim_kernel.h"
#include "cuda_fim.h"
#include "../gpu_utils/gpu_utils.h"
#include <math.h>
void run_eikonal_solv... |
3bbfeff123b8e7c89040a265ef342ae3772318afb2aaae01756818e0c38e93e3 | CUDA | 8,006 | 255 | // @file nnfullyconnected.cu
// @brief Fully-connected block
// @author Andrea Vedaldi
/*
Copyright (C) 2014-16 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "nnfullyconnected.hpp"
#include "im... |
56b952670068d3e8f94e86be0ebab4731035fafb6fbb62cd242f03afe59a877c | CUDA | 8,111 | 185 | /*!
* Copyright (c) 2021-2026 Microsoft Corporation. All rights reserved.
* Copyright (c) 2021-2026 The LightGBM developers. All rights reserved.
* Licensed under the MIT License. See LICENSE file in the project root for
* license information.
*/
#ifdef USE_CUDA
#include <algorithm>
#include <LightGBM/cuda/cuda... |
6d6037d3642c2c2902759f53fd854e13c494c57949b27b36fe1a632f3de82604 | CUDA | 8,129 | 197 | #include "../../gpu_utils/gpu_utils.h"
#include "../../monodomain/constants.h"
#include "ten_tusscher_tt3_mixed_endo_mid_epi.h"
#include <stddef.h>
extern "C" SET_ODE_INITIAL_CONDITIONS_GPU(set_model_initial_conditions_gpu) {
log_info("Using Ten & Tusscher 3 GPU model\n");
uint32_t num_volumes = solver->orig... |
575cd03bfaf535521878f535ece57055e907cc80173ffdec24606353c8f5a724 | CUDA | 8,207 | 271 | // @file vl_nnroipooling.cpp
// @brief ROI pooling block
// @author Hakan Bilen
// @author Abishek Dutta
// @author Andrea Vedaldi
/*
Copyright (C) 2016-17 Hakan Bilen, Abishek Dutta, and Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD lice... |
0c40bcb7acc528f3da6ea6eb37bfb1c113a1d9a39114b06cc8cbda0032a82c23 | CUDA | 8,218 | 292 | // @file vl_nnnormalizelp.cu
// @brief LP normalization MEX wrapper
// @author Sebastien Ehrhardt
// @author Andrea Vedaldi
/*
Copyright (C) 2017 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "... |
39e4ad0332ab04e3d495cfd642cffad0c1b9ea19d2f17dd778e0418919b406dc | CUDA | 8,242 | 183 | /*
this file is part of whiskeras 2.0.
whiskeras 2.0 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 of the license, or
(at your option) any later version.
whiskeras 2.0 is distributed i... |
7a63525c8742c8c6cfe4c1c8a11f522ba3967b5a7c8df1d6b08efb378cad7f5c | CUDA | 8,342 | 284 | // @file nnbnorm.cu
// @brief Batch normalization block
// @author Sebastien Ehrhardt
// @author Andrea Vedaldi
/*
Copyright (C) 2015-16 Sebastien Ehrhardt and Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
... |
1e8b166256138c435c5458cb28c48cb11241aed8f866b74e0e1014c814e92f6f | CUDA | 8,433 | 250 | // @file nnsubsample.cu
// @brief Subsampling block
// @author Andrea Vedaldi
/*
Copyright (C) 2014-17 Andrea Vedaldi and Karel Lenc.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#include "nnsubsample.hpp"
#include "i... |
2ad946bcc3e20a75a45276b9fdc412b2b80610e800a90058d52bcb487c3a676d | CUDA | 8,491 | 276 | // @file vl_nnroipooling.cpp
// @brief roipooling block implementation (GPU)
// @author Hakan Bilen
// @author Abishek Dutta
// @author Andrea Vedaldi
/*
Copyright (C) 2016 Hakan Bilen, Abishek Dutta, and Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the term... |
507eed6ed3ed37dd0a0bfd911df3adf202b9fea15294ef3c2f05c642c70879b7 | CUDA | 8,567 | 228 | // @file nnbias_cudnn.cu
// @brief biasolution block CuDNN-based implementation.
// @author Andrea Vedaldi
/*
Copyright (C) 2015-16 Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#if !defined(ENABLE_GPU)... |
35030da0b9359836e9a0a1a1da99df64c4fa907bfc6bfccf9f10a63b546636c0 | CUDA | 8,570 | 271 | // @file nnbilinearsampler.cu
// @brief Bilinear sampler block
// @author Ankush Gupta
// @author Andrea Vedaldi
/*
Copyright (C) 2016-17 Ankush Gupta and Andrea Vedaldi.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.