Skip to content

Himeyama/cuda-convolve

Repository files navigation

cuda-convolve

Gem Version Rubocop

Installation

Dependency

brew install himeyama/homebrew-lib/libcuda-convolve

Gem or Gemfile

Gemfile

gem 'cuda-convolve'

and

bundle

Gem

gem install cuda-convolve

Examples

# frozen_string_literal: true

require 'cuda/convolve'

using CudaConvolve

p [1, 2, 3].convolve([0, 1, 0.5])
# [0.0, 1.0, 2.5, 4.0, 1.5]
p [1, 2, 3].convolve([0, 1, 0.5], mode: :same)
# [1.0, 2.5, 4.0]
p [1, 2, 3].convolve([0, 1, 0.5], mode: :valid)
# [2.5]

About

convolve + cuda + ruby (1次元のみ対応)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published