Skip to content

Commit

Permalink
hdf5: first stab at hdf5-1.10 support
Browse files Browse the repository at this point in the history
This CL is a first step towards supporting new features and APIs
of HDF5 v1.10.

Right now, anecdotal evidence shows that HDF5 v1.8 is still massively
deployed so support for 1.10 has to be opt-in, by way of an optional
build tag aptly named "hdf5-v1.10"

Updates gonum#16.
  • Loading branch information
sbinet committed May 23, 2018
1 parent 0d9b0a2 commit 414f2c0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ addons:
env:
global:
- GODEBUG=cgocheck=0
- TAGS="hdf5_v1.8"
## FIXME: add hdf5_v1.10 when trusty->bionic
## - TAGS="hdf5_v1.8 hdf5_v1.10"

notifications:
email:
Expand All @@ -31,7 +34,7 @@ notifications:
on_failure: always

script:
- go get -d -t -v ./...
- go install -v ./...
- go test -v ./...
- go get -d -t -v -tags="$TAGS" ./...
- go install -v -tags="$TAGS" ./...
- go test -v -tags="$TAGS" ./...

15 changes: 15 additions & 0 deletions h5f_v1.10.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright ©2018 The gonum Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//+build hdf5_v1.10

package hdf5

// #include "hdf5.h"
import "C"

// StartSWMRWrite enables SWMR writing mode for this file.
func (f *File) StartSWMRWrite() error {
return h5err(C.H5Fstart_swmr_write(f.id))
}

0 comments on commit 414f2c0

Please sign in to comment.