commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
b61229631268bb419ff78c38079dfe955d313427
test for blockid and thread id
NandoSerrano85/CDA4101-project
main.cu
main.cu
/* Team: Packers PID: 5642858 Class: CDA4101 Section: U02 Affirmation: "I affirm that this program is entirely my own work and none of it is the work of any other person." */ #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <unistd.h> #include "bmplib.h" int img_pix[100000][100000][3] = {{{0}}}; ...
/* Team: Packers PID: 5642858 Class: CDA4101 Section: U02 Affirmation: "I affirm that this program is entirely my own work and none of it is the work of any other person." */ #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <unistd.h> #include "bmplib.h" int img_pix[100000][100000][3] = {{{0}}}; ...
apache-2.0
Cuda
14cd67e496cdfd568e19137140a5b626300d4da0
Test transform_reduce with thrust::device in __device__ code.
xiongzhanblake/thrust,thrust/thrust,xiongzhanblake/thrust_src,Ricardo666666/thrust,mohamed-ali/thrust,dachziegel/thrust,dachziegel/thrust,GrimDerp/thrust,thrust/thrust,egaburov/thrust,jaredhoberock/thrust,egaburov/thrust,dachziegel/thrust,xiongzhanblake/thrust_src,sarvex/thrust,raygit/thrust,sdalton1/thrust,thvasilo/th...
testing/backend/cuda/transform_reduce.cu
testing/backend/cuda/transform_reduce.cu
#include <unittest/unittest.h> #include <thrust/transform_reduce.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator1, typename Function1, typename T, typename Function2, typename Iterator2> __global__ void transform_reduce_kernel(ExecutionPolicy exec, Iterator1 first, Iterato...
#include <unittest/unittest.h> #include <thrust/transform_reduce.h> #include <thrust/execution_policy.h> template<typename Iterator1, typename Function1, typename T, typename Function2, typename Iterator2> __global__ void transform_reduce_kernel(Iterator1 first, Iterator1 last, Function1 f1, T init, Function2 f2, Ite...
apache-2.0
Cuda
30d9589afe26f9a08979b3d4506b2f2a802f0236
add cast cuda kernel (#29352)
luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle
paddle/fluid/operators/cast_op.cu
paddle/fluid/operators/cast_op.cu
/* Copyright (c) 2016 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 by applicable law or...
/* Copyright (c) 2016 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 by applicable law or...
apache-2.0
Cuda
a5d44373949544ac8bf73de5f411da3f273705ae
Fix broken unit test build.
xiongzhanblake/thrust_src,egaburov/thrust,zhenglaizhang/thrust,GrimDerp/thrust,sdalton1/thrust,Ricardo666666/thrust,thvasilo/thrust,GrimDerp/thrust,mohamed-ali/thrust,jaredhoberock/thrust,mohamed-ali/thrust,sarvex/thrust,sarvex/thrust,dachziegel/thrust,raygit/thrust,jaredhoberock/thrust,thrust/thrust,raygit/thrust,jare...
testing/backend/cuda/pair_sort.cu
testing/backend/cuda/pair_sort.cu
#include <unittest/unittest.h> #include <thrust/pair.h> #include <thrust/sort.h> #include <thrust/execution_policy.h> template<typename Iterator1, typename Iterator2> __global__ void stable_sort_kernel(Iterator1 first, Iterator1 last, Iterator2 is_supported) { #if (__CUDA_ARCH__ >= 200) *is_supported = true; thru...
#include <unittest/unittest.h> #include <thrust/pair.h> #include <thrust/sort.h> #include <thrust/execution_policy.h> template<typename Iterator1, typename Iterator2> __global__ void stable_sort_kernel(Iterator1 first, Iterator1 last, Iterator2 is_supported) { #if (__CUDA_ARCH__ >= 200) *is_supported = true; thru...
apache-2.0
Cuda
f12178faacfb29f4deec2dede795bad48f2a8d2e
fix long result array
bvanderhaar/cuda-musclework,bvanderhaar/cuda-musclework,bvanderhaar/cuda-musclework
main.cu
main.cu
#include <stdio.h> #include <stdlib.h> /* * In CUDA it is necessary to define block sizes * The grid of data that will be worked on is divided into blocks */ #define BLOCK_SIZE 8 __global__ void cu_dotProduct(int *distance_array_d, int *force_array_d, long long *result_array_d, int ma...
#include <stdio.h> #include <stdlib.h> /* * In CUDA it is necessary to define block sizes * The grid of data that will be worked on is divided into blocks */ #define BLOCK_SIZE 8 __global__ void cu_dotProduct(int *distance_array_d, int *force_array_d, int *result_array_d, int max) { ...
mit
Cuda
97fd757a6258e775ae67d73aa16b093364d19b45
Test swap_ranges with thrust::device in __device__ code.
thrust/thrust,andrewcorrigan/thrust-multi-permutation-iterator,egaburov/thrust,andrewcorrigan/thrust-multi-permutation-iterator,mohamed-ali/thrust,jaredhoberock/thrust,thrust/thrust,xiongzhanblake/thrust_src,marksantos/thrust,raygit/thrust,zeryx/thrust,thrust/thrust,zhenglaizhang/thrust,Ricardo666666/thrust,Ricardo6666...
testing/backend/cuda/swap_ranges.cu
testing/backend/cuda/swap_ranges.cu
#include <unittest/unittest.h> #include <thrust/swap.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator1, typename Iterator2> __global__ void swap_ranges_kernel(ExecutionPolicy exec, Iterator1 first1, Iterator1 last1, Iterator2 first2) { thrust::swap_ranges(exec, first1, la...
#include <unittest/unittest.h> #include <thrust/swap.h> #include <thrust/execution_policy.h> template<typename Iterator1, typename Iterator2> __global__ void swap_ranges_kernel(Iterator1 first1, Iterator1 last1, Iterator2 first2) { thrust::swap_ranges(thrust::seq, first1, last1, first2); } void TestSwapRangesDevi...
apache-2.0
Cuda
d7075468eb7fd7289ab7c7f66b31d9ccbac24a77
fix block size
bvanderhaar/cuda-musclework,bvanderhaar/cuda-musclework,bvanderhaar/cuda-musclework
main.cu
main.cu
#include <stdio.h> #include <stdlib.h> /* * In CUDA it is necessary to define block sizes * The grid of data that will be worked on is divided into blocks */ #define BLOCK_SIZE 32 __global__ void cu_dotProduct(int *distance_array_d, int *force_array_d, long long *result_array_d, int m...
#include <stdio.h> #include <stdlib.h> /* * In CUDA it is necessary to define block sizes * The grid of data that will be worked on is divided into blocks */ #define BLOCK_SIZE 8 __global__ void cu_dotProduct(int *distance_array_d, int *force_array_d, long long *result_array_d, int ma...
mit
Cuda
aff4368441446622e08a001649ada1bc045d9097
use elementwise to optimize gelu forward implementation on GPU (#38188)
luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,luotao1/Paddle,luotao1/Paddle,PaddlePaddle/Paddle
paddle/fluid/operators/gelu_op.cu
paddle/fluid/operators/gelu_op.cu
/* Copyright (c) 2020 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 by applicable law or...
/* Copyright (c) 2020 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 by applicable law or...
apache-2.0
Cuda
01302bf55131eb9e4f59f3fb6cdcea61ffd0ec7f
make TestDeviceDeleteDestructorInvocation a KNOWN_FAILURE
google-code-export/thrust,UIKit0/thrust,allendaicool/thrust,lishi0927/thrust,UIKit0/thrust,Vishwa07/thrust,julianromera/thrust,rdmenezes/thrust,lishi0927/thrust,julianromera/thrust,malenie/thrust,rdmenezes/thrust,lishi0927/thrust,julianromera/thrust,julianromera/thrust,hemmingway/thrust,malenie/thrust,bfurtaw/thrust,Vi...
testing/device_delete.cu
testing/device_delete.cu
#include <thrusttest/unittest.h> #include <thrust/device_vector.h> #include <thrust/device_ptr.h> #include <thrust/device_new.h> #include <thrust/device_delete.h> struct Foo { __host__ __device__ Foo(void) :set_me_upon_destruction(0) {} __host__ __device__ ~Foo(void) { #ifdef __CUDA_AR...
#include <thrusttest/unittest.h> #include <thrust/device_vector.h> #include <thrust/device_ptr.h> #include <thrust/device_new.h> #include <thrust/device_delete.h> struct Foo { __host__ __device__ Foo(void) :set_me_upon_destruction(0) {} __host__ __device__ ~Foo(void) { #ifdef __CUDA_AR...
apache-2.0
Cuda
c9dea082b741db1640d0575b52d4ec017b0c93e0
Test mismatch with thrust::device in __device__ code.
dachziegel/thrust,raygit/thrust,egaburov/thrust,arnabgho/thrust,xiongzhanblake/thrust,mohamed-ali/thrust,GrimDerp/thrust,thvasilo/thrust,dachziegel/thrust,xiongzhanblake/thrust,thrust/thrust,arnabgho/thrust,thrust/thrust,sdalton1/thrust,jaredhoberock/thrust,zhenglaizhang/thrust,sarvex/thrust,andrewcorrigan/thrust-multi...
testing/backend/cuda/mismatch.cu
testing/backend/cuda/mismatch.cu
#include <unittest/unittest.h> #include <thrust/mismatch.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator1, typename Iterator2, typename Iterator3> __global__ void mismatch_kernel(ExecutionPolicy exec, Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator3 result) {...
#include <unittest/unittest.h> #include <thrust/mismatch.h> #include <thrust/execution_policy.h> template<typename Iterator1, typename Iterator2, typename Iterator3> __global__ void mismatch_kernel(Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator3 result) { *result = thrust::mismatch(thrust::seq, first...
apache-2.0
Cuda
f6dcbc04a3dc5a0e3e3401927f2496bde5913eb2
Remove dependence on the CUDA SDK
cburstedde/libsc,holke/libsc,holke/libsc,johannrudi/libsc,cburstedde/libsc,cburstedde/libsc,johannrudi/libsc,cburstedde/libsc,holke/libsc,cburstedde/libsc,johannrudi/libsc,johannrudi/libsc,holke/libsc,johannrudi/libsc
example/cuda/prac5.cu
example/cuda/prac5.cu
/* originally from http://people.maths.ox.ac.uk/gilesm/ and modified */ // // include files // #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <cuda.h> #include "prac5.h" // // kernel routine // __global__ void my_first_kernel(float *x) { int tid = threadIdx.x + blockDim.x*...
/* originally from http://people.maths.ox.ac.uk/gilesm/ and modified */ // // include files // #include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <cutil_inline.h> #include "prac5.h" // // kernel routine // __global__ void my_first_kernel(float *x) { int tid = threadIdx.x + bl...
lgpl-2.1
Cuda
cd952e9eb2e70d0e8f3aa9fd1e424eab518b8f48
fix main
AlexHatesUnicorns/FDTD_Solver,SchadkoAO/FDTD_Solver,SchadkoAO/FDTD_Solver,SchadkoAO/FDTD_Solver,SchadkoAO/FDTD_Solver,SchadkoAO/FDTD_Solver,AlexHatesUnicorns/FDTD_Solver,SchadkoAO/FDTD_Solver
src/Parser/main.cu
src/Parser/main.cu
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include "Parser.h" #include "../Updaters/UpdaterTE.h" #include "../Grids/GridTE.h" #include "../Routines/HzOutputRoutineTE.h" #include <ctime> #include <cmath> int main(int argc, char **argv) { Parser parser; parser.runFile(argv[1]...
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include "Parser.h" #include "../Updaters/UpdaterTE.h" #include "../Grids/GridTE.h" #include "../Routines/HzOutputRoutineTE.h" #include <ctime> #include <cmath> int main(int argc, char **argv) { /*int sizeX = 500; int sizeY = 500; int la...
mit
Cuda
33b3aed01a2104bd53dd94d755b2239a53c5ae6f
change default parameters to those for VLFeat comparison
alicevision/popsift,poparteu/popsift,poparteu/popsift,alicevision/popsift,alicevision/popsift
src/sift/sift_conf.cu
src/sift/sift_conf.cu
#include "sift_conf.h" namespace popart { Config::Config( ) : start_sampling( -1 ) , octaves( -1 ) , levels( 3 ) , sigma( 1.6f ) , _edge_limit( 10.0f ) , _threshold( 0.04 ) // ( 10.0f / 256.0f ) , _sift_mode( Config::PopSift ) , log_mode( Config::None ) , scaling_mode( Config::Indi...
#include "sift_conf.h" namespace popart { Config::Config( ) : start_sampling( -1 ) , octaves( -1 ) , levels( 3 ) , sigma( 1.6f ) , _edge_limit( 10.0f ) , _threshold( 10.0f / 256.0f ) , _sift_mode( Config::PopSift ) , log_mode( Config::None ) , scaling_mode( Config::IndirectDownscal...
mpl-2.0
Cuda
24b2f32b88d5ae1db41e9a262808f35aed4358db
use double for high precision
rk0der/railgun,rk0der/railgun,rk0der/railgun
examples/06_monte_carlo/solve_pi.cu
examples/06_monte_carlo/solve_pi.cu
#include "railgun.h" #include <numeric> #include <iostream> #include <curand_kernel.h> __global__ void monte_pi(int seed, int n_try, double* out) { int id = blockIdx.x * blockDim.x + threadIdx.x; curandState s; curand_init((unsigned int)seed, id, 0, &s); int inside = 0; for (int i = 0; i < n_try...
#include "railgun.h" #include <numeric> #include <iostream> #include <curand_kernel.h> __global__ void monte_pi(int seed, int n_try, float* out) { int id = blockIdx.x * blockDim.x + threadIdx.x; curandState s; curand_init((unsigned int)seed, id, 0, &s); int inside = 0; for (int i = 0; i < n_try;...
mit
Cuda
4d0fdaf4f7bb706773758f1c47f62e0ccb33de8f
Revert datatype for scalar d_params
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
hoomd/md/HarmonicDihedralForceGPU.cuh
hoomd/md/HarmonicDihedralForceGPU.cuh
// Copyright (c) 2009-2019 The Regents of the University of Michigan // This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. // Maintainer: dnlebard #include "hoomd/ParticleData.cuh" #include "hoomd/HOOMDMath.h" #include "hoomd/BondedGroupData.cuh" /*! \file HarmonicDihedralForceGPU...
// Copyright (c) 2009-2019 The Regents of the University of Michigan // This file is part of the HOOMD-blue project, released under the BSD 3-Clause License. // Maintainer: dnlebard #include "hoomd/ParticleData.cuh" #include "hoomd/HOOMDMath.h" #include "hoomd/BondedGroupData.cuh" /*! \file HarmonicDihedralForceGPU...
bsd-3-clause
Cuda
cd5d6486c8cf8b5da0d0c9a5512bdd24d40e894c
Test uber_future's move assignment
egaburov/agency,egaburov/agency
test_uber_future.cu
test_uber_future.cu
#include <cassert> #include "uber_future.hpp" #include <iostream> struct continuation_1 { __host__ __device__ int operator()(int& arg) { return arg + 7; } }; struct continuation_2 { __host__ __device__ int operator()(int& arg) { return arg + 42; }; }; int main() { static_assert(agency::deta...
#include <cassert> #include "uber_future.hpp" #include <iostream> struct continuation_1 { __host__ __device__ int operator()(int& arg) { return arg + 7; } }; struct continuation_2 { __host__ __device__ int operator()(int& arg) { return arg + 42; }; }; int main() { static_assert(agency::deta...
bsd-3-clause
Cuda
371e8f023b3b9c3fb30a70ea4a7f957f0dcd8dcc
fix bug
sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet,sxjscience/mxnet
src/operator/tensor/nn_addition_op.cu
src/operator/tensor/nn_addition_op.cu
/*! * Copyright (c) 2017 by Contributors * \file nn_addition_op.cu * \brief GPU Implementation of nn additional operations */ // this will be invoked by gcc and compile GPU version #include "./nn_addition_op-inl.h" #include "./elemwise_unary_op.h" #include "./elemwise_binary_op.h" namespace mxnet { namespace op { NNV...
/*! * Copyright (c) 2017 by Contributors * \file nn_addition_op.cu * \brief GPU Implementation of nn additional operations */ // this will be invoked by gcc and compile GPU version #include "./nn_addition_op-inl.h" #include "./elemwise_unary_op.h" #include "./elemwise_binary_op.h" namespace mxnet { namespace op { NNV...
apache-2.0
Cuda
9aec3d7a801e051cd009d6034b4d6ceb094e75a7
Bump CUB version to 2.0.0.
NVlabs/cub,NVIDIA/cub
cub/version.cuh
cub/version.cuh
/****************************************************************************** * Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistrib...
/****************************************************************************** * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistrib...
bsd-3-clause
Cuda
24b1f36a6445206fc9e2ba70c70b4ffad4c3af75
fix error
buttonzzj/cuda_trial,buttonzzj/cuda_trial
mat_transpose.cu
mat_transpose.cu
#include <stdio.h> #include "timer.h" #include "utils.h" const int N = 1024; // we are transposing a N by N mat const int K = 1; void fill_matrix(float* mat){ for (int i = 0; i < N*N; i++){ mat[i] = (float)i; } } int main(int argc, char const *argv[]) { size_t mat_size = N * N * sizeof(float); ...
#include <stdio.h> #include "timer.h" #include "utils.h" const int N = 1024; // we are transposing a N by N mat const int K = 1; void fill_matrix(float* mat){ for (int i = 0; i < N*N; i++){ mat[i] = (float)i; } } int main(int argc, char const *argv[]) { size_t mat_size = N * N * sizeof(float); ...
mit
Cuda
01ca8a89b3e67e79ad45b08f937125fd4c786c3b
Replace the non-standard global operator+ with a functor for summing tuples. Fixes a compilation error introduced with the promotion of iterator_facade's operator+.
andrewcorrigan/thrust-multi-permutation-iterator,andrewcorrigan/thrust-multi-permutation-iterator,xiongzhanblake/thrust,marksantos/thrust,GrimDerp/thrust,sdalton1/thrust,dachziegel/thrust,xiongzhanblake/thrust_src,arnabgho/thrust,sdalton1/thrust,andrewcorrigan/thrust-multi-permutation-iterator,GrimDerp/thrust,jaredhobe...
testing/tuple_reduce.cu
testing/tuple_reduce.cu
#include <unittest/unittest.h> #include <thrust/tuple.h> #include <thrust/reduce.h> #include <thrust/transform.h> using namespace unittest; struct SumTupleFunctor { template <typename Tuple> __host__ __device__ Tuple operator+(const Tuple &lhs, const Tuple &rhs) { using thrust::get; return thrust::...
#include <unittest/unittest.h> #include <thrust/tuple.h> #include <thrust/reduce.h> #include <thrust/transform.h> using namespace unittest; template <typename Tuple> __host__ __device__ Tuple operator+(const Tuple &lhs, const Tuple &rhs) { using namespace thrust; return make_tuple(get<0>(lhs) + get<0>(rhs), ...
apache-2.0
Cuda
c21be1f8e7de45fcde3d6a68212f8c3f1f6abd86
Update BFSTest.cu
hornet-gt/hornetsnest,FedericoUnivr/cuStingerAlg,FedericoUnivr/cuStingerAlg,FedericoUnivr/cuStingerAlg,hornet-gt/hornetsnest,hornet-gt/hornetsnest
test/BFSTest.cu
test/BFSTest.cu
/** * @brief Breadth-first Search Top-Down test program * @file */ #include "Static/BreadthFirstSearch/TopDown.cuh" #include <Graph/GraphStd.hpp> #include <Util/CommandLineParam.hpp> #include <cuda_profiler_api.h> //--profile-from-start off int main(int argc, char* argv[]) { using namespace timer; using nam...
/** * @brief Breadth-first Search Top-Down test program * @file */ #include "Static/BreadthFirstSearch/TopDown.cuh" #include <Graph/GraphStd.hpp> #include <Util/CommandLineParam.hpp> #include <cuda_profiler_api.h> //--profile-from-start off int main(int argc, char* argv[]) { using namespace timer; using nam...
bsd-3-clause
Cuda
602562b7beced534cb75891153c88c1ed047fe13
make TestDeviceDeleteDestructorInvocation a KNOWN_FAILURE
jbrownbridge/thrust,jbrownbridge/thrust,jbrownbridge/thrust,jbrownbridge/thrust
testing/device_delete.cu
testing/device_delete.cu
#include <thrusttest/unittest.h> #include <thrust/device_vector.h> #include <thrust/device_ptr.h> #include <thrust/device_new.h> #include <thrust/device_delete.h> struct Foo { __host__ __device__ Foo(void) :set_me_upon_destruction(0) {} __host__ __device__ ~Foo(void) { #ifdef __CUDA_AR...
#include <thrusttest/unittest.h> #include <thrust/device_vector.h> #include <thrust/device_ptr.h> #include <thrust/device_new.h> #include <thrust/device_delete.h> struct Foo { __host__ __device__ Foo(void) :set_me_upon_destruction(0) {} __host__ __device__ ~Foo(void) { #ifdef __CUDA_AR...
apache-2.0
Cuda
292bbadda2bc5bb11d2320ff73ecb8a9e1f85584
Implement the easy kernels: elemwise mul, add
nyu-mll/spinn,nyu-mll/spinn,stanfordnlp/spinn,stanfordnlp/spinn,stanfordnlp/spinn,nyu-mll/spinn
metal_stack/kernels.cuh
metal_stack/kernels.cuh
#ifndef _kernels_ #define _kernels_ #include <cstdlib> #include <cuda_runtime.h> // Grid dimension constraints for jagupard machines. #define MAX_BLOCKS 65535 #define MAX_THREADS_PER_BLOCK 1024 namespace kernels { // v *= s void muli_vs(float *v, int s, int N); __global__ void k_muli_vs(float *v, int s, in...
#ifndef _kernels_ #define _kernels_ #include <cstdlib> #include <cuda_runtime.h> namespace kernels { /** * Add two vectors inplace (writing to the first). * * v1 = v1 * v1_coeff + v2 * v2_coeff */ __global__ void addi_vv(float *v1, const float *v2, float v1_coeff, float v2_coeff); ...
mit
Cuda
1a5aeaff2f1602726854039246b4d0f3f8acff28
Fix to properly support wrapping CUB in a custom outer namespace using CUB_NS_{PRE,POST}FIX macros
NVIDIA/cub,NVlabs/CUB,NVlabs/cub
cub/util_namespace.cuh
cub/util_namespace.cuh
/****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provid...
/****************************************************************************** * Copyright (c) 2011, Duane Merrill. All rights reserved. * Copyright (c) 2011-2018, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provid...
bsd-3-clause
Cuda
f07e813c13d5a47978c1d91509742de10327b44d
Fix block size at fix_output
fixstars-jp/libSGM,fixstars/libSGM
src/fix_output.cu
src/fix_output.cu
/* Copyright 2016 Fixstars Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http ://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwa...
/* Copyright 2016 Fixstars Corporation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http ://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, softwa...
apache-2.0
Cuda
80a3d7bffa67f9eeed2c7fbc9d9c883bfb363cfc
Fix comment marker in OpenCVDetectCudaArch.cu
opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv,opencv/opencv
cmake/checks/OpenCVDetectCudaArch.cu
cmake/checks/OpenCVDetectCudaArch.cu
#include <iostream> #include <sstream> #include <list> int main() { std::ostringstream arch; std::list<std::string> archs; int count = 0; if (cudaSuccess != cudaGetDeviceCount(&count)){ return -1; } if (count == 0) { return -1; } for (int device = 0; device < count; ++device) { cud...
#include <iostream> #include <sstream> #include <list> int main() { std::ostringstream arch; std::list<std::string> archs; int count = 0; if (cudaSuccess != cudaGetDeviceCount(&count)){ return -1; } if (count == 0) { return -1; } for (int device = 0; device < count; ++device) { cud...
apache-2.0
Cuda
04acb553def9018cba911c86ed47e3e1ce6c1c25
Fix uninitialized copy for NVHPC
NVIDIA/cub,NVlabs/cub
cub/detail/uninitialized_copy.cuh
cub/detail/uninitialized_copy.cuh
/****************************************************************************** * Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistrib...
/****************************************************************************** * Copyright (c) 2011-2022, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistrib...
bsd-3-clause
Cuda
e7c721f80d2b64c2edb94953f2d6c704243a4f18
add restrict
MeteoSwiss-APN/comm_overlap_bench,MeteoSwiss-APN/comm_overlap_bench
src/Kernel.cu
src/Kernel.cu
#include "Kernel.h" __global__ void cukernel(Real __restrict__ * in, Real __restrict__* out, const int kSize, const int iStride, const int jStride, const int kStride) { int ipos = blockIdx.x * 32 + threadIdx.x; int jpos = blockIdx.y * 8 + threadIdx.y; out[ipos*iStride + jpos*jStride] = (pow(in[ipos*iStr...
#include "Kernel.h" __global__ void cukernel(Real* in, Real* out, const int kSize, const int iStride, const int jStride, const int kStride) { int ipos = blockIdx.x * 32 + threadIdx.x; int jpos = blockIdx.y * 8 + threadIdx.y; out[ipos*iStride + jpos*jStride] = (pow(in[ipos*iStride + jpos*jStride] *in[ipo...
bsd-2-clause
Cuda
a85c03256cfc0812e268f5e0f1b804910e75e673
Add missing ':' to noexcept.cu test.
llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-cl...
test/CodeGenCUDA/nothrow.cu
test/CodeGenCUDA/nothrow.cu
// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fcuda-is-device \ // RUN: -triple nvptx-nvidia-cuda -emit-llvm -disable-llvm-passes -o - %s | \ // RUN: FileCheck -check-prefix DEVICE %s // RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions \ // RUN: -triple x86_64-unknown-linux-gnu -emit-llvm -d...
// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fcuda-is-device \ // RUN: -triple nvptx-nvidia-cuda -emit-llvm -disable-llvm-passes -o - %s | \ // RUN FileCheck -check-prefix DEVICE %s // RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions \ // RUN: -triple x86_64-unknown-linux-gnu -emit-llvm -d...
apache-2.0
Cuda
678750113efabc5d170dfe9e1154cda50b0c35c2
add support for Nvidia GPUs with CUDA compute capability 6.1 (#110)
facebookresearch/faiss,facebookresearch/faiss,facebookresearch/faiss,facebookresearch/faiss
gpu/utils/DeviceDefs.cuh
gpu/utils/DeviceDefs.cuh
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the CC-by-NC license found in the * LICENSE file in the root directory of this source tree. */ // Copyright 2004-present Facebook. All Rights Reserved. #pragma once namespace faiss { namespace gpu { ...
/** * Copyright (c) 2015-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the CC-by-NC license found in the * LICENSE file in the root directory of this source tree. */ // Copyright 2004-present Facebook. All Rights Reserved. #pragma once namespace faiss { namespace gpu { ...
mit
Cuda
4262dd79925faeb9409b4b8c343154a2f98d8c81
Convert settings to float
amelmquist/chrono,armanpazouki/chrono,projectchrono/chrono,jcmadsen/chrono,dariomangoni/chrono,amelmquist/chrono,amelmquist/chrono,amelmquist/chrono,projectchrono/chrono,projectchrono/chrono,dariomangoni/chrono,jcmadsen/chrono,Milad-Rakhsha/chrono,rserban/chrono,armanpazouki/chrono,andrewseidl/chrono,Milad-Rakhsha/chro...
src/chrono_parallel/physics/ChMPM.cuh
src/chrono_parallel/physics/ChMPM.cuh
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2016 projectchrono.org // All right reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of th...
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2016 projectchrono.org // All right reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of th...
bsd-3-clause
Cuda
364be6ee679b46476c9b8edc373bdb8ea829ab91
Use THCState in LogSigmoid.
andreaskoepf/cunn,jonathantompson/cunn,jhjin/cunn,apaszke/cunn,colesbury/cunn,andreaskoepf/cunn,rotmanmi/cunn,apaszke/cunn,ml-lab/cunn,clementfarabet/cunn,ominux/cunn,hughperkins/cunn,rotmanmi/cunn,szagoruyko/cunn,clementfarabet/cunn,lukasc-ch/cunn,Aysegul/cunn,apaszke/cunn,lukasc-ch/cunn,fmassa/cunn,davidBelanger/cunn...
LogSigmoid.cu
LogSigmoid.cu
#include "utils.h" struct logSigmoid_updateOutput_functor { __host__ __device__ float operator()(const float& input) const { float z = exp(-input); return -log(1. + z); } }; static int cunn_LogSigmoid_updateOutput(lua_State *L) { THCState *state = getCutorchState(L); THCudaTensor *input = (THCudaTen...
struct logSigmoid_updateOutput_functor { __host__ __device__ float operator()(const float& input) const { float z = exp(-input); return -log(1. + z); } }; static int cunn_LogSigmoid_updateOutput(lua_State *L) { THCudaTensor *input = (THCudaTensor*)luaT_checkudata(L, 2, "torch.CudaTensor"); THCudaTens...
bsd-3-clause
Cuda
cf1254c3badfcf965130dcfc09e242933dcc6b54
Update Doxygen documentation with conventions
barbagroup/cuIBM,barbagroup/cuIBM,barbagroup/cuIBM
src/helpers.cu
src/helpers.cu
/***************************************************************************//** * \file helpers.cu * \author Anush Krishnan (anush@bu.edu) * \brief Definition of the discrete Delta function. */ #include "helpers.h" /** * \fn real dhRoma(real x, real h) * \brief Discrete Delta function from Roma et al. (1999)...
/***************************************************************************//** * \file helpers.cu * \author Krishnan, A. (anush@bu.edu) * \brief Definition of the discrete Delta function */ #include "helpers.h" /** * \fn real dhRoma(real x, real h) * \brief Discrete Delta function from Roma et al. (1999). * * A.M...
mit
Cuda
7e4d95a42b1136a04f9a034780878ddf85915d7a
Test is_partitioned with thrust::device in __device__ code.
dachziegel/thrust,jaredhoberock/thrust,xiongzhanblake/thrust_src,zeryx/thrust,xiongzhanblake/thrust,xiongzhanblake/thrust_src,jaredhoberock/thrust,thvasilo/thrust,thrust/thrust,zeryx/thrust,xiongzhanblake/thrust_src,Ricardo666666/thrust,dachziegel/thrust,dachziegel/thrust,zhenglaizhang/thrust,jaredhoberock/thrust,sdalt...
testing/backend/cuda/is_partitioned.cu
testing/backend/cuda/is_partitioned.cu
#include <unittest/unittest.h> #include <thrust/partition.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator, typename Predicate, typename Iterator2> __global__ void is_partitioned_kernel(ExecutionPolicy exec, Iterator first, Iterator last, Pred...
#include <unittest/unittest.h> #include <thrust/partition.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename Iterator, typename Predicate, typename Iterator2> __global__ void is_partitioned_kernel(Iterator first, Iterator last, Predicate pred, Iterator2 result) { *result = thru...
apache-2.0
Cuda
e9370fe59fc0c630b1d7665e3b392ce574c0ba1c
fix compile bugs
tensor-tang/Paddle,QiJune/Paddle,Canpio/Paddle,chengduoZH/Paddle,Canpio/Paddle,reyoung/Paddle,putcn/Paddle,Canpio/Paddle,pkuyym/Paddle,QiJune/Paddle,lcy-seso/Paddle,tensor-tang/Paddle,PaddlePaddle/Paddle,lcy-seso/Paddle,lcy-seso/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,baidu/Paddle,QiJune/Paddle,putcn/Paddle,Canpio/Pa...
paddle/fluid/operators/increment_op.cu
paddle/fluid/operators/increment_op.cu
// Copyright (c) 2018 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 requir...
// Copyright (c) 2018 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 requir...
apache-2.0
Cuda
e1cfc5cd892fe6a307cd100678333d4ff60c15bb
move matrices to GPU
undertherain/benchmarker,undertherain/benchmarker,undertherain/benchmarker,undertherain/benchmarker
benchmarker/modules/problems/cublas/main.cu
benchmarker/modules/problems/cublas/main.cu
//#include <stdio.h> //#include <stdlib.h> #include <iostream> #include <cblas.h> #include <omp.h> #include <chrono> #include "config.h" #include "args.hpp" #include <unistd.h> using namespace std::chrono; int main(int argc, char * argv[]) { size_t m, n, k; float * A, *B, *C; double dtime; args_to_...
//#include <stdio.h> //#include <stdlib.h> #include <iostream> #include <cblas.h> #include <omp.h> #include <chrono> #include "config.h" #include "args.hpp" #include <unistd.h> using namespace std::chrono; int main(int argc, char * argv[]) { size_t m, n, k; float * A, *B, *C; double dtime; args_to_...
mpl-2.0
Cuda
a0917d02ea91f993643f01aef65609b3837aa69e
test for line 37
NandoSerrano85/CDA4101-project
main.cu
main.cu
/* Team: Packers PID: 5642858 Class: CDA4101 Section: U02 Affirmation: "I affirm that this program is entirely my own work and none of it is the work of any other person." */ #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <unistd.h> #include "bmplib.h" #define TRUE = 1 //cuda function __global...
/* Team: Packers PID: 5642858 Class: CDA4101 Section: U02 Affirmation: "I affirm that this program is entirely my own work and none of it is the work of any other person." */ #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <unistd.h> #include "bmplib.h" #define TRUE = 1 //cuda function __global...
apache-2.0
Cuda
ca5745700081ea34f56f39cad5c458c25ff77d71
Update gunrock_mad.cu
ydwu/gunrock,anshumang/gunrockINST,vvishal/gunrock,anshumang/gunrock-swched-swmm,Damien-/gunrock,ydwu/gunrock,vvishal/gunrock,ydwu/gunrock,anshumang/gunrock-swched-swmm,anshumang/gunrock-swched-swmm,Damien-/gunrock,anshumang/gunrockINST,vvishal/gunrock,ydwu/gunrock,Damien-/gunrock,anshumang/gunrock-swched-swmm,anshuman...
wrapper/test/gunrock_mad.cu
wrapper/test/gunrock_mad.cu
/** * @file gunrock_mad.cu * @brief mad calculation procedure * */ #include <wrapper/app/mad/mad_enactor.cuh> #include <wrapper/app/mad/mad_functor.cuh> #include <wrapper/app/mad/mad_problem.cuh> #include <stdio.h> // used for print out using namespace wrapper::app::mad; #ifdef __cplusplus extern "C" { #endif ...
/** * @file gunrock_mad.cu * @brief mad calculation procedure * */ #include <wrapper/app/mad/mad_enactor.cuh> #include <wrapper/app/mad/mad_functor.cuh> #include <wrapper/app/mad/mad_problem.cuh> #include <wrapper/util/util.cuh> using namespace wrapper::app::mad; #ifdef __cplusplus extern "C" { #endif void ...
apache-2.0
Cuda
885dc551462112298b4f96ec237eb0a03d3e1ddd
Update SSSPTest.cu
FedericoUnivr/cuStingerAlg,hornet-gt/hornetsnest,hornet-gt/hornetsnest,FedericoUnivr/cuStingerAlg,FedericoUnivr/cuStingerAlg,hornet-gt/hornetsnest
test/SSSPTest.cu
test/SSSPTest.cu
/** * @brief SSSP test program * @file */ #include "Static/ShortestPath/SSSP.cuh" #include <Graph/GraphStd.hpp> #include <Graph/GraphWeight.hpp> #include <Util/CommandLineParam.hpp> int main(int argc, char* argv[]) { using namespace timer; using namespace hornets_nest; graph::GraphStd<vid_t, eoff_t> gr...
/** * @brief SSSP test program * @file */ #include "Static/ShortestPath/SSSP.cuh" #include <Graph/GraphStd.hpp> #include <Graph/GraphWeight.hpp> #include <Util/CommandLineParam.hpp> int main(int argc, char* argv[]) { using namespace timer; using namespace hornets_nest; graph::GraphStd<vid_t, eoff_t> gr...
bsd-3-clause
Cuda
0baf18dfb0e80191c6a696dafaafd091af49be7d
Tweak so that bulkem works on multi-GPU machines (though only one GPU is used)
ihowson/bulkem,ihowson/bulkem,ihowson/bulkem
src/cuda/bulkem_cuda.cu
src/cuda/bulkem_cuda.cu
#include <pthread.h> #include <stdio.h> #include <sys/time.h> #include "../bulkem.h" #include "cxx11.h" void *thread(void *void_args) { fit_params *fp = (fit_params *)void_args; stream_main(fp); return 0; } void print_time_elapsed(struct timeval start_time, struct timeval end_time) { double elapsed_...
#include <pthread.h> #include <stdio.h> #include <sys/time.h> #include "../bulkem.h" #include "cxx11.h" void *thread(void *void_args) { fit_params *fp = (fit_params *)void_args; stream_main(fp); return 0; } void print_time_elapsed(struct timeval start_time, struct timeval end_time) { double elapsed_...
mit
Cuda
2bc60887616c2eaec9af34781157147f569cd7ae
Update BFSTest2.cu
hornet-gt/hornetsnest,hornet-gt/hornetsnest,FedericoUnivr/cuStingerAlg,hornet-gt/hornetsnest,FedericoUnivr/cuStingerAlg,FedericoUnivr/cuStingerAlg
test/BFSTest2.cu
test/BFSTest2.cu
/** * @brief Breadth-first Search Top-Down test program * @file */ #include "Static/BreadthFirstSearch/TopDown2.cuh" #include <Graph/GraphStd.hpp> #include <Util/CommandLineParam.hpp> #include <cuda_profiler_api.h> //--profile-from-start off int main(int argc, char* argv[]) { using namespace timer; ...
/** * @brief Breadth-first Search Top-Down test program * @file */ #include "Static/BreadthFirstSearch/TopDown2.cuh" #include <Graph/GraphStd.hpp> #include <Util/CommandLineParam.hpp> #include <cuda_profiler_api.h> //--profile-from-start off int main(int argc, char* argv[]) { using namespace timer; ...
bsd-3-clause
Cuda
6b12698ee2b6bf19a539f4ad5e9205b4446a2c45
fix for compute capability <= 5.2 because fp16 arithmetic operations not supported in cuda_fp16.hpp
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
cupy/core/include/cupy/atomics.cuh
cupy/core/include/cupy/atomics.cuh
#pragma once #if __CUDA_ARCH__ < 600 __device__ double atomicAdd(double *address, double val) { unsigned long long int* address_as_ull = (unsigned long long int*)address; unsigned long long int old = *address_as_ull; unsigned long long int assumed; do { assumed = old; old = atomicCAS(address_as_ull,...
#pragma once #if __CUDA_ARCH__ < 600 __device__ double atomicAdd(double *address, double val) { unsigned long long int* address_as_ull = (unsigned long long int*)address; unsigned long long int old = *address_as_ull; unsigned long long int assumed; do { assumed = old; old = atomicCAS(address_as_ull,...
mit
Cuda
205132a8cfdfb1e0bf98094ea9eb4713a6e45180
fix error
buttonzzj/cuda_trial,buttonzzj/cuda_trial
mat_transpose.cu
mat_transpose.cu
#include <stdio.h> #include "timer.h" #include "utils.h" const int N = 1024; // we are transposing a N by N mat const int K = 1; void fill_matrix(float* mat){ for (int i = 0; i < N*N; i++){ mat[i] = (float)i; } } int main(int argc, char const *argv[]) { size_t mat_size = N * N * sizeof(float); ...
#include <stdio.h> #include "timer.h" #include "utils.h" const int N = 1024; // we are transposing a N by N mat const int K = 1; void fill_matrix(float* mat){ for (int i = 0; i < N*N; i++){ mat[i] = (float)j; } } int main(int argc, char const *argv[]) { size_t mat_size = N * N * sizeof(float); ...
mit
Cuda
05821b747f6b4ee81dd76189b8aa0f6174819dbd
reformat code.
DO-CV/sara,DO-CV/sara,DO-CV/sara,DO-CV/sara,DO-CV/sara,DO-CV/sara
cpp/test/Shakti/MultiArray/test_texturearray.cu
cpp/test/Shakti/MultiArray/test_texturearray.cu
// ========================================================================== // // This file is part of DO-CV, a basic set of libraries in C++ for computer // vision. // // Copyright (C) 2015 David Ok <david.ok8@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public // License v. 2.0. If ...
// ========================================================================== // // This file is part of DO-CV, a basic set of libraries in C++ for computer // vision. // // Copyright (C) 2015 David Ok <david.ok8@gmail.com> // // This Source Code Form is subject to the terms of the Mozilla Public // License v. 2.0. If ...
mpl-2.0
Cuda
2e9d88479a0014b6c23b1016f540fd78b16ecd37
initialize totalAllocatedBytes to 0
GOMC-WSU/GOMC,GOMC-WSU/GOMC_Serial,GOMC-WSU/GOMC_Serial,GOMC-WSU/GOMC,GOMC-WSU/GOMC_Serial,GOMC-WSU/GOMC,GOMC-WSU/GOMC,GOMC-WSU/GOMC
src/GPU/CUDAMemoryManager.cuh
src/GPU/CUDAMemoryManager.cuh
#pragma once #ifdef GOMC_CUDA #include <cuda.h> #include <cuda_runtime.h> #include <unordered_map> #include <iostream> class CUDAMemoryManager { public: static cudaError_t mallocMemory(void **address, unsigned int size); static cudaError_t freeMemory(void *address); private: static long long totalAllocatedBytes...
#pragma once #ifdef GOMC_CUDA #include <cuda.h> #include <cuda_runtime.h> #include <unordered_map> #include <iostream> class CUDAMemoryManager { public: static cudaError_t mallocMemory(void **address, unsigned int size); static cudaError_t freeMemory(void *address); private: static long long totalAllocatedBytes...
mit
Cuda
288a8494b776b838711fe659f080fa1598ed8a51
add some useful func
stormHan/Parallel_RVD,stormHan/Parallel_RVD
Parallel_RVD/Math_basics.cuh
Parallel_RVD/Math_basics.cuh
#ifndef H_CUDA_BASCIS_H #define H_CUDA_BASCIS_H __device__ double computeDistance(double3 p1, double3 p2) { return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y) + (p1.z - p2.z) * (p1.z - p2.z)); } __device__ double3 add(double3 a, double3 b) { a.x = a.x + b.x; a.y = a.y + b.y; a.z = a...
#ifndef H_CUDA_BASCIS_H #define H_CUDA_BASCIS_H __device__ double computeDistance(double3 p1, double3 p2) { return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y) + (p1.z - p2.z) * (p1.z - p2.z)); } __device__ double3 add(double3 a, double3 b) { a.x = a.x + b.x; a.y = a.y + b.y; a.z = a...
mit
Cuda
2a231db3226a9bfcd008bb6120bec12fe0a98cd1
Bump version to 1.10.0. Commits prior to this are in 1.9.10.
NVlabs/cub,NVIDIA/cub,NVlabs/CUB
cub/version.cuh
cub/version.cuh
/****************************************************************************** * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistrib...
/****************************************************************************** * Copyright (c) 2011-2020, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistrib...
bsd-3-clause
Cuda
d4a2cff9242d298ed888d673c84fbb7ea6aaef7a
fix variable name snafu
rupertnash/gpu-swimmers,rupertnash/gpu-swimmers,rupertnash/gpu-swimmers
lbswim/liblbswim/TracerArray.cu
lbswim/liblbswim/TracerArray.cu
#include "TracerArray.h" #include <math.h> #include "interp.cu" TracerArray::TracerArray(const int num_) : num(num_), r(num_*DQ_d), s(num*DQ_d), v(num_*DQ_d) { } __global__ void DoTracerArrayMove(const int nPart, double* part_r, double* part_s, double* part_v, const LatticeAddressing* ad...
#include "TracerArray.h" #include <math.h> #include "interp.cu" TracerArray::TracerArray(const int num_) : num(num_), r(num_*DQ_d), s(num*DQ_d), v(num_*DQ_d) { } __global__ void DoTracerArrayMove(const int nPart, double* part_r, double* part_s, double* part_v, const LatticeAddressing* ad...
mit
Cuda
5d3e763eb472333a447feec8bdbdd17d560c64a1
Test reverse & reverse_copy with thrust::reverse in __device__ code.
andrewcorrigan/thrust-multi-permutation-iterator,jaredhoberock/thrust,sarvex/thrust,xiongzhanblake/thrust,mohamed-ali/thrust,zeryx/thrust,andrewcorrigan/thrust-multi-permutation-iterator,Ricardo666666/thrust,jaredhoberock/thrust,sarvex/thrust,thvasilo/thrust,sdalton1/thrust,raygit/thrust,marksantos/thrust,sarvex/thrust...
testing/backend/cuda/reverse.cu
testing/backend/cuda/reverse.cu
#include <unittest/unittest.h> #include <thrust/reverse.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator> __global__ void reverse_kernel(ExecutionPolicy exec, Iterator first, Iterator last) { thrust::reverse(exec, first, last); } template<typename T, typename ExecutionP...
#include <unittest/unittest.h> #include <thrust/reverse.h> #include <thrust/execution_policy.h> template<typename Iterator> __global__ void reverse_kernel(Iterator first, Iterator last) { thrust::reverse(thrust::seq, first, last); } template<typename T> void TestReverseDeviceSeq(const size_t n) { thrust::host_v...
apache-2.0
Cuda
e2a513d300a7cb7f7186e7cbd18925a5ebb3f681
Migrate lexicographical_sort to thrust::next::gather.
Vishwa07/thrust,UIKit0/thrust,allendaicool/thrust,hemmingway/thrust,UIKit0/thrust,bfurtaw/thrust,julianromera/thrust,rdmenezes/thrust,rdmenezes/thrust,rdmenezes/thrust,allendaicool/thrust,allendaicool/thrust,google-code-export/thrust,levendlee/thrust,Vishwa07/thrust,julianromera/thrust,h1arshad/thrust,Vishwa07/thrust,h...
examples/lexicographical_sort.cu
examples/lexicographical_sort.cu
#include <thrust/host_vector.h> #include <thrust/device_vector.h> #include <thrust/generate.h> #include <thrust/sequence.h> #include <thrust/sort.h> #include <thrust/gather.h> #include <iostream> #include <cstdlib> // This example shows how to perform a lexicographical sort on multiple keys. // // http://en.wikipedia....
#include <thrust/host_vector.h> #include <thrust/device_vector.h> #include <thrust/generate.h> #include <thrust/sequence.h> #include <thrust/sort.h> #include <thrust/gather.h> #include <iostream> #include <cstdlib> // This example shows how to perform a lexicographical sort on multiple keys. // // http://en.wikipedia....
apache-2.0
Cuda
cbdad45b7e1cabf1b3ba60d9b44d48a1029ca7c5
Test equal algorithms with thrust::device in __device__ code.
Ricardo666666/thrust,zhenglaizhang/thrust,jaredhoberock/thrust,xiongzhanblake/thrust_src,zeryx/thrust,thrust/thrust,GrimDerp/thrust,marksantos/thrust,zhenglaizhang/thrust,dachziegel/thrust,andrewcorrigan/thrust-multi-permutation-iterator,thrust/thrust,GrimDerp/thrust,marksantos/thrust,marksantos/thrust,mohamed-ali/thru...
testing/backend/cuda/equal.cu
testing/backend/cuda/equal.cu
#include <unittest/unittest.h> #include <thrust/equal.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator1, typename Iterator2, typename Iterator3> __global__ void equal_kernel(ExecutionPolicy exec, Iterator1 first1, Iterator1 last1, Iterator2 fi...
#include <unittest/unittest.h> #include <thrust/equal.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename Iterator1, typename Iterator2, typename Iterator3> __global__ void equal_kernel(Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator3 result) { *result = thrust::eq...
apache-2.0
Cuda
78a0404a3e182476217d5e45f72d84094ff1aeb7
add seed to bn_test
emjotde/amunn,DianaDespa/marian-train,emjotde/Marian,marian-nmt/marian-train,DianaDespa/marian-train,amunmt/marian,emjotde/amunmt,DianaDespa/marian-train,marian-nmt/marian-train,amunmt/marian,emjotde/amunmt,emjotde/amunn,emjotde/Marian,emjotde/amunn,emjotde/amunmt,emjotde/amunmt,marian-nmt/marian-train,DianaDespa/maria...
src/test/bn_test.cu
src/test/bn_test.cu
#include <iostream> #include <cuda.h> #include <string> #include <vector> #include <cmath> #include <random> #include <algorithm> #include <iterator> #include <iostream> #include <functional> #include "marian.h" int main(int argc, char** argv) { using namespace marian; using namespace data; using namespace keyw...
#include <iostream> #include <cuda.h> #include <string> #include <vector> #include <cmath> #include <random> #include <algorithm> #include <iterator> #include <iostream> #include <functional> #include "marian.h" int main(int argc, char** argv) { using namespace marian; using namespace data; using namespace keyw...
mit
Cuda
e976369175582109b5d1a368f3b3f1c586751f4c
Test mismatch with thrust::device in __device__ code.
raygit/thrust,egaburov/thrust,thrust/thrust,jaredhoberock/thrust,xiongzhanblake/thrust_src,zhenglaizhang/thrust,dachziegel/thrust,GrimDerp/thrust,arnabgho/thrust,Ricardo666666/thrust,egaburov/thrust,zeryx/thrust,sarvex/thrust,zhenglaizhang/thrust,sarvex/thrust,sarvex/thrust,raygit/thrust,jaredhoberock/thrust,thrust/thr...
testing/backend/cuda/mismatch.cu
testing/backend/cuda/mismatch.cu
#include <unittest/unittest.h> #include <thrust/mismatch.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator1, typename Iterator2, typename Iterator3> __global__ void mismatch_kernel(ExecutionPolicy exec, Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator3 result) {...
#include <unittest/unittest.h> #include <thrust/mismatch.h> #include <thrust/execution_policy.h> template<typename Iterator1, typename Iterator2, typename Iterator3> __global__ void mismatch_kernel(Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator3 result) { *result = thrust::mismatch(thrust::seq, first...
apache-2.0
Cuda
8f5d22b045a7f2863ba1ce2d183d88f958687996
Add annotations.
Canpio/Paddle,pengli09/Paddle,putcn/Paddle,luotao1/Paddle,luotao1/Paddle,lcy-seso/Paddle,tensor-tang/Paddle,Canpio/Paddle,yu239/Paddle,chengduoZH/Paddle,chengduoZH/Paddle,lispc/Paddle,PaddlePaddle/Paddle,pengli09/Paddle,yu239/Paddle,baidu/Paddle,yu239/Paddle,baidu/Paddle,yu239/Paddle,QiJune/Paddle,putcn/Paddle,jacquesq...
paddle/cuda/include/hl_matrix_type.cuh
paddle/cuda/include/hl_matrix_type.cuh
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserve. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
apache-2.0
Cuda
a8cae4fba6b3da7404f940fc198af9fc7d18ad08
Fix execution space errors.
NVlabs/cub,NVlabs/CUB,NVIDIA/cub
cub/detail/device_synchronize.cuh
cub/detail/device_synchronize.cuh
/* * Copyright 2021 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
/* * Copyright 2021 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
bsd-3-clause
Cuda
fd95af3ef31cf4f3fc73c70355665bef898b5754
Test count algorithms with thrust::device in __device__ code.
Ricardo666666/thrust,thrust/thrust,Ricardo666666/thrust,zhenglaizhang/thrust,jaredhoberock/thrust,dachziegel/thrust,thvasilo/thrust,egaburov/thrust,jaredhoberock/thrust,mohamed-ali/thrust,sarvex/thrust,egaburov/thrust,andrewcorrigan/thrust-multi-permutation-iterator,xiongzhanblake/thrust,sdalton1/thrust,zeryx/thrust,da...
testing/backend/cuda/count.cu
testing/backend/cuda/count.cu
#include <unittest/unittest.h> #include <thrust/count.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator, typename T, typename Iterator2> __global__ void count_kernel(ExecutionPolicy exec, Iterator first, Iterator last, T value, Iterator2 result) { *result = thrust::count(e...
#include <unittest/unittest.h> #include <thrust/count.h> #include <thrust/execution_policy.h> template<typename Iterator, typename T, typename Iterator2> __global__ void count_kernel(Iterator first, Iterator last, T value, Iterator2 result) { *result = thrust::count(thrust::seq, first, last, value); } template<ty...
apache-2.0
Cuda
88de7905af4b795bbfa41f04f6050d5a7feecc94
fix long result array
bvanderhaar/cuda-musclework,bvanderhaar/cuda-musclework,bvanderhaar/cuda-musclework
main.cu
main.cu
#include <stdio.h> #include <stdlib.h> /* * In CUDA it is necessary to define block sizes * The grid of data that will be worked on is divided into blocks */ #define BLOCK_SIZE 8 __global__ void cu_dotProduct(int *distance_array_d, int *force_array_d, int *result_array_d, int max) { ...
#include <stdio.h> #include <stdlib.h> /* * In CUDA it is necessary to define block sizes * The grid of data that will be worked on is divided into blocks */ #define BLOCK_SIZE 8 __global__ void cu_dotProduct(int *distance_array_d, int *force_array_d, int *result_array_d, int max) { ...
mit
Cuda
ca852eb30d6c81efff57f981ac46942c48916271
Update dpbKDE.cuh
chuckre/DigitalPopulations,chuckre/DigitalPopulations,chuckre/DigitalPopulations,chuckre/DigitalPopulations,chuckre/DigitalPopulations
QuantumPopulationGeoAnalytics/DigPopKernelAnalysis/src/dpbKDE.cuh
QuantumPopulationGeoAnalytics/DigPopKernelAnalysis/src/dpbKDE.cuh
/* Contributors: Yizhao Gao (yizhaotsccsj@gmail.com) */ #ifndef DPBKDEH #define DPBKDEH int dpbKDE(char * inputPopFileName, char * inputHHFileName, char * outputFileName, char * outputCount, float xMin, float yMin, float xMax, float yMax, float cellSize, float bandwidth, char * subPop, char * mapLogic, char * perso...
#ifndef DPBKDEH #define DPBKDEH int dpbKDE(char * inputPopFileName, char * inputHHFileName, char * outputFileName, char * outputCount, float xMin, float yMin, float xMax, float yMax, float cellSize, float bandwidth, char * subPop, char * mapLogic, char * personColName, int epsgCode); #endif
apache-2.0
Cuda
3dda3adc9f005e70582beda26b789f578f910bc0
Add <cmath> to monte_carlo.cu. fixes issue 383
andrewcorrigan/thrust-multi-permutation-iterator,thrust/thrust,thrust/thrust,zhenglaizhang/thrust,raygit/thrust,raygit/thrust,xiongzhanblake/thrust_src,Ricardo666666/thrust,jaredhoberock/thrust,sdalton1/thrust,GrimDerp/thrust,arnabgho/thrust,GrimDerp/thrust,sdalton1/thrust,thvasilo/thrust,mohamed-ali/thrust,egaburov/th...
examples/monte_carlo.cu
examples/monte_carlo.cu
#include <thrust/random.h> #include <thrust/iterator/counting_iterator.h> #include <thrust/functional.h> #include <thrust/transform_reduce.h> #include <iostream> #include <iomanip> #include <cmath> // we could vary M & N to find the perf sweet spot __host__ __device__ unsigned int hash(unsigned int a) { a = (a+0...
#include <thrust/random.h> #include <thrust/iterator/counting_iterator.h> #include <thrust/functional.h> #include <thrust/transform_reduce.h> #include <iostream> #include <iomanip> // we could vary M & N to find the perf sweet spot __host__ __device__ unsigned int hash(unsigned int a) { a = (a+0x7ed55d16) + (a<<...
apache-2.0
Cuda
89cded93f2b43e7d42a137415bbc81d96db516e5
print host name
evaneschneider/cholla,evaneschneider/cholla,evaneschneider/cholla,cholla-hydro/cholla,evaneschneider/cholla,cholla-hydro/cholla,cholla-hydro/cholla,cholla-hydro/cholla
src/cuda_mpi_routines.cu
src/cuda_mpi_routines.cu
#include<stdio.h> #include"gpu.hpp" #include"io.h" #include"cuda_mpi_routines.h" /*! \fn int initialize_cuda_mpi(int myid, int nprocs); * \brief CUDA initialization within MPI. */ int initialize_cuda_mpi(int myid, int nprocs) { int i_device = 0; //GPU device for this process int n_device; //number of GPU dev...
#include<stdio.h> #include"gpu.hpp" #include"io.h" #include"cuda_mpi_routines.h" /*! \fn int initialize_cuda_mpi(int myid, int nprocs); * \brief CUDA initialization within MPI. */ int initialize_cuda_mpi(int myid, int nprocs) { int i_device = 0; //GPU device for this process int n_device; //number of GPU dev...
mit
Cuda
c258b2f1b64d48ef4b2ba67c444806fca6a0fad6
modify the example to gather multiple elements, which are used as a arguments to a function whose single valued result is stored in an output array.
sdalton1/thrust,egaburov/thrust,egaburov/thrust,sdalton1/thrust,sdalton1/thrust,egaburov/thrust
examples/transform_output_iterator.cu
examples/transform_output_iterator.cu
#include <thrust/device_vector.h> #include <thrust/functional.h> #include <thrust/gather.h> #include <thrust/iterator/transform_output_iterator.h> #include <iostream> struct Functor { template<class Tuple> __host__ __device__ float operator()(const Tuple& tuple) const { const float x = thrust::get<0>(tupl...
#include <thrust/device_vector.h> #include <thrust/functional.h> #include <thrust/gather.h> #include <thrust/iterator/transform_output_iterator.h> #include <iostream> struct Functor : thrust::unary_function<float,float> { __host__ __device__ float operator()(float x) { return x*2.0f / 3.0f; } }; int main(...
apache-2.0
Cuda
c328e3987cd1484821effe62b89a34357a94a4ac
Update headers_test_03.cu
ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP
tests/hipify-clang/headers_test_03.cu
tests/hipify-clang/headers_test_03.cu
// RUN: %run_test hipify "%s" "%t" %cuda_args // CHECK: #pragma once // CHECK-NEXT: #include <hip/hip_runtime.h> #pragma once // CHECK-NOT: #include <hip/hip_runtime.h> int main(int argc, char* argv[]) { return 0; }
// RUN: %run_test hipify "%s" "%t" %cuda_args // CHECK: #pragma once // CHECK-NEXT: #include <hip/hip_runtime.h> #pragma once // CHECK-NOT: #include<hip/hip_runtime.h> int main(int argc, char* argv[]) { return 0; }
mit
Cuda
9008e7aa32fc15ddaf97e6fa569bbd7a0a190589
Test count algorithms with thrust::device in __device__ code.
thrust/thrust,thvasilo/thrust,Ricardo666666/thrust,thvasilo/thrust,arnabgho/thrust,sdalton1/thrust,xiongzhanblake/thrust,egaburov/thrust,andrewcorrigan/thrust-multi-permutation-iterator,mohamed-ali/thrust,sarvex/thrust,jaredhoberock/thrust,jaredhoberock/thrust,Ricardo666666/thrust,thrust/thrust,mohamed-ali/thrust,xiong...
testing/backend/cuda/count.cu
testing/backend/cuda/count.cu
#include <unittest/unittest.h> #include <thrust/count.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator, typename T, typename Iterator2> __global__ void count_kernel(ExecutionPolicy exec, Iterator first, Iterator last, T value, Iterator2 result) { *result = thrust::count(e...
#include <unittest/unittest.h> #include <thrust/count.h> #include <thrust/execution_policy.h> template<typename Iterator, typename T, typename Iterator2> __global__ void count_kernel(Iterator first, Iterator last, T value, Iterator2 result) { *result = thrust::count(thrust::seq, first, last, value); } template<ty...
apache-2.0
Cuda
bd58ba7c5ea5170a1f555129df44e514f7eb9699
fix buggette in byvaluestructwithpointer test
hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl
test/cocl/byvaluestructwithpointer.cu
test/cocl/byvaluestructwithpointer.cu
#include <iostream> #include <memory> #include <cassert> using namespace std; #include <cuda.h> struct MyStruct { float *floats; float afloat; }; __global__ void getValue(struct MyStruct mystruct, float *data) { data[0] = mystruct.floats[0] + 3.0f; } int main(int argc, char *argv[]) { int N = 1024;...
#include <iostream> #include <memory> #include <cassert> using namespace std; #include <cuda.h> struct MyStruct { float *floats; float afloat; }; __global__ void getValue(struct MyStruct mystruct, float *data) { data[0] = mystruct.floats[0] + 3.0f; } int main(int argc, char *argv[]) { int N = 1024;...
apache-2.0
Cuda
d7f3baed181f6b8891fcc0cea1d4cd3403779b36
add header (#5648)
microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime,microsoft/onnxruntime
onnxruntime/test/shared_lib/cuda_add.cu
onnxruntime/test/shared_lib/cuda_add.cu
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. #include <cuda.h> #include <cuda_runtime.h> #include <cstdint> using namespace std; __global__ void cuda_add_impl(int64_t N, float* O, const float* X, const float* Y) { auto offset = threadIdx.x; if (offset < N) { ...
#include <cuda.h> #include <cuda_runtime.h> #include <cstdint> using namespace std; __global__ void cuda_add_impl(int64_t N, float* O, const float* X, const float* Y) { auto offset = threadIdx.x; if (offset < N) { O[offset] = Y[offset] + X[offset]; } } void cuda_add(int64_t N, float* O, const float* X, con...
mit
Cuda
26a73e48f976216374fc8a9294228673648a1d1d
update code
reyoung/Paddle,tensor-tang/Paddle,pengli09/Paddle,putcn/Paddle,yu239/Paddle,tensor-tang/Paddle,hedaoyuan/Paddle,pengli09/Paddle,yu239/Paddle,jacquesqiao/Paddle,lispc/Paddle,Canpio/Paddle,PaddlePaddle/Paddle,baidu/Paddle,lispc/Paddle,Canpio/Paddle,Canpio/Paddle,QiJune/Paddle,Canpio/Paddle,Canpio/Paddle,yu239/Paddle,Padd...
paddle/majel/test/cuda_test.cu
paddle/majel/test/cuda_test.cu
#include <stdio.h> #include <cuda_runtime.h> #include "gtest/gtest.h" #define CHECK_ERR(x) \ if (x != cudaSuccess) { \ fprintf(stderr,"%s in %s at line %d\n", \ cudaGetErrorString(err),__FILE__,__LINE__); \ exit(-1); ...
#include <stdio.h> #include <cuda_runtime.h> #include "gtest/gtest.h" #define CHECK_ERR(x) \ if (x != cudaSuccess) { \ fprintf(stderr,"%s in %s at line %d\n", \ cudaGetErrorString(err),__FILE__,__LINE__); \ exit(-1); ...
apache-2.0
Cuda
18b6e08f06416230deaa0b9de9e01d4f651ed8a4
fix return value for float16 atomicAdd
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
cupy/core/include/cupy/atomics.cuh
cupy/core/include/cupy/atomics.cuh
#pragma once #if __CUDA_ARCH__ < 600 __device__ double atomicAdd(double *address, double val) { unsigned long long int* address_as_ull = (unsigned long long int*)address; unsigned long long int old = *address_as_ull; unsigned long long int assumed; do { assumed = old; old = atomicCAS(address_as_ull,...
#pragma once #if __CUDA_ARCH__ < 600 __device__ double atomicAdd(double *address, double val) { unsigned long long int* address_as_ull = (unsigned long long int*)address; unsigned long long int old = *address_as_ull; unsigned long long int assumed; do { assumed = old; old = atomicCAS(address_as_ull,...
mit
Cuda
00d1205b57f543f6d57bd16390facb046757ba4a
remove use of float2 from bounding box example
h1arshad/thrust,allendaicool/thrust,julianromera/thrust,julianromera/thrust,levendlee/thrust,h1arshad/thrust,levendlee/thrust,malenie/thrust,julianromera/thrust,UIKit0/thrust,levendlee/thrust,h1arshad/thrust,malenie/thrust,rdmenezes/thrust,hemmingway/thrust,Vishwa07/thrust,hemmingway/thrust,UIKit0/thrust,malenie/thrust...
examples/bounding_box.cu
examples/bounding_box.cu
#include <thrust/transform_reduce.h> #include <thrust/device_vector.h> #include <thrust/pair.h> #include <stdlib.h> // for rand() // This example shows how to compute a bounding box // for a set of points in two dimensions. struct point2d { float x, y; __host__ __device__ point2d() {} __host_...
#include <thrust/transform_reduce.h> #include <thrust/device_vector.h> #include <thrust/pair.h> #include <cuda.h> // for float2 #include <stdlib.h> // for rand() // This example shows how to compute a bounding box // for a set of points in two dimensions. // bounding box type typedef thrust::pair<float2, float...
apache-2.0
Cuda
f4a811aa0a3bdefa300e24ea0fef73ecb2cca1f6
Remove additional newline
fixstars-jp/libSGM,fixstars/libSGM
test/integrated.cu
test/integrated.cu
#include <gtest/gtest.h> #include <thrust/device_vector.h> #include <libsgm.h> #include "internal.h" #include "generator.hpp" static bool is_cuda_input(sgm::EXECUTE_INOUT type) { return (type & 0x1) > 0; } static bool is_cuda_output(sgm::EXECUTE_INOUT type) { return (type & 0x2) > 0; } class LibSGM : public testing::...
#include <gtest/gtest.h> #include <thrust/device_vector.h> #include <libsgm.h> #include "internal.h" #include "generator.hpp" static bool is_cuda_input(sgm::EXECUTE_INOUT type) { return (type & 0x1) > 0; } static bool is_cuda_output(sgm::EXECUTE_INOUT type) { return (type & 0x2) > 0; } class LibSGM : public testing::...
apache-2.0
Cuda
122e83e36cee629cf3e8c5b0e6222b2160437769
Fix unittest
jacquesqiao/Paddle,pkuyym/Paddle,luotao1/Paddle,baidu/Paddle,yu239/Paddle,lispc/Paddle,lispc/Paddle,lcy-seso/Paddle,luotao1/Paddle,QiJune/Paddle,QiJune/Paddle,lispc/Paddle,jacquesqiao/Paddle,chengduoZH/Paddle,pengli09/Paddle,Canpio/Paddle,QiJune/Paddle,baidu/Paddle,putcn/Paddle,Canpio/Paddle,PaddlePaddle/Paddle,Canpio/...
paddle/operators/rowwise_add_op.cu
paddle/operators/rowwise_add_op.cu
#include <paddle/framework/op_registry.h> #include <paddle/operators/rowwise_add_op.h> REGISTER_OP_GPU_KERNEL( rowwise_add, paddle::operators::RowWiseAddKernel<paddle::platform ::GPUPlace>);
#include <paddle/framework/op_registry.h> #include <paddle/operators/rowwise_add_op.h> REGISTER_OP_GPU_KERNEL( mul, paddle::operators::RowWiseAddKernel<paddle::platform ::GPUPlace>);
apache-2.0
Cuda
6fc750ff575dcd39617dbe9b90bf993cbbacc1b1
Update SSSPTest.cu
FedericoUnivr/cuStingerAlg,hornet-gt/hornetsnest,FedericoUnivr/cuStingerAlg,hornet-gt/hornetsnest,hornet-gt/hornetsnest,FedericoUnivr/cuStingerAlg
test/SSSPTest.cu
test/SSSPTest.cu
/** * @brief SSSP test program * @file */ #include "Static/ShortestPath/SSSP.cuh" #include <Graph/GraphStd.hpp> #include <Graph/GraphWeight.hpp> #include <Util/CommandLineParam.hpp> int main(int argc, char* argv[]) { using namespace timer; using namespace hornets_nest; graph::GraphStd<vid_t, eoff_t> gr...
/** * @brief SSSP test program * @file */ #include "Static/ShortestPath/SSSP.cuh" #include <Graph/GraphStd.hpp> #include <Graph/GraphWeight.hpp> #include <Util/CommandLineParam.hpp> int main(int argc, char* argv[]) { using namespace timer; using namespace hornets_nest; graph::GraphStd<vid_t, eoff_t> gr...
bsd-3-clause
Cuda
adbb432f6bf89b184fe306c7a99eb608123f145e
comment change
egaburov/agency,egaburov/agency
test_shared.cu
test_shared.cu
#include <agency/cuda/execution_policy.hpp> #include <agency/cuda/grid_executor.hpp> #include <thrust/device_vector.h> #include <cstdio> #include <cassert> template<class T> __device__ T fetch_and_add(T* ptr, T value) { #ifdef __NVCC__ return atomicAdd(ptr, value); #else return __sync_fetch_and_add(ptr, value); #...
#include <agency/cuda/execution_policy.hpp> #include <agency/cuda/grid_executor.hpp> #include <thrust/device_vector.h> #include <cstdio> #include <cassert> template<class T> __device__ T fetch_and_add(T* ptr, T value) { #ifdef __NVCC__ return atomicAdd(ptr, value); #else return __sync_fetch_and_add(ptr, value); #...
bsd-3-clause
Cuda
495ba1d03952012a17390a47af4fd0850a7612e3
Remove redundant includes.
SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC,SKA-ScienceDataProcessor/RC
MS3/Sketches/GCF_new/scale_complex_by_dbl.cuh
MS3/Sketches/GCF_new/scale_complex_by_dbl.cuh
#ifndef __SCALE_COMPLEX_BY_DBL_CUH #define __SCALE_COMPLEX_BY_DBL_CUH #include <cuComplex.h> __device__ static __inline__ cuDoubleComplex cuMulComplexByDouble(cuDoubleComplex v, double y){ return make_cuDoubleComplex ( v.x * y ...
#ifndef __SCALE_COMPLEX_BY_DBL_CUH #define __SCALE_COMPLEX_BY_DBL_CUH #include <cuda.h> #include <cuComplex.h> #include <math_constants.h> __device__ static __inline__ cuDoubleComplex cuMulComplexByDouble(cuDoubleComplex v, double y){ return make_cuDouble...
apache-2.0
Cuda
39e07c33c0608302ff494c43874be895bd7dd503
Test minmax_element with thrust::device in __device__ code.
sdalton1/thrust,xiongzhanblake/thrust,dachziegel/thrust,sarvex/thrust,thvasilo/thrust,GrimDerp/thrust,zeryx/thrust,Ricardo666666/thrust,egaburov/thrust,arnabgho/thrust,thvasilo/thrust,egaburov/thrust,jaredhoberock/thrust,thvasilo/thrust,marksantos/thrust,xiongzhanblake/thrust,marksantos/thrust,xiongzhanblake/thrust_src...
testing/backend/cuda/minmax_element.cu
testing/backend/cuda/minmax_element.cu
#include <unittest/unittest.h> #include <thrust/extrema.h> template<typename ExecutionPolicy, typename Iterator1, typename Iterator2> __global__ void minmax_element_kernel(ExecutionPolicy exec, Iterator1 first, Iterator1 last, Iterator2 result) { *result = thrust::minmax_element(exec, first, last); } template<typ...
#include <unittest/unittest.h> #include <thrust/extrema.h> template<typename Iterator1, typename Iterator2> __global__ void minmax_element_kernel(Iterator1 first, Iterator1 last, Iterator2 result) { *result = thrust::minmax_element(thrust::seq, first, last); } template<typename Iterator1, typename Iterator2, type...
apache-2.0
Cuda
cc18bc9f594be203e29f26f31f4cab36ae299b98
Update iteration reporting.
bryancatanzaro/kmeans
kmeans.cu
kmeans.cu
#include "kmeans.h" #include "util.h" #include <thrust/reduce.h> namespace kmeans { int kmeans(int iterations, int n, int d, int k, thrust::device_vector<double>& data, thrust::device_vector<int>& labels, thrust::device_vector<double>& centroids, thrust::device_v...
#include "kmeans.h" #include "util.h" #include <thrust/reduce.h> namespace kmeans { int kmeans(int iterations, int n, int d, int k, thrust::device_vector<double>& data, thrust::device_vector<int>& labels, thrust::device_vector<double>& centroids, thrust::device_v...
apache-2.0
Cuda
aed3443d8757df71549cafee81f4ecc8bd32fab9
Revise test for pb (passed)
termoshtt/cujak,termoshtt/cujak
fft2d/test/pb.cu
fft2d/test/pb.cu
#include "../pb.hpp" #include "../algorithm.hpp" #include <gtest/gtest.h> namespace FFT = cujak::fft2d; class PBTest : public ::testing::Test { protected: PBTest() : F(Nx, Ny), C(Nx, Ny) {} const int Nx = 128; const int Ny = 256; const double Lx = 7.2354234; const double Ly = 3.2345234; FFT::Field<float...
#include "../pb.hpp" namespace FFT = cujak::fft2d; const int Nx = 128, Ny = 256; int main(int argc, char const *argv[]) { FFT::Field<float> F(Nx, Ny); for (int i = 0; i < Nx; i++) { for (int j = 0; j < Ny; ++j) { F.set(i, j, i + j); } } F.property.set_lx(1.0); F.property.set_ly(2.0); FFT::...
bsd-2-clause
Cuda
46eb38835e672f75b0b0544afef3d8da333ea825
Use %zu instead of %d to fprintf size_t
NVlabs/nvbio,NVlabs/nvbio,NVlabs/nvbio,NVlabs/nvbio
nvmem/util.cu
nvmem/util.cu
/* * nvbio * Copyright (c) 2011-2014, NVIDIA CORPORATION. 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, ...
/* * nvbio * Copyright (c) 2011-2014, NVIDIA CORPORATION. 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, ...
bsd-3-clause
Cuda
f18a1aa0c309821edd946b93439d7ac82b2fee9d
add for each benchmark.cu
zhangzhimin/tensor,Matazure/tensor,Matazure/tensor,zhangzhimin/tensor
benchmark/for_each_benchmark.cu
benchmark/for_each_benchmark.cu
#include <benchmark/benchmark.h> #include <matazure/tensor> using namespace matazure; void BM_cu_for_each(benchmark::State& state) { cu_tensor<byte, 1> ts_src(state.range(0)); while (state.KeepRunning()) { for_each(ts_src, [] __matazure__(byte &e) { e = 1.0f; }); } auto bytes_size = static_cast<size_t>(t...
mit
Cuda
6dfc33c226a3fcb7c0d96c179c3dbbc687d9570f
fix compile errors
tensor-tang/Paddle,QiJune/Paddle,reyoung/Paddle,putcn/Paddle,pkuyym/Paddle,baidu/Paddle,luotao1/Paddle,luotao1/Paddle,lcy-seso/Paddle,PaddlePaddle/Paddle,chengduoZH/Paddle,Canpio/Paddle,baidu/Paddle,jacquesqiao/Paddle,pkuyym/Paddle,luotao1/Paddle,chengduoZH/Paddle,reyoung/Paddle,QiJune/Paddle,putcn/Paddle,QiJune/Paddle...
paddle/fluid/operators/increment_op.cu
paddle/fluid/operators/increment_op.cu
// Copyright (c) 2018 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 requir...
// Copyright (c) 2018 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 requir...
apache-2.0
Cuda
7017c1035bb1c8bc308e6c0b1d29edf1acb92acd
Test is_sorted_until with thrust::device in __device__ code.
sdalton1/thrust,thvasilo/thrust,xiongzhanblake/thrust_src,andrewcorrigan/thrust-multi-permutation-iterator,dachziegel/thrust,thvasilo/thrust,dachziegel/thrust,zeryx/thrust,arnabgho/thrust,egaburov/thrust,jaredhoberock/thrust,thvasilo/thrust,thrust/thrust,marksantos/thrust,arnabgho/thrust,xiongzhanblake/thrust,jaredhobe...
testing/backend/cuda/is_sorted_until.cu
testing/backend/cuda/is_sorted_until.cu
#include <unittest/unittest.h> #include <thrust/sort.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator1, typename Iterator2> __global__ void is_sorted_until_kernel(ExecutionPolicy exec, Iterator1 first, Iterator1 last, Iterator2 result) { *result = thrust::is_sorted_until(...
#include <unittest/unittest.h> #include <thrust/sort.h> #include <thrust/execution_policy.h> template<typename Iterator1, typename Iterator2> __global__ void is_sorted_until_kernel(Iterator1 first, Iterator1 last, Iterator2 result) { *result = thrust::is_sorted_until(thrust::seq, first, last); } template<typename...
apache-2.0
Cuda
3b9f79760708de8eaa591fe6b8f7a37b757ffaaf
Fix memory leak
RichieSams/rapt,RichieSams/rapt
source/hello_world/main.cu
source/hello_world/main.cu
/* raic - RichieSam's Adventures in Cuda * * raic is the legal property of Adrian Astley * Copyright Adrian Astley 2015 */ #include "cuda_runtime.h" #include "device_launch_parameters.h" #include "cuda_util.h" typedef unsigned char byte; typedef unsigned char uint8; typedef signed char int8; typedef unsigned sh...
/* raic - RichieSam's Adventures in Cuda * * raic is the legal property of Adrian Astley * Copyright Adrian Astley 2015 */ #include "cuda_runtime.h" #include "device_launch_parameters.h" #include "cuda_util.h" typedef unsigned char byte; typedef unsigned char uint8; typedef signed char int8; typedef unsigned sh...
apache-2.0
Cuda
7896cf61fb35b0a12337f9ffeb12eef17990ee09
Test set_intersection with thrust::device in __device__ code.
egaburov/thrust,thrust/thrust,zhenglaizhang/thrust,marksantos/thrust,zeryx/thrust,raygit/thrust,marksantos/thrust,GrimDerp/thrust,xiongzhanblake/thrust,egaburov/thrust,andrewcorrigan/thrust-multi-permutation-iterator,sdalton1/thrust,mohamed-ali/thrust,sarvex/thrust,Ricardo666666/thrust,xiongzhanblake/thrust_src,dachzie...
testing/backend/cuda/set_intersection.cu
testing/backend/cuda/set_intersection.cu
#include <unittest/unittest.h> #include <thrust/set_operations.h> #include <thrust/functional.h> #include <thrust/sort.h> #include <thrust/extrema.h> #include <thrust/iterator/discard_iterator.h> template<typename ExecutionPolicy, typename Iterator1, typename Iterator2, typename Iterator3, typename Iterator4> __globa...
#include <unittest/unittest.h> #include <thrust/set_operations.h> #include <thrust/functional.h> #include <thrust/sort.h> #include <thrust/extrema.h> #include <thrust/iterator/discard_iterator.h> template<typename Iterator1, typename Iterator2, typename Iterator3, typename Iterator4> __global__ void set_intersection_...
apache-2.0
Cuda
30eab9a20a3c5d7427d04d05791a44adad57315f
fix bug: fix data op template function
junluan/shadow,junluan/shadow,junluan/shadow
shadow/operators/data_op.cu
shadow/operators/data_op.cu
#include "data_op.hpp" namespace Shadow { namespace Vision { #if defined(USE_CUDA) template <typename T> __global__ void KernelDataTransform(const T *in_data, int count, int in_c, int spatial_dim, int num_mean, const T *mean_value, int num_scale...
#include "data_op.hpp" namespace Shadow { namespace Vision { #if defined(USE_CUDA) template <typename T> __global__ void KernelDataTransform(const T *in_data, int count, int in_c, int spatial_dim, int num_mean, const T *mean_value, int num_scale...
apache-2.0
Cuda
e520c962f711f8c574e0be5a6d791db204cf9726
Fix wrong argument variables order
nakdai/aten,nakdai/aten
src/libidaten/asvgf/asvgf_debug.cu
src/libidaten/asvgf/asvgf_debug.cu
#include "asvgf/asvgf.h" #include "kernel/pt_common.h" #include "cuda/cudadefs.h" #include "cuda/helper_math.h" #include "cuda/cudautil.h" #include "cuda/cudamemory.h" #include "aten4idaten.h" __global__ void displayBluenoiseTexture( cudaSurfaceObject_t dst, int width, int height, cudaTextureObject_t te...
#include "asvgf/asvgf.h" #include "kernel/pt_common.h" #include "cuda/cudadefs.h" #include "cuda/helper_math.h" #include "cuda/cudautil.h" #include "cuda/cudamemory.h" #include "aten4idaten.h" __global__ void displayBluenoiseTexture( cudaSurfaceObject_t dst, int width, int height, cudaTextureObject_t te...
mit
Cuda
e08ccc92e20fc9831158b629651d49e962d12bfc
change workgroupsize in testshfl from 256 to 128, see if works better on travis cpu?
hughperkins/coriander,hughperkins/coriander,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/coriander,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl,hughperkins/cuda-on-cl
test/cocl/testshfl.cu
test/cocl/testshfl.cu
// test __shfl_down... #include <iostream> #include <memory> #include <cassert> using namespace std; #include <cuda.h> __global__ void getValue(float *data) { int tid = threadIdx.x; int warpid = tid % 32; // assume warpsize 32. Anyway, CUDA code uses warpsize 32. float me = data[tid]; me = __shfl_...
// test __shfl_down... #include <iostream> #include <memory> #include <cassert> using namespace std; #include <cuda.h> __global__ void getValue(float *data) { int tid = threadIdx.x; int warpid = tid % 32; // assume warpsize 32. Anyway, CUDA code uses warpsize 32. float me = data[tid]; me = __shfl_...
apache-2.0
Cuda
ca07a3fbed76be1543134bb83745007e5729b9f8
add math func
stormHan/Parallel_RVD,stormHan/Parallel_RVD
Parallel_RVD/Math_basics.cuh
Parallel_RVD/Math_basics.cuh
#ifndef H_CUDA_BASCIS_H #define H_CUDA_BASCIS_H __device__ double computeDistance(double3 p1, double3 p2) { return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y) + (p1.z - p2.z) * (p1.z - p2.z)); } __device__ double3 add(double3 a, double3 b) { a.x = a.x + b.x; a.y = a.y + b.y; a.z = a...
#ifndef H_CUDA_BASCIS_H #define H_CUDA_BASCIS_H __device__ double computeDistance(double3 p1, double3 p2) { return sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y) + (p1.z - p2.z) * (p1.z - p2.z)); } #endif /* H_CUDA_BASCIS_H */
mit
Cuda
4aea219cd7c289ddb65853b3e13ae361cf08e1ea
test basic custom mem alloc
yuanming-hu/taichi,yuanming-hu/taichi,yuanming-hu/taichi,yuanming-hu/taichi
misc/baselines/kernel_malloc.cu
misc/baselines/kernel_malloc.cu
#include "cuda_runtime.h" #include <cstdio> #include "time.h" constexpr int segment_size = 1024; constexpr int threads = 512; __device__ char *pool; void __global__ alloc(int **pointers) { auto index = blockIdx.x * blockDim.x + threadIdx.x; // pointers[index] = (int *)malloc(segment_size); pointers[index] = (in...
#include "time.h" constexpr int segment_size = 1024; constexpr int threads = 512; void __global__ alloc(int **pointers) { auto index = blockIdx.x * blockDim.x + threadIdx.x; pointers[index] = (int *)malloc(segment_size); } void __global__ fill(int **pointers) { auto index = blockIdx.x * blockDim.x + threadIdx....
apache-2.0
Cuda
8bf30ff09bd4553c6bb8cd37e18e940fa37df0bc
add acocustics riemann solver
ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw,ForestClaw/forestclaw
applications/clawpack/acoustics/2d/radial/user_cuda5.0/rpn2acoustics.cu
applications/clawpack/acoustics/2d/radial/user_cuda5.0/rpn2acoustics.cu
#include "../radial_user.h" #include <fc2d_cudaclaw5.h> #include <fclaw_base.h> /* Needed for SC_MIN, SC_MAX */ #include <cassert> typedef double real; static __device__ real claw_zero = 0.0; static __device__ real rho = 1.0; static __device__ real bulk = 4.0; __device__ void radial_rpn2acoustics(int idir, int meqn...
#include "../radial_user.h" #include <fc2d_cudaclaw5.h> #include <fclaw_base.h> /* Needed for SC_MIN, SC_MAX */ __device__ void radial_rpn2acoustics(int idir, int meqn, int mwaves, int maux, double ql[], double qr[], double auxl[], double auxr[], ...
bsd-2-clause
Cuda
8610a9fba24a924f372f1d79cfad2499f386dd29
Remove KNOWN_FAILURE from TestNullPtrDereferenceYieldsError.
jaredhoberock/thrust,GrimDerp/thrust,arnabgho/thrust,xiongzhanblake/thrust_src,thvasilo/thrust,mohamed-ali/thrust,egaburov/thrust,zhenglaizhang/thrust,jaredhoberock/thrust,egaburov/thrust,marksantos/thrust,GrimDerp/thrust,Ricardo666666/thrust,thrust/thrust,zhenglaizhang/thrust,arnabgho/thrust,thrust/thrust,sarvex/thrus...
testing/backend/cuda/cudart.cu
testing/backend/cuda/cudart.cu
#include <unittest/unittest.h> #include <cuda_runtime_api.h> #include <thrust/detail/util/align.h> void TestCudaMemcpyD2DNullPointerError(void) { cudaError_t result1 = cudaMemcpy((void*)0, (void*)0, 1, cudaMemcpyDeviceToDevice); cudaError_t result2 = cudaGetLastError(); ASSERT_EQUAL(cudaErrorInvalidValue, resul...
#include <unittest/unittest.h> #include <cuda_runtime_api.h> #include <thrust/detail/util/align.h> void TestCudaMemcpyD2DNullPointerError(void) { cudaError_t result1 = cudaMemcpy((void*)0, (void*)0, 1, cudaMemcpyDeviceToDevice); cudaError_t result2 = cudaGetLastError(); ASSERT_EQUAL(cudaErrorInvalidValue, resul...
apache-2.0
Cuda
19cc95881631ba17503cbb788a367653f6c90f17
Add TestCountingIteratorLowerBound and mark it as KNOWN_FAILURE
GrimDerp/thrust,thvasilo/thrust,egaburov/thrust,xiongzhanblake/thrust,GrimDerp/thrust,arnabgho/thrust,thrust/thrust,thvasilo/thrust,marksantos/thrust,thrust/thrust,marksantos/thrust,zhenglaizhang/thrust,raygit/thrust,thrust/thrust,andrewcorrigan/thrust-multi-permutation-iterator,thrust/thrust,GrimDerp/thrust,zhenglaizh...
testing/counting_iterator.cu
testing/counting_iterator.cu
#include <thrusttest/unittest.h> #include <thrust/iterator/counting_iterator.h> #include <thrust/sort.h> #include <thrust/binary_search.h> void TestCountingIteratorIncrement(void) { thrust::experimental::counting_iterator<int> iter(0); ASSERT_EQUAL(*iter, 0); iter++; ASSERT_EQUAL(*iter, 1); ...
#include <thrusttest/unittest.h> #include <thrust/iterator/counting_iterator.h> void TestCountingIteratorIncrement(void) { thrust::experimental::counting_iterator<int> iter(0); ASSERT_EQUAL(*iter, 0); iter++; ASSERT_EQUAL(*iter, 1); iter++; iter++; ASSERT_EQUAL(*iter, 3); ...
apache-2.0
Cuda
926b17e11417acdd59148604d65b4946fe849b82
Mark TestTransformNullPtr as a KNOWN_FAILURE on Windows
allendaicool/thrust,lishi0927/thrust,UIKit0/thrust,julianromera/thrust,lishi0927/thrust,rdmenezes/thrust,hemmingway/thrust,malenie/thrust,h1arshad/thrust,google-code-export/thrust,levendlee/thrust,hemmingway/thrust,hemmingway/thrust,google-code-export/thrust,julianromera/thrust,hemmingway/thrust,bfurtaw/thrust,Vishwa07...
testing/debug.cu
testing/debug.cu
#define THRUST_DEBUG 1 #include <unittest/unittest.h> #include <thrust/device_ptr.h> #include <thrust/transform.h> #include <thrust/reduce.h> #include <thrust/scan.h> #include <thrust/sort.h> #include <thrust/system_error.h> #if THRUST_DEVICE_BACKEND == THRUST_DEVICE_BACKEND_CUDA void TestTransformNullPtr(void) { #i...
#define THRUST_DEBUG 1 #include <unittest/unittest.h> #include <thrust/device_ptr.h> #include <thrust/transform.h> #include <thrust/reduce.h> #include <thrust/scan.h> #include <thrust/sort.h> #include <thrust/system_error.h> #if THRUST_DEVICE_BACKEND == THRUST_DEVICE_BACKEND_CUDA void TestTransformNullPtr(void) { #i...
apache-2.0
Cuda
8241eb88fdff68e8155300ddbda6c4a507692efb
Add missing #include <thrust/sequence.h>
arnabgho/thrust,thvasilo/thrust,zhenglaizhang/thrust,andrewcorrigan/thrust-multi-permutation-iterator,thrust/thrust,zeryx/thrust,andrewcorrigan/thrust-multi-permutation-iterator,jaredhoberock/thrust,egaburov/thrust,arnabgho/thrust,sdalton1/thrust,xiongzhanblake/thrust_src,xiongzhanblake/thrust,jaredhoberock/thrust,mark...
testing/pair_sort.cu
testing/pair_sort.cu
#include <unittest/unittest.h> #include <thrust/pair.h> #include <thrust/sort.h> #include <thrust/sequence.h> struct make_pair_functor { template<typename T1, typename T2> __host__ __device__ thrust::pair<T1,T2> operator()(const T1 &x, const T2 &y) { return thrust::make_pair(x,y); } // end operator()()...
#include <unittest/unittest.h> #include <thrust/pair.h> #include <thrust/sort.h> struct make_pair_functor { template<typename T1, typename T2> __host__ __device__ thrust::pair<T1,T2> operator()(const T1 &x, const T2 &y) { return thrust::make_pair(x,y); } // end operator()() }; // end make_pair_functor ...
apache-2.0
Cuda
f3af88172f4ace7640952f4dfc8a0688fccc87c5
add compute centriod
stormHan/Parallel_RVD,stormHan/Parallel_RVD
Parallel_RVD/Cudaclass.cu
Parallel_RVD/Cudaclass.cu
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <iostream> /* process the cuda error */ inline void checkCudaErrors(cudaError err) { if (cudaSuccess != err) { fprintf(stderr, "CUDA Runtime API error : %s.\n", cudaGetErrorString(err)); return; } } /* device function */ __device__ doub...
#include "cuda_runtime.h" #include "device_launch_parameters.h" #include <iostream> /* process the cuda error */ inline void checkCudaErrors(cudaError err) { if (cudaSuccess != err) { fprintf(stderr, "CUDA Runtime API error : %s.\n", cudaGetErrorString(err)); return; } } /* a thread to compute the RVD in par...
mit
Cuda
3fac9e303b1263bb5d1eb87a93e4f236866da948
Test tabulate with thrust::device in __device__ code.
xiongzhanblake/thrust,marksantos/thrust,mohamed-ali/thrust,thvasilo/thrust,raygit/thrust,jaredhoberock/thrust,marksantos/thrust,sarvex/thrust,raygit/thrust,jaredhoberock/thrust,egaburov/thrust,jaredhoberock/thrust,dachziegel/thrust,thrust/thrust,zeryx/thrust,arnabgho/thrust,jaredhoberock/thrust,egaburov/thrust,GrimDerp...
testing/backend/cuda/tabulate.cu
testing/backend/cuda/tabulate.cu
#include <unittest/unittest.h> #include <thrust/tabulate.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename ExecutionPolicy, typename Iterator, typename Function> __global__ void tabulate_kernel(ExecutionPolicy exec, Iterator first, Iterator last, Function f) { thrust::tabulate...
#include <unittest/unittest.h> #include <thrust/tabulate.h> #include <thrust/functional.h> #include <thrust/execution_policy.h> template<typename Iterator, typename Function> __global__ void tabulate_kernel(Iterator first, Iterator last, Function f) { thrust::tabulate(thrust::seq, first, last, f); } void TestTabu...
apache-2.0
Cuda
f7747956bc13db827a0b86cbc3e2d431c961de4f
Fix syntax of then_execute() calls
egaburov/agency,egaburov/agency
test_then_execute.cu
test_then_execute.cu
#include <agency/executor_traits.hpp> #include <agency/sequential_executor.hpp> #include <agency/parallel_executor.hpp> #include <agency/concurrent_executor.hpp> #include <agency/cuda/grid_executor.hpp> #include <mutex> #include <thread> #include <cassert> template<class Executor, class Shape> void test_host(Shape sha...
#include <agency/executor_traits.hpp> #include <agency/sequential_executor.hpp> #include <agency/parallel_executor.hpp> #include <agency/concurrent_executor.hpp> #include <agency/cuda/grid_executor.hpp> #include <mutex> #include <thread> #include <cassert> template<class Executor, class Shape> void test_host(Shape sha...
bsd-3-clause
Cuda
69a107f86d128468c95e5f3dc99e0c6327f2735c
Add missing #include <thrust/sequence.h>
rdmenezes/thrust,h1arshad/thrust,bfurtaw/thrust,h1arshad/thrust,google-code-export/thrust,levendlee/thrust,hemmingway/thrust,julianromera/thrust,julianromera/thrust,bfurtaw/thrust,lishi0927/thrust,UIKit0/thrust,hemmingway/thrust,Vishwa07/thrust,allendaicool/thrust,hemmingway/thrust,UIKit0/thrust,lishi0927/thrust,rdmene...
testing/pair_sort.cu
testing/pair_sort.cu
#include <unittest/unittest.h> #include <thrust/pair.h> #include <thrust/sort.h> #include <thrust/sequence.h> struct make_pair_functor { template<typename T1, typename T2> __host__ __device__ thrust::pair<T1,T2> operator()(const T1 &x, const T2 &y) { return thrust::make_pair(x,y); } // end operator()()...
#include <unittest/unittest.h> #include <thrust/pair.h> #include <thrust/sort.h> struct make_pair_functor { template<typename T1, typename T2> __host__ __device__ thrust::pair<T1,T2> operator()(const T1 &x, const T2 &y) { return thrust::make_pair(x,y); } // end operator()() }; // end make_pair_functor ...
apache-2.0
Cuda
5a4abe78e02a7cc3cca608779cbd661ad018f150
Make out_of_memory_recovery test trigger OOM faster.
thrust/thrust,thrust/thrust,andrewcorrigan/thrust-multi-permutation-iterator,thrust/thrust,thrust/thrust,thrust/thrust,andrewcorrigan/thrust-multi-permutation-iterator,andrewcorrigan/thrust-multi-permutation-iterator
testing/out_of_memory_recovery.cu
testing/out_of_memory_recovery.cu
// Regression test for NVBug 2720132. // // Summary of 2720132: // // 1. The large allocation fails due to running out of memory. // 2. A `thrust::system::system_error` exception is thrown. // 3. Local objects are destroyed as the stack is unwound, leading to the destruction of `x`. // 4. `x` runs a parallel algorithm ...
// Regression test for NVBug 2720132. #include <unittest/unittest.h> #include <thrust/device_vector.h> #include <thrust/detail/cstdint.h> struct non_trivial { __host__ __device__ non_trivial() {} __host__ __device__ ~non_trivial() {} }; void test_out_of_memory_recovery() { try { thrust::device_vector<non...
apache-2.0
Cuda
2fd8592e7acfba154b385bd4c39bd74c787dea1d
Index changed
SchadkoAO/FDTD_Solver,AlexHatesUnicorns/FDTD_Solver,AlexHatesUnicorns/FDTD_Solver,SchadkoAO/FDTD_Solver,SchadkoAO/FDTD_Solver,SchadkoAO/FDTD_Solver,SchadkoAO/FDTD_Solver,SchadkoAO/FDTD_Solver
src/Updaters/Updater1DTE_thrust.cu
src/Updaters/Updater1DTE_thrust.cu
#include "Updater1DTE.h" #include <thrust/for_each.h> #include <thrust/iterator/counting_iterator.h> #include <iostream> #include "../Structures/CudaStreamsPool.h" void Updater1DTE::updateEy() { thrust::counting_iterator<int> start(0); thrust::counting_iterator<int> end(grid->size-1); thrust::for_each(start , end ...
#include "Updater1DTE.h" #include <thrust/for_each.h> #include <thrust/iterator/counting_iterator.h> #include <iostream> #include "../Structures/CudaStreamsPool.h" void Updater1DTE::updateEy() { thrust::counting_iterator<int> start(1); thrust::counting_iterator<int> end(grid->size-1); thrust::for_each(start , end ...
mit
Cuda
a784a9c824563bd1324b8f877e2fab6c56038c06
Update headers_test_04.cu
GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP,ROCm-Developer-Tools/HIP,GPUOpen-ProfessionalCompute-Tools/HIP
tests/hipify-clang/headers_test_04.cu
tests/hipify-clang/headers_test_04.cu
// RUN: %run_test hipify "%s" "%t" %cuda_args // CHECK: #include <hip/hip_runtime.h> // CHECK-NEXT: #include <stdio.h> // CHECK-NEXT: #include <iostream> #include <stdio.h> #include <iostream> // CHECK-NOT: #include <hip/hip_runtime.h> int main(int argc, char* argv[]) { return 0; }
// RUN: %run_test hipify "%s" "%t" %cuda_args // CHECK: #include <hip/hip_runtime.h> // CHECK-NEXT: #include <stdio.h> // CHECK-NEXT: #include <iostream> #include <stdio.h> #include <iostream> // CHECK-NOT: #include<hip/hip_runtime.h> int main(int argc, char* argv[]) { return 0; }
mit
Cuda
9bfe3116aabd01049fdbd90855cb245a30b795df
Update elemwise_binary_broadcast_op_basic.cu (#18761)
tlby/mxnet,tlby/mxnet,szha/mxnet,szha/mxnet,DickJC123/mxnet,szha/mxnet,DickJC123/mxnet,szha/mxnet,apache/incubator-mxnet,apache/incubator-mxnet,tlby/mxnet,tlby/mxnet,szha/mxnet,tlby/mxnet,leezu/mxnet,szha/mxnet,tlby/mxnet,szha/mxnet,szha/mxnet,tlby/mxnet,leezu/mxnet,DickJC123/mxnet,leezu/mxnet,leezu/mxnet,leezu/mxnet,D...
src/operator/tensor/elemwise_binary_broadcast_op_basic.cu
src/operator/tensor/elemwise_binary_broadcast_op_basic.cu
/* * 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 ...
/* * 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 ...
apache-2.0
Cuda