OpenASIP  2.0
Public Member Functions | List of all members
SparseVector< ValueType > Class Template Reference

#include <SparseVectorMap.hh>

Inheritance diagram for SparseVector< ValueType >:
Inheritance graph
Collaboration diagram for SparseVector< ValueType >:
Collaboration graph

Public Member Functions

size_t size () const
 
size_t number_of_elements () const
 

Detailed Description

template<class ValueType>
class SparseVector< ValueType >

Definition at line 43 of file SparseVectorMap.hh.

Member Function Documentation

◆ number_of_elements()

template<class ValueType >
size_t SparseVector< ValueType >::number_of_elements ( ) const
inline

Definition at line 54 of file SparseVectorMap.hh.

54  {
55  return std::map<unsigned int, ValueType>::size();
56  }

◆ size()

template<class ValueType >
size_t SparseVector< ValueType >::size ( ) const
inline

Definition at line 45 of file SparseVectorMap.hh.

45  {
46  typename std::map<unsigned int, ValueType>::const_reverse_iterator i =
47  std::map<unsigned int, ValueType>::rbegin();
48  if (i != std::map<unsigned int, ValueType>::rend()) {
49  return (i->first)+1;
50  } else {
51  return 0;
52  }
53  }

Referenced by ExecutionPipelineResource::assignSource(), ExecutionPipelineResource::highestKnownCycle(), ExecutionPipelineResource::nextResultCycle(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::resourcesAllowTrigger(), ExecutionPipelineResource::resultAllowedAtCycle(), ExecutionPipelineResource::size(), ExecutionPipelineResource::unassignDestination(), and ExecutionPipelineResource::unassignSource().


The documentation for this class was generated from the following file: