Ejemplo n.º 1
0
/******************************************************************************************************
 * Add tag to L1 cache
 ******************************************************************************************************/
void addL1( struct state* state, struct cache* cache ) {
    
    // Add reference 
    addCache( state->L1_Index, state->L1_Tag, cache, state->type ); 

    // Transition
    state->next = QUERY_L2;
    return;

}
Ejemplo n.º 2
0
/******************************************************************************************************
 * Add tag to L2 cache
 ******************************************************************************************************/
void addL2( struct state* state ) {
    
    // Add reference 
    struct cache* cache = &L2_unified;
    addCache( state->L2_Index, state->L2_Tag, cache, state->type ); 

    // Transition
    if( state->type == 'W' ) {
        state->next = HANDLE_WRITE;
        return;
    } else {
        state->next = IDLE;
        return;
    }
}
Ejemplo n.º 3
0
void ossimSingleImageChain::createRenderedChain(const ossimSrcRecord& src)
{
   // Band selector after image handler only if needed.
   if ( m_handler.valid() )
   {
      // Only add if needed.
      if ( ( m_handler->getNumberOfOutputBands() != 1 ) || src.getBands().size() )
      {
         addBandSelector(src);
         if ( m_threeBandReverseFlag )
         {
            setToThreeBandsReverse();
         }
      }
   }
   else // No image handler so just add it.
   {
      addBandSelector(src);
   }
   
   // histogram
   if ( m_addHistogramFlag || src.getHistogramOp().size() )
   {
      addHistogramRemapper(src);
   }

   // brightness contrast:
   if ( m_brightnessContrastFlag )
   {
      addBrightnessContrast();
   }

   // sharpen filter:
   if ( m_sharpenFlag )
   {
      addSharpen();
   }

   // scalar remapper
   if ( m_remapToEightBitFlag )
   {
      if ( m_handler.valid() )
      {
         // See if it's eight bit.
         if (m_handler->getOutputScalarType() != OSSIM_UINT8)
         {
            addScalarRemapper();
         }
      }
      else
      {
         // Just add...
         addScalarRemapper(); 
      }
   }

   // resampler cache
   if ( m_addResamplerCacheFlag )
   {
      m_resamplerCache = addCache();
   }
   
   // resampler
   addResampler();

   //---
   // Do this here so that if a band selector is added to the end of the
   // chain it will go in before the end of chain cache.
   //---
   if (m_threeBandFlag)
   {
      if (!m_bandSelector) // Input must be one band.
      {
         addBandSelector(src);
      }
      setToThreeBands();
   }

   //---
   // Ditto...
   //---
   if ( m_threeBandReverseFlag && !m_bandSelector )
   {
      addBandSelector();
      setToThreeBandsReverse();
   }

   // End of chain cache.
   if ( m_addChainCacheFlag )
   {
      m_chainCache = addCache();
   }

   initialize();

}