hdf5 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/hdf5.gemspec +2 -2
- data/lib/hdf5.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab73d6d8bc8df4d84509a2030fef544f7b830b1e
|
4
|
+
data.tar.gz: 856dd962ff750e37993eb266e319440247b55599
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9970a09552f30d7b34ee92c754e85eef32c64fa56639dc0d8ba7cf4e288b0eb022109948ac02630db1fa58d375ce21e7ad4f2c5b57b2a387d93954dc8442eae
|
7
|
+
data.tar.gz: 3bf5b47e5cbcb3860b6e6f6f726d94b965a6c44bdfe4a1dd6b2b792f42bf7e8e256faff663bd3869ac3b21823e1766530e92e10719745c270e0055b9bda86d7e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.5
|
data/hdf5.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: hdf5 0.3.
|
5
|
+
# stub: hdf5 0.3.5 ruby lib
|
6
6
|
# stub: ext/hdf5/extconf.rb
|
7
7
|
|
8
8
|
Gem::Specification.new do |s|
|
9
9
|
s.name = "hdf5"
|
10
|
-
s.version = "0.3.
|
10
|
+
s.version = "0.3.5"
|
11
11
|
|
12
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
13
|
s.require_paths = ["lib"]
|
data/lib/hdf5.rb
CHANGED
@@ -148,6 +148,7 @@ module Hdf5
|
|
148
148
|
extend FFI::Library
|
149
149
|
ffi_lib H5Library.library_path
|
150
150
|
attach_function :basic_open, :H5Dopen2, [H5Types.hid_t, :string, H5Types.hid_t], H5Types.hid_t
|
151
|
+
attach_function :basic_close, :H5Dclose, [H5Types.hid_t], H5Types.herr_t
|
151
152
|
attach_function :basic_get_type, :H5Dget_type, [H5Types.hid_t], H5Types.hid_t
|
152
153
|
attach_function :basic_get_space, :H5Dget_space, [H5Types.hid_t], H5Types.hid_t
|
153
154
|
attach_function :basic_read, :H5Dread, [H5Types.hid_t, H5Types.hid_t, H5Types.hid_t, H5Types.hid_t, H5Types.hid_t, :pointer], H5Types.herr_t
|
@@ -157,11 +158,13 @@ module Hdf5
|
|
157
158
|
def self.open(location_id, name)
|
158
159
|
id = basic_open(location_id, name, 0)
|
159
160
|
raise NotFound.new("dataset #{name} not found") if id < 0
|
160
|
-
|
161
|
+
ds = new(id)
|
162
|
+
ds
|
161
163
|
end
|
162
164
|
# Create a new object. id is the id of the HDF5 dataset this wraps.
|
163
165
|
# Use H5Dataset.open to open a dataset
|
164
166
|
def initialize(id)
|
167
|
+
ObjectSpace.define_finalizer(self){H5Dataset.basic_close(id)}
|
165
168
|
@id = id
|
166
169
|
end
|
167
170
|
# Return an H5Datatype object containing information about the type
|
@@ -242,6 +245,7 @@ module Hdf5
|
|
242
245
|
attr_reader :id
|
243
246
|
extend FFI::Library
|
244
247
|
ffi_lib H5Library.library_path
|
248
|
+
attach_function :basic_close, :H5Sclose, [H5Types.hid_t], H5Types.herr_t
|
245
249
|
attach_function :basic_get_simple_extent_ndims, :H5Sget_simple_extent_ndims, [H5Types.hid_t], :int
|
246
250
|
attach_function :basic_get_simple_extent_dims, :H5Sget_simple_extent_dims, [H5Types.hid_t, :pointer, :pointer], :int
|
247
251
|
attach_function :basic_create_simple, :H5Screate_simple, [:int, :pointer, :pointer], H5Types.hid_t
|
@@ -263,6 +267,7 @@ module Hdf5
|
|
263
267
|
# Create a new H5Dataspace object. id must be the id
|
264
268
|
# of a pre-existing HDF5 dataspace.
|
265
269
|
def initialize(id)
|
270
|
+
ObjectSpace.define_finalizer(self){H5Dataspace.basic_close(id)}
|
266
271
|
@id = id
|
267
272
|
end
|
268
273
|
# Number of dimensions in the dataspace
|
@@ -298,11 +303,13 @@ module Hdf5
|
|
298
303
|
class H5Datatype
|
299
304
|
extend FFI::Library
|
300
305
|
ffi_lib H5Library.library_path
|
306
|
+
attach_function :basic_close, :H5Tclose, [H5Types.hid_t], H5Types.herr_t
|
301
307
|
attach_function :basic_get_class, :H5Tget_class, [H5Types.hid_t], H5Types.h5t_class_t
|
302
308
|
attach_function :basic_get_nmembers, :H5Tget_nmembers, [H5Types.hid_t], :int
|
303
309
|
attach_function :basic_get_member_type, :H5Tget_member_type, [H5Types.hid_t, :uint], H5Types.hid_t
|
304
310
|
attr_reader :id
|
305
311
|
def initialize(id)
|
312
|
+
ObjectSpace.define_finalizer(self){H5Datatype.basic_close(id)}
|
306
313
|
@id = id
|
307
314
|
end
|
308
315
|
def h5_class
|