GNU Octave  4.2.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
typecast.cc File Reference
#include <limits>
#include "mx-base.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "ovl.h"
#include "unwind-prot.h"
Include dependency graph for typecast.cc:

Go to the source code of this file.

Functions

OCTAVE_EXPORT octave_value_list Ftypecast (const octave_value_list &args, int) this is not guaranteed by C++.If your system is IEEE conformant
 
template<typename ArrayType >
static void get_data_and_bytesize (const ArrayType &array, const void *&data, octave_idx_type &byte_size, dim_vector &old_dims, octave::unwind_protect &frame)
 
static dim_vector get_vec_dims (const dim_vector &old_dims, octave_idx_type n)
 
template<typename ArrayType >
static ArrayType reinterpret_copy (const void *data, octave_idx_type byte_size, const dim_vector &old_dims)
 
 typecast (ar{x},"uint8") esult
 

Variables

OCTAVE_EXPORT
octave_value_list single and
double will be bytes and bytes
respectively the return value
is a row otherwise it is a
column vector If the bit
length of 
ar {x} is not divisible by that of ar{class}
 
OCTAVE_EXPORT
octave_value_list single and
double will be bytes and bytes
respectively 
code {"logical"} is not allowed for ar{class}. If the input is a row vector
 
OCTAVE_EXPORT
octave_value_list single and
double will be bytes and bytes
respectively the return value
is a row 
vector
 
OCTAVE_EXPORT
octave_value_list single and
double will be bytes and bytes 
wide
 

Function Documentation

OCTAVE_EXPORT octave_value_list Ftypecast ( const octave_value_list args,
int   
)

Referenced by install_typecast_fcns().

template<typename ArrayType >
static void get_data_and_bytesize ( const ArrayType &  array,
const void *&  data,
octave_idx_type byte_size,
dim_vector old_dims,
octave::unwind_protect frame 
)
static

Definition at line 51 of file typecast.cc.

References action_container::add_delete().

static dim_vector get_vec_dims ( const dim_vector old_dims,
octave_idx_type  n 
)
static

Definition at line 39 of file typecast.cc.

References dim_vector::ndims().

Referenced by reinterpret_copy().

template<typename ArrayType >
static ArrayType reinterpret_copy ( const void *  data,
octave_idx_type  byte_size,
const dim_vector old_dims 
)
static

Definition at line 69 of file typecast.cc.

References error(), get_vec_dims(), and retval.

typecast ( ar{x ,
"uint8"   
)

Definition at line 138 of file typecast.cc.

Variable Documentation

OCTAVE_EXPORT octave_value_list single and double will be bytes and bytes respectively the return value is a row otherwise it is a column vector If the bit length of an error occurs An example of the use of typecast on a little endian machine is xample roup ar {x} is not divisible by that of ar{class}

Definition at line 138 of file typecast.cc.

OCTAVE_EXPORT octave_value_list single and double will be bytes and bytes respectively code {"logical"} is not allowed for ar{class}. If the input is a row vector

Definition at line 138 of file typecast.cc.

OCTAVE_EXPORT octave_value_list single and double will be bytes and bytes respectively the return value is a row vector

Definition at line 138 of file typecast.cc.

OCTAVE_EXPORT octave_value_list single and double will be bytes and bytes wide

Definition at line 138 of file typecast.cc.