Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stegro committed Feb 19, 2015
1 parent a24a972 commit 510c397
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
6 changes: 1 addition & 5 deletions h5read.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@

using namespace std;

#define ALLOC_HSIZE_INFZERO_TO_UNLIMITED 1
#define ALLOC_HSIZE_INF_TO_ZERO 2
#define ALLOC_HSIZE_DEFAULT 3

#if ((H5_VERS_MAJOR > 1) || (H5_VERS_MINOR >= 8))
// define this in case there is no configure script at work. This
// should not be necessary any more when integrated into core.
Expand Down Expand Up @@ -598,7 +594,7 @@ H5File::~H5File()
// T will be Matrix or dim_vector
template <typename T>
hsize_t*
alloc_hsize(const T& dim, const int inf_zero_treatment_mode)
H5File::alloc_hsize(const T& dim, const int inf_zero_treatment_mode)
{
int rank = dim.length();
hsize_t *hsize = (hsize_t*)malloc(rank * sizeof(hsize_t));
Expand Down
13 changes: 10 additions & 3 deletions h5read.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
*
* Copyright 2012 Tom Mullins
* Copyright 2015 Stefan Großhauser
*
* Copyright (C) 2012 Tom Mullins
* Copyright (C) 2015 Tom Mullins, Thorsten Liebig, Stefan Großhauser
*
* This file is part of hdf5oct.
*
* hdf5oct is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -62,6 +62,10 @@ H5File(const char *filename, const bool create_if_nonexisting);
void create_dset(const char *location, const Matrix& size,
const char *datatype, const Matrix& chunksize);
private:
const static int ALLOC_HSIZE_INFZERO_TO_UNLIMITED = 1;
const static int ALLOC_HSIZE_INF_TO_ZERO = 2;
const static int ALLOC_HSIZE_DEFAULT = 3;

//rank of the hdf5 dataset
int rank;
//dimensions of the hdf5 dataset
Expand All @@ -85,6 +89,9 @@ H5File(const char *filename, const bool create_if_nonexisting);
octave_value read_dset();

hid_t hdf5_make_complex_type (hid_t num_type);

template <typename T> hsize_t* alloc_hsize(const T& dim, const int inf_zero_treatment_mode);

};


Expand Down

0 comments on commit 510c397

Please sign in to comment.