Class: Darshan::HDF5::Record
- Inherits:
-
DarshanRecord
- Object
- DarshanRecord
- Darshan::HDF5::Record
- Defined in:
- ext/darshan/hdf5-module.c
Instance Method Summary collapse
Instance Method Details
#counter(index) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'ext/darshan/hdf5-module.c', line 23
static VALUE Darshan3rb_hdf5_get_counter(VALUE self, VALUE index)
{
struct darshan_hdf5_file* c_record = NULL;
Data_Get_Struct(self, struct darshan_hdf5_file, c_record);
int i = NUM2INT(index);
if((i < 0) || (c_record == NULL)) return Qnil;
if(i < HDF5_NUM_INDICES) return LL2NUM(c_record->counters[i]);
if(i < HDF5_NUM_INDICES+HDF5_F_NUM_INDICES) return rb_float_new(c_record->fcounters[i-HDF5_NUM_INDICES]);
else return Qnil;
}
|
#rank ⇒ Object
15 16 17 18 19 20 21 |
# File 'ext/darshan/hdf5-module.c', line 15
static VALUE Darshan3rb_hdf5_get_rank(VALUE self)
{
struct darshan_hdf5_file* c_record = NULL;
Data_Get_Struct(self,struct darshan_hdf5_file,c_record);
if(c_record) return LL2NUM(c_record->base_rec.rank);
else return Qnil;
}
|