Ruby: rb_memory_view_t Struct Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Fields
rb_memory_view_t Struct Reference

`#include <memory_view.h>`

## Data Fields
VALUE | obj
void * | data
ssize_t | byte_size
bool | readonly
const char * | format
ssize_t | item_size
struct {
const rb_memory_view_item_component_t * components
size_t length
} | item_desc
ssize_t | ndim
const ssize_t * | shape
const ssize_t * | strides
const ssize_t * | sub_offsets
void *const | private

## Detailed Description

Definition at line 39 of file memory_view.h.

## Field Documentation

## ◆ byte_size

ssize_t rb_memory_view_t::byte_size

Definition at line 49 of file memory_view.h.

Referenced by rb_memory_view_init_as_byte_array().

## ◆ components

const rb_memory_view_item_component_t* rb_memory_view_t::components

Definition at line 83 of file memory_view.h.

Referenced by rb_memory_view_get_item(), rb_memory_view_init_as_byte_array(), rb_memory_view_prepare_item_desc(), and rb_memory_view_release().

## ◆ data

void* rb_memory_view_t::data

Definition at line 46 of file memory_view.h.

Referenced by rb_memory_view_get_item_pointer(), and rb_memory_view_init_as_byte_array().

## ◆ format

const char* rb_memory_view_t::format

Definition at line 72 of file memory_view.h.

Referenced by rb_memory_view_get_item(), rb_memory_view_init_as_byte_array(), and rb_memory_view_prepare_item_desc().

## ◆

struct { ... } rb_memory_view_t::item_desc

Referenced by rb_memory_view_get_item(), rb_memory_view_init_as_byte_array(), rb_memory_view_prepare_item_desc(), and rb_memory_view_release().

## ◆ item_size

ssize_t rb_memory_view_t::item_size

Definition at line 76 of file memory_view.h.

Referenced by rb_memory_view_get_item_pointer(), rb_memory_view_init_as_byte_array(), rb_memory_view_is_column_major_contiguous(), and rb_memory_view_is_row_major_contiguous().

## ◆ length

size_t rb_memory_view_t::length

Definition at line 86 of file memory_view.h.

Referenced by rb_memory_view_get_item(), rb_memory_view_init_as_byte_array(), and rb_memory_view_prepare_item_desc().

## ◆ ndim

ssize_t rb_memory_view_t::ndim

Definition at line 90 of file memory_view.h.

Referenced by rb_memory_view_get_item_pointer(), rb_memory_view_init_as_byte_array(), rb_memory_view_is_column_major_contiguous(), and rb_memory_view_is_row_major_contiguous().

## ◆ obj

VALUE rb_memory_view_t::obj

Definition at line 43 of file memory_view.h.

Referenced by rb_memory_view_get(), rb_memory_view_init_as_byte_array(), and rb_memory_view_release().

## ◆ private

void* const rb_memory_view_t::private

Definition at line 105 of file memory_view.h.

Referenced by rb_memory_view_init_as_byte_array().

## ◆ readonly

bool rb_memory_view_t::readonly

Definition at line 52 of file memory_view.h.

Referenced by rb_memory_view_init_as_byte_array().

## ◆ shape

const ssize_t* rb_memory_view_t::shape

Definition at line 94 of file memory_view.h.

Referenced by rb_memory_view_get_item_pointer(), rb_memory_view_init_as_byte_array(), rb_memory_view_is_column_major_contiguous(), and rb_memory_view_is_row_major_contiguous().

## ◆ strides

const ssize_t* rb_memory_view_t::strides

Definition at line 98 of file memory_view.h.

Referenced by rb_memory_view_get_item_pointer(), rb_memory_view_init_as_byte_array(), rb_memory_view_is_column_major_contiguous(), and rb_memory_view_is_row_major_contiguous().

## ◆ sub_offsets

const ssize_t* rb_memory_view_t::sub_offsets

Definition at line 102 of file memory_view.h.

Referenced by rb_memory_view_get_item_pointer(), and rb_memory_view_init_as_byte_array().

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

- include/ruby/memory_view.h