Ejemplo n.º 1
0
int main ()
{
	int blocksize = 8;
	int cachesize = 32;
	int type = 1;

	Cache* myCache;
	myCache = createAndInitialize(blocksize, cachesize, type);
	printCache(myCache);
	printTagArray(myCache);
	int i;
	for (i = 0; i < 64; i++)
	{
		accessCache(myCache, i);
	}
	printTagArray(myCache);
}
Ejemplo n.º 2
0
int main()
{
	char *value = createAndInitialize(2);
	value[0] = '1';

	for(int i = 0; i < max; i++)
	{
		value = sum(value, value);
	}

	long result = 0;
	int len = (int)strlen(value);
	for(int i = 0; i < len; i++)
	{
		result += value[i] - '0';
	}
	printf("%ld\n", result);
	return 0;
}
Ejemplo n.º 3
0
Dataset::Dataset(
    CreateAt<Location const> location
  , Datatype const& datatype
  , vector<hsize_t> const& dimensions
  , optional<void const*> const& optional_data
  , optional<DatasetCreationProperties const&> const& optional_creation_properties
  , optional<DatasetAccessProperties const&> const& optional_access_properties
  , optional<LinkCreationProperties const&> const& optional_link_creation_properties
) // {{{
  : Object(location->getFile(),Identity::Ptr())
{
    createAndInitialize(
        *location,
        datatype,
        Dataspace(dimensions),
        optional_data,
        optional_creation_properties,
        optional_access_properties,
        optional_link_creation_properties
    );
} // }}}