Class: Darshan::MPIIO::Record
- Defined in:
- ext/darshan/mpiio-module.c
Instance Attribute Summary
Attributes inherited from Record
Instance Method Summary collapse
Instance Method Details
#counter(index) ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'ext/darshan/mpiio-module.c', line 23
static VALUE Darshan3rb_mpiio_get_counter(VALUE self, VALUE index)
{
struct darshan_mpiio_file* c_record = NULL;
Data_Get_Struct(self,struct darshan_mpiio_file,c_record);
int i = NUM2INT(index);
if((i < 0) || (c_record == NULL)) return Qnil;
if(i < MPIIO_NUM_INDICES) return LL2NUM(c_record->counters[i]);
if(i < MPIIO_NUM_INDICES+MPIIO_F_NUM_INDICES) return rb_float_new(c_record->fcounters[i-MPIIO_NUM_INDICES]);
else return Qnil;
}
|
#rank ⇒ Object
15 16 17 18 19 20 21 |
# File 'ext/darshan/mpiio-module.c', line 15
static VALUE Darshan3rb_mpiio_get_rank(VALUE self)
{
struct darshan_mpiio_file* c_record = NULL;
Data_Get_Struct(self,struct darshan_mpiio_file,c_record);
if(c_record) return LL2NUM(c_record->base_rec.rank);
else return Qnil;
}
|