GNU Octave  4.0.0
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
typecast.cc File Reference
#include <limits>
#include "mx-base.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "oct-obj.h"
#include "unwind-prot.h"
Include dependency graph for typecast.cc:

Go to the source code of this file.

Functions

template<class ArrayType >
ArrayType do_bitpack (const boolNDArray &bitp)
 
template<class ArrayType >
boolNDArray do_bitunpack (const ArrayType &array)
 
OCTAVE_EXPORT octave_value_list Fbitpack (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fbitunpack (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ftypecast (const octave_value_list &args, int)
 
template<class ArrayType >
static void get_data_and_bytesize (const ArrayType &array, const void *&data, octave_idx_type &byte_size, dim_vector &old_dims, unwind_protect &frame)
 
static dim_vector get_vec_dims (const dim_vector &old_dims, octave_idx_type n)
 
template<class ArrayType >
static ArrayType reinterpret_copy (const void *data, octave_idx_type byte_size, const dim_vector &old_dims)
 

Function Documentation

template<class ArrayType >
ArrayType do_bitpack ( const boolNDArray bitp)
template<class ArrayType >
boolNDArray do_bitunpack ( const ArrayType &  array)

Definition at line 394 of file typecast.cc.

References Array< T >::fortran_vec(), and get_vec_dims().

Referenced by Fbitunpack().

OCTAVE_EXPORT octave_value_list Fbitpack ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fbitunpack ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Ftypecast ( const octave_value_list args,
int   
)
template<class ArrayType >
static void get_data_and_bytesize ( const ArrayType &  array,
const void *&  data,
octave_idx_type byte_size,
dim_vector old_dims,
unwind_protect frame 
)
static

Definition at line 51 of file typecast.cc.

References action_container::add_delete().

Referenced by Ftypecast().

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::length().

Referenced by do_bitpack(), do_bitunpack(), and reinterpret_copy().

template<class 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(), and get_vec_dims().