25 fprintf(stderr,
"[Warning]: No dense tag %s value for %s %ld\n",
30 fprintf(stderr,
"[Warning]: No dense tag %s value for root set\n", name.c_str());
42 "[Warning]: Invalid entity handle setting tag %s: %s %ld\n",
53 :
TagInfo( name,
size, type, default_value,
size ), mySequenceArray( index ), meshValue( 0 )
67 const void* default_value )
69 if( bytes < 1 )
return 0;
74 return new DenseTag( index, name, bytes, type, default_value );
93 const unsigned char*
const& ptr,
99 return get_array_private( seqman, NULL, h,
const_cast< const unsigned char*&
>( ptr ), count );
105 const unsigned char*& ptr,
106 size_t& count )
const
127 ptr =
reinterpret_cast< const unsigned char*
>( mem );
176 if( !mem && allocate )
187 ptr =
reinterpret_cast< unsigned char*
>( mem );
200 unsigned char* ptr =
reinterpret_cast< unsigned char*
>( adata );
204 const unsigned char* data = 0;
225 const unsigned char* array = NULL;
226 unsigned char* data =
reinterpret_cast< unsigned char*
>( values );
231 while( start <= p->second )
235 const size_t count = std::min< size_t >( p->second - start + 1, avail );
237 memcpy( data, array,
get_size() * count );
255 const void** pointers,
256 int* data_lengths )
const
261 const unsigned char* ptr = NULL;
287 const void** pointers,
288 int* data_lengths )
const
292 const unsigned char* array = NULL;
303 while( start <= p->second )
307 const size_t count = std::min< size_t >( p->second - start + 1, avail );
310 for(
EntityHandle end = start + count; start != end; ++start )
340 const unsigned char* ptr =
reinterpret_cast< const unsigned char*
>( data );
342 unsigned char* array = NULL;
358 const char* data =
reinterpret_cast< const char*
>( values );
359 unsigned char* array = NULL;
365 while( start <= p->second )
369 const size_t count = std::min< size_t >( p->second - start + 1, avail );
370 memcpy( array, data,
get_size() * count );
383 void const*
const* pointers,
384 const int* data_lengths )
389 unsigned char* array = NULL;
396 memcpy( array, *pointers,
get_size() );
405 void const*
const* pointers,
409 unsigned char* array = NULL;
415 while( start <= p->second )
419 const EntityHandle end = std::min< EntityHandle >( p->second + 1, start + avail );
420 while( start != end )
422 memcpy( array, *pointers,
get_size() );
438 const void* value_ptr )
442 unsigned char* array = NULL;
450 memcpy( array, value_ptr,
get_size() );
460 const void* value_ptr )
463 unsigned char* array = NULL;
469 while( start <= p->second )
473 const size_t count = std::min< size_t >( p->second - start + 1, avail );
487 const void* value_ptr,
498 const void* value_ptr,
509 size_t num_entities )
511 std::vector< unsigned char > zeros;
524 std::vector< unsigned char > zeros;
545 unsigned char* array = NULL;
550 size_t count = std::min< size_t >( avail, *( iter.
end_of_block() ) - *iter + 1 );
562 const Range* intersect_list )
const
567 std::pair< EntityType, EntityType > range =
type_range( type );
569 for( EntityType t = range.first; t != range.second; ++t )
572 for( i = map.
begin(); i != map.
end(); ++i )
574 hint =
entities->insert( hint, ( *i )->start_handle(), ( *i )->end_handle() );
583 size_t& output_count,
589 output_count += tmp.
size();
596 Range& output_entities,
600 const Range* intersect_entities )
const
602 if( value_bytes && value_bytes !=
get_size() )
605 "Cannot compare data of size " << value_bytes <<
" with tag of size " <<
get_size() );
608 if( !intersect_entities )
610 std::pair< EntityType, EntityType > range =
type_range( type );
612 for( EntityType t = range.first; t != range.second; ++t )
615 for( i = map.
begin(); i != map.
end(); ++i )
622 start += ( *i )->start_handle() - ( *i )->
data()->start_handle();
630 const unsigned char* array = NULL;
645 while( start <= p->second )
649 if( p->second - start < count - 1 ) count = p->second - start + 1;
667 const unsigned char* ptr = NULL;
673 unsigned long& total,
674 unsigned long& per_entity )
const
686 prev_data = ( *i )->data();
687 total +=
get_size() * ( *i )->data()->size();