1# This file is part of h5py, a Python interface to the HDF5 library. 2# 3# http://www.h5py.org 4# 5# Copyright 2008-2013 Andrew Collette and contributors 6# 7# License: Standard 3-clause BSD; see "license.txt" for full license terms 8# and contributor agreement. 9 10 11""" 12 Low-level HDF5 "H5AC" cache configuration interface. 13""" 14 15 16cdef class CacheConfig: 17 """Represents H5AC_cache_config_t objects 18 19 """ 20 21 #cdef H5AC_cache_config_t cache_config 22 # /* general configuration fields: */ 23 def __cinit__(self): 24 self.cache_config.version = H5AC__CURR_CACHE_CONFIG_VERSION 25 26 property version: 27 def __get__(self): 28 return self.cache_config.version 29 def __set__(self, int val): 30 self.cache_config.version = val 31 32 property rpt_fcn_enabled: 33 def __get__(self): 34 return self.cache_config.rpt_fcn_enabled 35 def __set__(self, hbool_t val): 36 self.cache_config.rpt_fcn_enabled = val 37 38 property evictions_enabled: 39 def __get__(self): 40 return self.cache_config.evictions_enabled 41 def __set__(self, hbool_t val): 42 self.cache_config.evictions_enabled = val 43 44 property set_initial_size: 45 def __get__(self): 46 return self.cache_config.set_initial_size 47 def __set__(self, hbool_t val): 48 self.cache_config.set_initial_size = val 49 50 property initial_size: 51 def __get__(self): 52 return self.cache_config.initial_size 53 def __set__(self, size_t val): 54 self.cache_config.initial_size = val 55 56 property min_clean_fraction: 57 def __get__(self): 58 return self.cache_config.min_clean_fraction 59 def __set__(self, double val): 60 self.cache_config.min_clean_fraction = val 61 62 property max_size: 63 def __get__(self): 64 return self.cache_config.max_size 65 def __set__(self, size_t val): 66 self.cache_config.max_size = val 67 68 property min_size: 69 def __get__(self): 70 return self.cache_config.min_size 71 def __set__(self, size_t val): 72 self.cache_config.min_size = val 73 74 property epoch_length: 75 def __get__(self): 76 return self.cache_config.epoch_length 77 def __set__(self, long int val): 78 self.cache_config.epoch_length = val 79 80 # /* size increase control fields: */ 81 property incr_mode: 82 def __get__(self): 83 return self.cache_config.incr_mode 84 def __set__(self, H5C_cache_incr_mode val): 85 self.cache_config.incr_mode = val 86 87 property lower_hr_threshold: 88 def __get__(self): 89 return self.cache_config.lower_hr_threshold 90 def __set__(self, double val): 91 self.cache_config.lower_hr_threshold = val 92 93 property increment: 94 def __get__(self): 95 return self.cache_config.increment 96 def __set__(self, double val): 97 self.cache_config.increment = val 98 99 property apply_max_increment: 100 def __get__(self): 101 return self.cache_config.apply_max_increment 102 def __set__(self, hbool_t val): 103 self.cache_config.apply_max_increment = val 104 105 property max_increment: 106 def __get__(self): 107 return self.cache_config.max_increment 108 def __set__(self, size_t val): 109 self.cache_config.max_increment = val 110 111 property flash_incr_mode: 112 def __get__(self): 113 return self.cache_config.flash_incr_mode 114 def __set__(self, H5C_cache_flash_incr_mode val): 115 self.cache_config.flash_incr_mode = val 116 117 property flash_multiple: 118 def __get__(self): 119 return self.cache_config.flash_multiple 120 def __set__(self, double val): 121 self.cache_config.flash_multiple = val 122 123 property flash_threshold: 124 def __get__(self): 125 return self.cache_config.flash_threshold 126 def __set__(self, double val): 127 self.cache_config.flash_threshold = val 128 129 # /* size decrease control fields: */ 130 property decr_mode: 131 def __get__(self): 132 return self.cache_config.decr_mode 133 def __set__(self, H5C_cache_decr_mode val): 134 self.cache_config.decr_mode = val 135 136 property upper_hr_threshold: 137 def __get__(self): 138 return self.cache_config.upper_hr_threshold 139 def __set__(self, double val): 140 self.cache_config.upper_hr_threshold = val 141 142 property decrement: 143 def __get__(self): 144 return self.cache_config.decrement 145 def __set__(self, double val): 146 self.cache_config.decrement = val 147 148 property apply_max_decrement: 149 def __get__(self): 150 return self.cache_config.apply_max_decrement 151 def __set__(self, hbool_t val): 152 self.cache_config.apply_max_decrement = val 153 154 property max_decrement: 155 def __get__(self): 156 return self.cache_config.max_decrement 157 def __set__(self, size_t val): 158 self.cache_config.max_decrement = val 159 160 property epochs_before_eviction: 161 def __get__(self): 162 return self.cache_config.epochs_before_eviction 163 def __set__(self, int val): 164 self.cache_config.epochs_before_eviction = val 165 166 167 168 property apply_empty_reserve: 169 def __get__(self): 170 return self.cache_config.apply_empty_reserve 171 def __set__(self, hbool_t val): 172 self.cache_config.apply_empty_reserve = val 173 174 175 property empty_reserve: 176 def __get__(self): 177 return self.cache_config.empty_reserve 178 def __set__(self, double val): 179 self.cache_config.empty_reserve = val 180 181 # /* parallel configuration fields: */ 182 property dirty_bytes_threshold: 183 def __get__(self): 184 return self.cache_config.dirty_bytes_threshold 185 def __set__(self, int val): 186 self.cache_config.dirty_bytes_threshold = val 187