Esempio n. 1
0
    view_type allocate(size_type n) {
        Allocator allocator;

        pointer ptr = n>0 ? allocator.allocate(n) : nullptr;

        #ifdef VERBOSE
        std::cerr << util::type_printer<DeviceCoordinator>::print()
                  << util::blue("::allocate") << "(" << n << ")"
                  << (ptr==nullptr && n>0 ? " failure" : " success")
                  << std::endl;
        #endif

        return view_type(ptr, n);
    }
Esempio n. 2
0
typename
mizuiro::image::store<
	Format,
	Access
>::view_type
mizuiro::image::store<
	Format,
	Access
>::view()
{
	return
		view_type(
			this->size(),
			this->data(),
			this->format_store()
		);
}
	view_type view()
	{
		return view_type(size(), begin(image_vectors_), begin(label_vectors_));
	}