PAPI 0.100 → 0.101
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/PAPI.gemspec +1 -1
- data/lib/PAPI/EventSet.rb +17 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de3a90256e611c4afea6f7878025745c7eb0a315
|
4
|
+
data.tar.gz: 92f6fc2183070716de8e5ea002d3a788bfbb897a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2713b51238af8b029ce032053fadc9f32d57fdbbdd4b9e746bfb915165de527376e449b5f43088f6fcc3da946669299f56c459af991c3f5769f3402c15acccf
|
7
|
+
data.tar.gz: 665638d1acd6f0c4f337841335532e446d6ecaa66f9783bdc6a610d737969a7359985d60d15b0c7475a06908443ab7d1a4a143503d4bf4a00ca4adaed5258d7a
|
data/PAPI.gemspec
CHANGED
data/lib/PAPI/EventSet.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|