PAPI 0.100 → 0.101

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 +4 -4
  2. data/PAPI.gemspec +1 -1
  3. data/lib/PAPI/EventSet.rb +17 -0
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f46591e6beaf71b1b303a90c2fd08a6f4ce8aa3
4
- data.tar.gz: 7479c89a0aefed2e55a85da912294e5b9fea5e1c
3
+ metadata.gz: de3a90256e611c4afea6f7878025745c7eb0a315
4
+ data.tar.gz: 92f6fc2183070716de8e5ea002d3a788bfbb897a
5
5
  SHA512:
6
- metadata.gz: f0a38ba8caa53bd5f57e219b09782cebef482972ec8304e4e9ed026bf6928aa5997cdccb448b4fca18fe20e5e17cd65adbf6df7ec4babfe9b8af7aa5274c682e
7
- data.tar.gz: b2e5c9a9ac7ff1e8fe79e359ebdec68a432cd21c63e8afebafa5b5b4b1d06bb025dde85d1e1636438b7422db2aa3a220a58e2dce8402b49db91ce61c287b516e
6
+ metadata.gz: a2713b51238af8b029ce032053fadc9f32d57fdbbdd4b9e746bfb915165de527376e449b5f43088f6fcc3da946669299f56c459af991c3f5769f3402c15acccf
7
+ data.tar.gz: 665638d1acd6f0c4f337841335532e446d6ecaa66f9783bdc6a610d737969a7359985d60d15b0c7475a06908443ab7d1a4a143503d4bf4a00ca4adaed5258d7a
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'PAPI'
3
- s.version = "0.100"
3
+ s.version = "0.101"
4
4
  s.author = "Brice Videau"
5
5
  s.email = "brice.videau@imag.fr"
6
6
  s.homepage = "https://github.com/Nanosim-LIG/papi-ruby"
@@ -2,6 +2,8 @@ module PAPI
2
2
 
3
3
  typedef :int, :event_set
4
4
  attach_function :PAPI_create_eventset, [:pointer], :int
5
+ attach_function :PAPI_cleanup_eventset, [:event_set], :int
6
+ attach_function :PAPI_destroy_eventset, [:pointer], :int
5
7
  attach_function :PAPI_add_event, [:event_set, :int], :int
6
8
  attach_function :PAPI_add_named_event, [:event_set, :string], :int
7
9
  attach_function :PAPI_remove_event, [:event_set, :int], :int
@@ -27,6 +29,21 @@ module PAPI
27
29
  @size = 0
28
30
  end
29
31
 
32
+ def cleanup
33
+ error = PAPI::PAPI_cleanup_eventset( @number )
34
+ PAPI::error_check(error)
35
+ return self
36
+ end
37
+
38
+ def destroy
39
+ number = FFI::MemoryPointer::new(:int)
40
+ number.write_int(@number)
41
+ error = PAPI::PAPI_destroy_eventset( number )
42
+ @number = number.read_int
43
+ PAPI::error_check(error)
44
+ return self
45
+ end
46
+
30
47
  def assign_component(component)
31
48
  error = PAPI::PAPI_assign_eventset_component( @number, component.to_i )
32
49
  PAPI::error_check(error)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: PAPI
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.100'
4
+ version: '0.101'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice Videau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-19 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi