MCPcopy Create free account
hub / github.com/BoevaLab/FREEC / setbounds

Method setbounds

src/ap.h:502–532  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500 };
501
502 void setbounds( int iLow1, int iHigh1, int iLow2, int iHigh2 )
503 {
504 if(m_Vec)
505 {
506 if( Aligned )
507 ap::afree(m_Vec);
508 else
509 delete[] m_Vec;
510 }
511 int n1 = iHigh1-iLow1+1;
512 int n2 = iHigh2-iLow2+1;
513 m_iVecSize = n1*n2;
514 if( Aligned )
515 {
516 //if( n2%2!=0 )
517 while( (n2*sizeof(T))%16!=0 )
518 {
519 n2++;
520 m_iVecSize += n1;
521 }
522 m_Vec = (T*)ap::amalloc((size_t)(m_iVecSize*sizeof(T)), 16);
523 }
524 else
525 m_Vec = new T[(size_t)m_iVecSize];
526 m_iLow1 = iLow1;
527 m_iHigh1 = iHigh1;
528 m_iLow2 = iLow2;
529 m_iHigh2 = iHigh2;
530 m_iConstOffset = -m_iLow2-m_iLow1*n2;
531 m_iLinearMember = n2;
532 };
533
534 void setlength(int iLen1, int iLen2)
535 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected