Карта сайта Kansoftware
НОВОСТИУСЛУГИРЕШЕНИЯКОНТАКТЫ
Разработка программного обеспечения

Class image_format

Boost , Chapter 1. Boost.Compute , Reference

Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Class image_format

boost::compute::image_format — A OpenCL image format.

Synopsis

// In header: <boost/compute/image/image_format.hpp>

class image_format {
public:
  enum channel_order { r = = CL_R, a = = CL_A, intensity = = CL_INTENSITY, 
                       luminance = = CL_LUMINANCE, rg = = CL_RG, ra = = CL_RA, 
                       rgb = = CL_RGB, rgba = = CL_RGBA, argb = = CL_ARGB, 
                       bgra = = CL_BGRA };
  enum channel_data_type { snorm_int8 = = CL_SNORM_INT8, 
                           snorm_int16 = = CL_SNORM_INT16, 
                           unorm_int8 = = CL_UNORM_INT8, 
                           unorm_int16 = = CL_UNORM_INT16, 
                           unorm_short_565 = = CL_UNORM_SHORT_565, 
                           unorm_short_555 = = CL_UNORM_SHORT_555, 
                           unorm_int_101010 = = CL_UNORM_INT_101010, 
                           signed_int8 = = CL_SIGNED_INT8, 
                           signed_int16 = = CL_SIGNED_INT16, 
                           signed_int32 = = CL_SIGNED_INT32, 
                           unsigned_int8 = = CL_UNSIGNED_INT8, 
                           unsigned_int16 = = CL_UNSIGNED_INT16, 
                           unsigned_int32 = = CL_UNSIGNED_INT32, 
                           float16 = = CL_HALF_FLOAT, float32 = = CL_FLOAT };
  // construct/copy/destruct
  explicit image_format(cl_channel_order, cl_channel_type);
  explicit image_format(const cl_image_format &);
  image_format(const image_format &);
  image_format & operator=(const image_format &);
  ~image_format();
  // public member functions
  const cl_image_format * get_format_ptr() const;
  bool operator==(const image_format &) const;
  bool operator!=(const image_format &) const;
};

Description

Например, для создания формата 8-битного RGBA-изображения:

boost::compute::image_format rgba8(CL_RGBA, CL_UNSIGNED_INT8);

После созданияimage_formatОбъекты обычно передаются конструктору различных классов изображений (например,image2d).,Изображение3dдля создания объекта изображения на вычислительном устройстве.

Форматы изображений, поддерживаемые контекстом, могут быть запрошены с помощью статических get_supported_formats() в каждом классе изображений. Например:

std::vector<image_format> formats = image2d::get_supported_formats(ctx);

Смотрите также:

image2d

image_format public construct/copy/destruct

  1. <
    explicitimage_format(cl_channel_orderorder,cl_channel_typetype);
    >Создает новый объект формата изображения с<order>и<type>.
  2. <
    explicitimage_format(constcl_image_format&format);
    >Создает новый формат изображения из<format>.
  3. <
    image_format(constimage_format&other);
    >Создает новый объект формата изображения в виде копии<other>.
  4. <
    image_format&operator=(constimage_format&other);
    >Копии формата от<other>до<*this>.
  5. <
    ~image_format();
    >Уничтожает объект формата изображения.

image_format public member functions

  1. <
    constcl_image_format*get_format_ptr()const;
    >Возвращает указатель на<cl_image_format>объект.
  2. booloperator==(constimage_format&other)const;
    Возвращаетсяtrue, если*thisто же самое, чтоother.
  3. <
    booloperator!=(constimage_format&other)const;
    >Возвращается<true>, если<*this>не то же самое, что<other>.

PrevUpHomeNext

Статья Class image_format раздела Chapter 1. Boost.Compute Reference может быть полезна для разработчиков на c++ и boost.




Материалы статей собраны из открытых источников, владелец сайта не претендует на авторство. Там где авторство установить не удалось, материал подаётся без имени автора. В случае если Вы считаете, что Ваши права нарушены, пожалуйста, свяжитесь с владельцем сайта.



:: Главная :: Reference ::


реклама


©KANSoftWare (разработка программного обеспечения, создание программ, создание интерактивных сайтов), 2007
Top.Mail.Ru

Время компиляции файла: 2024-08-30 11:47:00
2025-05-19 23:40:22/0.0085830688476562/1