fourrier 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/lib/fourrier.rb +26 -0
  3. data/lib/fourrier/libc.rb +16 -0
  4. metadata +46 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: caf2a204b68cb7cdbbe9423368ebac68e4cd6627
4
+ data.tar.gz: 71fa22685662938c0aaa7fa9b95e226223de69f7
5
+ SHA512:
6
+ metadata.gz: 0c185826b66f7ab9a1bec8347a40a9dc6b1e81d01fdabe01e568c72179d6f84759cd07eb7b0f6b39023c903aff43bf8714de1aaee39bcc288b2f0ae16b584a73
7
+ data.tar.gz: 3818f7e2033f6ad7fd71b3267595a18c9016acd92f318ccfaa44bf7d2673cc19f7dcda31cd1906c5a746ccdd0fc19ad3962d65f179c3fc2365399e6e64ecfaab
@@ -0,0 +1,26 @@
1
+ require 'ffi'
2
+ require_relative 'fourrier/libc'
3
+ require_relative 'fourrier/filters'
4
+ require_relative 'fourrier/freqs'
5
+
6
+ module Fourrier
7
+ extend FFI::Library
8
+ puts $.
9
+ ffi_lib "/usr/local/lib/libfourrier.so"
10
+
11
+ # Filters
12
+ attach_function :Hanning_r, [ :pointer, :uint, :pointer], :void
13
+ attach_function :Hanning_c, [ :pointer, :uint, :pointer], :void
14
+
15
+ # Freqs
16
+ attach_function :allocFrequencies, [ :uint ], :pointer
17
+ attach_function :getHarmonics, [ :pointer ], :uint
18
+ attach_function :getFrequency, [ :pointer, :uint ], :double
19
+ attach_function :getAmplitude, [ :pointer, :uint ], :double
20
+ attach_function :setAmplitude, [ :pointer, :double, :uint ], :void
21
+ attach_function :getPhase, [ :pointer, :uint ], :double
22
+ attach_function :setPhase, [ :pointer, :double, :uint], :void
23
+
24
+ # Frequency
25
+
26
+ end
@@ -0,0 +1,16 @@
1
+ module LibC
2
+ extend FFI::Library
3
+ ffi_lib FFI::Library::LIBC
4
+
5
+ # Memory allocators
6
+ attach_function :malloc, [:size_t], :pointer
7
+ attach_function :calloc, [:size_t], :pointer
8
+ attach_function :valloc, [:size_t], :pointer
9
+ attach_function :realloc, [:pointer, :size_t], :pointer
10
+ attach_function :free, [:pointer], :void
11
+
12
+ # Memory movers
13
+ attach_function :memcpy, [:pointer, :pointer, :size_t], :pointer
14
+ attach_function :bcopy, [:pointer, :pointer, :size_t], :void
15
+
16
+ end # module LibC
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fourrier
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Cedric Hernalsteens
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Ruby interface (through FFI) to the C Fourrier library
14
+ email: cedric.hernalsteens@cern.ch
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/fourrier.rb
20
+ - lib/fourrier/libc.rb
21
+ homepage: http://chernals.web.cern.ch/chernals/fourrier
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.2.2
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: 'Fourrier: a C library for tune computation'
45
+ test_files: []
46
+ has_rdoc: