MCPcopy Create free account
hub / github.com/ImageEngine/cortex / operator()

Method operator()

src/IECorePython/LRUCacheBinding.cpp:172–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170 }
171
172 void operator()( const blocked_range<size_t> &r ) const
173 {
174 for( size_t i=r.begin(); i!=r.end(); ++i )
175 {
176 const int k = i % m_numValues;
177 const int v = m_cache.get( k );
178 if( k != v )
179 {
180 throw Exception(
181 boost::str(
182 boost::format( "Incorrect LRUCache value found (expected %d but got %d)" ) % k %v
183 )
184 );
185 }
186
187 if( m_clearFrequency && (i % m_clearFrequency == 0) )
188 {
189 m_cache.clear();
190 }
191 }
192 }
193
194 private :
195

Callers

nothing calls this directly

Calls 5

strFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
getMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected