Skip to content

Commit

Permalink
Update to HDF5 1.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Isaza committed Apr 5, 2016
1 parent 92860ef commit fb91327
Show file tree
Hide file tree
Showing 2,329 changed files with 199,951 additions and 1,242,050 deletions.
398 changes: 397 additions & 1 deletion HDF5Kit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Source/Dataset.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// file LICENSE at the root of the source code distribution tree.

public class Dataset: Object {
override init(id: Int32) {
override init(id: hid_t) {
super.init(id: id)
}

Expand Down
6 changes: 3 additions & 3 deletions Source/Dataspace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// file LICENSE at the root of the source code distribution tree.

public class Dataspace {
var id: Int32
var id: hid_t

init(id: Int32) {
init(id: hid_t) {
self.id = id
guard id >= 0 else {
fatalError("Failed to create Dataspace")
Expand Down Expand Up @@ -38,7 +38,7 @@ public class Dataspace {
/// Create a Dataspace for use in a chunked Dataset. No component of `maxDims` should be less than the corresponding element of `dims`. Elements of `maxDims` can have a value of -1, those dimension will have an unlimited size.
public init(dims: [Int], maxDims: [Int]) {
let dims64 = dims.map({ hsize_t($0) })
let maxDims64 = maxDims.map({ unsafeBitCast($0, hsize_t.self) })
let maxDims64 = maxDims.map({ hsize_t($0) })
id = withExtendedLifetime((dims64, maxDims64)) {
return H5Screate_simple(Int32(dims.count), dims64, maxDims64)
}
Expand Down
4 changes: 2 additions & 2 deletions Source/Datatype.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public enum DataClass: Int32 {


public class Datatype : Object, Equatable {
override init(id: Int32) {
override init(id: hid_t) {
super.init(id: id)
}

Expand All @@ -36,7 +36,7 @@ public class Datatype : Object, Equatable {

/// Create a Datatype from a Swift type
public convenience init?(type: Any.Type) {
let id: Int32
let id: hid_t
if type == String.self {
id = H5Tcopy(H5T_C_S1_g)
H5Tset_size(id, -1)
Expand Down
8 changes: 4 additions & 4 deletions Source/File.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class File: GroupType {
}

public class func create(filePath: String, mode: CreateMode) -> File? {
var id: Int32 = -1
var id: hid_t = -1
filePath.withCString { filePath in
id = H5Fcreate(filePath, mode.rawValue, 0, 0)
}
Expand All @@ -27,7 +27,7 @@ public class File: GroupType {
}

public class func open(filePath: String, mode: OpenMode) -> File? {
var id: Int32 = -1
var id: hid_t = -1
filePath.withCString { filePath in
id = H5Fopen(filePath, mode.rawValue, 0)
}
Expand All @@ -37,9 +37,9 @@ public class File: GroupType {
return File(id: id)
}

public internal(set) var id: Int32 = -1
public internal(set) var id: hid_t = -1

init(id: Int32) {
init(id: hid_t) {
self.id = id
guard id >= 0 else {
fatalError("Failed to create HDF5 File")
Expand Down
2 changes: 1 addition & 1 deletion Source/Group.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// file LICENSE at the root of the source code distribution tree.

public protocol GroupType {
var id: Int32 { get }
var id: hid_t { get }
}

public class Group: Object, GroupType {
Expand Down
2 changes: 1 addition & 1 deletion Source/NativeType.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public enum NativeType {
}

/// The raw value of the NativeType
public var rawValue: Swift.Int32 {
public var rawValue: hid_t {
switch self {
case Int: return H5T_NATIVE_LONG_g
case UInt: return H5T_NATIVE_ULONG_g
Expand Down
4 changes: 2 additions & 2 deletions Source/Object.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// file LICENSE at the root of the source code distribution tree.

public class Object {
public internal(set) var id: Int32 = -1
public internal(set) var id: hid_t = -1

init(id: Int32) {
init(id: hid_t) {
precondition(id >= 0, "Object ID needs to be non-negative")
self.id = id
}
Expand Down
14 changes: 10 additions & 4 deletions dist/ACKNOWLEDGMENTS
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
Acknowledgments - November 2010
-------------------------------
Acknowledgments
----------------

We would like to thank the following people who have contributed directly
or indirectly to HDF5:
We would like to thank the following people who provided code contributions
to the HDF5 1.10.0 and earlier releases:

Steffen Kieß, for contributing code used to specify locations of the external
files included in the 1.10.0 release.

Jason Newton, for contributing code used to improve the C/C++ Packet Table
included in the 1.10.0 release.

Werner Benger, for contributing code used to add support for the Windows
Threading library included in the 1.8.6 release.
Expand Down
34 changes: 15 additions & 19 deletions dist/CMakeFilters.cmake
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@

#-----------------------------------------------------------------------------
# Options for HDF5 Filters
#-----------------------------------------------------------------------------
MACRO (HDF5_SETUP_FILTERS FILTER)
option (HDF5_USE_FILTER_${FILTER} "Use the ${FILTER} Filter" ON)
if (HDF5_USE_FILTER_${FILTER})
set (H5_HAVE_FILTER_${FILTER} 1)
set (FILTERS "${FILTERS} ${FILTER}")
endif (HDF5_USE_FILTER_${FILTER})
# message (STATUS "Filter ${FILTER} is ${HDF5_USE_FILTER_${FILTER}}")
ENDMACRO (HDF5_SETUP_FILTERS)

include (ExternalProject)
#option (HDF5_ALLOW_EXTERNAL_SUPPORT "Allow External Library Building (NO SVN TGZ)" "NO")
set (HDF5_ALLOW_EXTERNAL_SUPPORT "NO" CACHE STRING "Allow External Library Building (NO SVN TGZ)")
Expand Down Expand Up @@ -40,11 +28,12 @@ option (HDF5_ENABLE_Z_LIB_SUPPORT "Enable Zlib Filters" OFF)
if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (NOT H5_ZLIB_HEADER)
if (NOT ZLIB_USE_EXTERNAL)
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT})
find_package (ZLIB NAMES ${ZLIB_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT ZLIB_FOUND)
find_package (ZLIB) # Legacy find
if (ZLIB_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_LIBRARIES})
endif (ZLIB_FOUND)
endif (NOT ZLIB_FOUND)
endif (NOT ZLIB_USE_EXTERNAL)
Expand All @@ -57,7 +46,7 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
set (ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
else (ZLIB_FOUND)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE})
EXTERNAL_ZLIB_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT})
set (H5_HAVE_FILTER_DEFLATE 1)
set (H5_HAVE_ZLIB_H 1)
set (H5_HAVE_LIBZ 1)
Expand All @@ -75,7 +64,10 @@ if (HDF5_ENABLE_Z_LIB_SUPPORT)
if (H5_HAVE_FILTER_DEFLATE)
set (EXTERNAL_FILTERS "${EXTERNAL_FILTERS} DEFLATE")
endif (H5_HAVE_FILTER_DEFLATE)
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_LIBRARIES})
if (BUILD_SHARED_LIBS)
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${ZLIB_SHARED_LIBRARY})
endif (BUILD_SHARED_LIBS)
set (LINK_LIBS ${LINK_LIBS} ${ZLIB_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS})
message (STATUS "Filter ZLIB is ON")
endif (HDF5_ENABLE_Z_LIB_SUPPORT)
Expand All @@ -87,11 +79,12 @@ option (HDF5_ENABLE_SZIP_SUPPORT "Use SZip Filter" OFF)
if (HDF5_ENABLE_SZIP_SUPPORT)
option (HDF5_ENABLE_SZIP_ENCODING "Use SZip Encoding" OFF)
if (NOT SZIP_USE_EXTERNAL)
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT})
find_package (SZIP NAMES ${SZIP_PACKAGE_NAME}${HDF_PACKAGE_EXT} COMPONENTS static shared)
if (NOT SZIP_FOUND)
find_package (SZIP) # Legacy find
if (SZIP_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_LIBRARIES})
endif (SZIP_FOUND)
endif (NOT SZIP_FOUND)
endif (NOT SZIP_USE_EXTERNAL)
Expand All @@ -100,10 +93,10 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
set (H5_HAVE_SZLIB_H 1)
set (H5_HAVE_LIBSZ 1)
set (SZIP_INCLUDE_DIR_GEN ${SZIP_INCLUDE_DIR})
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIR})
set (SZIP_INCLUDE_DIRS ${SZIP_INCLUDE_DIRS} ${SZIP_INCLUDE_DIR})
else (SZIP_FOUND)
if (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${LIB_TYPE} ${HDF5_ENABLE_SZIP_ENCODING})
EXTERNAL_SZIP_LIBRARY (${HDF5_ALLOW_EXTERNAL_SUPPORT} ${HDF5_ENABLE_SZIP_ENCODING})
set (H5_HAVE_FILTER_SZIP 1)
set (H5_HAVE_SZLIB_H 1)
set (H5_HAVE_LIBSZ 1)
Expand All @@ -112,7 +105,10 @@ if (HDF5_ENABLE_SZIP_SUPPORT)
message (FATAL_ERROR "SZIP is Required for SZIP support in HDF5")
endif (HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "SVN" OR HDF5_ALLOW_EXTERNAL_SUPPORT MATCHES "TGZ")
endif (SZIP_FOUND)
set (LINK_LIBS ${LINK_LIBS} ${SZIP_LIBRARIES})
if (BUILD_SHARED_LIBS)
set (LINK_SHARED_LIBS ${LINK_SHARED_LIBS} ${SZIP_SHARED_LIBRARY})
endif (BUILD_SHARED_LIBS)
set (LINK_LIBS ${LINK_LIBS} ${SZIP_STATIC_LIBRARY})
INCLUDE_DIRECTORIES (${SZIP_INCLUDE_DIRS})
message (STATUS "Filter SZIP is ON")
if (H5_HAVE_FILTER_SZIP)
Expand Down
Loading

0 comments on commit fb91327

Please sign in to comment.