repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
msharov/casycom
util.c
<gh_stars>1-10 // This file is part of the casycom project // // Copyright (c) 2015 by <NAME> <<EMAIL>> // This file is free software, distributed under the ISC license. #include "util.h" #include <stdarg.h> #if __has_include(<execinfo.h>) #include <execinfo.h> #endif //{{{ Memory management ------------------------------------------------ void* xalloc (size_t sz) { void* p = xrealloc (NULL, sz); memset (p, 0, sz); return p; } void* xrealloc (void* p, size_t sz) { p = realloc (p, sz); if (!p && sz) { casycom_log (LOG_ERR, "out of memory\n"); exit (EXIT_FAILURE); } return p; } //}}}------------------------------------------------------------------- //{{{ Debugging #ifndef NDEBUG void casycom_log (int type, const char* fmt, ...) { va_list args; va_start (args, fmt); if (isatty (STDOUT_FILENO)) vprintf (fmt, args); else vsyslog (type, fmt, args); va_end (args); } void casycom_backtrace (void) { #if __has_include(<execinfo.h>) void* frames [64]; int nFrames = backtrace (ARRAY_BLOCK(frames)); if (nFrames <= 1) return; // Can happen if there is no debugging information char** syms = backtrace_symbols (frames, nFrames); if (!syms) return; for (int i = 1; i < nFrames; ++i) casycom_log (LOG_ERR, "\t%s\n", syms[i]); free (syms); #endif } #endif #ifndef UC_VERSION static inline char _num_to_digit (uint8_t b) { char d = (b & 0xF) + '0'; return d <= '9' ? d : d+('A'-'0'-10); } static inline bool _printable (char c) { return c >= 32 && c < 127; } void hexdump (const void* vp, size_t n) { const uint8_t* p = vp; char line[65]; line[64] = 0; for (size_t i = 0; i < n; i += 16) { memset (line, ' ', sizeof(line)-1); for (size_t h = 0; h < 16; ++h) { if (i+h < n) { uint8_t b = p[i+h]; line[h*3] = _num_to_digit(b>>4); line[h*3+1] = _num_to_digit(b); line[h+3*16] = _printable(b) ? b : '.'; } } puts (line); } } #endif //}}}------------------------------------------------------------------- //{{{ Miscellaneous unsigned sd_listen_fds (void) { const char* e = getenv("LISTEN_PID"); if (!e || getpid() != (pid_t) strtoul(e, NULL, 10)) return 0; e = getenv("LISTEN_FDS"); return e ? strtoul (e, NULL, 10) : 0; } #ifndef UC_VERSION const char* executable_in_path (const char* efn, char* exe, size_t exesz) { if (efn[0] == '/' || (efn[0] == '.' && (efn[1] == '/' || efn[1] == '.'))) { if (0 != access (efn, X_OK)) return NULL; return efn; } const char* penv = getenv("PATH"); if (!penv) penv = "/bin:/usr/bin:."; char path [PATH_MAX]; snprintf (ARRAY_BLOCK(path), "%s/%s"+3, penv); for (char *pf = path, *pl = pf; *pf; pf = pl) { while (*pl && *pl != ':') ++pl; *pl++ = 0; snprintf (exe, exesz, "%s/%s", pf, efn); if (0 == access (exe, X_OK)) return exe; } return NULL; } #endif //}}}-------------------------------------------------------------------
msharov/casycom
vector.c
<filename>vector.c // This file is part of the casycom project // // Copyright (c) 2015 by <NAME> <<EMAIL>> // This file is free software, distributed under the ISC license. #include "vector.h" #include "util.h" void vector_reserve (void* vv, size_t sz) { CharVector* v = vv; if (v->allocated >= sz) return; size_t nsz = v->allocated + !v->allocated; while (nsz < sz) nsz *= 2; assert (v->elsize && "uninitialized vector detected"); v->d = xrealloc (v->d, nsz * v->elsize); memset (v->d + v->allocated * v->elsize, 0, (nsz - v->allocated) * v->elsize); v->allocated = nsz; } void vector_deallocate (void* vv) { CharVector* v = vv; xfree (v->d); v->size = 0; v->allocated = 0; } void* vector_emplace (void* vv, size_t ip) { CharVector* v = vv; assert (ip <= v->size && "out of bounds insert"); vector_reserve (vv, v->size+1); char* ii = v->d + ip * v->elsize; memmove (ii + v->elsize, ii, (v->size-ip)*v->elsize); memset (ii, 0, v->elsize); ++v->size; return ii; } void* vector_emplace_n (void* vv, size_t ip, size_t n) { CharVector* v = vv; assert (ip <= v->size && "out of bounds insert"); vector_reserve (vv, v->size+n); char* ii = v->d + ip * v->elsize; memmove (ii + n*v->elsize, ii, (v->size-ip)*v->elsize); memset (ii, 0, n*v->elsize); v->size += n; return ii; } void vector_insert (void* vv, size_t ip, const void* e) { CharVector* v = vv; void* h = vector_emplace (v, ip); memcpy (h, e, v->elsize); } void vector_insert_n (void* vv, size_t ip, const void* e, size_t esz) { CharVector* v = vv; void* h = vector_emplace_n (v, ip, esz); memcpy (h, e, esz*v->elsize); } void vector_erase_n (void* vv, size_t ep, size_t n) { CharVector* v = vv; char *ei = v->d + ep*v->elsize, *eei = v->d + (ep+n)*v->elsize; assert (ep <= v->size && ep+n <= v->size && "out of bounds erase"); memmove (ei, eei, (v->size - (ep+n)) * v->elsize); v->size -= n; } void vector_swap (void* vv1, void* vv2) { CharVector *v1 = vv1, *v2 = vv2; assert (v1->elsize == v2->elsize && "can only swap identical vectors"); CharVector t; memcpy (&t, v1, sizeof(t)); memcpy (v1, v2, sizeof(*v1)); memcpy (v2, &t, sizeof(*v2)); } void vector_copy (void* vv1, const void* vv2) { CharVector* v1 = vv1; const CharVector* v2 = vv2; vector_resize (v1, v2->size); memcpy (v1->d, v2->d, v2->size); } static size_t _vector_bound (const void* vv, vector_compare_fn_t cmp, const int cmpv, const void* e) { const CharVector* v = vv; size_t f = 0, l = v->size; while (f < l) { size_t m = (f+l)/2; if (cmpv > cmp (v->d + m*v->elsize, e)) f = m + 1; else l = m; } return f; } size_t vector_lower_bound (const void* vv, vector_compare_fn_t cmp, const void* e) { return _vector_bound (vv, cmp, 0, e); } size_t vector_upper_bound (const void* vv, vector_compare_fn_t cmp, const void* e) { return _vector_bound (vv, cmp, 1, e); }
msharov/casycom
stm.c
<reponame>msharov/casycom // This file is part of the casycom project // // Copyright (c) 2015 by <NAME> <<EMAIL>> // This file is free software, distributed under the ISC license. #include "stm.h" const char* casystm_read_string (RStm* s) { uint32_t vlen = casystm_read_uint32 (s); const char* v = s->_p; if (!vlen) --v; casystm_read_skip (s, vlen); casystm_read_align (s, sizeof(vlen)); assert (strnlen(v,s->_p-v) == vlen-!!vlen && "unterminated string in stream"); return v; } void casystm_write_string (WStm* s, const char* v) { uint32_t vlen = 0; if (v && (vlen = strlen(v))) ++vlen; casystm_write_uint32 (s, vlen); casystm_write_data (s, v, vlen); casystm_write_align (s, sizeof(vlen)); }
msharov/casycom
xcom.h
// This file is part of the casycom project // // Copyright (c) 2015 by <NAME> <<EMAIL>> // This file is free software, distributed under the ISC license. #pragma once #include "main.h" #include "vector.h" #include <sys/socket.h> #include <netinet/in.h> #if !defined(NDEBUG) && !defined(UC_VERSION) #include <arpa/inet.h> #endif #ifdef __cplusplus extern "C" { #endif //{{{ Extern ----------------------------------------------------------- enum EExternType { EXTERN_CLIENT, EXTERN_SERVER }; typedef void (*MFN_Extern_open)(void* vo, int fd, enum EExternType atype, const iid_t* imported_interfaces, const iid_t* exportedInterfaces); typedef void (*MFN_Extern_close)(void* vo); typedef struct _DExtern { iid_t interface; MFN_Extern_open Extern_open; MFN_Extern_close Extern_close; } DExtern; void PExtern_open (const Proxy* pp, int fd, enum EExternType atype, const iid_t* import_interfaces, const iid_t* export_interfaces) noexcept NONNULL(1); void PExtern_close (const Proxy* pp) noexcept NONNULL(); int PExtern_connect (const Proxy* pp, const struct sockaddr* addr, socklen_t addrlen, const iid_t* imported_interfaces) noexcept NONNULL(); int PExtern_connect_local (const Proxy* pp, const char* path, const iid_t* imported_interfaces) noexcept NONNULL(); int PExtern_connect_user_local (const Proxy* pp, const char* sockname, const iid_t* imported_interfaces) noexcept NONNULL(); int PExtern_connect_system_local (const Proxy* pp, const char* sockname, const iid_t* imported_interfaces) noexcept NONNULL(); int PExtern_launch_pipe (const Proxy* pp, const char* exe, const char* arg, const iid_t* imported_interfaces) noexcept NONNULL(1,2,4); extern const Interface i_Extern; void casycom_enable_externs (void) noexcept; //{{{2 Extern_connect -------------------------------------------------- #ifdef __cplusplus namespace { #endif /// Create local IPv4 socket at given ip and port static inline int PExtern_connect_ip4 (const Proxy* pp, in_addr_t ip, in_port_t port, const iid_t* imported_interfaces) { struct sockaddr_in addr = { .sin_family = PF_INET, #ifdef UC_VERSION .sin_addr = ip, #else .sin_addr = { ip }, #endif .sin_port = port }; #ifndef NDEBUG char addrbuf [64]; #ifdef UC_VERSION DEBUG_PRINTF ("[X] Connecting to socket %s:%hu\n", inet_intop(addr.sin_addr, addrbuf, sizeof(addrbuf)), port); #else DEBUG_PRINTF ("[X] Connecting to socket %s:%hu\n", inet_ntop(PF_INET, &addr.sin_addr, addrbuf, sizeof(addrbuf)), port); #endif #endif return PExtern_connect (pp, (const struct sockaddr*) &addr, sizeof(addr), imported_interfaces); } /// Create local IPv4 socket at given port on the loopback interface static inline int PExtern_connect_local_ip4 (const Proxy* pp, in_port_t port, const iid_t* imported_interfaces) { return PExtern_connect_ip4 (pp, INADDR_LOOPBACK, port, imported_interfaces); } /// Create local IPv6 socket at given ip and port static inline int PExtern_connect_ip6 (const Proxy* pp, struct in6_addr ip, in_port_t port, const iid_t* imported_interfaces) { struct sockaddr_in6 addr = { .sin6_family = PF_INET6, .sin6_addr = ip, .sin6_port = port }; #if !defined(NDEBUG) && !defined(UC_VERSION) char addrbuf [128]; DEBUG_PRINTF ("[X] Connecting to socket %s:%hu\n", inet_ntop(PF_INET6, &addr.sin6_addr, addrbuf, sizeof(addrbuf)), port); #endif return PExtern_connect (pp, (const struct sockaddr*) &addr, sizeof(addr), imported_interfaces); } /// Create local IPv6 socket at given ip and port static inline int PExtern_connect_local_ip6 (const Proxy* pp, in_port_t port, const iid_t* imported_interfaces) { struct sockaddr_in6 addr = { .sin6_family = PF_INET6, .sin6_addr = IN6ADDR_LOOPBACK_INIT, .sin6_port = port }; DEBUG_PRINTF ("[X] Connecting to socket localhost6:%hu\n", port); return PExtern_connect (pp, (const struct sockaddr*) &addr, sizeof(addr), imported_interfaces); } #ifdef __cplusplus } // namespace #endif //}}}2 //}}}------------------------------------------------------------------- //{{{ ExternInfo DECLARE_VECTOR_TYPE (InterfaceVector, Interface*); typedef struct _ExternCredentials { pid_t pid; uid_t uid; #ifdef SCM_CREDS uid_t euid; // BSD-only field, do not use #endif gid_t gid; } ExternCredentials; typedef struct _ExternInfo { InterfaceVector interfaces; ExternCredentials creds; oid_t oid; bool is_client; bool is_unix_socket; } ExternInfo; const ExternInfo* casycom_extern_info (oid_t eid) noexcept; const ExternInfo* casycom_extern_object_info (oid_t oid) noexcept; //}}}------------------------------------------------------------------- //{{{ ExternR typedef void (*MFN_ExternR_connected)(void* vo, const ExternInfo* einfo); typedef struct _DExternR { iid_t interface; MFN_ExternR_connected ExternR_connected; } DExternR; void PExternR_connected (const Proxy* pp, const ExternInfo* einfo) noexcept NONNULL(); extern const Interface i_ExternR; //}}}------------------------------------------------------------------- #ifdef __cplusplus } // extern "C" #endif
msharov/casycom
io.c
<filename>io.c<gh_stars>1-10 // This file is part of the casycom project // // Copyright (c) 2015 by <NAME> <<EMAIL>> // This file is free software, distributed under the ISC license. #include "io.h" #include "timer.h" //{{{ IO interface ----------------------------------------------------- enum { method_IO_read, method_IO_write }; void PIO_read (const Proxy* pp, CharVector* d) { Msg* msg = casymsg_begin (pp, method_IO_read, 8); msg->h.interface = &i_IO; WStm os = casymsg_write (msg); casystm_write_ptr (&os, d); casymsg_end (msg); } void PIO_write (const Proxy* pp, CharVector* d) { Msg* msg = casymsg_begin (pp, method_IO_write, 8); msg->h.interface = &i_IO; WStm os = casymsg_write (msg); casystm_write_ptr (&os, d); casymsg_end (msg); } static void IO_dispatch (const DIO* dtable, void* o, const Msg* msg) { if (msg->imethod == method_IO_read) { RStm is = casymsg_read (msg); CharVector* d = casystm_read_ptr (&is); dtable->IO_read (o, d); } else if (msg->imethod == method_IO_write) { RStm is = casymsg_read (msg); CharVector* d = casystm_read_ptr (&is); dtable->IO_write (o, d); } else casymsg_default_dispatch (dtable, o, msg); } const Interface i_IO = { .name = "IO", .dispatch = IO_dispatch, .method = { "read\0x", "write\0x", NULL } }; //}}}------------------------------------------------------------------- //{{{ IOR interface enum { method_IOR_read, method_IOR_written }; void PIOR_read (const Proxy* pp, CharVector* d) { Msg* msg = casymsg_begin (pp, method_IOR_read, 8); WStm os = casymsg_write (msg); casystm_write_ptr (&os, d); casymsg_end (msg); } void PIOR_written (const Proxy* pp, CharVector* d) { Msg* msg = casymsg_begin (pp, method_IOR_written, 8); WStm os = casymsg_write (msg); casystm_write_ptr (&os, d); casymsg_end (msg); } static void IOR_dispatch (const DIOR* dtable, void* o, const Msg* msg) { if (msg->imethod == method_IOR_read) { RStm is = casymsg_read (msg); CharVector* d = casystm_read_ptr (&is); if (dtable->IOR_read) dtable->IOR_read (o, d); } else if (msg->imethod == method_IOR_written) { RStm is = casymsg_read (msg); CharVector* d = casystm_read_ptr (&is); if (dtable->IOR_written) dtable->IOR_written (o, d); } else casymsg_default_dispatch (dtable, o, msg); } const Interface i_IOR = { .name = "IOR", .dispatch = IOR_dispatch, .method = { "read\0x", "written\0x", NULL } }; //}}}------------------------------------------------------------------- //{{{ FdIO interface enum { method_FdIO_attach }; void PFdIO_attach (const Proxy* pp, int fd) { Msg* msg = casymsg_begin (pp, method_FdIO_attach, 4); WStm os = casymsg_write (msg); casystm_write_int32 (&os, fd); casymsg_end (msg); } static void FdIO_dispatch (const DFdIO* dtable, void* o, const Msg* msg) { if (msg->imethod == method_FdIO_attach) { RStm is = casymsg_read (msg); int fd = casystm_read_int32 (&is); dtable->FdIO_attach (o, fd); } else casymsg_default_dispatch (dtable, o, msg); } const Interface i_FdIO = { .name = "FdIO", .dispatch = FdIO_dispatch, .method = { "attach\0i", NULL } }; //}}}------------------------------------------------------------------- //{{{ FdIO object typedef struct _FdIO { Proxy reply; int fd; Proxy timer; bool eof; CharVector* rbuf; CharVector* wbuf; } FdIO; const Factory f_FdIO; static void* FdIO_create (const Msg* msg) { FdIO* po = xalloc (sizeof(FdIO)); po->fd = -1; po->reply = casycom_create_reply_proxy (&i_IOR, msg); po->timer = casycom_create_proxy (&i_Timer, msg->h.dest); return po; } static void FdIO_FdIO_attach (FdIO* o, int fd) { o->fd = fd; } static void FdIO_TimerR_timer (FdIO* o, int fd UNUSED, const Msg* msg UNUSED) { enum ETimerWatchCmd ccmd = 0; if (o->rbuf) { if (!o->eof) { size_t rbufsz = o->rbuf->size; for (size_t btr; 0 < (btr = o->rbuf->allocated - o->rbuf->size);) { ssize_t r = read (o->fd, &o->rbuf->d[o->rbuf->size], btr); if (r <= 0) { if (!r || errno == ECONNRESET) { o->eof = true; casycom_mark_unused (o); } else if (errno == EAGAIN) ccmd |= WATCH_READ; else if (errno == EINTR) continue; else casycom_error ("read: %s", strerror(errno)); break; } o->rbuf->size += r; } if (rbufsz != o->rbuf->size || o->eof) PIOR_read (&o->reply, o->rbuf); } if (o->eof) PIOR_read (&o->reply, o->rbuf = NULL); } if (o->wbuf) { if (!o->eof) { size_t wbufsize = o->wbuf->size; while (o->wbuf->size) { ssize_t r = write (o->fd, o->wbuf->d, o->wbuf->size); if (r <= 0) { if (!r || errno == ECONNRESET) { o->eof = true; casycom_mark_unused (o); } else if (errno == EAGAIN) ccmd |= WATCH_WRITE; else if (errno == EINTR) continue; else casycom_error ("write: %s", strerror(errno)); break; } vector_erase_n (o->wbuf, 0, r); } if (wbufsize != o->wbuf->size && (!o->wbuf->size || o->eof)) PIOR_written (&o->reply, o->wbuf); if (!o->wbuf->size) // stop writing when done o->wbuf = NULL; } if (o->eof) PIOR_written (&o->reply, o->wbuf = NULL); } if (ccmd) PTimer_watch (&o->timer, ccmd, o->fd, TIMER_NONE); } static void FdIO_IO_read (FdIO* o, CharVector* d) { o->rbuf = d; FdIO_TimerR_timer (o, o->fd, NULL); } static void FdIO_IO_write (FdIO* o, CharVector* d) { o->wbuf = d; FdIO_TimerR_timer (o, o->fd, NULL); } static const DFdIO d_FdIO_FdIO = { .interface = &i_FdIO, DMETHOD (FdIO, FdIO_attach) }; static const DIO d_FdIO_IO = { .interface = &i_IO, DMETHOD (FdIO, IO_read), DMETHOD (FdIO, IO_write) }; static const DTimerR d_FdIO_TimerR = { .interface = &i_TimerR, DMETHOD (FdIO, TimerR_timer) }; const Factory f_FdIO = { .create = FdIO_create, .dtable = { &d_FdIO_FdIO, &d_FdIO_IO, &d_FdIO_TimerR, NULL } }; //}}}-------------------------------------------------------------------
msharov/casycom
main.c
<reponame>msharov/casycom<gh_stars>1-10 // This file is part of the casycom project // // Copyright (c) 2015 by <NAME> <<EMAIL>> // This file is free software, distributed under the ISC license. #include "app.h" #include "timer.h" #include "vector.h" #include <signal.h> #include <stdarg.h> #include <sys/wait.h> //{{{ Module globals --------------------------------------------------- // Last non-fatal signal. Set by signal handler, read by main loop. static unsigned _casycom_last_signal = 0; static pid_t _casycom_last_child_pid = 0; static int _casycom_last_child_status = 0; // Loop exit code static int _casycom_exit_code = EXIT_SUCCESS; // Loop status static bool _casycom_quitting = false; // Output queue modification lock static _Atomic(bool) _casycom_output_queue_lock = false; // Last error static char* _casycom_error = NULL; // App proxy static Proxy _casycom_appp = {}; // Enables debug trace messages bool casycom_debug_msg_trace = false; // Message queues DECLARE_VECTOR_TYPE (MsgVector, Msg*); static VECTOR (MsgVector, _casycom_input_queue); // During each main loop iteration, this queue is read static VECTOR (MsgVector, _casycom_output_queue); // ... and this queue is written. Then they are swapped. // Object table contains object factories and the dtables they support DECLARE_VECTOR_TYPE (FactoryTable, const Factory*); static VECTOR (FactoryTable, _casycom_object_table); static const Factory* _casycom_default_object = NULL; // Message link map typedef enum _OFlags { f_Unused, // Objects marked unused are deleted during loop idle f_Last } OFlags; typedef struct _MsgLink { void* o; const Factory* factory; Proxy h; uint32_t flags; } MsgLink; DECLARE_VECTOR_TYPE (SOMap, MsgLink); // _casycom_omap contains the message routing table, mapping each // proxy-to-object link. The map is sorted by object id. Each object // may have multiple incoming and outgoing links. The block of incoming // links is contiguous, being sorted, and the first link contains the // object pointer (ml->o). The other links have o set to NULL, and are // ordered by the order of creation of their proxies. The first // link is created by the first proxy created to this object, and is // considered to be the creator link. The creator path is used for error // handling propagation. Once the creator object is destroyed, all // objects created by it are also destroyed. static VECTOR (SOMap, _casycom_omap); //---------------------------------------------------------------------- // Local private functions static MsgLink* casycom_find_destination (oid_t doid); static MsgLink* casycom_find_or_create_destination (const Msg* msg); static MsgLink* casycom_link_for_object (const void* o); static const DTable* casycom_find_dtable (const Factory* o, iid_t iid); static const Factory* casycom_find_factory (iid_t iid); static size_t casycom_link_for_proxy (const Proxy* ph); static size_t casycom_omap_lower_bound (oid_t oid); static void* casycom_create_link_object (MsgLink* ml, const Msg* msg); static void casycom_destroy_link_at (size_t l); static void casycom_destroy_object (MsgLink* ol); static void casycom_do_message_queues (void); static void casycom_idle (void); //}}}------------------------------------------------------------------- //{{{ Signal handling #define S(s) (1<<(s)) enum { sigset_Quit = S(SIGINT)|S(SIGQUIT)|S(SIGTERM), sigset_Die = S(SIGILL)|S(SIGABRT)|S(SIGBUS)|S(SIGFPE)|S(SIGSYS)|S(SIGSEGV)|S(SIGALRM)|S(SIGXCPU), sigset_Msg = sigset_Quit|S(SIGHUP)|S(SIGCHLD)|S(SIGWINCH)|S(SIGURG)|S(SIGXFSZ)|S(SIGUSR1)|S(SIGUSR2)|S(SIGPIPE) }; enum { qc_ShellSignalQuitOffset = 128 }; static void casycom_on_fatal_signal (int sig) { static volatile _Atomic(bool) doubleSignal = false; if (false == atomic_exchange (&doubleSignal, true)) { alarm (1); casycom_log (LOG_CRIT, "[S] Error: %s\n", strsignal(sig)); #ifndef NDEBUG casycom_backtrace(); #endif // The exit code should be success when terminated by user int exitcode = EXIT_SUCCESS; if (!(S(sig) & sigset_Quit)) exitcode = qc_ShellSignalQuitOffset+sig; exit (exitcode); } _Exit (qc_ShellSignalQuitOffset+sig); } static void casycom_on_msg_signal (int sig) { DEBUG_PRINTF ("[S] Signal %d: %s\n", sig, strsignal(sig)); #ifdef NDEBUG alarm (1); #endif _casycom_last_signal = sig; if (sig == SIGCHLD) _casycom_last_child_pid = waitpid (-1, &_casycom_last_child_status, WNOHANG); else if (S(sig) & sigset_Quit) casycom_quit (qc_ShellSignalQuitOffset+sig); } static void casycom_install_signal_handlers (void) { for (unsigned sig = 0; sig < sizeof(int)*8; ++sig) { if (sigset_Msg & S(sig)) signal (sig, casycom_on_msg_signal); else if (sigset_Die & S(sig)) signal (sig, casycom_on_fatal_signal); } } #undef S static inline void casycom_send_signal_message (void) { if (!_casycom_last_signal) return; alarm (0); // the alarm was set to check for infinite loops if (_casycom_appp.interface) PApp_signal (&_casycom_appp, _casycom_last_signal, _casycom_last_child_pid, _casycom_last_child_status); _casycom_last_signal = 0; } //}}}------------------------------------------------------------------- //{{{ Proxies and link table /// creates a proxy to a new object from object \p src, using interface \p iid Proxy casycom_create_proxy (iid_t iid, oid_t src) { // Find first unused oid value // OMap is sorted, so increment nid until a number gap is found oid_t nid = oid_First; if (_casycom_omap.size) nid = _casycom_omap.d[0].h.dest; size_t ip = 0; for (; ip < _casycom_omap.size; ++ip) { if (nid < _casycom_omap.d[ip].h.dest) break; if (nid == _casycom_omap.d[ip].h.dest) ++nid; } return casycom_create_proxy_to (iid, src, nid); } /// creates a proxy to existing object \p dest from \p src, using interface \p iid Proxy casycom_create_proxy_to (iid_t iid, oid_t src, oid_t dest) { size_t ip = casycom_omap_lower_bound (dest); while (ip < _casycom_omap.size && _casycom_omap.d[ip].h.dest == dest) ++ip; MsgLink* e = vector_emplace (&_casycom_omap, ip); e->factory = casycom_find_factory (iid); e->h.interface = iid; e->h.src = src; e->h.dest = dest; DEBUG_PRINTF ("[T] created proxy link %hu -> %hu.%s\n", e->h.src, e->h.dest, e->h.interface->name); return e->h; } static void casycom_destroy_link_at (size_t l) { if (l >= _casycom_omap.size) return; MsgLink ol = _casycom_omap.d[l]; // casycom_destroy_object may destroy other links, so l will be invalidated vector_erase (&_casycom_omap, l); DEBUG_PRINTF ("[T] destroyed proxy link %hu -> %hu.%s\n", ol.h.src, ol.h.dest, ol.h.interface->name); if (ol.o) // If this is the link that created the object, destroy the object casycom_destroy_object (&ol); } void casycom_destroy_proxy (Proxy* pp) { casycom_destroy_link_at (casycom_link_for_proxy (pp)); pp->interface = NULL; pp->src = 0; pp->dest = 0; } static size_t casycom_omap_lower_bound (oid_t oid) { size_t first = 0, last = _casycom_omap.size; while (first < last) { size_t mid = (first + last) / 2; if (_casycom_omap.d[mid].h.dest < oid) first = mid + 1; else last = mid; } return first; } static size_t casycom_link_for_proxy (const Proxy* ph) { for (size_t l = casycom_omap_lower_bound (ph->dest); l < _casycom_omap.size && _casycom_omap.d[l].h.dest == ph->dest; ++l) if (_casycom_omap.d[l].h.src == ph->src) return l; return SIZE_MAX; } static MsgLink* casycom_link_for_object (const void* o) { for (size_t dp = 0; dp < _casycom_omap.size; ++dp) if (_casycom_omap.d[dp].o == o) return &_casycom_omap.d[dp]; return NULL; } static MsgLink* casycom_find_destination (oid_t doid) { size_t dp = casycom_omap_lower_bound (doid); if (dp < _casycom_omap.size && _casycom_omap.d[dp].h.dest == doid) return &_casycom_omap.d[dp]; return NULL; } void casycom_debug_dump_link_table (void) { DEBUG_PRINTF ("[D] Current link table:\n"); for (size_t i = 0; i < _casycom_omap.size; ++i) { const MsgLink* UNUSED l = &_casycom_omap.d[i]; DEBUG_PRINTF ("\t%hu -> %hu.%s\t(%p),%x\n", l->h.src, l->h.dest, l->h.interface->name, l->o, l->flags); } } //}}}------------------------------------------------------------------- //{{{ Object registration and creation #ifndef NDEBUG static void casycom_debug_check_object (const Factory* o, const char* it) { assert (o->create && "registered object must have a constructor"); assert (o->dtable[0] && "an object must implement at least one interface"); DEBUG_PRINTF ("[T] Registered %s", it); for (const DTable* const* oi = (const DTable* const*) o->dtable; *oi; ++oi) { assert ((*oi)->interface && "each dtable must contain the pointer to the implemented interface"); DEBUG_PRINTF ("%c%s", oi == (const DTable* const*) o->dtable ? ' ':',', (*oi)->interface->name); } DEBUG_PRINTF("\n"); } #endif /// Registers an object class for creation void casycom_register (const Factory* o) { #ifndef NDEBUG casycom_debug_check_object (o, "class"); #endif vector_push_back (&_casycom_object_table, &o); } /// Registers object class for unknown interfaces void casycom_register_default (const Factory* o) { #ifndef NDEBUG if (o) casycom_debug_check_object (o, "default class"); else if (_casycom_default_object) DEBUG_PRINTF ("[T] Unregistered default class"); #endif _casycom_default_object = o; } /// Finds object id of the given object oid_t casycom_oid_of_object (const void* o) { MsgLink* ml = casycom_link_for_object (o); return ml ? ml->h.dest : oid_Broadcast; } /// Marks the given object unused, to be deleted during the next idle void casycom_mark_unused (const void* o) { MsgLink* ml = casycom_link_for_object (o); if (ml) ml->flags |= (1<<f_Unused); } static void* casycom_create_link_object (MsgLink* ml, const Msg* msg) { assert (!ml->o && "internal error: object already exists"); // create using the otable DEBUG_PRINTF ("[T] Creating object %hu.%s\n", ml->h.dest, casymsg_interface_name(msg)); void* o = ml->factory->create (msg); assert (o && "object create method must return a valid object or die"); return o; } void* casycom_create_object (const iid_t iid) { Proxy op = casycom_create_proxy (iid, oid_Broadcast); Msg* msg = casymsg_begin (&op, method_create_object, 0); void* o = casycom_find_or_create_destination (msg)->o; casymsg_free (msg); return o; } static void casycom_destroy_object (MsgLink* ol) { // destroying an object can cause all kinds of ugly recursion as notified // objects destroy proxies and mess up OMap. To work around these problems // links must be saved and various locks set. ol->o is one of those locks. if (!ol->o) return; DEBUG_PRINTF ("[T] destroying object %hu.%s\n", ol->h.dest, ol->h.interface->name); // Call the destructor, if set. if (ol->factory->destroy) { ol->factory->destroy (ol->o); ol->o = NULL; } else xfree (ol->o); // Otherwise just free ol->flags = 0; const oid_t oid = ol->h.dest; // Notify callers of destruction oid_t callers [16]; unsigned nCallers = 0; // In two passes because object_destroyed handlers can modify OMap for (size_t di = 0; di < _casycom_omap.size; ++di) { const MsgLink* cl = &_casycom_omap.d[di]; if (cl->h.dest == oid && cl->h.src != oid_Broadcast) // Object calls the destroyed object callers[nCallers++] = cl->h.src; } for (unsigned i = 0; i < nCallers; ++i) { const MsgLink* cl = casycom_find_destination (callers[i]); // Find the link with its pointer if (cl && cl->factory->object_destroyed) { // notify of destruction, if requested DEBUG_PRINTF ("[T]\tNotifying object %hu -> %hu.%s\n", cl->h.src, cl->h.dest, cl->h.interface->name); cl->factory->object_destroyed (cl->o, oid); } } // Erase all links from this object for (size_t di = 0; di < _casycom_omap.size; ++di) { if (_casycom_omap.d[di].h.src == oid) { casycom_destroy_link_at (di); di = SIZE_MAX; // recursion will modify OMap, so have to start over } } } static inline void casycom_destroy_unused_objects (void) { for (size_t i = 0; i < _casycom_omap.size; ++i) { if (_casycom_omap.d[i].flags & (1<<f_Unused)) { DEBUG_PRINTF ("[I] destroying unused object %hu.%s\n", _casycom_omap.d[i].h.dest, _casycom_omap.d[i].h.interface->name); casycom_destroy_object (&_casycom_omap.d[i]); i = SIZE_MAX; // start over because casycom_destroy_object modifies OMap } } } static const DTable* casycom_find_dtable (const Factory* o, iid_t iid) { for (const DTable* const* oi = (const DTable* const*) o->dtable; *oi; ++oi) if ((*oi)->interface == iid) return *oi; if (o == _casycom_default_object) return _casycom_default_object->dtable[0]; return NULL; } static const Factory* casycom_find_factory (iid_t iid) { for (size_t i = 0; i < _casycom_object_table.size; ++i) { const Factory* ot = _casycom_object_table.d[i]; if (casycom_find_dtable (ot, iid)) return ot; } return _casycom_default_object; } iid_t casycom_interface_by_name (const char* iname) { for (size_t i = 0; i < _casycom_object_table.size; ++i) { const Factory* f = _casycom_object_table.d[i]; for (const DTable* const* di = (const DTable* const*) f->dtable; *di; ++di) if (!strcmp ((*di)->interface->name, iname)) return (*di)->interface; } if (_casycom_default_object) { iid_t default_interface = ((const DTable*)_casycom_default_object->dtable[0])->interface; if (!strcmp (default_interface->name, iname)) return default_interface; } return NULL; } static MsgLink* casycom_find_or_create_destination (const Msg* msg) { MsgLink* ml; // Object constructor may create proxies, modifying the link map, // so if a new object is created, need to find the link again. for (void* no = NULL;;) { ml = casycom_find_destination (msg->h.dest); if (!ml || ml->o || (ml->o = no)) break; no = casycom_create_link_object (ml, msg); // create the object, if needed } return ml; } //}}}------------------------------------------------------------------- //{{{ Message queue management // This is privately exported to msg.c . Do not use directly. // Places \p msg into the output queue. It is thread-safe. void casycom_queue_message (Msg* msg) { #ifndef NDEBUG // Message validity checks assert (msg->h.interface && (!msg->size || msg->body) && "invalid message"); const Factory* dest_factory = casycom_find_factory (msg->h.interface); if (!dest_factory) DEBUG_PRINTF ("Error: you must call casycom_register (&f_%s) to use this interface\n", casymsg_interface_name(msg)); assert (dest_factory && "message addressed to unregistered interface"); MsgLink* destl = casycom_find_destination (msg->h.dest); assert (destl && "message addressed to an unknown destination"); const DTable* dtable = casycom_find_dtable (destl->factory, msg->h.interface); assert (dtable && "message forwarded to object that does not support its interface"); assert (casycom_link_for_proxy(&msg->h) < _casycom_omap.size && "message sent through a deleted proxy; do not delete proxies in the destructor or in ObjectDeleted!"); if (msg->imethod != method_create_object) { assert (msg->imethod < casyiface_count_methods (msg->h.interface) && "invalid message destination method"); size_t vmsgsize = casymsg_validate_signature (msg); if (DEBUG_MSG_TRACE && msg->size != vmsgsize) { DEBUG_PRINTF ("Error: message body size %zu does not match signature '%s':\n", vmsgsize, casymsg_signature(msg)); casycom_debug_message_dump (msg); } assert (msg->size == vmsgsize && "message data does not match method signature"); assert ((!strchr(casymsg_signature(msg),'h') || msg->fdoffset != NO_FD_IN_MESSAGE) && "message signature requires a file descriptor in the message body, but none was written"); assert ((msg->fdoffset == NO_FD_IN_MESSAGE || (msg->fdoffset+4u <= msg->size && ceilg(msg->fdoffset,4) == msg->fdoffset)) && "you must use casymsg_write_fd to write a file descriptor to a message"); } else assert (!msg->size && msg->fdoffset == NO_FD_IN_MESSAGE && "invalid createObject message"); #endif acquire_lock (&_casycom_output_queue_lock); vector_push_back (&_casycom_output_queue, &msg); release_lock (&_casycom_output_queue_lock); } static void casycom_do_message_queues (void) { // Deliver all messages in the input queue for (size_t m = 0; m < _casycom_input_queue.size; ++m) { const Msg* msg = _casycom_input_queue.d[m]; if (DEBUG_MSG_TRACE) casycom_debug_message_dump (msg); MsgLink* ml = casycom_find_or_create_destination (msg); if (!ml) // message addressed to object deleted after sending continue; // Call the interface dispatch with the object and the message const DTable* dtable = casycom_find_dtable (ml->factory, msg->h.interface); ((pfn_dispatch) dtable->interface->dispatch) (dtable, ml->o, msg); // After each message, check for generated errors if (_casycom_error && !casycom_forward_error (msg->h.dest, msg->h.dest)) { // If nobody can handle the error, print it and quit casycom_log (LOG_ERR, "Error: %s\n", _casycom_error); casycom_quit (EXIT_FAILURE); break; } } // Clear input queue for (size_t m = 0; m < _casycom_input_queue.size; ++m) casymsg_free (_casycom_input_queue.d[m]); vector_clear (&_casycom_input_queue); // And make the output queue the input queue for the next round acquire_lock (&_casycom_output_queue_lock); vector_swap (&_casycom_input_queue, &_casycom_output_queue); release_lock (&_casycom_output_queue_lock); } void casycom_debug_message_dump (const Msg* msg) { if (!msg) { printf ("[T] NULL Message\n"); return; } printf ("[T] Message[%u] %hu -> %hu.%s.%s\n", msg->size, msg->h.src, msg->h.dest, casymsg_interface_name(msg), casymsg_method_name(msg)); hexdump (msg->body, msg->size); } //}}}------------------------------------------------------------------- //--- Main API /// initializes the library and the event loop void casycom_init (void) { DEBUG_PRINTF ("[I] initializing casycom\n"); atexit (casycom_reset); int syslogopt = 0, syslogfac = LOG_USER; if (isatty (STDIN_FILENO)) syslogopt = LOG_PERROR; else syslogfac = LOG_DAEMON; openlog (NULL, syslogopt, syslogfac); } /// Resets the framework to its initial state void casycom_reset (void) { DEBUG_PRINTF ("[I] Resetting casycom\n"); while (_casycom_omap.size) casycom_destroy_link_at (_casycom_omap.size-1); vector_deallocate (&_casycom_omap); acquire_lock (&_casycom_output_queue_lock); for (size_t m = 0; m < _casycom_output_queue.size; ++m) casymsg_free (_casycom_output_queue.d[m]); vector_deallocate (&_casycom_output_queue); release_lock (&_casycom_output_queue_lock); for (size_t m = 0; m < _casycom_input_queue.size; ++m) casymsg_free (_casycom_input_queue.d[m]); vector_deallocate (&_casycom_input_queue); vector_deallocate (&_casycom_object_table); xfree (_casycom_error); DEBUG_PRINTF ("[I] Reset complete\n"); } /// Replaces casycom_init if casycom is the top-level framework in your process void casycom_framework_init (const Factory* oapp, argc_t argc, argv_t argv) { casycom_install_signal_handlers(); casycom_init(); casycom_register (oapp); _casycom_appp = casycom_create_proxy_to (&i_App, oid_Broadcast, oid_App); PApp_init (&_casycom_appp, argc, argv); } /// Sets the quit flag, causing the event loop to quit once all queued events are processed void casycom_quit (int exitCode) { DEBUG_PRINTF ("[T] Quit requested, exit code %d\n", exitCode); _casycom_exit_code = exitCode; _casycom_quitting = true; } /// Returns the current exit code int casycom_exit_code (void) { return _casycom_exit_code; } bool casycom_is_quitting (void) { return _casycom_quitting; } bool casycom_is_failed (void) { return _casycom_error != NULL; } /// The main event loop. Returns exit code. int casycom_main (void) { for (_casycom_quitting = false; !_casycom_quitting; casycom_idle()) casycom_do_message_queues(); return _casycom_exit_code; } static void casycom_idle (void) { DEBUG_PRINTF ("[I]=======================================================================\n"); casycom_send_signal_message(); // Check if a signal has fired casycom_destroy_unused_objects(); // destroy objects marked unused // Process timers and fd waits int waittime = -1; if (_casycom_input_queue.size + _casycom_output_queue.size + _casycom_quitting) waittime = 0; // Do not wait if there are packets in the queue bool haveTimers = Timer_run_timer (waittime); // Quit when there are no more packets or timers if (!haveTimers && !(_casycom_input_queue.size + _casycom_output_queue.size)) { DEBUG_PRINTF ("[E] Ran out of messages. Quitting.\n"); casycom_quit (EXIT_SUCCESS); } } /// Do one message loop iteration; for non-framework operation /// Returns false when all queues are empty bool casycom_loop_once (void) { Timer_run_timer (0); // Check watched fds casycom_do_message_queues(); // Process any resulting messages casycom_destroy_unused_objects(); // Destroy objects marked unused return _casycom_input_queue.size+_casycom_output_queue.size; } /// Create error to be handled at next casycom_forward_error call void casycom_error (const char* fmt, ...) { va_list args; va_start (args, fmt); char* e = NULL; // If error printing failed, use default error message if (0 > vasprintf (&e, fmt, args)) e = strdup ("unknown error"); va_end (args); if (!_casycom_error) // First error message; move _casycom_error = e; else { char* ne = NULL; // Subsequent messages are appended if (0 <= asprintf (&ne, "%s\n\t%s", _casycom_error, e)) { xfree (_casycom_error); _casycom_error = ne; xfree (e); } } DEBUG_PRINTF ("[E] Error set: %s\n", _casycom_error); } /// Forward error to object \p oid, indicating \e eoid as the failed object. /// /// If the called object can not handle the error, it will be marked as failed /// and the error will be forward to its creator. If no object in this chain /// handles the error, false will be returned. casycom_forward_error is always /// called if an error exists after a message has been delivered. Manual /// invocation is typically needed only when an object failure causes additional /// errors not on the create chain. bool casycom_forward_error (oid_t oid, oid_t eoid) { assert (_casycom_error && "you must first set the error with casycom_error"); // See if the object can handle the error MsgLink* ml = casycom_find_destination (oid); if (!ml) // no further links in the chain, set to unhandled return false; DEBUG_PRINTF ("[E] Handling error in object %hu\n", ml->h.dest); if (ml->o && ml->factory->error && ml->factory->error (ml->o, eoid, _casycom_error)) { DEBUG_PRINTF ("[E] Error handled\n"); xfree (_casycom_error); return true; } assert (ml->h.src != oid && "an object is never created by itself; use oid_Broadcast as creator for static objects"); // If not, fail this object and forward to creator return casycom_forward_error (ml->h.src, oid); }
msharov/casycom
timer.c
<gh_stars>1-10 // This file is part of the casycom project // // Copyright (c) 2015 by <NAME> <<EMAIL>> // This file is free software, distributed under the ISC license. #include "timer.h" #include "main.h" #include "vector.h" #include <time.h> //---------------------------------------------------------------------- // Timer interface enum { method_Timer_watch }; void PTimer_watch (const Proxy* pp, enum ETimerWatchCmd cmd, int fd, casytimer_t timeoutms) { assert (pp->interface == &i_Timer && "the given proxy is for a different interface"); Msg* msg = casymsg_begin (pp, method_Timer_watch, 16); WStm os = casymsg_write (msg); casystm_write_uint32 (&os, cmd); casystm_write_int32 (&os, fd); casystm_write_uint64 (&os, timeoutms); casymsg_end (msg); } static void Timer_dispatch (const DTimer* dtable, void* o, const Msg* msg) { if (msg->imethod == method_Timer_watch) { RStm is = casymsg_read (msg); enum ETimerWatchCmd cmd = casystm_read_uint32 (&is); int fd = casystm_read_int32 (&is); casytimer_t timeoutms = casystm_read_uint64 (&is); dtable->Timer_watch (o, cmd, fd, timeoutms); } else casymsg_default_dispatch (dtable, o, msg); } const Interface i_Timer = { .name = "Timer", .dispatch = Timer_dispatch, .method = { "watch\0uix", NULL } }; //---------------------------------------------------------------------- // TimerR interface enum { method_TimerR_timer }; void PTimerR_timer (const Proxy* pp, int fd) { Msg* msg = casymsg_begin (pp, method_TimerR_timer, 4); WStm os = casymsg_write (msg); casystm_write_int32 (&os, fd); casymsg_end (msg); } static void TimerR_dispatch (const DTimerR* dtable, void* o, const Msg* msg) { if (msg->imethod == method_TimerR_timer) { RStm is = casymsg_read (msg); int fd = casystm_read_int32 (&is); dtable->TimerR_timer (o, fd, msg); } else casymsg_default_dispatch (dtable, o, msg); } const Interface i_TimerR = { .name = "TimerR", .dispatch = TimerR_dispatch, .method = { "timer\0i", NULL } }; //---------------------------------------------------------------------- // The Timer server object typedef struct _Timer { Proxy reply; casytimer_t nextfire; enum ETimerWatchCmd cmd; int fd; } Timer; // Global list of pointers to active timer objects DECLARE_VECTOR_TYPE (WatchList, Timer*); static VECTOR(WatchList, _timer_watch_list); //---------------------------------------------------------------------- void* Timer_create (const Msg* msg) { Timer* o = xalloc (sizeof(Timer)); o->reply = casycom_create_reply_proxy (&i_TimerR, msg); o->nextfire = TIMER_NONE; o->cmd = WATCH_STOP; o->fd = -1; vector_push_back (&_timer_watch_list, &o); return o; } void Timer_destroy (void* vo) { Timer* o = vo; for (int i = _timer_watch_list.size; --i >= 0;) if (_timer_watch_list.d[i] == o) vector_erase (&_timer_watch_list, i); xfree (o); if (!_timer_watch_list.size) vector_deallocate (&_timer_watch_list); } void Timer_Timer_watch (Timer* o, enum ETimerWatchCmd cmd, int fd, casytimer_t timeoutms) { o->cmd = cmd; o->fd = fd; if (timeoutms <= TIMER_MAX) timeoutms += Timer_now(); o->nextfire = timeoutms; } #ifndef NDEBUG static const char* timestring (casytimer_t t) { t /= 1000; static char tbuf[32] = {}; #if UC_VERSION ctime_r (t, tbuf); #else ctime_r ((const time_t*) &t, tbuf); #endif tbuf[strlen(tbuf)-1] = 0; // remove newline return tbuf; } #endif /// Waits for timer or fd events. /// toWait specifies the minimum timeout in milliseconds. bool Timer_run_timer (int toWait) { if (!_timer_watch_list.size) return false; // Populate the fd list and find the nearest timer struct pollfd fds [_timer_watch_list.size]; size_t nFds = 0; casytimer_t nearest = TIMER_MAX; for (size_t i = 0; i < _timer_watch_list.size; ++i) { const Timer* we = _timer_watch_list.d[i]; if (we->nextfire < nearest) nearest = we->nextfire; if (we->fd >= 0 && we->cmd != WATCH_STOP) { fds[nFds].fd = we->fd; fds[nFds].events = we->cmd; fds[nFds].revents = 0; ++nFds; } } // Calculate how long to wait if (toWait && nearest < TIMER_MAX) // toWait could be zero, in which case don't toWait = nearest - Timer_now(); // And wait if (DEBUG_MSG_TRACE) { DEBUG_PRINTF ("[I] Waiting for %zu file descriptors from %zu timers", nFds, _timer_watch_list.size); if (toWait > 0) DEBUG_PRINTF (" with %d ms timeout", toWait); DEBUG_PRINTF (". %s\n", timestring(Timer_now())); } // And poll poll (fds, nFds, toWait); // Poll errors are checked for each fd with POLLERR. Other errors are ignored. // poll will exit when there are fds available or when the timer expires const casytimer_t now = Timer_now(); for (size_t i = 0, fdi = 0; i < _timer_watch_list.size; ++i) { const Timer* we = _timer_watch_list.d[i]; bool bFired = we->nextfire <= now; // Check timer expiration if (DEBUG_MSG_TRACE && bFired) { DEBUG_PRINTF("[T]\tTimer %s", timestring(we->nextfire)); DEBUG_PRINTF(" fired at %s\n", timestring(now)); } if (we->fd >= 0 && we->cmd != WATCH_STOP) { // Check if fd fired, or has errors. Errors will be detected when the client tries to use the fd. if (fds[fdi].revents & (POLLERR| we->cmd)) bFired = true; if (DEBUG_MSG_TRACE) { if (fds[fdi].revents & POLLIN) DEBUG_PRINTF("[T]\tFile descriptor %d can be read\n", fds[fdi].fd); if (fds[fdi].revents & POLLOUT) DEBUG_PRINTF("[T]\tFile descriptor %d can be written\n", fds[fdi].fd); if (fds[fdi].revents & POLLMSG) DEBUG_PRINTF("[T]\tFile descriptor %d has extra data\n", fds[fdi].fd); if (fds[fdi].revents & POLLERR) DEBUG_PRINTF("[T]\tFile descriptor %d has errors\n", fds[fdi].fd); } ++fdi; } if (bFired) { // Once the timer or the fd fires, it is removed PTimerR_timer (&we->reply, we->fd); casycom_mark_unused (we); // ... in the next idle } } return _timer_watch_list.size; } size_t Timer_watch_list_size (void) { return _timer_watch_list.size; } size_t Timer_watch_list_for_poll (struct pollfd* fds, size_t fdslen, int* timeout) { size_t nFds = 0; casytimer_t nearest = TIMER_MAX; for (size_t i = 0; i < _timer_watch_list.size; ++i) { const Timer* we = _timer_watch_list.d[i]; if (we->nextfire < nearest) nearest = we->nextfire; if (we->fd >= 0 && we->cmd != WATCH_STOP && nFds < fdslen) { fds[nFds].fd = we->fd; fds[nFds].events = we->cmd; fds[nFds].revents = 0; ++nFds; } } if (timeout) { casytimer_t now = Timer_now(); *timeout = (now < nearest ? (int)(nearest - now) : -1); } return nFds; } /// Returns current time in milliseconds casytimer_t Timer_now (void) { struct timespec t; if (0 > clock_gettime (CLOCK_REALTIME, &t)) return 0; return (casytimer_t) t.tv_sec * 1000 + t.tv_nsec / 1000000; } //---------------------------------------------------------------------- static const DTimer d_Timer_Timer = { .interface = &i_Timer, DMETHOD (Timer, Timer_watch) }; const Factory f_Timer = { .create = Timer_create, .destroy = Timer_destroy, .dtable = { &d_Timer_Timer, NULL } };
muzle/NewsAggregator
NetworkPlatform/NetworkPlatform/NetworkPlatform.h
<gh_stars>0 #import <Foundation/Foundation.h> //! Project version number for NetworkPlatform. FOUNDATION_EXPORT double NetworkPlatformVersionNumber; //! Project version string for NetworkPlatform. FOUNDATION_EXPORT const unsigned char NetworkPlatformVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <NetworkPlatform/PublicHeader.h>
muzle/NewsAggregator
CoreDataPlatform/CoreDataPlatform/CoreDataPlatform.h
<gh_stars>0 #import <Foundation/Foundation.h> //! Project version number for CoreDataPlatform. FOUNDATION_EXPORT double CoreDataPlatformVersionNumber; //! Project version string for CoreDataPlatform. FOUNDATION_EXPORT const unsigned char CoreDataPlatformVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <CoreDataPlatform/PublicHeader.h>
hansemannn/titanium-sirikit
ios/Classes/TiSirikit.h
<filename>ios/Classes/TiSirikit.h // // TiSirikit.h // titanium-sirikit // // Created by Your Name // Copyright (c) 2019 Your Company. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for TiSirikit. FOUNDATION_EXPORT double TiSirikitVersionNumber; //! Project version string for TiSirikit. FOUNDATION_EXPORT const unsigned char TiSirikitVersionString[]; #import "TiSirikitModuleAssets.h"
jeroen/hdf5r
inst/CWrappers_1.10.2/headers/H5ACpublic.h
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * * If you do not have access to either file, you may request a copy from * * <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- * * Created: H5ACpublic.h * Jul 10 1997 * <NAME> <<EMAIL>> * * Purpose: Public include file for cache functions. * * Modifications: * *------------------------------------------------------------------------- */ #ifndef _H5ACpublic_H #define _H5ACpublic_H /* Public headers needed by this file */ #include "H5public.h" #include "H5Cpublic.h" #ifdef __cplusplus extern "C" { #endif /**************************************************************************** * * structure H5AC_cache_config_t * * H5AC_cache_config_t is a public structure intended for use in public APIs. * At least in its initial incarnation, it is basicaly a copy of struct * H5C_auto_size_ctl_t, minus the report_fcn field, and plus the * dirty_bytes_threshold field. * * The report_fcn field is omitted, as including it would require us to * make H5C_t structure public. * * The dirty_bytes_threshold field does not appear in H5C_auto_size_ctl_t, * as synchronization between caches on different processes is handled at * the H5AC level, not at the level of H5C. Note however that there is * considerable interaction between this value and the other fields in this * structure. * * Similarly, the open_trace_file, close_trace_file, and trace_file_name * fields do not appear in H5C_auto_size_ctl_t, as most trace file * issues are handled at the H5AC level. The one exception is storage of * the pointer to the trace file, which is handled by H5C. * * The structure is in H5ACpublic.h as we may wish to allow different * configuration options for metadata and raw data caches. * * The fields of the structure are discussed individually below: * * version: Integer field containing the version number of this version * of the H5AC_cache_config_t structure. Any instance of * H5AC_cache_config_t passed to the cache must have a known * version number, or an error will be flagged. * * rpt_fcn_enabled: Boolean field used to enable and disable the default * reporting function. This function is invoked every time the * automatic cache resize code is run, and reports on its activities. * * This is a debugging function, and should normally be turned off. * * open_trace_file: Boolean field indicating whether the trace_file_name * field should be used to open a trace file for the cache. * * *** DEPRECATED *** Use H5Fstart/stop logging functions instead * * The trace file is a debuging feature that allow the capture of * top level metadata cache requests for purposes of debugging and/or * optimization. This field should normally be set to FALSE, as * trace file collection imposes considerable overhead. * * This field should only be set to TRUE when the trace_file_name * contains the full path of the desired trace file, and either * there is no open trace file on the cache, or the close_trace_file * field is also TRUE. * * close_trace_file: Boolean field indicating whether the current trace * file (if any) should be closed. * * *** DEPRECATED *** Use H5Fstart/stop logging functions instead * * See the above comments on the open_trace_file field. This field * should be set to FALSE unless there is an open trace file on the * cache that you wish to close. * * trace_file_name: Full path of the trace file to be opened if the * open_trace_file field is TRUE. * * *** DEPRECATED *** Use H5Fstart/stop logging functions instead * * In the parallel case, an ascii representation of the mpi rank of * the process will be appended to the file name to yield a unique * trace file name for each process. * * The length of the path must not exceed H5AC__MAX_TRACE_FILE_NAME_LEN * characters. * * evictions_enabled: Boolean field used to either report the current * evictions enabled status of the cache, or to set the cache's * evictions enabled status. * * In general, the metadata cache should always be allowed to * evict entries. However, in some cases it is advantageous to * disable evictions briefly, and thereby postpone metadata * writes. However, this must be done with care, as the cache * can grow quickly. If you do this, re-enable evictions as * soon as possible and monitor cache size. * * At present, evictions can only be disabled if automatic * cache resizing is also disabled (that is, ( incr_mode == * H5C_incr__off ) && ( decr_mode == H5C_decr__off )). There * is no logical reason why this should be so, but it simplifies * implementation and testing, and I can't think of any reason * why it would be desireable. If you can think of one, I'll * revisit the issue. * * set_initial_size: Boolean flag indicating whether the size of the * initial size of the cache is to be set to the value given in * the initial_size field. If set_initial_size is FALSE, the * initial_size field is ignored. * * initial_size: If enabled, this field contain the size the cache is * to be set to upon receipt of this structure. Needless to say, * initial_size must lie in the closed interval [min_size, max_size]. * * min_clean_fraction: double in the range 0 to 1 indicating the fraction * of the cache that is to be kept clean. This field is only used * in parallel mode. Typical values are 0.1 to 0.5. * * max_size: Maximum size to which the cache can be adjusted. The * supplied value must fall in the closed interval * [MIN_MAX_CACHE_SIZE, MAX_MAX_CACHE_SIZE]. Also, max_size must * be greater than or equal to min_size. * * min_size: Minimum size to which the cache can be adjusted. The * supplied value must fall in the closed interval * [H5C__MIN_MAX_CACHE_SIZE, H5C__MAX_MAX_CACHE_SIZE]. Also, min_size * must be less than or equal to max_size. * * epoch_length: Number of accesses on the cache over which to collect * hit rate stats before running the automatic cache resize code, * if it is enabled. * * At the end of an epoch, we discard prior hit rate data and start * collecting afresh. The epoch_length must lie in the closed * interval [H5C__MIN_AR_EPOCH_LENGTH, H5C__MAX_AR_EPOCH_LENGTH]. * * * Cache size increase control fields: * * incr_mode: Instance of the H5C_cache_incr_mode enumerated type whose * value indicates how we determine whether the cache size should be * increased. At present there are two possible values: * * H5C_incr__off: Don't attempt to increase the size of the cache * automatically. * * When this increment mode is selected, the remaining fields * in the cache size increase section ar ignored. * * H5C_incr__threshold: Attempt to increase the size of the cache * whenever the average hit rate over the last epoch drops * below the value supplied in the lower_hr_threshold * field. * * Note that this attempt will fail if the cache is already * at its maximum size, or if the cache is not already using * all available space. * * Note that you must set decr_mode to H5C_incr__off if you * disable metadata cache entry evictions. * * lower_hr_threshold: Lower hit rate threshold. If the increment mode * (incr_mode) is H5C_incr__threshold and the hit rate drops below the * value supplied in this field in an epoch, increment the cache size by * size_increment. Note that cache size may not be incremented above * max_size, and that the increment may be further restricted by the * max_increment field if it is enabled. * * When enabled, this field must contain a value in the range [0.0, 1.0]. * Depending on the incr_mode selected, it may also have to be less than * upper_hr_threshold. * * increment: Double containing the multiplier used to derive the new * cache size from the old if a cache size increment is triggered. * The increment must be greater than 1.0, and should not exceed 2.0. * * The new cache size is obtained my multiplying the current max cache * size by the increment, and then clamping to max_size and to stay * within the max_increment as necessary. * * apply_max_increment: Boolean flag indicating whether the max_increment * field should be used to limit the maximum cache size increment. * * max_increment: If enabled by the apply_max_increment field described * above, this field contains the maximum number of bytes by which the * cache size can be increased in a single re-size. * * flash_incr_mode: Instance of the H5C_cache_flash_incr_mode enumerated * type whose value indicates whether and by which algorithm we should * make flash increases in the size of the cache to accomodate insertion * of large entries and large increases in the size of a single entry. * * The addition of the flash increment mode was occasioned by performance * problems that appear when a local heap is increased to a size in excess * of the current cache size. While the existing re-size code dealt with * this eventually, performance was very bad for the remainder of the * epoch. * * At present, there are two possible values for the flash_incr_mode: * * H5C_flash_incr__off: Don't perform flash increases in the size of * the cache. * * H5C_flash_incr__add_space: Let x be either the size of a newly * newly inserted entry, or the number of bytes by which the * size of an existing entry has been increased. * * If * x > flash_threshold * current max cache size, * * increase the current maximum cache size by x * flash_multiple * less any free space in the cache, and star a new epoch. For * now at least, pay no attention to the maximum increment. * * In both of the above cases, the flash increment pays no attention to * the maximum increment (at least in this first incarnation), but DOES * stay within max_size. * * With a little thought, it should be obvious that the above flash * cache size increase algorithm is not sufficient for all circumstances * -- for example, suppose the user round robins through * (1/flash_threshold) +1 groups, adding one data set to each on each * pass. Then all will increase in size at about the same time, requiring * the max cache size to at least double to maintain acceptable * performance, however the above flash increment algorithm will not be * triggered. * * Hopefully, the add space algorithms detailed above will be sufficient * for the performance problems encountered to date. However, we should * expect to revisit the issue. * * flash_multiple: Double containing the multiple described above in the * H5C_flash_incr__add_space section of the discussion of the * flash_incr_mode section. This field is ignored unless flash_incr_mode * is H5C_flash_incr__add_space. * * flash_threshold: Double containing the factor by which current max cache * size is multiplied to obtain the size threshold for the add_space flash * increment algorithm. The field is ignored unless flash_incr_mode is * H5C_flash_incr__add_space. * * * Cache size decrease control fields: * * decr_mode: Instance of the H5C_cache_decr_mode enumerated type whose * value indicates how we determine whether the cache size should be * decreased. At present there are four possibilities. * * H5C_decr__off: Don't attempt to decrease the size of the cache * automatically. * * When this increment mode is selected, the remaining fields * in the cache size decrease section are ignored. * * H5C_decr__threshold: Attempt to decrease the size of the cache * whenever the average hit rate over the last epoch rises * above the value supplied in the upper_hr_threshold * field. * * H5C_decr__age_out: At the end of each epoch, search the cache for * entries that have not been accessed for at least the number * of epochs specified in the epochs_before_eviction field, and * evict these entries. Conceptually, the maximum cache size * is then decreased to match the new actual cache size. However, * this reduction may be modified by the min_size, the * max_decrement, and/or the empty_reserve. * * H5C_decr__age_out_with_threshold: Same as age_out, but we only * attempt to reduce the cache size when the hit rate observed * over the last epoch exceeds the value provided in the * upper_hr_threshold field. * * Note that you must set decr_mode to H5C_decr__off if you * disable metadata cache entry evictions. * * upper_hr_threshold: Upper hit rate threshold. The use of this field * varies according to the current decr_mode: * * H5C_decr__off or H5C_decr__age_out: The value of this field is * ignored. * * H5C_decr__threshold: If the hit rate exceeds this threshold in any * epoch, attempt to decrement the cache size by size_decrement. * * Note that cache size may not be decremented below min_size. * * Note also that if the upper_threshold is 1.0, the cache size * will never be reduced. * * H5C_decr__age_out_with_threshold: If the hit rate exceeds this * threshold in any epoch, attempt to reduce the cache size * by evicting entries that have not been accessed for more * than the specified number of epochs. * * decrement: This field is only used when the decr_mode is * H5C_decr__threshold. * * The field is a double containing the multiplier used to derive the * new cache size from the old if a cache size decrement is triggered. * The decrement must be in the range 0.0 (in which case the cache will * try to contract to its minimum size) to 1.0 (in which case the * cache will never shrink). * * apply_max_decrement: Boolean flag used to determine whether decrements * in cache size are to be limited by the max_decrement field. * * max_decrement: Maximum number of bytes by which the cache size can be * decreased in a single re-size. Note that decrements may also be * restricted by the min_size of the cache, and (in age out modes) by * the empty_reserve field. * * epochs_before_eviction: Integer field used in H5C_decr__age_out and * H5C_decr__age_out_with_threshold decrement modes. * * This field contains the number of epochs an entry must remain * unaccessed before it is evicted in an attempt to reduce the * cache size. If applicable, this field must lie in the range * [1, H5C__MAX_EPOCH_MARKERS]. * * apply_empty_reserve: Boolean field controlling whether the empty_reserve * field is to be used in computing the new cache size when the * decr_mode is H5C_decr__age_out or H5C_decr__age_out_with_threshold. * * empty_reserve: To avoid a constant racheting down of cache size by small * amounts in the H5C_decr__age_out and H5C_decr__age_out_with_threshold * modes, this field allows one to require that any cache size * reductions leave the specified fraction of unused space in the cache. * * The value of this field must be in the range [0.0, 1.0]. I would * expect typical values to be in the range of 0.01 to 0.1. * * * Parallel Configuration Fields: * * In PHDF5, all operations that modify metadata must be executed collectively. * * We used to think that this was enough to ensure consistency across the * metadata caches, but since we allow processes to read metadata individually, * the order of dirty entries in the LRU list can vary across processes, * which can result in inconsistencies between the caches. * * PHDF5 uses several strategies to prevent such inconsistencies in metadata, * all of which use the fact that the same stream of dirty metadata is seen * by all processes for purposes of synchronization. This is done by * having each process count the number of bytes of dirty metadata generated, * and then running a "sync point" whenever this count exceeds a user * specified threshold (see dirty_bytes_threshold below). * * The current metadata write strategy is indicated by the * metadata_write_strategy field. The possible values of this field, along * with the associated metadata write strategies are discussed below. * * dirty_bytes_threshold: Threshold of dirty byte creation used to * synchronize updates between caches. (See above for outline and * motivation.) * * This value MUST be consistant across all processes accessing the * file. This field is ignored unless HDF5 has been compiled for * parallel. * * metadata_write_strategy: Integer field containing a code indicating the * desired metadata write strategy. The valid values of this field * are enumerated and discussed below: * * * H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY: * * When metadata_write_strategy is set to this value, only process * zero is allowed to write dirty metadata to disk. All other * processes must retain dirty metadata until they are informed at * a sync point that the dirty metadata in question has been written * to disk. * * When the sync point is reached (or when there is a user generated * flush), process zero flushes sufficient entries to bring it into * complience with its min clean size (or flushes all dirty entries in * the case of a user generated flush), broad casts the list of * entries just cleaned to all the other processes, and then exits * the sync point. * * Upon receipt of the broadcast, the other processes mark the indicated * entries as clean, and leave the sync point as well. * * * H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED: * * In the distributed metadata write strategy, process zero still makes * the decisions as to what entries should be flushed, but the actual * flushes are distributed across the processes in the computation to * the extent possible. * * In this strategy, when a sync point is triggered (either by dirty * metadata creation or manual flush), all processes enter a barrier. * * On the other side of the barrier, process 0 constructs an ordered * list of the entries to be flushed, and then broadcasts this list * to the caches in all the processes. * * All processes then scan the list of entries to be flushed, flushing * some, and marking the rest as clean. The algorithm for this purpose * ensures that each entry in the list is flushed exactly once, and * all are marked clean in each cache. * * Note that in the case of a flush of the cache, no message passing * is necessary, as all processes have the same list of dirty entries, * and all of these entries must be flushed. Thus in this case it is * sufficient for each process to sort its list of dirty entries after * leaving the initial barrier, and use this list as if it had been * received from process zero. * * To avoid possible messages from the past/future, all caches must * wait until all caches are done before leaving the sync point. * ****************************************************************************/ #define H5AC__CURR_CACHE_CONFIG_VERSION 1 #define H5AC__MAX_TRACE_FILE_NAME_LEN 1024 #define H5AC_METADATA_WRITE_STRATEGY__PROCESS_0_ONLY 0 #define H5AC_METADATA_WRITE_STRATEGY__DISTRIBUTED 1 typedef struct H5AC_cache_config_t { /* general configuration fields: */ int version; hbool_t rpt_fcn_enabled; hbool_t open_trace_file; hbool_t close_trace_file; char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1]; hbool_t evictions_enabled; hbool_t set_initial_size; size_t initial_size; double min_clean_fraction; size_t max_size; size_t min_size; long int epoch_length; /* size increase control fields: */ enum H5C_cache_incr_mode incr_mode; double lower_hr_threshold; double increment; hbool_t apply_max_increment; size_t max_increment; enum H5C_cache_flash_incr_mode flash_incr_mode; double flash_multiple; double flash_threshold; /* size decrease control fields: */ enum H5C_cache_decr_mode decr_mode; double upper_hr_threshold; double decrement; hbool_t apply_max_decrement; size_t max_decrement; int epochs_before_eviction; hbool_t apply_empty_reserve; double empty_reserve; /* parallel configuration fields: */ size_t dirty_bytes_threshold; int metadata_write_strategy; } H5AC_cache_config_t; /**************************************************************************** * * structure H5AC_cache_image_config_t * * H5AC_cache_image_ctl_t is a public structure intended for use in public * APIs. At least in its initial incarnation, it is a copy of struct * H5C_cache_image_ctl_t. * * The fields of the structure are discussed individually below: * * version: Integer field containing the version number of this version * of the H5C_image_ctl_t structure. Any instance of * H5C_image_ctl_t passed to the cache must have a known * version number, or an error will be flagged. * * generate_image: Boolean flag indicating whether a cache image should * be created on file close. * * save_resize_status: Boolean flag indicating whether the cache image * should include the adaptive cache resize configuration and status. * Note that this field is ignored at present. * * entry_ageout: Integer field indicating the maximum number of * times a prefetched entry can appear in subsequent cache images. * This field exists to allow the user to avoid the buildup of * infrequently used entries in long sequences of cache images. * * The value of this field must lie in the range * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE (-1) to * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX (100). * * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE means that no limit * is imposed on number of times a prefeteched entry can appear * in subsequent cache images. * * A value of 0 prevents prefetched entries from being included * in cache images. * * Positive integers restrict prefetched entries to the specified * number of appearances. * * Note that the number of subsequent cache images that a prefetched * entry has appeared in is tracked in an 8 bit field. Thus, while * H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX can be increased from its * current value, any value in excess of 255 will be the functional * equivalent of H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE. * ****************************************************************************/ #define H5AC__CURR_CACHE_IMAGE_CONFIG_VERSION 1 #define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__NONE -1 #define H5AC__CACHE_IMAGE__ENTRY_AGEOUT__MAX 100 typedef struct H5AC_cache_image_config_t { int version; hbool_t generate_image; hbool_t save_resize_status; int entry_ageout; } H5AC_cache_image_config_t; #ifdef __cplusplus } #endif #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5E.h
#ifndef _WRAPPER_AUTO_H5E_H_ #define _WRAPPER_AUTO_H5E_H_ #include "global.h" /* H5_DLL herr_t H5Eauto_is_v2(hid_t err_stack, unsigned *is_stack); */ SEXP R_H5Eauto_is_v2(SEXP R_err_stack, SEXP R_is_stack); /* H5_DLL herr_t H5Eclear2(hid_t err_stack); */ SEXP R_H5Eclear2(SEXP R_err_stack); /* H5_DLL herr_t H5Eclose_msg(hid_t err_id); */ SEXP R_H5Eclose_msg(SEXP R_err_id); /* H5_DLL herr_t H5Eclose_stack(hid_t stack_id); */ SEXP R_H5Eclose_stack(SEXP R_stack_id); /* H5_DLL hid_t H5Ecreate_msg(hid_t cls, H5E_type_t msg_type, const char *msg); */ SEXP R_H5Ecreate_msg(SEXP R_cls, SEXP R_msg_type, SEXP R_msg); /* H5_DLL hid_t H5Ecreate_stack(void); */ SEXP R_H5Ecreate_stack(void); /* H5_DLL ssize_t H5Eget_class_name(hid_t class_id, char *name, size_t size); */ SEXP R_H5Eget_class_name(SEXP R_class_id, SEXP R_name, SEXP R_size); /* H5_DLL hid_t H5Eget_current_stack(void); */ SEXP R_H5Eget_current_stack(void); /* H5_DLL char *H5Eget_major(H5E_major_t maj); */ SEXP R_H5Eget_major(SEXP R_maj); /* H5_DLL char *H5Eget_minor(H5E_minor_t min); */ SEXP R_H5Eget_minor(SEXP R_min); /* H5_DLL ssize_t H5Eget_msg(hid_t msg_id, H5E_type_t *type, char *msg, size_t size); */ SEXP R_H5Eget_msg(SEXP R_msg_id, SEXP R_type, SEXP R_msg, SEXP R_size); /* H5_DLL ssize_t H5Eget_num(hid_t error_stack_id); */ SEXP R_H5Eget_num(SEXP R_error_stack_id); /* H5_DLL herr_t H5Epop(hid_t err_stack, size_t count); */ SEXP R_H5Epop(SEXP R_err_stack, SEXP R_count); /* H5_DLL herr_t H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *msg, ...); */ SEXP R_H5Epush2(SEXP R_err_stack, SEXP R_file, SEXP R_func, SEXP R_line, SEXP R_cls_id, SEXP R_maj_id, SEXP R_min_id, SEXP R_msg); /* H5_DLL hid_t H5Eregister_class(const char *cls_name, const char *lib_name, const char *version); */ SEXP R_H5Eregister_class(SEXP R_cls_name, SEXP R_lib_name, SEXP R_version); /* H5_DLL herr_t H5Eset_current_stack(hid_t err_stack_id); */ SEXP R_H5Eset_current_stack(SEXP R_err_stack_id); /* H5_DLL herr_t H5Eunregister_class(hid_t class_id); */ SEXP R_H5Eunregister_class(SEXP R_class_id); #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5FDsec2.c
<filename>src/1_8_16/Wrapper_auto_H5FDsec2.c<gh_stars>10-100 /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5FDsec2.h" /* H5_DLL hid_t H5FD_sec2_init(void); */ SEXP R_H5FD_sec2_init(void){ int vars_protected=0; hid_t return_val = H5FD_sec2_init(); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL void H5FD_sec2_term(void); */ SEXP R_H5FD_sec2_term(void){ int vars_protected=0; H5FD_sec2_term(); SEXP R_return_val= R_NilValue; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_fapl_sec2(hid_t fapl_id); */ SEXP R_H5Pset_fapl_sec2(SEXP R_fapl_id){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); herr_t return_val = H5Pset_fapl_sec2(fapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5G.h
<reponame>jeroen/hdf5r<gh_stars>10-100 #ifndef _WRAPPER_AUTO_H5G_H_ #define _WRAPPER_AUTO_H5G_H_ #include "global.h" /* H5_DLL herr_t H5Gclose(hid_t group_id); */ SEXP R_H5Gclose(SEXP R_group_id); /* H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id); */ SEXP R_H5Gcreate_anon(SEXP R_loc_id, SEXP R_gcpl_id, SEXP R_gapl_id); /* H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id); */ SEXP R_H5Gcreate2(SEXP R_loc_id, SEXP R_name, SEXP R_lcpl_id, SEXP R_gcpl_id, SEXP R_gapl_id); /* H5_DLL herr_t H5Gflush(hid_t group_id); */ SEXP R_H5Gflush(SEXP R_group_id); /* H5_DLL hid_t H5Gget_create_plist(hid_t group_id); */ SEXP R_H5Gget_create_plist(SEXP R_group_id); /* H5_DLL herr_t H5Gget_info(hid_t loc_id, H5G_info_t *ginfo); */ SEXP R_H5Gget_info(SEXP R_loc_id, SEXP R_ginfo); /* H5_DLL herr_t H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo, hid_t lapl_id); */ SEXP R_H5Gget_info_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_ginfo, SEXP R_lapl_id); /* H5_DLL herr_t H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *ginfo, hid_t lapl_id); */ SEXP R_H5Gget_info_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_ginfo, SEXP R_lapl_id); /* H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id); */ SEXP R_H5Gopen2(SEXP R_loc_id, SEXP R_name, SEXP R_gapl_id); /* H5_DLL herr_t H5Grefresh(hid_t group_id); */ SEXP R_H5Grefresh(SEXP R_group_id); /* H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment); */ SEXP R_H5Gset_comment(SEXP R_loc_id, SEXP R_name, SEXP R_comment); #endif
jeroen/hdf5r
src/Wrapper_manual_H5T.h
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #ifndef _WRAPPER_MANUAL_H5T_H_ #define _WRAPPER_MANUAL_H5T_H_ #include "global.h" SEXP h5create_compound_type(SEXP names, SEXP _dtype_ids, SEXP _size, SEXP _offset); SEXP h5create_enum_type(SEXP _labels, SEXP _values, SEXP _dtype_id); SEXP h5get_enum_labels(SEXP _dtype_id); SEXP h5get_enum_values(SEXP _dtype_id); SEXP h5get_compound_types(SEXP _dtype_id); SEXP h5get_compound_names(SEXP _dtype_id); SEXP h5get_compound_classes(SEXP _dtype_id); SEXP h5get_compound_offsets(SEXP _dtype_id); // uses a private function to detect if a datatype has a variable length component // the internal function of H5T_detect_class already has this ability, but it is // hidden from users in the API in order to return H5T_STRING, even for variable length // strings; internally, a variable length string is counted as variable length SEXP R_H5Tdetect_vlen(SEXP _dtype_id); #endif
jeroen/hdf5r
inst/CWrappers_1.8.16/headers/H5PLextern.h
<gh_stars>10-100 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic document set and is * * linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access * * to either file, you may request a copy from <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: <NAME> <<EMAIL>> * 13 February 2013 */ #ifndef _H5PLextern_H #define _H5PLextern_H /* Include HDF5 header */ #include "hdf5.h" /* plugins always export */ #if defined (_MSC_VER) /* MSVC Compiler Case */ #define H5PLUGIN_DLL __declspec(dllexport) #elif (__GNUC__ >= 4) /* GCC 4.x has support for visibility options */ #define H5PLUGIN_DLL __attribute__ ((visibility("default"))) #else #define H5PLUGIN_DLL #endif #ifdef __cplusplus extern "C" { #endif H5PLUGIN_DLL H5PL_type_t H5PLget_plugin_type(void); H5PLUGIN_DLL const void *H5PLget_plugin_info(void); #ifdef __cplusplus } #endif #endif /* _H5PLextern_H */
jeroen/hdf5r
inst/CWrappers_1.12.0/auto_include.h
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #ifndef _AUTO_INCLUDE_H_ #define _AUTO_INCLUDE_H_ #include <hdf5.h> #include <hdf5_hl.h> #include <R.h> #include <Rdefines.h> #include <Rinternals.h> #include <R_ext/Rdynload.h> #include <R_ext/Error.h> #include "HelperStructs.h" #include "Wrapper_auto_H5A.h" #include "Wrapper_auto_H5D.h" #include "Wrapper_auto_H5E.h" #include "Wrapper_auto_H5F.h" #include "Wrapper_auto_H5G.h" #include "Wrapper_auto_H5I.h" #include "Wrapper_auto_H5L.h" #include "Wrapper_auto_H5O.h" #include "Wrapper_auto_H5P.h" #include "Wrapper_auto_H5.h" #include "Wrapper_auto_H5R.h" #include "Wrapper_auto_H5S.h" #include "Wrapper_auto_H5T.h" #include "Wrapper_auto_H5Z.h" #include "Wrapper_auto_H5DS.h" #include "Wrapper_auto_H5IM.h" #include "Wrapper_auto_H5LT.h" #include "Wrapper_auto_H5TB.h" #endif
jeroen/hdf5r
src/1_8_14/Wrapper_auto_H5.c
<gh_stars>10-100 /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5.h" /* H5_DLL herr_t H5check_version(unsigned majnum, unsigned minnum, unsigned relnum); */ SEXP R_H5check_version(SEXP R_majnum, SEXP R_minnum, SEXP R_relnum){ int vars_protected=0; unsigned majnum = SEXP_to_longlong(R_majnum, 0); unsigned minnum = SEXP_to_longlong(R_minnum, 0); unsigned relnum = SEXP_to_longlong(R_relnum, 0); herr_t return_val = H5check_version(majnum, minnum, relnum); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5close(void); */ SEXP R_H5close(void){ int vars_protected=0; herr_t return_val = H5close(); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5dont_atexit(void); */ SEXP R_H5dont_atexit(void){ int vars_protected=0; herr_t return_val = H5dont_atexit(); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5free_memory(void *mem); */ SEXP R_H5free_memory(SEXP R_mem, SEXP _dupl_mem){ int vars_protected=0; if(SEXP_to_logical(_dupl_mem)) { R_mem = PROTECT(duplicate(R_mem)); vars_protected++; } void* mem; if(XLENGTH(R_mem) == 0) { mem = NULL; } else { mem = (void *) VOIDPTR(R_mem); } herr_t return_val = H5free_memory(mem); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_mem); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("mem")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5garbage_collect(void); */ SEXP R_H5garbage_collect(void){ int vars_protected=0; herr_t return_val = H5garbage_collect(); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum); */ SEXP R_H5get_libversion(SEXP R_majnum, SEXP R_minnum, SEXP R_relnum){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_majnum = PROTECT(duplicate(R_majnum)); vars_protected++; R_minnum = PROTECT(duplicate(R_minnum)); vars_protected++; R_relnum = PROTECT(duplicate(R_relnum)); vars_protected++; unsigned* majnum; if(XLENGTH(R_majnum) == 0) { majnum = NULL; } else { R_helper = PROTECT(RToH5(R_majnum, h5_datatype[DT_unsigned], XLENGTH(R_majnum))); majnum= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* minnum; if(XLENGTH(R_minnum) == 0) { minnum = NULL; } else { R_helper = PROTECT(RToH5(R_minnum, h5_datatype[DT_unsigned], XLENGTH(R_minnum))); minnum= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* relnum; if(XLENGTH(R_relnum) == 0) { relnum = NULL; } else { R_helper = PROTECT(RToH5(R_relnum, h5_datatype[DT_unsigned], XLENGTH(R_relnum))); relnum= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5get_libversion(majnum, minnum, relnum); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_majnum, h5_datatype[DT_unsigned]); R_majnum = PROTECT(H5ToR_single_step(majnum, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_minnum, h5_datatype[DT_unsigned]); R_minnum = PROTECT(H5ToR_single_step(minnum, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_relnum, h5_datatype[DT_unsigned]); R_relnum = PROTECT(H5ToR_single_step(relnum, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 4)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_majnum); SET_VECTOR_ELT(__ret_list, 2, R_minnum); SET_VECTOR_ELT(__ret_list, 3, R_relnum); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 4)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("majnum")); SET_STRING_ELT(__ret_list_names, 2, mkChar("minnum")); SET_STRING_ELT(__ret_list_names, 3, mkChar("relnum")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5open(void); */ SEXP R_H5open(void){ int vars_protected=0; herr_t return_val = H5open(); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5set_free_list_limits (int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim); */ SEXP R_H5set_free_list_limits(SEXP R_reg_global_lim, SEXP R_reg_list_lim, SEXP R_arr_global_lim, SEXP R_arr_list_lim, SEXP R_blk_global_lim, SEXP R_blk_list_lim){ int vars_protected=0; int reg_global_lim = SEXP_to_longlong(R_reg_global_lim, 0); int reg_list_lim = SEXP_to_longlong(R_reg_list_lim, 0); int arr_global_lim = SEXP_to_longlong(R_arr_global_lim, 0); int arr_list_lim = SEXP_to_longlong(R_arr_list_lim, 0); int blk_global_lim = SEXP_to_longlong(R_blk_global_lim, 0); int blk_list_lim = SEXP_to_longlong(R_blk_list_lim, 0); herr_t return_val = H5set_free_list_limits(reg_global_lim, reg_list_lim, arr_global_lim, arr_list_lim, blk_global_lim, blk_list_lim); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5F.h
#ifndef _WRAPPER_AUTO_H5F_H_ #define _WRAPPER_AUTO_H5F_H_ #include "global.h" /* H5_DLL herr_t H5Fclear_elink_file_cache(hid_t file_id); */ SEXP R_H5Fclear_elink_file_cache(SEXP R_file_id); /* H5_DLL herr_t H5Fclose(hid_t file_id); */ SEXP R_H5Fclose(SEXP R_file_id); /* H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist); */ SEXP R_H5Fcreate(SEXP R_filename, SEXP R_flags, SEXP R_create_plist, SEXP R_access_plist); /* H5_DLL herr_t H5Fdelete(const char *filename, hid_t fapl_id); */ SEXP R_H5Fdelete(SEXP R_filename, SEXP R_fapl_id); /* H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope); */ SEXP R_H5Fflush(SEXP R_object_id, SEXP R_scope); /* H5_DLL herr_t H5Fformat_convert(hid_t fid); */ SEXP R_H5Fformat_convert(SEXP R_fid); /* H5_DLL hid_t H5Fget_access_plist(hid_t file_id); */ SEXP R_H5Fget_access_plist(SEXP R_file_id); /* H5_DLL hid_t H5Fget_create_plist(hid_t file_id); */ SEXP R_H5Fget_create_plist(SEXP R_file_id); /* H5_DLL herr_t H5Fget_dset_no_attrs_hint(hid_t file_id, hbool_t *minimize); */ SEXP R_H5Fget_dset_no_attrs_hint(SEXP R_file_id, SEXP R_minimize); /* H5_DLL herr_t H5Fget_eoa(hid_t file_id, haddr_t *eoa); */ SEXP R_H5Fget_eoa(SEXP R_file_id, SEXP R_eoa); /* H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len); */ SEXP R_H5Fget_file_image(SEXP R_file_id, SEXP R_buf_ptr, SEXP R_buf_len, SEXP _dupl_buf_ptr); /* H5_DLL herr_t H5Fget_fileno(hid_t file_id, unsigned long *fileno); */ SEXP R_H5Fget_fileno(SEXP R_file_id, SEXP R_fileno); /* H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size); */ SEXP R_H5Fget_filesize(SEXP R_file_id, SEXP R_size); /* H5_DLL ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t *sect_info); */ SEXP R_H5Fget_free_sections(SEXP R_file_id, SEXP R_type, SEXP R_nsects, SEXP R_sect_info); /* H5_DLL hssize_t H5Fget_freespace(hid_t file_id); */ SEXP R_H5Fget_freespace(SEXP R_file_id); /* H5_DLL herr_t H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo); */ SEXP R_H5Fget_info1(SEXP R_obj_id, SEXP R_finfo); /* H5_DLL herr_t H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo); */ SEXP R_H5Fget_info2(SEXP R_obj_id, SEXP R_finfo); /* H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned *intent); */ SEXP R_H5Fget_intent(SEXP R_file_id, SEXP R_intent); /* H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Fget_mdc_config(SEXP R_file_id, SEXP R_config_ptr); /* H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate_ptr); */ SEXP R_H5Fget_mdc_hit_rate(SEXP R_file_id, SEXP R_hit_rate_ptr); /* H5_DLL herr_t H5Fget_mdc_image_info(hid_t file_id, haddr_t *image_addr, hsize_t *image_size); */ SEXP R_H5Fget_mdc_image_info(SEXP R_file_id, SEXP R_image_addr, SEXP R_image_size); /* H5_DLL herr_t H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled, hbool_t *is_currently_logging); */ SEXP R_H5Fget_mdc_logging_status(SEXP R_file_id, SEXP R_is_enabled, SEXP R_is_currently_logging); /* H5_DLL herr_t H5Fget_mdc_size(hid_t file_id, size_t * max_size_ptr, size_t * min_clean_size_ptr, size_t * cur_size_ptr, int * cur_num_entries_ptr); */ SEXP R_H5Fget_mdc_size(SEXP R_file_id, SEXP R_max_size_ptr, SEXP R_min_clean_size_ptr, SEXP R_cur_size_ptr, SEXP R_cur_num_entries_ptr); /* H5_DLL herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info); */ SEXP R_H5Fget_metadata_read_retry_info(SEXP R_file_id, SEXP R_info); /* H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size); */ SEXP R_H5Fget_name(SEXP R_obj_id, SEXP R_name, SEXP R_size); /* H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types); */ SEXP R_H5Fget_obj_count(SEXP R_file_id, SEXP R_types); /* H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list); */ SEXP R_H5Fget_obj_ids(SEXP R_file_id, SEXP R_types, SEXP R_max_objs, SEXP R_obj_id_list); /* H5_DLL herr_t H5Fget_page_buffering_stats(hid_t file_id, unsigned accesses[2], unsigned hits[2], unsigned misses[2], unsigned evictions[2], unsigned bypasses[2]); */ SEXP R_H5Fget_page_buffering_stats(SEXP R_file_id, SEXP R_accesses, SEXP R_hits, SEXP R_misses, SEXP R_evictions, SEXP R_bypasses); /* H5_DLL herr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment); */ SEXP R_H5Fincrement_filesize(SEXP R_file_id, SEXP R_increment); /* H5_DLL htri_t H5Fis_accessible(const char *container_name, hid_t fapl_id); */ SEXP R_H5Fis_accessible(SEXP R_container_name, SEXP R_fapl_id); /* H5_DLL htri_t H5Fis_hdf5(const char *filename); */ SEXP R_H5Fis_hdf5(SEXP R_filename); /* H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist); */ SEXP R_H5Fmount(SEXP R_loc, SEXP R_name, SEXP R_child, SEXP R_plist); /* H5_DLL hid_t H5Fopen(const char *filename, unsigned flags, hid_t access_plist); */ SEXP R_H5Fopen(SEXP R_filename, SEXP R_flags, SEXP R_access_plist); /* H5_DLL hid_t H5Freopen(hid_t file_id); */ SEXP R_H5Freopen(SEXP R_file_id); /* H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id); */ SEXP R_H5Freset_mdc_hit_rate_stats(SEXP R_file_id); /* H5_DLL herr_t H5Freset_page_buffering_stats(hid_t file_id); */ SEXP R_H5Freset_page_buffering_stats(SEXP R_file_id); /* H5_DLL herr_t H5Fset_dset_no_attrs_hint(hid_t file_id, hbool_t minimize); */ SEXP R_H5Fset_dset_no_attrs_hint(SEXP R_file_id, SEXP R_minimize); /* H5_DLL herr_t H5Fset_latest_format(hid_t file_id, hbool_t latest_format); */ SEXP R_H5Fset_latest_format(SEXP R_file_id, SEXP R_latest_format); /* H5_DLL herr_t H5Fset_libver_bounds(hid_t file_id, H5F_libver_t low, H5F_libver_t high); */ SEXP R_H5Fset_libver_bounds(SEXP R_file_id, SEXP R_low, SEXP R_high); /* H5_DLL herr_t H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Fset_mdc_config(SEXP R_file_id, SEXP R_config_ptr); /* H5_DLL herr_t H5Fstart_mdc_logging(hid_t file_id); */ SEXP R_H5Fstart_mdc_logging(SEXP R_file_id); /* H5_DLL herr_t H5Fstart_swmr_write(hid_t file_id); */ SEXP R_H5Fstart_swmr_write(SEXP R_file_id); /* H5_DLL herr_t H5Fstop_mdc_logging(hid_t file_id); */ SEXP R_H5Fstop_mdc_logging(SEXP R_file_id); /* H5_DLL herr_t H5Funmount(hid_t loc, const char *name); */ SEXP R_H5Funmount(SEXP R_loc, SEXP R_name); #endif
jeroen/hdf5r
src/Wrapper_manual_H5T.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_manual_H5T.h" SEXP h5create_compound_type(SEXP _names, SEXP _dtype_ids, SEXP _size, SEXP _offset) { size_t total_size, offset[LENGTH(_names)]; herr_t status; // check if offset and size are given, if not, ignore both if(XLENGTH(_size) == 0 || XLENGTH(_offset) == 0) { total_size = 0; for(int i=0; i < LENGTH(_names); i++) { offset[i] = total_size; total_size += H5Tget_size(SEXP_to_longlong(_dtype_ids, i)); } } else { total_size = SEXP_to_longlong(_size, 0); for(int i=0; i < XLENGTH(_offset); ++i) { offset[i] = INTEGER(_offset)[i]; } } hid_t cpd_dtype_id = H5Tcreate(H5T_COMPOUND, total_size); for(int i=0; i< LENGTH(_names); i++) { status = H5Tinsert(cpd_dtype_id, CHAR(STRING_ELT(_names, i)), offset[i], SEXP_to_longlong(_dtype_ids, i)); if(status < 0) { error("Cannot insert type %lld\n", SEXP_to_longlong(_dtype_ids, i)); } } SEXP _return_val = PROTECT(ScalarInteger64(cpd_dtype_id)); SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, _return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); UNPROTECT(3); return(__ret_list); } SEXP h5create_enum_type(SEXP _labels, SEXP _values, SEXP _dtype_id) { herr_t status; hid_t dtype_id = SEXP_to_longlong(_dtype_id, 0); hid_t datatype = H5Tenum_create(dtype_id); long long buf; if(datatype < 0) { error("Cannot create new enum_type\n"); } for(int i=0; i < LENGTH(_labels); i++) { buf = SEXP_to_longlong(_values, i); H5Tconvert(H5T_NATIVE_LLONG, dtype_id, 1, &buf, NULL, H5P_DEFAULT); status = H5Tenum_insert(datatype, CHAR(STRING_ELT(_labels, i)), &buf); if(status < 0) { error("Could not insert value into enum %s value %d with status %d\n", CHAR(STRING_ELT(_labels, i)), buf, status); } } SEXP _return_val = PROTECT(ScalarInteger64(datatype)); SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, _return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); UNPROTECT(3); return(__ret_list); } SEXP h5get_enum_labels(SEXP _dtype_id) { hid_t enum_type = SEXP_to_longlong(_dtype_id, 0); size_t numValues = H5Tget_nmembers(enum_type); SEXP _return_val = PROTECT(allocVector(STRSXP, numValues)); char* member_name; for(unsigned int i=0; i<numValues; i++) { member_name = H5Tget_member_name(enum_type, i); SET_STRING_ELT(_return_val, i, mkChar(member_name)); H5free_memory(member_name); } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, _return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); UNPROTECT(3); return(__ret_list); } SEXP h5get_enum_values(SEXP _dtype_id) { hid_t enum_type = SEXP_to_longlong(_dtype_id, 0); hid_t enum_base_type = H5Tget_super(enum_type); hsize_t enum_base_size = H5Tget_size(enum_base_type); int enum_base_signed = H5Tget_sign(enum_base_type) == H5T_SGN_2; size_t numValues = H5Tget_nmembers(enum_type); int needs_llong = (enum_base_size > 4 || (enum_base_size==4 && !enum_base_signed)); if(enum_base_size > sizeof(long long)) { error("Cannot read an enum with a size > long long"); } SEXP _return_val; if(needs_llong) { _return_val = PROTECT(allocVector(REALSXP, numValues)); SET_CLASS(_return_val, ScalarString(mkChar("integer64"))); } else { _return_val = PROTECT(allocVector(INTSXP, numValues)); } long long enum_val; for(unsigned int i=0; i<numValues; i++) { H5Tget_member_value(enum_type, i, &enum_val); H5Tconvert(enum_base_type, H5T_NATIVE_LLONG, 1, &enum_val, NULL, H5P_DEFAULT); if(needs_llong) { ((long long *)REAL(_return_val))[i] = enum_val; } else { INTEGER(_return_val)[i] = enum_val; } } H5Tclose(enum_base_type); SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, _return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); UNPROTECT(3); return(__ret_list); } SEXP h5get_compound_types(SEXP _dtype_id) { hid_t cpd_type = SEXP_to_longlong(_dtype_id, 0); size_t numValues = H5Tget_nmembers(cpd_type); SEXP _return_val = PROTECT(allocVector(REALSXP, numValues)); SET_CLASS(_return_val, ScalarString(mkChar("integer64"))); for(unsigned int i=0; i<numValues; i++) { ((long long*)REAL(_return_val))[i]= H5Tget_member_type(cpd_type, i); } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, _return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); UNPROTECT(3); return(__ret_list); } SEXP h5get_compound_names(SEXP _dtype_id) { hid_t cpd_type = SEXP_to_longlong(_dtype_id, 0); size_t numValues = H5Tget_nmembers(cpd_type); SEXP _return_val = PROTECT(allocVector(STRSXP, numValues)); char *member_name; for(unsigned int i=0; i<numValues; i++) { member_name = H5Tget_member_name(cpd_type, i); SET_STRING_ELT(_return_val, i, mkChar(member_name)); H5free_memory(member_name); } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, _return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); UNPROTECT(3); return(__ret_list); } SEXP h5get_compound_classes(SEXP _dtype_id) { hid_t cpd_type = SEXP_to_longlong(_dtype_id, 0); size_t numValues = H5Tget_nmembers(cpd_type); H5T_class_t member_classes[numValues]; for(unsigned int i=0; i<numValues; i++) { member_classes[i]= H5Tget_member_class(cpd_type, i); } SEXP _return_val = PROTECT(H5ToR_single_step(member_classes, h5_datatype[DT_H5T_class_t], numValues, H5TOR_CONV_INT64_NOLOSS)); SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, _return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); UNPROTECT(3); return(__ret_list); } SEXP h5get_compound_offsets(SEXP _dtype_id) { hid_t cpd_type = SEXP_to_longlong(_dtype_id, 0); size_t numValues = H5Tget_nmembers(cpd_type); SEXP _return_val = PROTECT(allocVector(INTSXP, numValues)); for(unsigned int i=0; i<numValues; i++) { INTEGER(_return_val)[i]= H5Tget_member_offset(cpd_type, i); } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, _return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); UNPROTECT(3); return(__ret_list); } SEXP R_H5Tdetect_vlen(SEXP _dtype_id) { hid_t dtype_id = SEXP_to_longlong(_dtype_id, 0); // call the detect_class function is VLEN // but this does not check if it is a variable length string htri_t is_vlen = H5Tdetect_class(dtype_id, H5T_VLEN); // if it is not already vlen, check if it is a variabe lenght string if(is_vlen <= 0) { htri_t is_string = H5Tdetect_class(dtype_id, H5T_STRING); if(is_string) { is_vlen = H5Tis_variable_str(dtype_id); } } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, ScalarInteger(is_vlen)); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); UNPROTECT(2); return(__ret_list); }
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5DS.h
#ifndef _WRAPPER_AUTO_H5DS_H_ #define _WRAPPER_AUTO_H5DS_H_ #include "global.h" /* H5_HLDLL herr_t H5DSattach_scale( hid_t did, hid_t dsid, unsigned int idx); */ SEXP R_H5DSattach_scale(SEXP R_did, SEXP R_dsid, SEXP R_idx); /* H5_HLDLL herr_t H5DSdetach_scale( hid_t did, hid_t dsid, unsigned int idx); */ SEXP R_H5DSdetach_scale(SEXP R_did, SEXP R_dsid, SEXP R_idx); /* H5_HLDLL ssize_t H5DSget_label( hid_t did, unsigned int idx, char *label, size_t size); */ SEXP R_H5DSget_label(SEXP R_did, SEXP R_idx, SEXP R_label, SEXP R_size); /* H5_HLDLL int H5DSget_num_scales( hid_t did, unsigned int dim); */ SEXP R_H5DSget_num_scales(SEXP R_did, SEXP R_dim); /* H5_HLDLL ssize_t H5DSget_scale_name( hid_t did, char *name, size_t size); */ SEXP R_H5DSget_scale_name(SEXP R_did, SEXP R_name, SEXP R_size); /* H5_HLDLL htri_t H5DSis_attached( hid_t did, hid_t dsid, unsigned int idx); */ SEXP R_H5DSis_attached(SEXP R_did, SEXP R_dsid, SEXP R_idx); /* H5_HLDLL htri_t H5DSis_scale( hid_t did); */ SEXP R_H5DSis_scale(SEXP R_did); /* H5_HLDLL herr_t H5DSset_label( hid_t did, unsigned int idx, const char *label); */ SEXP R_H5DSset_label(SEXP R_did, SEXP R_idx, SEXP R_label); /* H5_HLDLL herr_t H5DSset_scale( hid_t dsid, const char *dimname); */ SEXP R_H5DSset_scale(SEXP R_dsid, SEXP R_dimname); #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5F.h
<reponame>jeroen/hdf5r #ifndef _WRAPPER_AUTO_H5F_H_ #define _WRAPPER_AUTO_H5F_H_ #include "global.h" /* H5_DLL herr_t H5Fclear_elink_file_cache(hid_t file_id); */ SEXP R_H5Fclear_elink_file_cache(SEXP R_file_id); /* H5_DLL herr_t H5Fclose(hid_t file_id); */ SEXP R_H5Fclose(SEXP R_file_id); /* H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist); */ SEXP R_H5Fcreate(SEXP R_filename, SEXP R_flags, SEXP R_create_plist, SEXP R_access_plist); /* H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope); */ SEXP R_H5Fflush(SEXP R_object_id, SEXP R_scope); /* H5_DLL hid_t H5Fget_access_plist(hid_t file_id); */ SEXP R_H5Fget_access_plist(SEXP R_file_id); /* H5_DLL hid_t H5Fget_create_plist(hid_t file_id); */ SEXP R_H5Fget_create_plist(SEXP R_file_id); /* H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len); */ SEXP R_H5Fget_file_image(SEXP R_file_id, SEXP R_buf_ptr, SEXP R_buf_len, SEXP _dupl_buf_ptr); /* H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size); */ SEXP R_H5Fget_filesize(SEXP R_file_id, SEXP R_size); /* H5_DLL hssize_t H5Fget_freespace(hid_t file_id); */ SEXP R_H5Fget_freespace(SEXP R_file_id); /* H5_DLL herr_t H5Fget_info(hid_t obj_id, H5F_info_t *bh_info); */ SEXP R_H5Fget_info(SEXP R_obj_id, SEXP R_bh_info); /* H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned * intent); */ SEXP R_H5Fget_intent(SEXP R_file_id, SEXP R_intent); /* H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Fget_mdc_config(SEXP R_file_id, SEXP R_config_ptr); /* H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate_ptr); */ SEXP R_H5Fget_mdc_hit_rate(SEXP R_file_id, SEXP R_hit_rate_ptr); /* H5_DLL herr_t H5Fget_mdc_size(hid_t file_id, size_t * max_size_ptr, size_t * min_clean_size_ptr, size_t * cur_size_ptr, int * cur_num_entries_ptr); */ SEXP R_H5Fget_mdc_size(SEXP R_file_id, SEXP R_max_size_ptr, SEXP R_min_clean_size_ptr, SEXP R_cur_size_ptr, SEXP R_cur_num_entries_ptr); /* H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size); */ SEXP R_H5Fget_name(SEXP R_obj_id, SEXP R_name, SEXP R_size); /* H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types); */ SEXP R_H5Fget_obj_count(SEXP R_file_id, SEXP R_types); /* H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list); */ SEXP R_H5Fget_obj_ids(SEXP R_file_id, SEXP R_types, SEXP R_max_objs, SEXP R_obj_id_list); /* H5_DLL htri_t H5Fis_hdf5(const char *filename); */ SEXP R_H5Fis_hdf5(SEXP R_filename); /* H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist); */ SEXP R_H5Fmount(SEXP R_loc, SEXP R_name, SEXP R_child, SEXP R_plist); /* H5_DLL hid_t H5Fopen(const char *filename, unsigned flags, hid_t access_plist); */ SEXP R_H5Fopen(SEXP R_filename, SEXP R_flags, SEXP R_access_plist); /* H5_DLL hid_t H5Freopen(hid_t file_id); */ SEXP R_H5Freopen(SEXP R_file_id); /* H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id); */ SEXP R_H5Freset_mdc_hit_rate_stats(SEXP R_file_id); /* H5_DLL herr_t H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Fset_mdc_config(SEXP R_file_id, SEXP R_config_ptr); /* H5_DLL herr_t H5Funmount(hid_t loc, const char *name); */ SEXP R_H5Funmount(SEXP R_loc, SEXP R_name); #endif
jeroen/hdf5r
src/1_10_0/export_auto.h
#ifndef _EXPORT_AUTO_H_ #define _EXPORT_AUTO_H_ R_CallMethodDef library_WRAPPER_AUTO_H5[] = { {"R_H5check_version", (DL_FUNC) &R_H5check_version, 3}, {"R_H5close", (DL_FUNC) &R_H5close, 0}, {"R_H5dont_atexit", (DL_FUNC) &R_H5dont_atexit, 0}, {"R_H5free_memory", (DL_FUNC) &R_H5free_memory, 2}, {"R_H5garbage_collect", (DL_FUNC) &R_H5garbage_collect, 0}, {"R_H5get_libversion", (DL_FUNC) &R_H5get_libversion, 3}, {"R_H5is_library_threadsafe", (DL_FUNC) &R_H5is_library_threadsafe, 1}, {"R_H5open", (DL_FUNC) &R_H5open, 0}, {"R_H5set_free_list_limits", (DL_FUNC) &R_H5set_free_list_limits, 6}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5A[] = { {"R_H5Aclose", (DL_FUNC) &R_H5Aclose, 1}, {"R_H5Acreate_by_name", (DL_FUNC) &R_H5Acreate_by_name, 8}, {"R_H5Acreate2", (DL_FUNC) &R_H5Acreate2, 6}, {"R_H5Adelete", (DL_FUNC) &R_H5Adelete, 2}, {"R_H5Adelete_by_idx", (DL_FUNC) &R_H5Adelete_by_idx, 6}, {"R_H5Adelete_by_name", (DL_FUNC) &R_H5Adelete_by_name, 4}, {"R_H5Aexists", (DL_FUNC) &R_H5Aexists, 2}, {"R_H5Aexists_by_name", (DL_FUNC) &R_H5Aexists_by_name, 4}, {"R_H5Aget_create_plist", (DL_FUNC) &R_H5Aget_create_plist, 1}, {"R_H5Aget_info", (DL_FUNC) &R_H5Aget_info, 2}, {"R_H5Aget_info_by_idx", (DL_FUNC) &R_H5Aget_info_by_idx, 7}, {"R_H5Aget_info_by_name", (DL_FUNC) &R_H5Aget_info_by_name, 5}, {"R_H5Aget_name", (DL_FUNC) &R_H5Aget_name, 3}, {"R_H5Aget_name_by_idx", (DL_FUNC) &R_H5Aget_name_by_idx, 8}, {"R_H5Aget_num_attrs", (DL_FUNC) &R_H5Aget_num_attrs, 1}, {"R_H5Aget_space", (DL_FUNC) &R_H5Aget_space, 1}, {"R_H5Aget_storage_size", (DL_FUNC) &R_H5Aget_storage_size, 1}, {"R_H5Aget_type", (DL_FUNC) &R_H5Aget_type, 1}, {"R_H5Aopen", (DL_FUNC) &R_H5Aopen, 3}, {"R_H5Aopen_by_idx", (DL_FUNC) &R_H5Aopen_by_idx, 7}, {"R_H5Aopen_by_name", (DL_FUNC) &R_H5Aopen_by_name, 5}, {"R_H5Aopen_idx", (DL_FUNC) &R_H5Aopen_idx, 2}, {"R_H5Aopen_name", (DL_FUNC) &R_H5Aopen_name, 2}, {"R_H5Aread", (DL_FUNC) &R_H5Aread, 4}, {"R_H5Arename", (DL_FUNC) &R_H5Arename, 3}, {"R_H5Arename_by_name", (DL_FUNC) &R_H5Arename_by_name, 5}, {"R_H5Awrite", (DL_FUNC) &R_H5Awrite, 3}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5D[] = { {"R_H5Dclose", (DL_FUNC) &R_H5Dclose, 1}, {"R_H5Dcreate_anon", (DL_FUNC) &R_H5Dcreate_anon, 5}, {"R_H5Dcreate2", (DL_FUNC) &R_H5Dcreate2, 7}, {"R_H5Ddebug", (DL_FUNC) &R_H5Ddebug, 1}, {"R_H5Dfill", (DL_FUNC) &R_H5Dfill, 6}, {"R_H5Dflush", (DL_FUNC) &R_H5Dflush, 1}, {"R_H5Dformat_convert", (DL_FUNC) &R_H5Dformat_convert, 1}, {"R_H5Dget_access_plist", (DL_FUNC) &R_H5Dget_access_plist, 1}, {"R_H5Dget_chunk_index_type", (DL_FUNC) &R_H5Dget_chunk_index_type, 2}, {"R_H5Dget_create_plist", (DL_FUNC) &R_H5Dget_create_plist, 1}, {"R_H5Dget_offset", (DL_FUNC) &R_H5Dget_offset, 1}, {"R_H5Dget_space", (DL_FUNC) &R_H5Dget_space, 1}, {"R_H5Dget_space_status", (DL_FUNC) &R_H5Dget_space_status, 2}, {"R_H5Dget_storage_size", (DL_FUNC) &R_H5Dget_storage_size, 1}, {"R_H5Dget_type", (DL_FUNC) &R_H5Dget_type, 1}, {"R_H5Dopen2", (DL_FUNC) &R_H5Dopen2, 3}, {"R_H5Dread", (DL_FUNC) &R_H5Dread, 7}, {"R_H5Drefresh", (DL_FUNC) &R_H5Drefresh, 1}, {"R_H5Dset_extent", (DL_FUNC) &R_H5Dset_extent, 2}, {"R_H5Dvlen_get_buf_size", (DL_FUNC) &R_H5Dvlen_get_buf_size, 4}, {"R_H5Dvlen_reclaim", (DL_FUNC) &R_H5Dvlen_reclaim, 5}, {"R_H5Dwrite", (DL_FUNC) &R_H5Dwrite, 6}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5DS[] = { {"R_H5DSattach_scale", (DL_FUNC) &R_H5DSattach_scale, 3}, {"R_H5DSdetach_scale", (DL_FUNC) &R_H5DSdetach_scale, 3}, {"R_H5DSget_label", (DL_FUNC) &R_H5DSget_label, 4}, {"R_H5DSget_num_scales", (DL_FUNC) &R_H5DSget_num_scales, 2}, {"R_H5DSget_scale_name", (DL_FUNC) &R_H5DSget_scale_name, 3}, {"R_H5DSis_attached", (DL_FUNC) &R_H5DSis_attached, 3}, {"R_H5DSis_scale", (DL_FUNC) &R_H5DSis_scale, 1}, {"R_H5DSset_label", (DL_FUNC) &R_H5DSset_label, 3}, {"R_H5DSset_scale", (DL_FUNC) &R_H5DSset_scale, 2}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5E[] = { {"R_H5Eauto_is_v2", (DL_FUNC) &R_H5Eauto_is_v2, 2}, {"R_H5Eclear2", (DL_FUNC) &R_H5Eclear2, 1}, {"R_H5Eclose_msg", (DL_FUNC) &R_H5Eclose_msg, 1}, {"R_H5Eclose_stack", (DL_FUNC) &R_H5Eclose_stack, 1}, {"R_H5Ecreate_msg", (DL_FUNC) &R_H5Ecreate_msg, 3}, {"R_H5Ecreate_stack", (DL_FUNC) &R_H5Ecreate_stack, 0}, {"R_H5Eget_class_name", (DL_FUNC) &R_H5Eget_class_name, 3}, {"R_H5Eget_current_stack", (DL_FUNC) &R_H5Eget_current_stack, 0}, {"R_H5Eget_major", (DL_FUNC) &R_H5Eget_major, 1}, {"R_H5Eget_minor", (DL_FUNC) &R_H5Eget_minor, 1}, {"R_H5Eget_msg", (DL_FUNC) &R_H5Eget_msg, 4}, {"R_H5Eget_num", (DL_FUNC) &R_H5Eget_num, 1}, {"R_H5Epop", (DL_FUNC) &R_H5Epop, 2}, {"R_H5Epush2", (DL_FUNC) &R_H5Epush2, 8}, {"R_H5Eregister_class", (DL_FUNC) &R_H5Eregister_class, 3}, {"R_H5Eset_current_stack", (DL_FUNC) &R_H5Eset_current_stack, 1}, {"R_H5Eunregister_class", (DL_FUNC) &R_H5Eunregister_class, 1}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5F[] = { {"R_H5Fclear_elink_file_cache", (DL_FUNC) &R_H5Fclear_elink_file_cache, 1}, {"R_H5Fclose", (DL_FUNC) &R_H5Fclose, 1}, {"R_H5Fcreate", (DL_FUNC) &R_H5Fcreate, 4}, {"R_H5Fflush", (DL_FUNC) &R_H5Fflush, 2}, {"R_H5Fformat_convert", (DL_FUNC) &R_H5Fformat_convert, 1}, {"R_H5Fget_access_plist", (DL_FUNC) &R_H5Fget_access_plist, 1}, {"R_H5Fget_create_plist", (DL_FUNC) &R_H5Fget_create_plist, 1}, {"R_H5Fget_file_image", (DL_FUNC) &R_H5Fget_file_image, 4}, {"R_H5Fget_filesize", (DL_FUNC) &R_H5Fget_filesize, 2}, {"R_H5Fget_free_sections", (DL_FUNC) &R_H5Fget_free_sections, 4}, {"R_H5Fget_freespace", (DL_FUNC) &R_H5Fget_freespace, 1}, {"R_H5Fget_info1", (DL_FUNC) &R_H5Fget_info1, 2}, {"R_H5Fget_info2", (DL_FUNC) &R_H5Fget_info2, 2}, {"R_H5Fget_intent", (DL_FUNC) &R_H5Fget_intent, 2}, {"R_H5Fget_mdc_config", (DL_FUNC) &R_H5Fget_mdc_config, 2}, {"R_H5Fget_mdc_hit_rate", (DL_FUNC) &R_H5Fget_mdc_hit_rate, 2}, {"R_H5Fget_mdc_logging_status", (DL_FUNC) &R_H5Fget_mdc_logging_status, 3}, {"R_H5Fget_mdc_size", (DL_FUNC) &R_H5Fget_mdc_size, 5}, {"R_H5Fget_metadata_read_retry_info", (DL_FUNC) &R_H5Fget_metadata_read_retry_info, 2}, {"R_H5Fget_name", (DL_FUNC) &R_H5Fget_name, 3}, {"R_H5Fget_obj_count", (DL_FUNC) &R_H5Fget_obj_count, 2}, {"R_H5Fget_obj_ids", (DL_FUNC) &R_H5Fget_obj_ids, 4}, {"R_H5Fis_hdf5", (DL_FUNC) &R_H5Fis_hdf5, 1}, {"R_H5Fmount", (DL_FUNC) &R_H5Fmount, 4}, {"R_H5Fopen", (DL_FUNC) &R_H5Fopen, 3}, {"R_H5Freopen", (DL_FUNC) &R_H5Freopen, 1}, {"R_H5Freset_mdc_hit_rate_stats", (DL_FUNC) &R_H5Freset_mdc_hit_rate_stats, 1}, {"R_H5Fset_mdc_config", (DL_FUNC) &R_H5Fset_mdc_config, 2}, {"R_H5Fstart_mdc_logging", (DL_FUNC) &R_H5Fstart_mdc_logging, 1}, {"R_H5Fstart_swmr_write", (DL_FUNC) &R_H5Fstart_swmr_write, 1}, {"R_H5Fstop_mdc_logging", (DL_FUNC) &R_H5Fstop_mdc_logging, 1}, {"R_H5Funmount", (DL_FUNC) &R_H5Funmount, 2}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5FDCORE[] = { {"R_H5Pget_fapl_core", (DL_FUNC) &R_H5Pget_fapl_core, 3}, {"R_H5Pset_fapl_core", (DL_FUNC) &R_H5Pset_fapl_core, 3}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5FDFAMILY[] = { {"R_H5FD_family_init", (DL_FUNC) &R_H5FD_family_init, 0}, {"R_H5Pget_fapl_family", (DL_FUNC) &R_H5Pget_fapl_family, 3}, {"R_H5Pset_fapl_family", (DL_FUNC) &R_H5Pset_fapl_family, 3}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5FDLOG[] = { {"R_H5FD_log_init", (DL_FUNC) &R_H5FD_log_init, 0}, {"R_H5Pset_fapl_log", (DL_FUNC) &R_H5Pset_fapl_log, 4}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5FDSEC2[] = { {"R_H5FD_sec2_init", (DL_FUNC) &R_H5FD_sec2_init, 0}, {"R_H5Pset_fapl_sec2", (DL_FUNC) &R_H5Pset_fapl_sec2, 1}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5FDSTDIO[] = { {"R_H5FD_stdio_init", (DL_FUNC) &R_H5FD_stdio_init, 0}, {"R_H5Pset_fapl_stdio", (DL_FUNC) &R_H5Pset_fapl_stdio, 1}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5G[] = { {"R_H5Gclose", (DL_FUNC) &R_H5Gclose, 1}, {"R_H5Gcreate_anon", (DL_FUNC) &R_H5Gcreate_anon, 3}, {"R_H5Gcreate2", (DL_FUNC) &R_H5Gcreate2, 5}, {"R_H5Gflush", (DL_FUNC) &R_H5Gflush, 1}, {"R_H5Gget_create_plist", (DL_FUNC) &R_H5Gget_create_plist, 1}, {"R_H5Gget_info", (DL_FUNC) &R_H5Gget_info, 2}, {"R_H5Gget_info_by_idx", (DL_FUNC) &R_H5Gget_info_by_idx, 7}, {"R_H5Gget_info_by_name", (DL_FUNC) &R_H5Gget_info_by_name, 4}, {"R_H5Gopen2", (DL_FUNC) &R_H5Gopen2, 3}, {"R_H5Grefresh", (DL_FUNC) &R_H5Grefresh, 1}, {"R_H5Gset_comment", (DL_FUNC) &R_H5Gset_comment, 3}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5I[] = { {"R_H5Iclear_type", (DL_FUNC) &R_H5Iclear_type, 2}, {"R_H5Idec_ref", (DL_FUNC) &R_H5Idec_ref, 1}, {"R_H5Idec_type_ref", (DL_FUNC) &R_H5Idec_type_ref, 1}, {"R_H5Idestroy_type", (DL_FUNC) &R_H5Idestroy_type, 1}, {"R_H5Iget_file_id", (DL_FUNC) &R_H5Iget_file_id, 1}, {"R_H5Iget_name", (DL_FUNC) &R_H5Iget_name, 3}, {"R_H5Iget_ref", (DL_FUNC) &R_H5Iget_ref, 1}, {"R_H5Iget_type", (DL_FUNC) &R_H5Iget_type, 1}, {"R_H5Iget_type_ref", (DL_FUNC) &R_H5Iget_type_ref, 1}, {"R_H5Iinc_ref", (DL_FUNC) &R_H5Iinc_ref, 1}, {"R_H5Iinc_type_ref", (DL_FUNC) &R_H5Iinc_type_ref, 1}, {"R_H5Iis_valid", (DL_FUNC) &R_H5Iis_valid, 1}, {"R_H5Inmembers", (DL_FUNC) &R_H5Inmembers, 2}, {"R_H5Iregister", (DL_FUNC) &R_H5Iregister, 2}, {"R_H5Itype_exists", (DL_FUNC) &R_H5Itype_exists, 1}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5IM[] = { {"R_H5IMget_image_info", (DL_FUNC) &R_H5IMget_image_info, 7}, {"R_H5IMget_npalettes", (DL_FUNC) &R_H5IMget_npalettes, 3}, {"R_H5IMget_palette", (DL_FUNC) &R_H5IMget_palette, 4}, {"R_H5IMget_palette_info", (DL_FUNC) &R_H5IMget_palette_info, 4}, {"R_H5IMis_image", (DL_FUNC) &R_H5IMis_image, 2}, {"R_H5IMis_palette", (DL_FUNC) &R_H5IMis_palette, 2}, {"R_H5IMlink_palette", (DL_FUNC) &R_H5IMlink_palette, 3}, {"R_H5IMmake_image_24bit", (DL_FUNC) &R_H5IMmake_image_24bit, 6}, {"R_H5IMmake_image_8bit", (DL_FUNC) &R_H5IMmake_image_8bit, 5}, {"R_H5IMmake_palette", (DL_FUNC) &R_H5IMmake_palette, 4}, {"R_H5IMread_image", (DL_FUNC) &R_H5IMread_image, 3}, {"R_H5IMunlink_palette", (DL_FUNC) &R_H5IMunlink_palette, 3}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5L[] = { {"R_H5Lcopy", (DL_FUNC) &R_H5Lcopy, 6}, {"R_H5Lcreate_external", (DL_FUNC) &R_H5Lcreate_external, 6}, {"R_H5Lcreate_hard", (DL_FUNC) &R_H5Lcreate_hard, 6}, {"R_H5Lcreate_soft", (DL_FUNC) &R_H5Lcreate_soft, 5}, {"R_H5Lcreate_ud", (DL_FUNC) &R_H5Lcreate_ud, 7}, {"R_H5Ldelete", (DL_FUNC) &R_H5Ldelete, 3}, {"R_H5Ldelete_by_idx", (DL_FUNC) &R_H5Ldelete_by_idx, 6}, {"R_H5Lexists", (DL_FUNC) &R_H5Lexists, 3}, {"R_H5Lget_info", (DL_FUNC) &R_H5Lget_info, 4}, {"R_H5Lget_info_by_idx", (DL_FUNC) &R_H5Lget_info_by_idx, 7}, {"R_H5Lget_name_by_idx", (DL_FUNC) &R_H5Lget_name_by_idx, 8}, {"R_H5Lget_val", (DL_FUNC) &R_H5Lget_val, 6}, {"R_H5Lget_val_by_idx", (DL_FUNC) &R_H5Lget_val_by_idx, 9}, {"R_H5Lis_registered", (DL_FUNC) &R_H5Lis_registered, 1}, {"R_H5Lmove", (DL_FUNC) &R_H5Lmove, 6}, {"R_H5Lunpack_elink_val", (DL_FUNC) &R_H5Lunpack_elink_val, 5}, {"R_H5Lunregister", (DL_FUNC) &R_H5Lunregister, 1}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5LT[] = { {"R_H5LTdtype_to_text", (DL_FUNC) &R_H5LTdtype_to_text, 4}, {"R_H5LTfind_attribute", (DL_FUNC) &R_H5LTfind_attribute, 2}, {"R_H5LTfind_dataset", (DL_FUNC) &R_H5LTfind_dataset, 2}, {"R_H5LTget_attribute", (DL_FUNC) &R_H5LTget_attribute, 6}, {"R_H5LTget_attribute_char", (DL_FUNC) &R_H5LTget_attribute_char, 4}, {"R_H5LTget_attribute_double", (DL_FUNC) &R_H5LTget_attribute_double, 4}, {"R_H5LTget_attribute_float", (DL_FUNC) &R_H5LTget_attribute_float, 4}, {"R_H5LTget_attribute_info", (DL_FUNC) &R_H5LTget_attribute_info, 6}, {"R_H5LTget_attribute_int", (DL_FUNC) &R_H5LTget_attribute_int, 4}, {"R_H5LTget_attribute_long", (DL_FUNC) &R_H5LTget_attribute_long, 4}, {"R_H5LTget_attribute_long_long", (DL_FUNC) &R_H5LTget_attribute_long_long, 4}, {"R_H5LTget_attribute_ndims", (DL_FUNC) &R_H5LTget_attribute_ndims, 4}, {"R_H5LTget_attribute_short", (DL_FUNC) &R_H5LTget_attribute_short, 4}, {"R_H5LTget_attribute_string", (DL_FUNC) &R_H5LTget_attribute_string, 4}, {"R_H5LTget_attribute_uchar", (DL_FUNC) &R_H5LTget_attribute_uchar, 4}, {"R_H5LTget_attribute_uint", (DL_FUNC) &R_H5LTget_attribute_uint, 4}, {"R_H5LTget_attribute_ulong", (DL_FUNC) &R_H5LTget_attribute_ulong, 4}, {"R_H5LTget_attribute_ushort", (DL_FUNC) &R_H5LTget_attribute_ushort, 4}, {"R_H5LTget_dataset_info", (DL_FUNC) &R_H5LTget_dataset_info, 5}, {"R_H5LTget_dataset_ndims", (DL_FUNC) &R_H5LTget_dataset_ndims, 3}, {"R_H5LTmake_dataset", (DL_FUNC) &R_H5LTmake_dataset, 6}, {"R_H5LTmake_dataset_char", (DL_FUNC) &R_H5LTmake_dataset_char, 5}, {"R_H5LTmake_dataset_double", (DL_FUNC) &R_H5LTmake_dataset_double, 5}, {"R_H5LTmake_dataset_float", (DL_FUNC) &R_H5LTmake_dataset_float, 5}, {"R_H5LTmake_dataset_int", (DL_FUNC) &R_H5LTmake_dataset_int, 5}, {"R_H5LTmake_dataset_long", (DL_FUNC) &R_H5LTmake_dataset_long, 5}, {"R_H5LTmake_dataset_short", (DL_FUNC) &R_H5LTmake_dataset_short, 5}, {"R_H5LTmake_dataset_string", (DL_FUNC) &R_H5LTmake_dataset_string, 3}, {"R_H5LTopen_file_image", (DL_FUNC) &R_H5LTopen_file_image, 4}, {"R_H5LTpath_valid", (DL_FUNC) &R_H5LTpath_valid, 3}, {"R_H5LTread_dataset", (DL_FUNC) &R_H5LTread_dataset, 5}, {"R_H5LTread_dataset_char", (DL_FUNC) &R_H5LTread_dataset_char, 3}, {"R_H5LTread_dataset_double", (DL_FUNC) &R_H5LTread_dataset_double, 3}, {"R_H5LTread_dataset_float", (DL_FUNC) &R_H5LTread_dataset_float, 3}, {"R_H5LTread_dataset_int", (DL_FUNC) &R_H5LTread_dataset_int, 3}, {"R_H5LTread_dataset_long", (DL_FUNC) &R_H5LTread_dataset_long, 3}, {"R_H5LTread_dataset_short", (DL_FUNC) &R_H5LTread_dataset_short, 3}, {"R_H5LTread_dataset_string", (DL_FUNC) &R_H5LTread_dataset_string, 3}, {"R_H5LTset_attribute_char", (DL_FUNC) &R_H5LTset_attribute_char, 5}, {"R_H5LTset_attribute_double", (DL_FUNC) &R_H5LTset_attribute_double, 5}, {"R_H5LTset_attribute_float", (DL_FUNC) &R_H5LTset_attribute_float, 5}, {"R_H5LTset_attribute_int", (DL_FUNC) &R_H5LTset_attribute_int, 5}, {"R_H5LTset_attribute_long", (DL_FUNC) &R_H5LTset_attribute_long, 5}, {"R_H5LTset_attribute_long_long", (DL_FUNC) &R_H5LTset_attribute_long_long, 5}, {"R_H5LTset_attribute_short", (DL_FUNC) &R_H5LTset_attribute_short, 5}, {"R_H5LTset_attribute_string", (DL_FUNC) &R_H5LTset_attribute_string, 4}, {"R_H5LTset_attribute_uchar", (DL_FUNC) &R_H5LTset_attribute_uchar, 5}, {"R_H5LTset_attribute_uint", (DL_FUNC) &R_H5LTset_attribute_uint, 5}, {"R_H5LTset_attribute_ulong", (DL_FUNC) &R_H5LTset_attribute_ulong, 5}, {"R_H5LTset_attribute_ushort", (DL_FUNC) &R_H5LTset_attribute_ushort, 5}, {"R_H5LTtext_to_dtype", (DL_FUNC) &R_H5LTtext_to_dtype, 2}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5O[] = { {"R_H5Oare_mdc_flushes_disabled", (DL_FUNC) &R_H5Oare_mdc_flushes_disabled, 2}, {"R_H5Oclose", (DL_FUNC) &R_H5Oclose, 1}, {"R_H5Ocopy", (DL_FUNC) &R_H5Ocopy, 6}, {"R_H5Odecr_refcount", (DL_FUNC) &R_H5Odecr_refcount, 1}, {"R_H5Odisable_mdc_flushes", (DL_FUNC) &R_H5Odisable_mdc_flushes, 1}, {"R_H5Oenable_mdc_flushes", (DL_FUNC) &R_H5Oenable_mdc_flushes, 1}, {"R_H5Oexists_by_name", (DL_FUNC) &R_H5Oexists_by_name, 3}, {"R_H5Oflush", (DL_FUNC) &R_H5Oflush, 1}, {"R_H5Oget_comment", (DL_FUNC) &R_H5Oget_comment, 3}, {"R_H5Oget_comment_by_name", (DL_FUNC) &R_H5Oget_comment_by_name, 5}, {"R_H5Oget_info", (DL_FUNC) &R_H5Oget_info, 2}, {"R_H5Oget_info_by_idx", (DL_FUNC) &R_H5Oget_info_by_idx, 7}, {"R_H5Oget_info_by_name", (DL_FUNC) &R_H5Oget_info_by_name, 4}, {"R_H5Oincr_refcount", (DL_FUNC) &R_H5Oincr_refcount, 1}, {"R_H5Olink", (DL_FUNC) &R_H5Olink, 5}, {"R_H5Oopen", (DL_FUNC) &R_H5Oopen, 3}, {"R_H5Oopen_by_addr", (DL_FUNC) &R_H5Oopen_by_addr, 2}, {"R_H5Oopen_by_idx", (DL_FUNC) &R_H5Oopen_by_idx, 6}, {"R_H5Orefresh", (DL_FUNC) &R_H5Orefresh, 1}, {"R_H5Oset_comment", (DL_FUNC) &R_H5Oset_comment, 2}, {"R_H5Oset_comment_by_name", (DL_FUNC) &R_H5Oset_comment_by_name, 4}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5P[] = { {"R_H5Padd_merge_committed_dtype_path", (DL_FUNC) &R_H5Padd_merge_committed_dtype_path, 2}, {"R_H5Pall_filters_avail", (DL_FUNC) &R_H5Pall_filters_avail, 1}, {"R_H5Pclose", (DL_FUNC) &R_H5Pclose, 1}, {"R_H5Pclose_class", (DL_FUNC) &R_H5Pclose_class, 1}, {"R_H5Pcopy", (DL_FUNC) &R_H5Pcopy, 1}, {"R_H5Pcopy_prop", (DL_FUNC) &R_H5Pcopy_prop, 3}, {"R_H5Pcreate", (DL_FUNC) &R_H5Pcreate, 1}, {"R_H5Pdecode", (DL_FUNC) &R_H5Pdecode, 1}, {"R_H5Pencode", (DL_FUNC) &R_H5Pencode, 4}, {"R_H5Pequal", (DL_FUNC) &R_H5Pequal, 2}, {"R_H5Pexist", (DL_FUNC) &R_H5Pexist, 2}, {"R_H5Pfill_value_defined", (DL_FUNC) &R_H5Pfill_value_defined, 2}, {"R_H5Pfree_merge_committed_dtype_paths", (DL_FUNC) &R_H5Pfree_merge_committed_dtype_paths, 1}, {"R_H5Pget", (DL_FUNC) &R_H5Pget, 4}, {"R_H5Pget_alignment", (DL_FUNC) &R_H5Pget_alignment, 3}, {"R_H5Pget_alloc_time", (DL_FUNC) &R_H5Pget_alloc_time, 2}, {"R_H5Pget_attr_creation_order", (DL_FUNC) &R_H5Pget_attr_creation_order, 2}, {"R_H5Pget_attr_phase_change", (DL_FUNC) &R_H5Pget_attr_phase_change, 3}, {"R_H5Pget_btree_ratios", (DL_FUNC) &R_H5Pget_btree_ratios, 4}, {"R_H5Pget_cache", (DL_FUNC) &R_H5Pget_cache, 5}, {"R_H5Pget_char_encoding", (DL_FUNC) &R_H5Pget_char_encoding, 2}, {"R_H5Pget_chunk", (DL_FUNC) &R_H5Pget_chunk, 3}, {"R_H5Pget_chunk_cache", (DL_FUNC) &R_H5Pget_chunk_cache, 4}, {"R_H5Pget_chunk_opts", (DL_FUNC) &R_H5Pget_chunk_opts, 2}, {"R_H5Pget_class", (DL_FUNC) &R_H5Pget_class, 1}, {"R_H5Pget_class_name", (DL_FUNC) &R_H5Pget_class_name, 1}, {"R_H5Pget_class_parent", (DL_FUNC) &R_H5Pget_class_parent, 1}, {"R_H5Pget_copy_object", (DL_FUNC) &R_H5Pget_copy_object, 2}, {"R_H5Pget_core_write_tracking", (DL_FUNC) &R_H5Pget_core_write_tracking, 3}, {"R_H5Pget_create_intermediate_group", (DL_FUNC) &R_H5Pget_create_intermediate_group, 2}, {"R_H5Pget_data_transform", (DL_FUNC) &R_H5Pget_data_transform, 3}, {"R_H5Pget_driver", (DL_FUNC) &R_H5Pget_driver, 1}, {"R_H5Pget_edc_check", (DL_FUNC) &R_H5Pget_edc_check, 1}, {"R_H5Pget_efile_prefix", (DL_FUNC) &R_H5Pget_efile_prefix, 3}, {"R_H5Pget_elink_acc_flags", (DL_FUNC) &R_H5Pget_elink_acc_flags, 2}, {"R_H5Pget_elink_fapl", (DL_FUNC) &R_H5Pget_elink_fapl, 1}, {"R_H5Pget_elink_file_cache_size", (DL_FUNC) &R_H5Pget_elink_file_cache_size, 2}, {"R_H5Pget_elink_prefix", (DL_FUNC) &R_H5Pget_elink_prefix, 3}, {"R_H5Pget_est_link_info", (DL_FUNC) &R_H5Pget_est_link_info, 3}, {"R_H5Pget_external", (DL_FUNC) &R_H5Pget_external, 6}, {"R_H5Pget_external_count", (DL_FUNC) &R_H5Pget_external_count, 1}, {"R_H5Pget_family_offset", (DL_FUNC) &R_H5Pget_family_offset, 2}, {"R_H5Pget_fclose_degree", (DL_FUNC) &R_H5Pget_fclose_degree, 2}, {"R_H5Pget_file_space", (DL_FUNC) &R_H5Pget_file_space, 3}, {"R_H5Pget_fill_time", (DL_FUNC) &R_H5Pget_fill_time, 2}, {"R_H5Pget_fill_value", (DL_FUNC) &R_H5Pget_fill_value, 4}, {"R_H5Pget_filter_by_id2", (DL_FUNC) &R_H5Pget_filter_by_id2, 8}, {"R_H5Pget_filter2", (DL_FUNC) &R_H5Pget_filter2, 8}, {"R_H5Pget_gc_references", (DL_FUNC) &R_H5Pget_gc_references, 2}, {"R_H5Pget_hyper_vector_size", (DL_FUNC) &R_H5Pget_hyper_vector_size, 2}, {"R_H5Pget_istore_k", (DL_FUNC) &R_H5Pget_istore_k, 2}, {"R_H5Pget_layout", (DL_FUNC) &R_H5Pget_layout, 1}, {"R_H5Pget_libver_bounds", (DL_FUNC) &R_H5Pget_libver_bounds, 3}, {"R_H5Pget_link_creation_order", (DL_FUNC) &R_H5Pget_link_creation_order, 2}, {"R_H5Pget_link_phase_change", (DL_FUNC) &R_H5Pget_link_phase_change, 3}, {"R_H5Pget_local_heap_size_hint", (DL_FUNC) &R_H5Pget_local_heap_size_hint, 2}, {"R_H5Pget_mdc_config ", (DL_FUNC) &R_H5Pget_mdc_config , 2}, {"R_H5Pget_mdc_log_options", (DL_FUNC) &R_H5Pget_mdc_log_options, 5}, {"R_H5Pget_meta_block_size", (DL_FUNC) &R_H5Pget_meta_block_size, 2}, {"R_H5Pget_metadata_read_attempts", (DL_FUNC) &R_H5Pget_metadata_read_attempts, 2}, {"R_H5Pget_multi_type", (DL_FUNC) &R_H5Pget_multi_type, 2}, {"R_H5Pget_nfilters", (DL_FUNC) &R_H5Pget_nfilters, 1}, {"R_H5Pget_nlinks", (DL_FUNC) &R_H5Pget_nlinks, 2}, {"R_H5Pget_nprops", (DL_FUNC) &R_H5Pget_nprops, 2}, {"R_H5Pget_obj_track_times", (DL_FUNC) &R_H5Pget_obj_track_times, 2}, {"R_H5Pget_preserve", (DL_FUNC) &R_H5Pget_preserve, 1}, {"R_H5Pget_shared_mesg_index", (DL_FUNC) &R_H5Pget_shared_mesg_index, 4}, {"R_H5Pget_shared_mesg_nindexes", (DL_FUNC) &R_H5Pget_shared_mesg_nindexes, 2}, {"R_H5Pget_shared_mesg_phase_change", (DL_FUNC) &R_H5Pget_shared_mesg_phase_change, 3}, {"R_H5Pget_sieve_buf_size", (DL_FUNC) &R_H5Pget_sieve_buf_size, 2}, {"R_H5Pget_size", (DL_FUNC) &R_H5Pget_size, 3}, {"R_H5Pget_sizes", (DL_FUNC) &R_H5Pget_sizes, 3}, {"R_H5Pget_small_data_block_size", (DL_FUNC) &R_H5Pget_small_data_block_size, 2}, {"R_H5Pget_sym_k", (DL_FUNC) &R_H5Pget_sym_k, 3}, {"R_H5Pget_userblock", (DL_FUNC) &R_H5Pget_userblock, 2}, {"R_H5Pget_version", (DL_FUNC) &R_H5Pget_version, 5}, {"R_H5Pget_virtual_count", (DL_FUNC) &R_H5Pget_virtual_count, 2}, {"R_H5Pget_virtual_dsetname", (DL_FUNC) &R_H5Pget_virtual_dsetname, 4}, {"R_H5Pget_virtual_filename", (DL_FUNC) &R_H5Pget_virtual_filename, 4}, {"R_H5Pget_virtual_printf_gap", (DL_FUNC) &R_H5Pget_virtual_printf_gap, 2}, {"R_H5Pget_virtual_srcspace", (DL_FUNC) &R_H5Pget_virtual_srcspace, 2}, {"R_H5Pget_virtual_view", (DL_FUNC) &R_H5Pget_virtual_view, 2}, {"R_H5Pget_virtual_vspace", (DL_FUNC) &R_H5Pget_virtual_vspace, 2}, {"R_H5Pisa_class", (DL_FUNC) &R_H5Pisa_class, 2}, {"R_H5Pmodify_filter", (DL_FUNC) &R_H5Pmodify_filter, 5}, {"R_H5Premove", (DL_FUNC) &R_H5Premove, 2}, {"R_H5Premove_filter", (DL_FUNC) &R_H5Premove_filter, 2}, {"R_H5Pset", (DL_FUNC) &R_H5Pset, 4}, {"R_H5Pset_alignment", (DL_FUNC) &R_H5Pset_alignment, 3}, {"R_H5Pset_alloc_time", (DL_FUNC) &R_H5Pset_alloc_time, 2}, {"R_H5Pset_attr_creation_order", (DL_FUNC) &R_H5Pset_attr_creation_order, 2}, {"R_H5Pset_attr_phase_change", (DL_FUNC) &R_H5Pset_attr_phase_change, 3}, {"R_H5Pset_btree_ratios", (DL_FUNC) &R_H5Pset_btree_ratios, 4}, {"R_H5Pset_buffer", (DL_FUNC) &R_H5Pset_buffer, 6}, {"R_H5Pset_cache", (DL_FUNC) &R_H5Pset_cache, 5}, {"R_H5Pset_char_encoding", (DL_FUNC) &R_H5Pset_char_encoding, 2}, {"R_H5Pset_chunk", (DL_FUNC) &R_H5Pset_chunk, 3}, {"R_H5Pset_chunk_cache", (DL_FUNC) &R_H5Pset_chunk_cache, 4}, {"R_H5Pset_chunk_opts", (DL_FUNC) &R_H5Pset_chunk_opts, 2}, {"R_H5Pset_copy_object", (DL_FUNC) &R_H5Pset_copy_object, 2}, {"R_H5Pset_core_write_tracking", (DL_FUNC) &R_H5Pset_core_write_tracking, 3}, {"R_H5Pset_create_intermediate_group", (DL_FUNC) &R_H5Pset_create_intermediate_group, 2}, {"R_H5Pset_data_transform", (DL_FUNC) &R_H5Pset_data_transform, 2}, {"R_H5Pset_deflate", (DL_FUNC) &R_H5Pset_deflate, 2}, {"R_H5Pset_driver", (DL_FUNC) &R_H5Pset_driver, 3}, {"R_H5Pset_edc_check", (DL_FUNC) &R_H5Pset_edc_check, 2}, {"R_H5Pset_efile_prefix", (DL_FUNC) &R_H5Pset_efile_prefix, 2}, {"R_H5Pset_elink_acc_flags", (DL_FUNC) &R_H5Pset_elink_acc_flags, 2}, {"R_H5Pset_elink_fapl", (DL_FUNC) &R_H5Pset_elink_fapl, 2}, {"R_H5Pset_elink_file_cache_size", (DL_FUNC) &R_H5Pset_elink_file_cache_size, 2}, {"R_H5Pset_elink_prefix", (DL_FUNC) &R_H5Pset_elink_prefix, 2}, {"R_H5Pset_est_link_info", (DL_FUNC) &R_H5Pset_est_link_info, 3}, {"R_H5Pset_external", (DL_FUNC) &R_H5Pset_external, 4}, {"R_H5Pset_family_offset", (DL_FUNC) &R_H5Pset_family_offset, 2}, {"R_H5Pset_fclose_degree", (DL_FUNC) &R_H5Pset_fclose_degree, 2}, {"R_H5Pset_file_image", (DL_FUNC) &R_H5Pset_file_image, 4}, {"R_H5Pset_file_space", (DL_FUNC) &R_H5Pset_file_space, 3}, {"R_H5Pset_fill_time", (DL_FUNC) &R_H5Pset_fill_time, 2}, {"R_H5Pset_fill_value", (DL_FUNC) &R_H5Pset_fill_value, 3}, {"R_H5Pset_filter", (DL_FUNC) &R_H5Pset_filter, 5}, {"R_H5Pset_fletcher32", (DL_FUNC) &R_H5Pset_fletcher32, 1}, {"R_H5Pset_gc_references", (DL_FUNC) &R_H5Pset_gc_references, 2}, {"R_H5Pset_hyper_vector_size", (DL_FUNC) &R_H5Pset_hyper_vector_size, 2}, {"R_H5Pset_istore_k", (DL_FUNC) &R_H5Pset_istore_k, 2}, {"R_H5Pset_layout", (DL_FUNC) &R_H5Pset_layout, 2}, {"R_H5Pset_libver_bounds", (DL_FUNC) &R_H5Pset_libver_bounds, 3}, {"R_H5Pset_link_creation_order", (DL_FUNC) &R_H5Pset_link_creation_order, 2}, {"R_H5Pset_link_phase_change", (DL_FUNC) &R_H5Pset_link_phase_change, 3}, {"R_H5Pset_local_heap_size_hint", (DL_FUNC) &R_H5Pset_local_heap_size_hint, 2}, {"R_H5Pset_mdc_config", (DL_FUNC) &R_H5Pset_mdc_config, 2}, {"R_H5Pset_mdc_log_options", (DL_FUNC) &R_H5Pset_mdc_log_options, 4}, {"R_H5Pset_meta_block_size", (DL_FUNC) &R_H5Pset_meta_block_size, 2}, {"R_H5Pset_metadata_read_attempts", (DL_FUNC) &R_H5Pset_metadata_read_attempts, 2}, {"R_H5Pset_multi_type", (DL_FUNC) &R_H5Pset_multi_type, 2}, {"R_H5Pset_nbit", (DL_FUNC) &R_H5Pset_nbit, 1}, {"R_H5Pset_nlinks", (DL_FUNC) &R_H5Pset_nlinks, 2}, {"R_H5Pset_obj_track_times", (DL_FUNC) &R_H5Pset_obj_track_times, 2}, {"R_H5Pset_preserve", (DL_FUNC) &R_H5Pset_preserve, 2}, {"R_H5Pset_scaleoffset", (DL_FUNC) &R_H5Pset_scaleoffset, 3}, {"R_H5Pset_shared_mesg_index", (DL_FUNC) &R_H5Pset_shared_mesg_index, 4}, {"R_H5Pset_shared_mesg_nindexes", (DL_FUNC) &R_H5Pset_shared_mesg_nindexes, 2}, {"R_H5Pset_shared_mesg_phase_change", (DL_FUNC) &R_H5Pset_shared_mesg_phase_change, 3}, {"R_H5Pset_shuffle", (DL_FUNC) &R_H5Pset_shuffle, 1}, {"R_H5Pset_sieve_buf_size", (DL_FUNC) &R_H5Pset_sieve_buf_size, 2}, {"R_H5Pset_sizes", (DL_FUNC) &R_H5Pset_sizes, 3}, {"R_H5Pset_small_data_block_size", (DL_FUNC) &R_H5Pset_small_data_block_size, 2}, {"R_H5Pset_sym_k", (DL_FUNC) &R_H5Pset_sym_k, 3}, {"R_H5Pset_szip", (DL_FUNC) &R_H5Pset_szip, 3}, {"R_H5Pset_userblock", (DL_FUNC) &R_H5Pset_userblock, 2}, {"R_H5Pset_virtual", (DL_FUNC) &R_H5Pset_virtual, 5}, {"R_H5Pset_virtual_printf_gap", (DL_FUNC) &R_H5Pset_virtual_printf_gap, 2}, {"R_H5Pset_virtual_view", (DL_FUNC) &R_H5Pset_virtual_view, 2}, {"R_H5Punregister", (DL_FUNC) &R_H5Punregister, 2}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5R[] = { {"R_H5Rcreate", (DL_FUNC) &R_H5Rcreate, 6}, {"R_H5Rdereference1", (DL_FUNC) &R_H5Rdereference1, 3}, {"R_H5Rdereference2", (DL_FUNC) &R_H5Rdereference2, 4}, {"R_H5Rget_name", (DL_FUNC) &R_H5Rget_name, 5}, {"R_H5Rget_obj_type2", (DL_FUNC) &R_H5Rget_obj_type2, 4}, {"R_H5Rget_region", (DL_FUNC) &R_H5Rget_region, 3}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5S[] = { {"R_H5Sclose", (DL_FUNC) &R_H5Sclose, 1}, {"R_H5Scopy", (DL_FUNC) &R_H5Scopy, 1}, {"R_H5Screate", (DL_FUNC) &R_H5Screate, 1}, {"R_H5Screate_simple", (DL_FUNC) &R_H5Screate_simple, 3}, {"R_H5Sdecode", (DL_FUNC) &R_H5Sdecode, 1}, {"R_H5Sencode", (DL_FUNC) &R_H5Sencode, 4}, {"R_H5Sextent_copy", (DL_FUNC) &R_H5Sextent_copy, 2}, {"R_H5Sextent_equal", (DL_FUNC) &R_H5Sextent_equal, 2}, {"R_H5Sget_regular_hyperslab", (DL_FUNC) &R_H5Sget_regular_hyperslab, 5}, {"R_H5Sget_select_bounds", (DL_FUNC) &R_H5Sget_select_bounds, 3}, {"R_H5Sget_select_elem_npoints", (DL_FUNC) &R_H5Sget_select_elem_npoints, 1}, {"R_H5Sget_select_elem_pointlist", (DL_FUNC) &R_H5Sget_select_elem_pointlist, 4}, {"R_H5Sget_select_hyper_blocklist", (DL_FUNC) &R_H5Sget_select_hyper_blocklist, 4}, {"R_H5Sget_select_hyper_nblocks", (DL_FUNC) &R_H5Sget_select_hyper_nblocks, 1}, {"R_H5Sget_select_npoints", (DL_FUNC) &R_H5Sget_select_npoints, 1}, {"R_H5Sget_select_type", (DL_FUNC) &R_H5Sget_select_type, 1}, {"R_H5Sget_simple_extent_dims", (DL_FUNC) &R_H5Sget_simple_extent_dims, 3}, {"R_H5Sget_simple_extent_ndims", (DL_FUNC) &R_H5Sget_simple_extent_ndims, 1}, {"R_H5Sget_simple_extent_npoints", (DL_FUNC) &R_H5Sget_simple_extent_npoints, 1}, {"R_H5Sget_simple_extent_type", (DL_FUNC) &R_H5Sget_simple_extent_type, 1}, {"R_H5Sis_regular_hyperslab", (DL_FUNC) &R_H5Sis_regular_hyperslab, 1}, {"R_H5Sis_simple", (DL_FUNC) &R_H5Sis_simple, 1}, {"R_H5Soffset_simple", (DL_FUNC) &R_H5Soffset_simple, 2}, {"R_H5Sselect_all", (DL_FUNC) &R_H5Sselect_all, 1}, {"R_H5Sselect_elements", (DL_FUNC) &R_H5Sselect_elements, 4}, {"R_H5Sselect_hyperslab", (DL_FUNC) &R_H5Sselect_hyperslab, 6}, {"R_H5Sselect_none", (DL_FUNC) &R_H5Sselect_none, 1}, {"R_H5Sselect_valid", (DL_FUNC) &R_H5Sselect_valid, 1}, {"R_H5Sset_extent_none", (DL_FUNC) &R_H5Sset_extent_none, 1}, {"R_H5Sset_extent_simple", (DL_FUNC) &R_H5Sset_extent_simple, 4}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5T[] = { {"R_H5Tarray_create2", (DL_FUNC) &R_H5Tarray_create2, 3}, {"R_H5Tclose", (DL_FUNC) &R_H5Tclose, 1}, {"R_H5Tcommit_anon", (DL_FUNC) &R_H5Tcommit_anon, 4}, {"R_H5Tcommit2", (DL_FUNC) &R_H5Tcommit2, 6}, {"R_H5Tcommitted", (DL_FUNC) &R_H5Tcommitted, 1}, {"R_H5Tcompiler_conv", (DL_FUNC) &R_H5Tcompiler_conv, 2}, {"R_H5Tconvert", (DL_FUNC) &R_H5Tconvert, 8}, {"R_H5Tcopy", (DL_FUNC) &R_H5Tcopy, 1}, {"R_H5Tcreate", (DL_FUNC) &R_H5Tcreate, 2}, {"R_H5Tdecode", (DL_FUNC) &R_H5Tdecode, 1}, {"R_H5Tdetect_class", (DL_FUNC) &R_H5Tdetect_class, 2}, {"R_H5Tencode", (DL_FUNC) &R_H5Tencode, 4}, {"R_H5Tenum_create", (DL_FUNC) &R_H5Tenum_create, 1}, {"R_H5Tenum_insert", (DL_FUNC) &R_H5Tenum_insert, 3}, {"R_H5Tenum_nameof", (DL_FUNC) &R_H5Tenum_nameof, 4}, {"R_H5Tenum_valueof", (DL_FUNC) &R_H5Tenum_valueof, 4}, {"R_H5Tequal", (DL_FUNC) &R_H5Tequal, 2}, {"R_H5Tflush", (DL_FUNC) &R_H5Tflush, 1}, {"R_H5Tget_array_dims2", (DL_FUNC) &R_H5Tget_array_dims2, 2}, {"R_H5Tget_array_ndims", (DL_FUNC) &R_H5Tget_array_ndims, 1}, {"R_H5Tget_class", (DL_FUNC) &R_H5Tget_class, 1}, {"R_H5Tget_create_plist", (DL_FUNC) &R_H5Tget_create_plist, 1}, {"R_H5Tget_cset", (DL_FUNC) &R_H5Tget_cset, 1}, {"R_H5Tget_ebias", (DL_FUNC) &R_H5Tget_ebias, 1}, {"R_H5Tget_fields", (DL_FUNC) &R_H5Tget_fields, 6}, {"R_H5Tget_inpad", (DL_FUNC) &R_H5Tget_inpad, 1}, {"R_H5Tget_member_class", (DL_FUNC) &R_H5Tget_member_class, 2}, {"R_H5Tget_member_index", (DL_FUNC) &R_H5Tget_member_index, 2}, {"R_H5Tget_member_name", (DL_FUNC) &R_H5Tget_member_name, 2}, {"R_H5Tget_member_offset", (DL_FUNC) &R_H5Tget_member_offset, 2}, {"R_H5Tget_member_type", (DL_FUNC) &R_H5Tget_member_type, 2}, {"R_H5Tget_member_value", (DL_FUNC) &R_H5Tget_member_value, 4}, {"R_H5Tget_native_type", (DL_FUNC) &R_H5Tget_native_type, 2}, {"R_H5Tget_nmembers", (DL_FUNC) &R_H5Tget_nmembers, 1}, {"R_H5Tget_norm", (DL_FUNC) &R_H5Tget_norm, 1}, {"R_H5Tget_offset", (DL_FUNC) &R_H5Tget_offset, 1}, {"R_H5Tget_order", (DL_FUNC) &R_H5Tget_order, 1}, {"R_H5Tget_pad", (DL_FUNC) &R_H5Tget_pad, 3}, {"R_H5Tget_precision", (DL_FUNC) &R_H5Tget_precision, 1}, {"R_H5Tget_sign", (DL_FUNC) &R_H5Tget_sign, 1}, {"R_H5Tget_size", (DL_FUNC) &R_H5Tget_size, 1}, {"R_H5Tget_strpad", (DL_FUNC) &R_H5Tget_strpad, 1}, {"R_H5Tget_super", (DL_FUNC) &R_H5Tget_super, 1}, {"R_H5Tget_tag", (DL_FUNC) &R_H5Tget_tag, 1}, {"R_H5Tinsert", (DL_FUNC) &R_H5Tinsert, 4}, {"R_H5Tis_variable_str", (DL_FUNC) &R_H5Tis_variable_str, 1}, {"R_H5Tlock", (DL_FUNC) &R_H5Tlock, 1}, {"R_H5Topen2", (DL_FUNC) &R_H5Topen2, 3}, {"R_H5Tpack", (DL_FUNC) &R_H5Tpack, 1}, {"R_H5Trefresh", (DL_FUNC) &R_H5Trefresh, 1}, {"R_H5Tset_cset", (DL_FUNC) &R_H5Tset_cset, 2}, {"R_H5Tset_ebias", (DL_FUNC) &R_H5Tset_ebias, 2}, {"R_H5Tset_fields", (DL_FUNC) &R_H5Tset_fields, 6}, {"R_H5Tset_inpad", (DL_FUNC) &R_H5Tset_inpad, 2}, {"R_H5Tset_norm", (DL_FUNC) &R_H5Tset_norm, 2}, {"R_H5Tset_offset", (DL_FUNC) &R_H5Tset_offset, 2}, {"R_H5Tset_order", (DL_FUNC) &R_H5Tset_order, 2}, {"R_H5Tset_pad", (DL_FUNC) &R_H5Tset_pad, 3}, {"R_H5Tset_precision", (DL_FUNC) &R_H5Tset_precision, 2}, {"R_H5Tset_sign", (DL_FUNC) &R_H5Tset_sign, 2}, {"R_H5Tset_size", (DL_FUNC) &R_H5Tset_size, 2}, {"R_H5Tset_strpad", (DL_FUNC) &R_H5Tset_strpad, 2}, {"R_H5Tset_tag", (DL_FUNC) &R_H5Tset_tag, 2}, {"R_H5Tvlen_create", (DL_FUNC) &R_H5Tvlen_create, 1}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5TB[] = { {"R_H5TBadd_records_from", (DL_FUNC) &R_H5TBadd_records_from, 6}, {"R_H5TBAget_fill", (DL_FUNC) &R_H5TBAget_fill, 4}, {"R_H5TBAget_title", (DL_FUNC) &R_H5TBAget_title, 2}, {"R_H5TBappend_records", (DL_FUNC) &R_H5TBappend_records, 7}, {"R_H5TBcombine_tables", (DL_FUNC) &R_H5TBcombine_tables, 5}, {"R_H5TBdelete_field", (DL_FUNC) &R_H5TBdelete_field, 3}, {"R_H5TBdelete_record", (DL_FUNC) &R_H5TBdelete_record, 4}, {"R_H5TBget_field_info", (DL_FUNC) &R_H5TBget_field_info, 6}, {"R_H5TBget_table_info", (DL_FUNC) &R_H5TBget_table_info, 4}, {"R_H5TBinsert_field", (DL_FUNC) &R_H5TBinsert_field, 7}, {"R_H5TBinsert_record", (DL_FUNC) &R_H5TBinsert_record, 9}, {"R_H5TBmake_table", (DL_FUNC) &R_H5TBmake_table, 14}, {"R_H5TBread_fields_index", (DL_FUNC) &R_H5TBread_fields_index, 11}, {"R_H5TBread_fields_name", (DL_FUNC) &R_H5TBread_fields_name, 10}, {"R_H5TBread_records", (DL_FUNC) &R_H5TBread_records, 9}, {"R_H5TBread_table", (DL_FUNC) &R_H5TBread_table, 7}, {"R_H5TBwrite_fields_index", (DL_FUNC) &R_H5TBwrite_fields_index, 10}, {"R_H5TBwrite_fields_name", (DL_FUNC) &R_H5TBwrite_fields_name, 9}, {"R_H5TBwrite_records", (DL_FUNC) &R_H5TBwrite_records, 8}, {NULL, NULL, 0} }; R_CallMethodDef library_WRAPPER_AUTO_H5Z[] = { {"R_H5Zfilter_avail", (DL_FUNC) &R_H5Zfilter_avail, 1}, {"R_H5Zget_filter_info", (DL_FUNC) &R_H5Zget_filter_info, 2}, {"R_H5Zregister", (DL_FUNC) &R_H5Zregister, 1}, {"R_H5Zunregister", (DL_FUNC) &R_H5Zunregister, 1}, {NULL, NULL, 0} }; #endif
jeroen/hdf5r
inst/CWrappers_1.10.3/headers/H5version.h
<reponame>jeroen/hdf5r /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * * If you do not have access to either file, you may request a copy from * * <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* Generated automatically by bin/make_vers -- do not edit */ /* Add new versioned symbols to H5vers.txt file */ #ifndef _H5version_H #define _H5version_H /* Issue error if contradicting macros have been defined. */ #if (defined(H5_USE_16_API) || defined(H5_USE_18_API) || defined(H5_USE_110_API)) && defined(H5_NO_DEPRECATED_SYMBOLS) #error "Can't choose old API versions when deprecated APIs are disabled" #endif /* (defined(H5_USE_16_API) || defined(H5_USE_18_API) || defined(H5_USE_110_API)) && defined(H5_NO_DEPRECATED_SYMBOLS) */ /* If a particular "global" version of the library's interfaces is chosen, * set the versions for the API symbols affected. * * Note: If an application has already chosen a particular version for an * API symbol, the individual API version macro takes priority. */ #if defined(H5_USE_16_API_DEFAULT) && !defined(H5_USE_16_API) #define H5_USE_16_API 1 #endif /* H5_USE_16_API_DEFAULT && !H5_USE_16_API */ #if defined(H5_USE_18_API_DEFAULT) && !defined(H5_USE_18_API) #define H5_USE_18_API 1 #endif /* H5_USE_18_API_DEFAULT && !H5_USE_18_API */ #if defined(H5_USE_110_API_DEFAULT) && !defined(H5_USE_110_API) #define H5_USE_110_API 1 #endif /* H5_USE_110_API_DEFAULT && !H5_USE_110_API */ #ifdef H5_USE_16_API /*************/ /* Functions */ /*************/ #if !defined(H5Acreate_vers) #define H5Acreate_vers 1 #endif /* !defined(H5Acreate_vers) */ #if !defined(H5Aiterate_vers) #define H5Aiterate_vers 1 #endif /* !defined(H5Aiterate_vers) */ #if !defined(H5Dcreate_vers) #define H5Dcreate_vers 1 #endif /* !defined(H5Dcreate_vers) */ #if !defined(H5Dopen_vers) #define H5Dopen_vers 1 #endif /* !defined(H5Dopen_vers) */ #if !defined(H5Eclear_vers) #define H5Eclear_vers 1 #endif /* !defined(H5Eclear_vers) */ #if !defined(H5Eget_auto_vers) #define H5Eget_auto_vers 1 #endif /* !defined(H5Eget_auto_vers) */ #if !defined(H5Eprint_vers) #define H5Eprint_vers 1 #endif /* !defined(H5Eprint_vers) */ #if !defined(H5Epush_vers) #define H5Epush_vers 1 #endif /* !defined(H5Epush_vers) */ #if !defined(H5Eset_auto_vers) #define H5Eset_auto_vers 1 #endif /* !defined(H5Eset_auto_vers) */ #if !defined(H5Ewalk_vers) #define H5Ewalk_vers 1 #endif /* !defined(H5Ewalk_vers) */ #if !defined(H5Gcreate_vers) #define H5Gcreate_vers 1 #endif /* !defined(H5Gcreate_vers) */ #if !defined(H5Gopen_vers) #define H5Gopen_vers 1 #endif /* !defined(H5Gopen_vers) */ #if !defined(H5Pget_filter_vers) #define H5Pget_filter_vers 1 #endif /* !defined(H5Pget_filter_vers) */ #if !defined(H5Pget_filter_by_id_vers) #define H5Pget_filter_by_id_vers 1 #endif /* !defined(H5Pget_filter_by_id_vers) */ #if !defined(H5Pinsert_vers) #define H5Pinsert_vers 1 #endif /* !defined(H5Pinsert_vers) */ #if !defined(H5Pregister_vers) #define H5Pregister_vers 1 #endif /* !defined(H5Pregister_vers) */ #if !defined(H5Rdereference_vers) #define H5Rdereference_vers 1 #endif /* !defined(H5Rdereference_vers) */ #if !defined(H5Rget_obj_type_vers) #define H5Rget_obj_type_vers 1 #endif /* !defined(H5Rget_obj_type_vers) */ #if !defined(H5Tarray_create_vers) #define H5Tarray_create_vers 1 #endif /* !defined(H5Tarray_create_vers) */ #if !defined(H5Tcommit_vers) #define H5Tcommit_vers 1 #endif /* !defined(H5Tcommit_vers) */ #if !defined(H5Tget_array_dims_vers) #define H5Tget_array_dims_vers 1 #endif /* !defined(H5Tget_array_dims_vers) */ #if !defined(H5Topen_vers) #define H5Topen_vers 1 #endif /* !defined(H5Topen_vers) */ /************/ /* Typedefs */ /************/ #if !defined(H5E_auto_t_vers) #define H5E_auto_t_vers 1 #endif /* !defined(H5E_auto_t_vers) */ #if !defined(H5Z_class_t_vers) #define H5Z_class_t_vers 1 #endif /* !defined(H5Z_class_t_vers) */ #endif /* H5_USE_16_API */ #ifdef H5_USE_18_API /*************/ /* Functions */ /*************/ #if !defined(H5Acreate_vers) #define H5Acreate_vers 2 #endif /* !defined(H5Acreate_vers) */ #if !defined(H5Aiterate_vers) #define H5Aiterate_vers 2 #endif /* !defined(H5Aiterate_vers) */ #if !defined(H5Dcreate_vers) #define H5Dcreate_vers 2 #endif /* !defined(H5Dcreate_vers) */ #if !defined(H5Dopen_vers) #define H5Dopen_vers 2 #endif /* !defined(H5Dopen_vers) */ #if !defined(H5Eclear_vers) #define H5Eclear_vers 2 #endif /* !defined(H5Eclear_vers) */ #if !defined(H5Eget_auto_vers) #define H5Eget_auto_vers 2 #endif /* !defined(H5Eget_auto_vers) */ #if !defined(H5Eprint_vers) #define H5Eprint_vers 2 #endif /* !defined(H5Eprint_vers) */ #if !defined(H5Epush_vers) #define H5Epush_vers 2 #endif /* !defined(H5Epush_vers) */ #if !defined(H5Eset_auto_vers) #define H5Eset_auto_vers 2 #endif /* !defined(H5Eset_auto_vers) */ #if !defined(H5Ewalk_vers) #define H5Ewalk_vers 2 #endif /* !defined(H5Ewalk_vers) */ #if !defined(H5Fget_info_vers) #define H5Fget_info_vers 1 #endif /* !defined(H5Fget_info_vers) */ #if !defined(H5Gcreate_vers) #define H5Gcreate_vers 2 #endif /* !defined(H5Gcreate_vers) */ #if !defined(H5Gopen_vers) #define H5Gopen_vers 2 #endif /* !defined(H5Gopen_vers) */ #if !defined(H5Oget_info_vers) #define H5Oget_info_vers 1 #endif /* !defined(H5Oget_info_vers) */ #if !defined(H5Oget_info_by_idx_vers) #define H5Oget_info_by_idx_vers 1 #endif /* !defined(H5Oget_info_by_idx_vers) */ #if !defined(H5Oget_info_by_name_vers) #define H5Oget_info_by_name_vers 1 #endif /* !defined(H5Oget_info_by_name_vers) */ #if !defined(H5Ovisit_vers) #define H5Ovisit_vers 1 #endif /* !defined(H5Ovisit_vers) */ #if !defined(H5Ovisit_by_name_vers) #define H5Ovisit_by_name_vers 1 #endif /* !defined(H5Ovisit_by_name_vers) */ #if !defined(H5Pget_filter_vers) #define H5Pget_filter_vers 2 #endif /* !defined(H5Pget_filter_vers) */ #if !defined(H5Pget_filter_by_id_vers) #define H5Pget_filter_by_id_vers 2 #endif /* !defined(H5Pget_filter_by_id_vers) */ #if !defined(H5Pinsert_vers) #define H5Pinsert_vers 2 #endif /* !defined(H5Pinsert_vers) */ #if !defined(H5Pregister_vers) #define H5Pregister_vers 2 #endif /* !defined(H5Pregister_vers) */ #if !defined(H5Rdereference_vers) #define H5Rdereference_vers 1 #endif /* !defined(H5Rdereference_vers) */ #if !defined(H5Rget_obj_type_vers) #define H5Rget_obj_type_vers 2 #endif /* !defined(H5Rget_obj_type_vers) */ #if !defined(H5Tarray_create_vers) #define H5Tarray_create_vers 2 #endif /* !defined(H5Tarray_create_vers) */ #if !defined(H5Tcommit_vers) #define H5Tcommit_vers 2 #endif /* !defined(H5Tcommit_vers) */ #if !defined(H5Tget_array_dims_vers) #define H5Tget_array_dims_vers 2 #endif /* !defined(H5Tget_array_dims_vers) */ #if !defined(H5Topen_vers) #define H5Topen_vers 2 #endif /* !defined(H5Topen_vers) */ /************/ /* Typedefs */ /************/ #if !defined(H5E_auto_t_vers) #define H5E_auto_t_vers 2 #endif /* !defined(H5E_auto_t_vers) */ #if !defined(H5Z_class_t_vers) #define H5Z_class_t_vers 2 #endif /* !defined(H5Z_class_t_vers) */ #endif /* H5_USE_18_API */ #ifdef H5_USE_110_API /*************/ /* Functions */ /*************/ #if !defined(H5Acreate_vers) #define H5Acreate_vers 2 #endif /* !defined(H5Acreate_vers) */ #if !defined(H5Aiterate_vers) #define H5Aiterate_vers 2 #endif /* !defined(H5Aiterate_vers) */ #if !defined(H5Dcreate_vers) #define H5Dcreate_vers 2 #endif /* !defined(H5Dcreate_vers) */ #if !defined(H5Dopen_vers) #define H5Dopen_vers 2 #endif /* !defined(H5Dopen_vers) */ #if !defined(H5Eclear_vers) #define H5Eclear_vers 2 #endif /* !defined(H5Eclear_vers) */ #if !defined(H5Eget_auto_vers) #define H5Eget_auto_vers 2 #endif /* !defined(H5Eget_auto_vers) */ #if !defined(H5Eprint_vers) #define H5Eprint_vers 2 #endif /* !defined(H5Eprint_vers) */ #if !defined(H5Epush_vers) #define H5Epush_vers 2 #endif /* !defined(H5Epush_vers) */ #if !defined(H5Eset_auto_vers) #define H5Eset_auto_vers 2 #endif /* !defined(H5Eset_auto_vers) */ #if !defined(H5Ewalk_vers) #define H5Ewalk_vers 2 #endif /* !defined(H5Ewalk_vers) */ #if !defined(H5Fget_info_vers) #define H5Fget_info_vers 2 #endif /* !defined(H5Fget_info_vers) */ #if !defined(H5Gcreate_vers) #define H5Gcreate_vers 2 #endif /* !defined(H5Gcreate_vers) */ #if !defined(H5Gopen_vers) #define H5Gopen_vers 2 #endif /* !defined(H5Gopen_vers) */ #if !defined(H5Oget_info_vers) #define H5Oget_info_vers 1 #endif /* !defined(H5Oget_info_vers) */ #if !defined(H5Oget_info_by_idx_vers) #define H5Oget_info_by_idx_vers 1 #endif /* !defined(H5Oget_info_by_idx_vers) */ #if !defined(H5Oget_info_by_name_vers) #define H5Oget_info_by_name_vers 1 #endif /* !defined(H5Oget_info_by_name_vers) */ #if !defined(H5Ovisit_vers) #define H5Ovisit_vers 1 #endif /* !defined(H5Ovisit_vers) */ #if !defined(H5Ovisit_by_name_vers) #define H5Ovisit_by_name_vers 1 #endif /* !defined(H5Ovisit_by_name_vers) */ #if !defined(H5Pget_filter_vers) #define H5Pget_filter_vers 2 #endif /* !defined(H5Pget_filter_vers) */ #if !defined(H5Pget_filter_by_id_vers) #define H5Pget_filter_by_id_vers 2 #endif /* !defined(H5Pget_filter_by_id_vers) */ #if !defined(H5Pinsert_vers) #define H5Pinsert_vers 2 #endif /* !defined(H5Pinsert_vers) */ #if !defined(H5Pregister_vers) #define H5Pregister_vers 2 #endif /* !defined(H5Pregister_vers) */ #if !defined(H5Rdereference_vers) #define H5Rdereference_vers 2 #endif /* !defined(H5Rdereference_vers) */ #if !defined(H5Rget_obj_type_vers) #define H5Rget_obj_type_vers 2 #endif /* !defined(H5Rget_obj_type_vers) */ #if !defined(H5Tarray_create_vers) #define H5Tarray_create_vers 2 #endif /* !defined(H5Tarray_create_vers) */ #if !defined(H5Tcommit_vers) #define H5Tcommit_vers 2 #endif /* !defined(H5Tcommit_vers) */ #if !defined(H5Tget_array_dims_vers) #define H5Tget_array_dims_vers 2 #endif /* !defined(H5Tget_array_dims_vers) */ #if !defined(H5Topen_vers) #define H5Topen_vers 2 #endif /* !defined(H5Topen_vers) */ /************/ /* Typedefs */ /************/ #if !defined(H5E_auto_t_vers) #define H5E_auto_t_vers 2 #endif /* !defined(H5E_auto_t_vers) */ #if !defined(H5Z_class_t_vers) #define H5Z_class_t_vers 2 #endif /* !defined(H5Z_class_t_vers) */ #endif /* H5_USE_110_API */ /* Choose the correct version of each API symbol, defaulting to the latest * version of each. The "best" name for API parameters/data structures * that have changed definitions is also set. An error is issued for * specifying an invalid API version. */ /*************/ /* Functions */ /*************/ #if !defined(H5Acreate_vers) || H5Acreate_vers == 2 #ifndef H5Acreate_vers #define H5Acreate_vers 2 #endif /* H5Acreate_vers */ #define H5Acreate H5Acreate2 #elif H5Acreate_vers == 1 #define H5Acreate H5Acreate1 #else /* H5Acreate_vers */ #error "H5Acreate_vers set to invalid value" #endif /* H5Acreate_vers */ #if !defined(H5Aiterate_vers) || H5Aiterate_vers == 2 #ifndef H5Aiterate_vers #define H5Aiterate_vers 2 #endif /* H5Aiterate_vers */ #define H5Aiterate H5Aiterate2 #define H5A_operator_t H5A_operator2_t #elif H5Aiterate_vers == 1 #define H5Aiterate H5Aiterate1 #define H5A_operator_t H5A_operator1_t #else /* H5Aiterate_vers */ #error "H5Aiterate_vers set to invalid value" #endif /* H5Aiterate_vers */ #if !defined(H5Dcreate_vers) || H5Dcreate_vers == 2 #ifndef H5Dcreate_vers #define H5Dcreate_vers 2 #endif /* H5Dcreate_vers */ #define H5Dcreate H5Dcreate2 #elif H5Dcreate_vers == 1 #define H5Dcreate H5Dcreate1 #else /* H5Dcreate_vers */ #error "H5Dcreate_vers set to invalid value" #endif /* H5Dcreate_vers */ #if !defined(H5Dopen_vers) || H5Dopen_vers == 2 #ifndef H5Dopen_vers #define H5Dopen_vers 2 #endif /* H5Dopen_vers */ #define H5Dopen H5Dopen2 #elif H5Dopen_vers == 1 #define H5Dopen H5Dopen1 #else /* H5Dopen_vers */ #error "H5Dopen_vers set to invalid value" #endif /* H5Dopen_vers */ #if !defined(H5Eclear_vers) || H5Eclear_vers == 2 #ifndef H5Eclear_vers #define H5Eclear_vers 2 #endif /* H5Eclear_vers */ #define H5Eclear H5Eclear2 #elif H5Eclear_vers == 1 #define H5Eclear H5Eclear1 #else /* H5Eclear_vers */ #error "H5Eclear_vers set to invalid value" #endif /* H5Eclear_vers */ #if !defined(H5Eget_auto_vers) || H5Eget_auto_vers == 2 #ifndef H5Eget_auto_vers #define H5Eget_auto_vers 2 #endif /* H5Eget_auto_vers */ #define H5Eget_auto H5Eget_auto2 #elif H5Eget_auto_vers == 1 #define H5Eget_auto H5Eget_auto1 #else /* H5Eget_auto_vers */ #error "H5Eget_auto_vers set to invalid value" #endif /* H5Eget_auto_vers */ #if !defined(H5Eprint_vers) || H5Eprint_vers == 2 #ifndef H5Eprint_vers #define H5Eprint_vers 2 #endif /* H5Eprint_vers */ #define H5Eprint H5Eprint2 #elif H5Eprint_vers == 1 #define H5Eprint H5Eprint1 #else /* H5Eprint_vers */ #error "H5Eprint_vers set to invalid value" #endif /* H5Eprint_vers */ #if !defined(H5Epush_vers) || H5Epush_vers == 2 #ifndef H5Epush_vers #define H5Epush_vers 2 #endif /* H5Epush_vers */ #define H5Epush H5Epush2 #elif H5Epush_vers == 1 #define H5Epush H5Epush1 #else /* H5Epush_vers */ #error "H5Epush_vers set to invalid value" #endif /* H5Epush_vers */ #if !defined(H5Eset_auto_vers) || H5Eset_auto_vers == 2 #ifndef H5Eset_auto_vers #define H5Eset_auto_vers 2 #endif /* H5Eset_auto_vers */ #define H5Eset_auto H5Eset_auto2 #elif H5Eset_auto_vers == 1 #define H5Eset_auto H5Eset_auto1 #else /* H5Eset_auto_vers */ #error "H5Eset_auto_vers set to invalid value" #endif /* H5Eset_auto_vers */ #if !defined(H5Ewalk_vers) || H5Ewalk_vers == 2 #ifndef H5Ewalk_vers #define H5Ewalk_vers 2 #endif /* H5Ewalk_vers */ #define H5Ewalk H5Ewalk2 #define H5E_error_t H5E_error2_t #define H5E_walk_t H5E_walk2_t #elif H5Ewalk_vers == 1 #define H5Ewalk H5Ewalk1 #define H5E_error_t H5E_error1_t #define H5E_walk_t H5E_walk1_t #else /* H5Ewalk_vers */ #error "H5Ewalk_vers set to invalid value" #endif /* H5Ewalk_vers */ #if !defined(H5Fget_info_vers) || H5Fget_info_vers == 2 #ifndef H5Fget_info_vers #define H5Fget_info_vers 2 #endif /* H5Fget_info_vers */ #define H5Fget_info H5Fget_info2 #define H5F_info_t H5F_info2_t #elif H5Fget_info_vers == 1 #define H5Fget_info H5Fget_info1 #define H5F_info_t H5F_info1_t #else /* H5Fget_info_vers */ #error "H5Fget_info_vers set to invalid value" #endif /* H5Fget_info_vers */ #if !defined(H5Gcreate_vers) || H5Gcreate_vers == 2 #ifndef H5Gcreate_vers #define H5Gcreate_vers 2 #endif /* H5Gcreate_vers */ #define H5Gcreate H5Gcreate2 #elif H5Gcreate_vers == 1 #define H5Gcreate H5Gcreate1 #else /* H5Gcreate_vers */ #error "H5Gcreate_vers set to invalid value" #endif /* H5Gcreate_vers */ #if !defined(H5Gopen_vers) || H5Gopen_vers == 2 #ifndef H5Gopen_vers #define H5Gopen_vers 2 #endif /* H5Gopen_vers */ #define H5Gopen H5Gopen2 #elif H5Gopen_vers == 1 #define H5Gopen H5Gopen1 #else /* H5Gopen_vers */ #error "H5Gopen_vers set to invalid value" #endif /* H5Gopen_vers */ #if !defined(H5Oget_info_vers) || H5Oget_info_vers == 2 #ifndef H5Oget_info_vers #define H5Oget_info_vers 2 #endif /* H5Oget_info_vers */ #define H5Oget_info H5Oget_info2 #elif H5Oget_info_vers == 1 #define H5Oget_info H5Oget_info1 #else /* H5Oget_info_vers */ #error "H5Oget_info_vers set to invalid value" #endif /* H5Oget_info_vers */ #if !defined(H5Oget_info_by_idx_vers) || H5Oget_info_by_idx_vers == 2 #ifndef H5Oget_info_by_idx_vers #define H5Oget_info_by_idx_vers 2 #endif /* H5Oget_info_by_idx_vers */ #define H5Oget_info_by_idx H5Oget_info_by_idx2 #elif H5Oget_info_by_idx_vers == 1 #define H5Oget_info_by_idx H5Oget_info_by_idx1 #else /* H5Oget_info_by_idx_vers */ #error "H5Oget_info_by_idx_vers set to invalid value" #endif /* H5Oget_info_by_idx_vers */ #if !defined(H5Oget_info_by_name_vers) || H5Oget_info_by_name_vers == 2 #ifndef H5Oget_info_by_name_vers #define H5Oget_info_by_name_vers 2 #endif /* H5Oget_info_by_name_vers */ #define H5Oget_info_by_name H5Oget_info_by_name2 #elif H5Oget_info_by_name_vers == 1 #define H5Oget_info_by_name H5Oget_info_by_name1 #else /* H5Oget_info_by_name_vers */ #error "H5Oget_info_by_name_vers set to invalid value" #endif /* H5Oget_info_by_name_vers */ #if !defined(H5Ovisit_vers) || H5Ovisit_vers == 2 #ifndef H5Ovisit_vers #define H5Ovisit_vers 2 #endif /* H5Ovisit_vers */ #define H5Ovisit H5Ovisit2 #elif H5Ovisit_vers == 1 #define H5Ovisit H5Ovisit1 #else /* H5Ovisit_vers */ #error "H5Ovisit_vers set to invalid value" #endif /* H5Ovisit_vers */ #if !defined(H5Ovisit_by_name_vers) || H5Ovisit_by_name_vers == 2 #ifndef H5Ovisit_by_name_vers #define H5Ovisit_by_name_vers 2 #endif /* H5Ovisit_by_name_vers */ #define H5Ovisit_by_name H5Ovisit_by_name2 #elif H5Ovisit_by_name_vers == 1 #define H5Ovisit_by_name H5Ovisit_by_name1 #else /* H5Ovisit_by_name_vers */ #error "H5Ovisit_by_name_vers set to invalid value" #endif /* H5Ovisit_by_name_vers */ #if !defined(H5Pget_filter_vers) || H5Pget_filter_vers == 2 #ifndef H5Pget_filter_vers #define H5Pget_filter_vers 2 #endif /* H5Pget_filter_vers */ #define H5Pget_filter H5Pget_filter2 #elif H5Pget_filter_vers == 1 #define H5Pget_filter H5Pget_filter1 #else /* H5Pget_filter_vers */ #error "H5Pget_filter_vers set to invalid value" #endif /* H5Pget_filter_vers */ #if !defined(H5Pget_filter_by_id_vers) || H5Pget_filter_by_id_vers == 2 #ifndef H5Pget_filter_by_id_vers #define H5Pget_filter_by_id_vers 2 #endif /* H5Pget_filter_by_id_vers */ #define H5Pget_filter_by_id H5Pget_filter_by_id2 #elif H5Pget_filter_by_id_vers == 1 #define H5Pget_filter_by_id H5Pget_filter_by_id1 #else /* H5Pget_filter_by_id_vers */ #error "H5Pget_filter_by_id_vers set to invalid value" #endif /* H5Pget_filter_by_id_vers */ #if !defined(H5Pinsert_vers) || H5Pinsert_vers == 2 #ifndef H5Pinsert_vers #define H5Pinsert_vers 2 #endif /* H5Pinsert_vers */ #define H5Pinsert H5Pinsert2 #elif H5Pinsert_vers == 1 #define H5Pinsert H5Pinsert1 #else /* H5Pinsert_vers */ #error "H5Pinsert_vers set to invalid value" #endif /* H5Pinsert_vers */ #if !defined(H5Pregister_vers) || H5Pregister_vers == 2 #ifndef H5Pregister_vers #define H5Pregister_vers 2 #endif /* H5Pregister_vers */ #define H5Pregister H5Pregister2 #elif H5Pregister_vers == 1 #define H5Pregister H5Pregister1 #else /* H5Pregister_vers */ #error "H5Pregister_vers set to invalid value" #endif /* H5Pregister_vers */ #if !defined(H5Rdereference_vers) || H5Rdereference_vers == 2 #ifndef H5Rdereference_vers #define H5Rdereference_vers 2 #endif /* H5Rdereference_vers */ #define H5Rdereference H5Rdereference2 #elif H5Rdereference_vers == 1 #define H5Rdereference H5Rdereference1 #else /* H5Rdereference_vers */ #error "H5Rdereference_vers set to invalid value" #endif /* H5Rdereference_vers */ #if !defined(H5Rget_obj_type_vers) || H5Rget_obj_type_vers == 2 #ifndef H5Rget_obj_type_vers #define H5Rget_obj_type_vers 2 #endif /* H5Rget_obj_type_vers */ #define H5Rget_obj_type H5Rget_obj_type2 #elif H5Rget_obj_type_vers == 1 #define H5Rget_obj_type H5Rget_obj_type1 #else /* H5Rget_obj_type_vers */ #error "H5Rget_obj_type_vers set to invalid value" #endif /* H5Rget_obj_type_vers */ #if !defined(H5Tarray_create_vers) || H5Tarray_create_vers == 2 #ifndef H5Tarray_create_vers #define H5Tarray_create_vers 2 #endif /* H5Tarray_create_vers */ #define H5Tarray_create H5Tarray_create2 #elif H5Tarray_create_vers == 1 #define H5Tarray_create H5Tarray_create1 #else /* H5Tarray_create_vers */ #error "H5Tarray_create_vers set to invalid value" #endif /* H5Tarray_create_vers */ #if !defined(H5Tcommit_vers) || H5Tcommit_vers == 2 #ifndef H5Tcommit_vers #define H5Tcommit_vers 2 #endif /* H5Tcommit_vers */ #define H5Tcommit H5Tcommit2 #elif H5Tcommit_vers == 1 #define H5Tcommit H5Tcommit1 #else /* H5Tcommit_vers */ #error "H5Tcommit_vers set to invalid value" #endif /* H5Tcommit_vers */ #if !defined(H5Tget_array_dims_vers) || H5Tget_array_dims_vers == 2 #ifndef H5Tget_array_dims_vers #define H5Tget_array_dims_vers 2 #endif /* H5Tget_array_dims_vers */ #define H5Tget_array_dims H5Tget_array_dims2 #elif H5Tget_array_dims_vers == 1 #define H5Tget_array_dims H5Tget_array_dims1 #else /* H5Tget_array_dims_vers */ #error "H5Tget_array_dims_vers set to invalid value" #endif /* H5Tget_array_dims_vers */ #if !defined(H5Topen_vers) || H5Topen_vers == 2 #ifndef H5Topen_vers #define H5Topen_vers 2 #endif /* H5Topen_vers */ #define H5Topen H5Topen2 #elif H5Topen_vers == 1 #define H5Topen H5Topen1 #else /* H5Topen_vers */ #error "H5Topen_vers set to invalid value" #endif /* H5Topen_vers */ /************/ /* Typedefs */ /************/ #if !defined(H5E_auto_t_vers) || H5E_auto_t_vers == 2 #ifndef H5E_auto_t_vers #define H5E_auto_t_vers 2 #endif /* H5E_auto_t_vers */ #define H5E_auto_t H5E_auto2_t #elif H5E_auto_t_vers == 1 #define H5E_auto_t H5E_auto1_t #else /* H5E_auto_t_vers */ #error "H5E_auto_t_vers set to invalid value" #endif /* H5E_auto_t_vers */ #if !defined(H5Z_class_t_vers) || H5Z_class_t_vers == 2 #ifndef H5Z_class_t_vers #define H5Z_class_t_vers 2 #endif /* H5Z_class_t_vers */ #define H5Z_class_t H5Z_class2_t #elif H5Z_class_t_vers == 1 #define H5Z_class_t H5Z_class1_t #else /* H5Z_class_t_vers */ #error "H5Z_class_t_vers set to invalid value" #endif /* H5Z_class_t_vers */ #endif /* H5version_H */
jeroen/hdf5r
src/export_manual.h
<filename>src/export_manual.h /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #ifndef _EXPORT_MANUAL_H_ #define _EXPORT_MANUAL_H_ R_CallMethodDef library_WRAPPER_MANUAL_H5T[] = { {"h5create_compound_type", (DL_FUNC) &h5create_compound_type, 4}, {"h5create_enum_type", (DL_FUNC) &h5create_enum_type, 3}, {"h5get_enum_labels", (DL_FUNC) &h5get_enum_labels, 1}, {"h5get_enum_values", (DL_FUNC) &h5get_enum_values, 1}, {"h5get_compound_types", (DL_FUNC) &h5get_compound_types, 1}, {"h5get_compound_names", (DL_FUNC) &h5get_compound_names, 1}, {"h5get_compound_classes", (DL_FUNC) &h5get_compound_classes, 1}, {"h5get_compound_offsets", (DL_FUNC) &h5get_compound_offsets, 1}, {"R_H5Tdetect_vlen", (DL_FUNC) &R_H5Tdetect_vlen, 1}, {NULL, NULL, 0} }; #endif
jeroen/hdf5r
src/1_8_16/const_export.h
<reponame>jeroen/hdf5r<filename>src/1_8_16/const_export.h /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #ifndef _CONST_EXPORT_H #define _CONST_EXPORT_H #include "global.h" #include <stdbool.h> #include <ctype.h> #include <string.h> // set some constants of my own #define H5TOR_CONV_NONE 0 #define H5TOR_CONV_INT64_INT_NOLOSS 1 #define H5TOR_CONV_INT64_FLOAT_NOLOSS 2 #define H5TOR_CONV_INT64_FLOAT_FORCE 4 #define H5TOR_CONV_UINT64_NA 8 #define H5TOR_CONV_INT64_NOLOSS 3 // create a dataframe with all type information SEXP show_all_const_data_frame(void); typedef enum { CONST_H5F_ACC_TRUNC, CONST_H5F_ACC_EXCL, CONST_H5F_ACC_DEBUG, CONST_H5F_ACC_RDONLY, CONST_H5F_ACC_RDWR, CONST_H5F_ACC_DEFAULT, CONST_H5P_DEFAULT, CONST_H5S_ALL, CONST_H5TOR_CONV_NONE, CONST_H5TOR_CONV_INT64_INT_NOLOSS, CONST_H5TOR_CONV_INT64_FLOAT_NOLOSS, CONST_H5TOR_CONV_INT64_FLOAT_FORCE, CONST_H5TOR_CONV_UINT64_NA, CONST_H5TOR_CONV_INT64_NOLOSS, CONST_H5F_OBJ_FILE, CONST_H5F_OBJ_DATASET, CONST_H5F_OBJ_GROUP, CONST_H5F_OBJ_DATATYPE, CONST_H5F_OBJ_ATTR, CONST_H5F_OBJ_ALL, CONST_H5F_OBJ_LOCAL, CONST_H5P_ATTRIBUTE_CREATE, CONST_H5P_DATASET_ACCESS, CONST_H5P_DATASET_CREATE, CONST_H5P_DATASET_XFER, CONST_H5P_DATATYPE_ACCESS, CONST_H5P_DATATYPE_CREATE, CONST_H5P_FILE_ACCESS, CONST_H5P_FILE_CREATE, CONST_H5P_FILE_MOUNT, CONST_H5P_GROUP_ACCESS, CONST_H5P_GROUP_CREATE, CONST_H5P_LINK_ACCESS, CONST_H5P_LINK_CREATE, CONST_H5P_OBJECT_COPY, CONST_H5P_OBJECT_CREATE, CONST_H5P_STRING_CREATE, CONST_H5Z_FILTER_ALL, CONST_H5Z_FILTER_DEFLATE, CONST_H5Z_FILTER_SHUFFLE, CONST_H5Z_FILTER_FLETCHER32, CONST_H5Z_FILTER_SZIP, CONST_H5Z_FILTER_NBIT, CONST_H5Z_FILTER_SCALEOFFSET, CONST_H5Z_FLAG_OPTIONAL, CONST_H5Z_FLAG_MANDATORY, CONST_H5P_CRT_ORDER_TRACKED, CONST_H5P_CRT_ORDER_INDEXED, CONST_H5O_COPY_SHALLOW_HIERARCHY_FLAG, CONST_H5O_COPY_EXPAND_SOFT_LINK_FLAG, CONST_H5O_COPY_EXPAND_EXT_LINK_FLAG, CONST_H5O_COPY_EXPAND_REFERENCE_FLAG, CONST_H5O_COPY_WITHOUT_ATTR_FLAG, CONST_H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG, CONST_H5D_CHUNK_CACHE_W0_DEFAULT, CONST_LAST_ITEM } CONST_enum; #endif
jeroen/hdf5r
src/1_10_0/Wrapper_auto_H5F.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5F.h" /* H5_DLL herr_t H5Fclear_elink_file_cache(hid_t file_id); */ SEXP R_H5Fclear_elink_file_cache(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); herr_t return_val = H5Fclear_elink_file_cache(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fclose(hid_t file_id); */ SEXP R_H5Fclose(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); herr_t return_val = H5Fclose(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist); */ SEXP R_H5Fcreate(SEXP R_filename, SEXP R_flags, SEXP R_create_plist, SEXP R_access_plist){ int vars_protected=0; const char* filename = CHAR(STRING_ELT(R_filename, 0)); unsigned flags = SEXP_to_longlong(R_flags, 0); hid_t create_plist = SEXP_to_longlong(R_create_plist, 0); hid_t access_plist = SEXP_to_longlong(R_access_plist, 0); hid_t return_val = H5Fcreate(filename, flags, create_plist, access_plist); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope); */ SEXP R_H5Fflush(SEXP R_object_id, SEXP R_scope){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); H5F_scope_t scope = SEXP_to_longlong(R_scope, 0); herr_t return_val = H5Fflush(object_id, scope); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fformat_convert(hid_t fid); */ SEXP R_H5Fformat_convert(SEXP R_fid){ int vars_protected=0; hid_t fid = SEXP_to_longlong(R_fid, 0); herr_t return_val = H5Fformat_convert(fid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Fget_access_plist(hid_t file_id); */ SEXP R_H5Fget_access_plist(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); hid_t return_val = H5Fget_access_plist(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Fget_create_plist(hid_t file_id); */ SEXP R_H5Fget_create_plist(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); hid_t return_val = H5Fget_create_plist(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len); */ SEXP R_H5Fget_file_image(SEXP R_file_id, SEXP R_buf_ptr, SEXP R_buf_len, SEXP _dupl_buf_ptr){ int vars_protected=0; if(SEXP_to_logical(_dupl_buf_ptr)) { R_buf_ptr = PROTECT(duplicate(R_buf_ptr)); vars_protected++; } hid_t file_id = SEXP_to_longlong(R_file_id, 0); void* buf_ptr; if(XLENGTH(R_buf_ptr) == 0) { buf_ptr = NULL; } else { buf_ptr = (void *) VOIDPTR(R_buf_ptr); } size_t buf_len = SEXP_to_longlong(R_buf_len, 0); ssize_t return_val = H5Fget_file_image(file_id, buf_ptr, buf_len); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size); */ SEXP R_H5Fget_filesize(SEXP R_file_id, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_size = PROTECT(duplicate(R_size)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); hsize_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_hsize_t], XLENGTH(R_size))); size= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Fget_filesize(file_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_size, h5_datatype[DT_hsize_t]); R_size = PROTECT(H5ToR_single_step(size, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t *sect_info); */ SEXP R_H5Fget_free_sections(SEXP R_file_id, SEXP R_type, SEXP R_nsects, SEXP R_sect_info){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_sect_info = PROTECT(duplicate(R_sect_info)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); H5F_mem_t type = SEXP_to_longlong(R_type, 0); size_t nsects = SEXP_to_longlong(R_nsects, 0); R_helper = PROTECT(RToH5(R_sect_info, h5_datatype[DT_H5F_sect_info_t], guess_nelem(R_sect_info, h5_datatype[DT_H5F_sect_info_t]))); H5F_sect_info_t* sect_info= (H5F_sect_info_t*) VOIDPTR(R_helper); vars_protected++; ssize_t return_val = H5Fget_free_sections(file_id, type, nsects, sect_info); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_sect_info, h5_datatype[DT_H5F_sect_info_t]); R_sect_info = PROTECT(H5ToR_single_step(sect_info, h5_datatype[DT_H5F_sect_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_sect_info); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("sect_info")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hssize_t H5Fget_freespace(hid_t file_id); */ SEXP R_H5Fget_freespace(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); hssize_t return_val = H5Fget_freespace(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo); */ SEXP R_H5Fget_info1(SEXP R_obj_id, SEXP R_finfo){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_finfo = PROTECT(duplicate(R_finfo)); vars_protected++; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); R_helper = PROTECT(RToH5(R_finfo, h5_datatype[DT_H5F_info1_t], guess_nelem(R_finfo, h5_datatype[DT_H5F_info1_t]))); H5F_info1_t* finfo= (H5F_info1_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Fget_info1(obj_id, finfo); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_finfo, h5_datatype[DT_H5F_info1_t]); R_finfo = PROTECT(H5ToR_single_step(finfo, h5_datatype[DT_H5F_info1_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_finfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("finfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo); */ SEXP R_H5Fget_info2(SEXP R_obj_id, SEXP R_finfo){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_finfo = PROTECT(duplicate(R_finfo)); vars_protected++; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); R_helper = PROTECT(RToH5(R_finfo, h5_datatype[DT_H5F_info2_t], guess_nelem(R_finfo, h5_datatype[DT_H5F_info2_t]))); H5F_info2_t* finfo= (H5F_info2_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Fget_info2(obj_id, finfo); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_finfo, h5_datatype[DT_H5F_info2_t]); R_finfo = PROTECT(H5ToR_single_step(finfo, h5_datatype[DT_H5F_info2_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_finfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("finfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned * intent); */ SEXP R_H5Fget_intent(SEXP R_file_id, SEXP R_intent){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_intent = PROTECT(duplicate(R_intent)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); unsigned* intent; if(XLENGTH(R_intent) == 0) { intent = NULL; } else { R_helper = PROTECT(RToH5(R_intent, h5_datatype[DT_unsigned], XLENGTH(R_intent))); intent= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Fget_intent(file_id, intent); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_intent, h5_datatype[DT_unsigned]); R_intent = PROTECT(H5ToR_single_step(intent, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_intent); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("intent")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Fget_mdc_config(SEXP R_file_id, SEXP R_config_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_config_ptr = PROTECT(duplicate(R_config_ptr)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); R_helper = PROTECT(RToH5(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t], guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t]))); H5AC_cache_config_t* config_ptr= (H5AC_cache_config_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Fget_mdc_config(file_id, config_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t]); R_config_ptr = PROTECT(H5ToR_single_step(config_ptr, h5_datatype[DT_H5AC_cache_config_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_config_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("config_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate_ptr); */ SEXP R_H5Fget_mdc_hit_rate(SEXP R_file_id, SEXP R_hit_rate_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_hit_rate_ptr = PROTECT(duplicate(R_hit_rate_ptr)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); double* hit_rate_ptr; if(XLENGTH(R_hit_rate_ptr) == 0) { hit_rate_ptr = NULL; } else { R_helper = PROTECT(RToH5(R_hit_rate_ptr, h5_datatype[DT_double], XLENGTH(R_hit_rate_ptr))); hit_rate_ptr= (double*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Fget_mdc_hit_rate(file_id, hit_rate_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_hit_rate_ptr, h5_datatype[DT_double]); R_hit_rate_ptr = PROTECT(H5ToR_single_step(hit_rate_ptr, h5_datatype[DT_double], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_hit_rate_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("hit_rate_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fget_mdc_logging_status(hid_t file_id, hbool_t *is_enabled, hbool_t *is_currently_logging); */ SEXP R_H5Fget_mdc_logging_status(SEXP R_file_id, SEXP R_is_enabled, SEXP R_is_currently_logging){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_is_enabled = PROTECT(duplicate(R_is_enabled)); vars_protected++; R_is_currently_logging = PROTECT(duplicate(R_is_currently_logging)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); hbool_t* is_enabled; if(XLENGTH(R_is_enabled) == 0) { is_enabled = NULL; } else { R_helper = PROTECT(RToH5(R_is_enabled, h5_datatype[DT_hbool_t], XLENGTH(R_is_enabled))); is_enabled= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } hbool_t* is_currently_logging; if(XLENGTH(R_is_currently_logging) == 0) { is_currently_logging = NULL; } else { R_helper = PROTECT(RToH5(R_is_currently_logging, h5_datatype[DT_hbool_t], XLENGTH(R_is_currently_logging))); is_currently_logging= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Fget_mdc_logging_status(file_id, is_enabled, is_currently_logging); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_is_enabled, h5_datatype[DT_hbool_t]); R_is_enabled = PROTECT(H5ToR_single_step(is_enabled, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_is_currently_logging, h5_datatype[DT_hbool_t]); R_is_currently_logging = PROTECT(H5ToR_single_step(is_currently_logging, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_is_enabled); SET_VECTOR_ELT(__ret_list, 2, R_is_currently_logging); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("is_enabled")); SET_STRING_ELT(__ret_list_names, 2, mkChar("is_currently_logging")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fget_mdc_size(hid_t file_id, size_t * max_size_ptr, size_t * min_clean_size_ptr, size_t * cur_size_ptr, int * cur_num_entries_ptr); */ SEXP R_H5Fget_mdc_size(SEXP R_file_id, SEXP R_max_size_ptr, SEXP R_min_clean_size_ptr, SEXP R_cur_size_ptr, SEXP R_cur_num_entries_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_max_size_ptr = PROTECT(duplicate(R_max_size_ptr)); vars_protected++; R_min_clean_size_ptr = PROTECT(duplicate(R_min_clean_size_ptr)); vars_protected++; R_cur_size_ptr = PROTECT(duplicate(R_cur_size_ptr)); vars_protected++; R_cur_num_entries_ptr = PROTECT(duplicate(R_cur_num_entries_ptr)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); size_t* max_size_ptr; if(XLENGTH(R_max_size_ptr) == 0) { max_size_ptr = NULL; } else { R_helper = PROTECT(RToH5(R_max_size_ptr, h5_datatype[DT_size_t], XLENGTH(R_max_size_ptr))); max_size_ptr= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* min_clean_size_ptr; if(XLENGTH(R_min_clean_size_ptr) == 0) { min_clean_size_ptr = NULL; } else { R_helper = PROTECT(RToH5(R_min_clean_size_ptr, h5_datatype[DT_size_t], XLENGTH(R_min_clean_size_ptr))); min_clean_size_ptr= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* cur_size_ptr; if(XLENGTH(R_cur_size_ptr) == 0) { cur_size_ptr = NULL; } else { R_helper = PROTECT(RToH5(R_cur_size_ptr, h5_datatype[DT_size_t], XLENGTH(R_cur_size_ptr))); cur_size_ptr= (size_t*) VOIDPTR(R_helper); vars_protected++; } int* cur_num_entries_ptr; if(XLENGTH(R_cur_num_entries_ptr) == 0) { cur_num_entries_ptr = NULL; } else { R_helper = PROTECT(RToH5(R_cur_num_entries_ptr, h5_datatype[DT_int], XLENGTH(R_cur_num_entries_ptr))); cur_num_entries_ptr= (int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Fget_mdc_size(file_id, max_size_ptr, min_clean_size_ptr, cur_size_ptr, cur_num_entries_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_max_size_ptr, h5_datatype[DT_size_t]); R_max_size_ptr = PROTECT(H5ToR_single_step(max_size_ptr, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_min_clean_size_ptr, h5_datatype[DT_size_t]); R_min_clean_size_ptr = PROTECT(H5ToR_single_step(min_clean_size_ptr, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_cur_size_ptr, h5_datatype[DT_size_t]); R_cur_size_ptr = PROTECT(H5ToR_single_step(cur_size_ptr, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_cur_num_entries_ptr, h5_datatype[DT_int]); R_cur_num_entries_ptr = PROTECT(H5ToR_single_step(cur_num_entries_ptr, h5_datatype[DT_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 5)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_max_size_ptr); SET_VECTOR_ELT(__ret_list, 2, R_min_clean_size_ptr); SET_VECTOR_ELT(__ret_list, 3, R_cur_size_ptr); SET_VECTOR_ELT(__ret_list, 4, R_cur_num_entries_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 5)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("max_size_ptr")); SET_STRING_ELT(__ret_list_names, 2, mkChar("min_clean_size_ptr")); SET_STRING_ELT(__ret_list_names, 3, mkChar("cur_size_ptr")); SET_STRING_ELT(__ret_list_names, 4, mkChar("cur_num_entries_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info); */ SEXP R_H5Fget_metadata_read_retry_info(SEXP R_file_id, SEXP R_info){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_info = PROTECT(duplicate(R_info)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); R_helper = PROTECT(RToH5(R_info, h5_datatype[DT_H5F_retry_info_t], guess_nelem(R_info, h5_datatype[DT_H5F_retry_info_t]))); H5F_retry_info_t* info= (H5F_retry_info_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Fget_metadata_read_retry_info(file_id, info); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_info, h5_datatype[DT_H5F_retry_info_t]); R_info = PROTECT(H5ToR_single_step(info, h5_datatype[DT_H5F_retry_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_info); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("info")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size); */ SEXP R_H5Fget_name(SEXP R_obj_id, SEXP R_name, SEXP R_size){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Fget_name(obj_id, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types); */ SEXP R_H5Fget_obj_count(SEXP R_file_id, SEXP R_types){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); unsigned types = SEXP_to_longlong(R_types, 0); ssize_t return_val = H5Fget_obj_count(file_id, types); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list); */ SEXP R_H5Fget_obj_ids(SEXP R_file_id, SEXP R_types, SEXP R_max_objs, SEXP R_obj_id_list){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_obj_id_list = PROTECT(duplicate(R_obj_id_list)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); unsigned types = SEXP_to_longlong(R_types, 0); size_t max_objs = SEXP_to_longlong(R_max_objs, 0); hid_t* obj_id_list; if(XLENGTH(R_obj_id_list) == 0) { obj_id_list = NULL; } else { R_helper = PROTECT(RToH5(R_obj_id_list, h5_datatype[DT_hid_t], XLENGTH(R_obj_id_list))); obj_id_list= (hid_t*) VOIDPTR(R_helper); vars_protected++; } ssize_t return_val = H5Fget_obj_ids(file_id, types, max_objs, obj_id_list); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_obj_id_list, h5_datatype[DT_hid_t]); R_obj_id_list = PROTECT(H5ToR_single_step(obj_id_list, h5_datatype[DT_hid_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_obj_id_list); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("obj_id_list")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Fis_hdf5(const char *filename); */ SEXP R_H5Fis_hdf5(SEXP R_filename){ int vars_protected=0; const char* filename = CHAR(STRING_ELT(R_filename, 0)); htri_t return_val = H5Fis_hdf5(filename); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist); */ SEXP R_H5Fmount(SEXP R_loc, SEXP R_name, SEXP R_child, SEXP R_plist){ int vars_protected=0; hid_t loc = SEXP_to_longlong(R_loc, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t child = SEXP_to_longlong(R_child, 0); hid_t plist = SEXP_to_longlong(R_plist, 0); herr_t return_val = H5Fmount(loc, name, child, plist); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Fopen(const char *filename, unsigned flags, hid_t access_plist); */ SEXP R_H5Fopen(SEXP R_filename, SEXP R_flags, SEXP R_access_plist){ int vars_protected=0; const char* filename = CHAR(STRING_ELT(R_filename, 0)); unsigned flags = SEXP_to_longlong(R_flags, 0); hid_t access_plist = SEXP_to_longlong(R_access_plist, 0); hid_t return_val = H5Fopen(filename, flags, access_plist); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Freopen(hid_t file_id); */ SEXP R_H5Freopen(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); hid_t return_val = H5Freopen(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id); */ SEXP R_H5Freset_mdc_hit_rate_stats(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); herr_t return_val = H5Freset_mdc_hit_rate_stats(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Fset_mdc_config(SEXP R_file_id, SEXP R_config_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_config_ptr = PROTECT(duplicate(R_config_ptr)); vars_protected++; hid_t file_id = SEXP_to_longlong(R_file_id, 0); R_helper = PROTECT(RToH5(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t], guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t]))); H5AC_cache_config_t* config_ptr= (H5AC_cache_config_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Fset_mdc_config(file_id, config_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t]); R_config_ptr = PROTECT(H5ToR_single_step(config_ptr, h5_datatype[DT_H5AC_cache_config_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_config_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("config_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fstart_mdc_logging(hid_t file_id); */ SEXP R_H5Fstart_mdc_logging(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); herr_t return_val = H5Fstart_mdc_logging(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fstart_swmr_write(hid_t file_id); */ SEXP R_H5Fstart_swmr_write(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); herr_t return_val = H5Fstart_swmr_write(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Fstop_mdc_logging(hid_t file_id); */ SEXP R_H5Fstop_mdc_logging(SEXP R_file_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); herr_t return_val = H5Fstop_mdc_logging(file_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Funmount(hid_t loc, const char *name); */ SEXP R_H5Funmount(SEXP R_loc, SEXP R_name){ int vars_protected=0; hid_t loc = SEXP_to_longlong(R_loc, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); herr_t return_val = H5Funmount(loc, name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
inst/CWrappers_1.10.3/headers/H5Rpublic.h
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * * If you do not have access to either file, you may request a copy from * * <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * This file contains public declarations for the H5R module. */ #ifndef _H5Rpublic_H #define _H5Rpublic_H /* Public headers needed by this file */ #include "H5public.h" #include "H5Gpublic.h" #include "H5Ipublic.h" /*****************/ /* Public Macros */ /*****************/ /* Note! Be careful with the sizes of the references because they should really * depend on the run-time values in the file. Unfortunately, the arrays need * to be defined at compile-time, so we have to go with the worst case sizes * for them. -QAK */ #define H5R_OBJ_REF_BUF_SIZE sizeof(haddr_t) /* 4 is used instead of sizeof(int) to permit portability between the Crays * and other machines (the heap ID is always encoded as an int32 anyway). */ #define H5R_DSET_REG_REF_BUF_SIZE (sizeof(haddr_t) + 4) /*******************/ /* Public Typedefs */ /*******************/ /* Reference types */ typedef enum H5R_type_t { H5R_BADTYPE = (-1), /* Invalid Reference Type */ H5R_OBJECT, /* Object reference */ H5R_DATASET_REGION, /* Dataset Region Reference */ H5R_MAXTYPE /* Highest type (Invalid as true type) */ } H5R_type_t; /* Object reference structure for user's code * This needs to be large enough to store largest haddr_t on a worst case * machine (8 bytes currently). */ typedef haddr_t hobj_ref_t; /* Dataset Region reference structure for user's code * (Buffer to store heap ID and index) * This needs to be large enough to store largest haddr_t in a worst case * machine (8 bytes currently) plus an int */ typedef unsigned char hdset_reg_ref_t[H5R_DSET_REG_REF_BUF_SIZE]; /********************/ /* Public Variables */ /********************/ /*********************/ /* Public Prototypes */ /*********************/ #ifdef __cplusplus extern "C" { #endif H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id); H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref); H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref); H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref, H5O_type_t *obj_type); H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, char *name /*out*/, size_t size); /* Symbols defined for compatibility with previous versions of the HDF5 API. * * Use of these symbols is deprecated. */ #ifndef H5_NO_DEPRECATED_SYMBOLS /* Function prototypes */ H5_DLL H5G_obj_t H5Rget_obj_type1(hid_t id, H5R_type_t ref_type, const void *_ref); H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref); #endif /* H5_NO_DEPRECATED_SYMBOLS */ #ifdef __cplusplus } #endif #endif /* _H5Rpublic_H */
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5L.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5L.h" /* H5_DLL herr_t H5Lcopy(hid_t src_loc, const char *src_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Lcopy(SEXP R_src_loc, SEXP R_src_name, SEXP R_dst_loc, SEXP R_dst_name, SEXP R_lcpl_id, SEXP R_lapl_id){ int vars_protected=0; hid_t src_loc = SEXP_to_longlong(R_src_loc, 0); const char* src_name = CHAR(STRING_ELT(R_src_name, 0)); hid_t dst_loc = SEXP_to_longlong(R_dst_loc, 0); const char* dst_name = CHAR(STRING_ELT(R_dst_name, 0)); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lcopy(src_loc, src_name, dst_loc, dst_name, lcpl_id, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lcreate_external(const char *file_name, const char *obj_name, hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Lcreate_external(SEXP R_file_name, SEXP R_obj_name, SEXP R_link_loc_id, SEXP R_link_name, SEXP R_lcpl_id, SEXP R_lapl_id){ int vars_protected=0; const char* file_name = CHAR(STRING_ELT(R_file_name, 0)); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); hid_t link_loc_id = SEXP_to_longlong(R_link_loc_id, 0); const char* link_name = CHAR(STRING_ELT(R_link_name, 0)); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lcreate_external(file_name, obj_name, link_loc_id, link_name, lcpl_id, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lcreate_hard(hid_t cur_loc, const char *cur_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Lcreate_hard(SEXP R_cur_loc, SEXP R_cur_name, SEXP R_dst_loc, SEXP R_dst_name, SEXP R_lcpl_id, SEXP R_lapl_id){ int vars_protected=0; hid_t cur_loc = SEXP_to_longlong(R_cur_loc, 0); const char* cur_name = CHAR(STRING_ELT(R_cur_name, 0)); hid_t dst_loc = SEXP_to_longlong(R_dst_loc, 0); const char* dst_name = CHAR(STRING_ELT(R_dst_name, 0)); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lcreate_hard(cur_loc, cur_name, dst_loc, dst_name, lcpl_id, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Lcreate_soft(SEXP R_link_target, SEXP R_link_loc_id, SEXP R_link_name, SEXP R_lcpl_id, SEXP R_lapl_id){ int vars_protected=0; const char* link_target = CHAR(STRING_ELT(R_link_target, 0)); hid_t link_loc_id = SEXP_to_longlong(R_link_loc_id, 0); const char* link_name = CHAR(STRING_ELT(R_link_name, 0)); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lcreate_soft(link_target, link_loc_id, link_name, lcpl_id, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type, const void *udata, size_t udata_size, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Lcreate_ud(SEXP R_link_loc_id, SEXP R_link_name, SEXP R_link_type, SEXP R_udata, SEXP R_udata_size, SEXP R_lcpl_id, SEXP R_lapl_id){ int vars_protected=0; hid_t link_loc_id = SEXP_to_longlong(R_link_loc_id, 0); const char* link_name = CHAR(STRING_ELT(R_link_name, 0)); H5L_type_t link_type = SEXP_to_longlong(R_link_type, 0); const void* udata; if(XLENGTH(R_udata) == 0) { udata = NULL; } else { udata = (void *) VOIDPTR(R_udata); } size_t udata_size = SEXP_to_longlong(R_udata_size, 0); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lcreate_ud(link_loc_id, link_name, link_type, udata, udata_size, lcpl_id, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Ldelete(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Ldelete(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Ldelete(loc_id, name, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Ldelete_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); */ SEXP R_H5Ldelete_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Ldelete_by_idx(loc_id, group_name, idx_type, order, n, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Lexists(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Lexists(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); htri_t return_val = H5Lexists(loc_id, name, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lget_info(hid_t loc_id, const char *name, H5L_info_t *linfo , hid_t lapl_id); */ SEXP R_H5Lget_info(SEXP R_loc_id, SEXP R_name, SEXP R_linfo, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_linfo = PROTECT(duplicate(R_linfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); R_helper = PROTECT(RToH5(R_linfo, h5_datatype[DT_H5L_info_t], guess_nelem(R_linfo, h5_datatype[DT_H5L_info_t]))); H5L_info_t* linfo= (H5L_info_t*) VOIDPTR(R_helper); vars_protected++; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lget_info(loc_id, name, linfo, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_linfo, h5_datatype[DT_H5L_info_t]); R_linfo = PROTECT(H5ToR_single_step(linfo, h5_datatype[DT_H5L_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_linfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("linfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5L_info_t *linfo , hid_t lapl_id); */ SEXP R_H5Lget_info_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_linfo, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_linfo = PROTECT(duplicate(R_linfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); R_helper = PROTECT(RToH5(R_linfo, h5_datatype[DT_H5L_info_t], guess_nelem(R_linfo, h5_datatype[DT_H5L_info_t]))); H5L_info_t* linfo= (H5L_info_t*) VOIDPTR(R_helper); vars_protected++; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lget_info_by_idx(loc_id, group_name, idx_type, order, n, linfo, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_linfo, h5_datatype[DT_H5L_info_t]); R_linfo = PROTECT(H5ToR_single_step(linfo, h5_datatype[DT_H5L_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_linfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("linfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Lget_name_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, char *name , size_t size, hid_t lapl_id); */ SEXP R_H5Lget_name_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_name, SEXP R_size, SEXP R_lapl_id){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); ssize_t return_val = H5Lget_name_by_idx(loc_id, group_name, idx_type, order, n, name, size, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lget_val(hid_t loc_id, const char *name, void *buf, size_t size, hid_t lapl_id); */ SEXP R_H5Lget_val(SEXP R_loc_id, SEXP R_name, SEXP R_buf, SEXP R_size, SEXP R_lapl_id, SEXP _dupl_buf){ int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } size_t size = SEXP_to_longlong(R_size, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lget_val(loc_id, name, buf, size, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lget_val_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, void *buf, size_t size, hid_t lapl_id); */ SEXP R_H5Lget_val_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_buf, SEXP R_size, SEXP R_lapl_id, SEXP _dupl_buf){ int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } size_t size = SEXP_to_longlong(R_size, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lget_val_by_idx(loc_id, group_name, idx_type, order, n, buf, size, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Lis_registered(H5L_type_t id); */ SEXP R_H5Lis_registered(SEXP R_id){ int vars_protected=0; H5L_type_t id = SEXP_to_longlong(R_id, 0); htri_t return_val = H5Lis_registered(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lmove(hid_t src_loc, const char *src_name, hid_t dst_loc, const char *dst_name, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Lmove(SEXP R_src_loc, SEXP R_src_name, SEXP R_dst_loc, SEXP R_dst_name, SEXP R_lcpl_id, SEXP R_lapl_id){ int vars_protected=0; hid_t src_loc = SEXP_to_longlong(R_src_loc, 0); const char* src_name = CHAR(STRING_ELT(R_src_name, 0)); hid_t dst_loc = SEXP_to_longlong(R_dst_loc, 0); const char* dst_name = CHAR(STRING_ELT(R_dst_name, 0)); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Lmove(src_loc, src_name, dst_loc, dst_name, lcpl_id, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lunpack_elink_val(const void *ext_linkval, size_t link_size, unsigned *flags, const char **filename, const char **obj_path ); */ SEXP R_H5Lunpack_elink_val(SEXP R_ext_linkval, SEXP R_link_size, SEXP R_flags, SEXP R_filename, SEXP R_obj_path){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_flags = PROTECT(duplicate(R_flags)); vars_protected++; R_filename = PROTECT(duplicate(R_filename)); vars_protected++; R_obj_path = PROTECT(duplicate(R_obj_path)); vars_protected++; const void* ext_linkval; if(XLENGTH(R_ext_linkval) == 0) { ext_linkval = NULL; } else { ext_linkval = (void *) VOIDPTR(R_ext_linkval); } size_t link_size = SEXP_to_longlong(R_link_size, 0); unsigned* flags; if(XLENGTH(R_flags) == 0) { flags = NULL; } else { R_helper = PROTECT(RToH5(R_flags, h5_datatype[DT_unsigned], XLENGTH(R_flags))); flags= (unsigned*) VOIDPTR(R_helper); vars_protected++; } const char** filename; if(XLENGTH(R_filename) == 0) { filename = NULL; } else { R_helper = PROTECT(RToH5(R_filename, h5_datatype[DT_char], XLENGTH(R_filename))); filename= (const char**) VOIDPTR(R_helper); vars_protected++; } const char** obj_path; if(XLENGTH(R_obj_path) == 0) { obj_path = NULL; } else { R_helper = PROTECT(RToH5(R_obj_path, h5_datatype[DT_char], XLENGTH(R_obj_path))); obj_path= (const char**) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Lunpack_elink_val(ext_linkval, link_size, flags, filename, obj_path); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_flags, h5_datatype[DT_unsigned]); R_flags = PROTECT(H5ToR_single_step(flags, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_filename, h5_datatype[DT_char]); R_filename = PROTECT(H5ToR_single_step(filename, h5_datatype[DT_char], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_obj_path, h5_datatype[DT_char]); R_obj_path = PROTECT(H5ToR_single_step(obj_path, h5_datatype[DT_char], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 4)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_flags); SET_VECTOR_ELT(__ret_list, 2, R_filename); SET_VECTOR_ELT(__ret_list, 3, R_obj_path); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 4)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("flags")); SET_STRING_ELT(__ret_list_names, 2, mkChar("filename")); SET_STRING_ELT(__ret_list_names, 3, mkChar("obj_path")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Lunregister(H5L_type_t id); */ SEXP R_H5Lunregister(SEXP R_id){ int vars_protected=0; H5L_type_t id = SEXP_to_longlong(R_id, 0); herr_t return_val = H5Lunregister(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_10_0/Wrapper_auto_H5P.h
<reponame>jeroen/hdf5r<filename>src/1_10_0/Wrapper_auto_H5P.h #ifndef _WRAPPER_AUTO_H5P_H_ #define _WRAPPER_AUTO_H5P_H_ #include "global.h" /* H5_DLL herr_t H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path); */ SEXP R_H5Padd_merge_committed_dtype_path(SEXP R_plist_id, SEXP R_path); /* H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id); */ SEXP R_H5Pall_filters_avail(SEXP R_plist_id); /* H5_DLL herr_t H5Pclose(hid_t plist_id); */ SEXP R_H5Pclose(SEXP R_plist_id); /* H5_DLL herr_t H5Pclose_class(hid_t plist_id); */ SEXP R_H5Pclose_class(SEXP R_plist_id); /* H5_DLL hid_t H5Pcopy(hid_t plist_id); */ SEXP R_H5Pcopy(SEXP R_plist_id); /* H5_DLL herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name); */ SEXP R_H5Pcopy_prop(SEXP R_dst_id, SEXP R_src_id, SEXP R_name); /* H5_DLL hid_t H5Pcreate(hid_t cls_id); */ SEXP R_H5Pcreate(SEXP R_cls_id); /* H5_DLL hid_t H5Pdecode(const void *buf); */ SEXP R_H5Pdecode(SEXP R_buf); /* H5_DLL herr_t H5Pencode(hid_t plist_id, void *buf, size_t *nalloc); */ SEXP R_H5Pencode(SEXP R_plist_id, SEXP R_buf, SEXP R_nalloc, SEXP _dupl_buf); /* H5_DLL htri_t H5Pequal(hid_t id1, hid_t id2); */ SEXP R_H5Pequal(SEXP R_id1, SEXP R_id2); /* H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name); */ SEXP R_H5Pexist(SEXP R_plist_id, SEXP R_name); /* H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status); */ SEXP R_H5Pfill_value_defined(SEXP R_plist, SEXP R_status); /* H5_DLL herr_t H5Pfree_merge_committed_dtype_paths(hid_t plist_id); */ SEXP R_H5Pfree_merge_committed_dtype_paths(SEXP R_plist_id); /* H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void * value); */ SEXP R_H5Pget(SEXP R_plist_id, SEXP R_name, SEXP R_value, SEXP _dupl_value); /* H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold, hsize_t *alignment); */ SEXP R_H5Pget_alignment(SEXP R_fapl_id, SEXP R_threshold, SEXP R_alignment); /* H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time); */ SEXP R_H5Pget_alloc_time(SEXP R_plist_id, SEXP R_alloc_time); /* H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags); */ SEXP R_H5Pget_attr_creation_order(SEXP R_plist_id, SEXP R_crt_order_flags); /* H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense); */ SEXP R_H5Pget_attr_phase_change(SEXP R_plist_id, SEXP R_max_compact, SEXP R_min_dense); /* H5_DLL herr_t H5Pget_btree_ratios(hid_t plist_id, double *left, double *middle, double *right); */ SEXP R_H5Pget_btree_ratios(SEXP R_plist_id, SEXP R_left, SEXP R_middle, SEXP R_right); /* H5_DLL herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts, size_t *rdcc_nslots, size_t *rdcc_nbytes, double *rdcc_w0); */ SEXP R_H5Pget_cache(SEXP R_plist_id, SEXP R_mdc_nelmts, SEXP R_rdcc_nslots, SEXP R_rdcc_nbytes, SEXP R_rdcc_w0); /* H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding ); */ SEXP R_H5Pget_char_encoding(SEXP R_plist_id, SEXP R_encoding); /* H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[]); */ SEXP R_H5Pget_chunk(SEXP R_plist_id, SEXP R_max_ndims, SEXP R_dim); /* H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots, size_t *rdcc_nbytes, double *rdcc_w0); */ SEXP R_H5Pget_chunk_cache(SEXP R_dapl_id, SEXP R_rdcc_nslots, SEXP R_rdcc_nbytes, SEXP R_rdcc_w0); /* H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts); */ SEXP R_H5Pget_chunk_opts(SEXP R_plist_id, SEXP R_opts); /* H5_DLL hid_t H5Pget_class(hid_t plist_id); */ SEXP R_H5Pget_class(SEXP R_plist_id); /* H5_DLL char *H5Pget_class_name(hid_t pclass_id); */ SEXP R_H5Pget_class_name(SEXP R_pclass_id); /* H5_DLL hid_t H5Pget_class_parent(hid_t pclass_id); */ SEXP R_H5Pget_class_parent(SEXP R_pclass_id); /* H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *crt_intmd ); */ SEXP R_H5Pget_copy_object(SEXP R_plist_id, SEXP R_crt_intmd); /* H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); */ SEXP R_H5Pget_core_write_tracking(SEXP R_fapl_id, SEXP R_is_enabled, SEXP R_page_size); /* H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd ); */ SEXP R_H5Pget_create_intermediate_group(SEXP R_plist_id, SEXP R_crt_intmd); /* H5_DLL ssize_t H5Pget_data_transform(hid_t plist_id, char* expression , size_t size); */ SEXP R_H5Pget_data_transform(SEXP R_plist_id, SEXP R_expression, SEXP R_size); /* H5_DLL hid_t H5Pget_driver(hid_t plist_id); */ SEXP R_H5Pget_driver(SEXP R_plist_id); /* H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id); */ SEXP R_H5Pget_edc_check(SEXP R_plist_id); /* H5_DLL ssize_t H5Pget_efile_prefix(hid_t dapl_id, char* prefix , size_t size); */ SEXP R_H5Pget_efile_prefix(SEXP R_dapl_id, SEXP R_prefix, SEXP R_size); /* H5_DLL herr_t H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags); */ SEXP R_H5Pget_elink_acc_flags(SEXP R_lapl_id, SEXP R_flags); /* H5_DLL hid_t H5Pget_elink_fapl(hid_t lapl_id); */ SEXP R_H5Pget_elink_fapl(SEXP R_lapl_id); /* H5_DLL herr_t H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size); */ SEXP R_H5Pget_elink_file_cache_size(SEXP R_plist_id, SEXP R_efc_size); /* H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size); */ SEXP R_H5Pget_elink_prefix(SEXP R_plist_id, SEXP R_prefix, SEXP R_size); /* H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries , unsigned *est_name_len ); */ SEXP R_H5Pget_est_link_info(SEXP R_plist_id, SEXP R_est_num_entries, SEXP R_est_name_len); /* H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name, off_t *offset, hsize_t *size); */ SEXP R_H5Pget_external(SEXP R_plist_id, SEXP R_idx, SEXP R_name_size, SEXP R_name, SEXP R_offset, SEXP R_size); /* H5_DLL int H5Pget_external_count(hid_t plist_id); */ SEXP R_H5Pget_external_count(SEXP R_plist_id); /* H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset); */ SEXP R_H5Pget_family_offset(SEXP R_fapl_id, SEXP R_offset); /* H5_DLL herr_t H5Pget_fclose_degree(hid_t fapl_id, H5F_close_degree_t *degree); */ SEXP R_H5Pget_fclose_degree(SEXP R_fapl_id, SEXP R_degree); /* H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold); */ SEXP R_H5Pget_file_space(SEXP R_plist_id, SEXP R_strategy, SEXP R_threshold); /* H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time); */ SEXP R_H5Pget_fill_time(SEXP R_plist_id, SEXP R_fill_time); /* H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value); */ SEXP R_H5Pget_fill_value(SEXP R_plist_id, SEXP R_type_id, SEXP R_value, SEXP _dupl_value); /* H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[], unsigned *filter_config); */ SEXP R_H5Pget_filter_by_id2(SEXP R_plist_id, SEXP R_id, SEXP R_flags, SEXP R_cd_nelmts, SEXP R_cd_values, SEXP R_namelen, SEXP R_name, SEXP R_filter_config); /* H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned filter, unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[], unsigned *filter_config ); */ SEXP R_H5Pget_filter2(SEXP R_plist_id, SEXP R_filter, SEXP R_flags, SEXP R_cd_nelmts, SEXP R_cd_values, SEXP R_namelen, SEXP R_name, SEXP R_filter_config); /* H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref); */ SEXP R_H5Pget_gc_references(SEXP R_fapl_id, SEXP R_gc_ref); /* H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size); */ SEXP R_H5Pget_hyper_vector_size(SEXP R_fapl_id, SEXP R_size); /* H5_DLL herr_t H5Pget_istore_k(hid_t plist_id, unsigned *ik); */ SEXP R_H5Pget_istore_k(SEXP R_plist_id, SEXP R_ik); /* H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id); */ SEXP R_H5Pget_layout(SEXP R_plist_id); /* H5_DLL herr_t H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low, H5F_libver_t *high); */ SEXP R_H5Pget_libver_bounds(SEXP R_plist_id, SEXP R_low, SEXP R_high); /* H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags ); */ SEXP R_H5Pget_link_creation_order(SEXP R_plist_id, SEXP R_crt_order_flags); /* H5_DLL herr_t H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact , unsigned *min_dense ); */ SEXP R_H5Pget_link_phase_change(SEXP R_plist_id, SEXP R_max_compact, SEXP R_min_dense); /* H5_DLL herr_t H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint ); */ SEXP R_H5Pget_local_heap_size_hint(SEXP R_plist_id, SEXP R_size_hint); /* H5_DLL herr_t H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Pget_mdc_config (SEXP R_plist_id, SEXP R_config_ptr); /* H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location, size_t *location_size, hbool_t *start_on_access); */ SEXP R_H5Pget_mdc_log_options(SEXP R_plist_id, SEXP R_is_enabled, SEXP R_location, SEXP R_location_size, SEXP R_start_on_access); /* H5_DLL herr_t H5Pget_meta_block_size(hid_t fapl_id, hsize_t *size); */ SEXP R_H5Pget_meta_block_size(SEXP R_fapl_id, SEXP R_size); /* H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts); */ SEXP R_H5Pget_metadata_read_attempts(SEXP R_plist_id, SEXP R_attempts); /* H5_DLL herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type); */ SEXP R_H5Pget_multi_type(SEXP R_fapl_id, SEXP R_type); /* H5_DLL int H5Pget_nfilters(hid_t plist_id); */ SEXP R_H5Pget_nfilters(SEXP R_plist_id); /* H5_DLL herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks); */ SEXP R_H5Pget_nlinks(SEXP R_plist_id, SEXP R_nlinks); /* H5_DLL herr_t H5Pget_nprops(hid_t id, size_t *nprops); */ SEXP R_H5Pget_nprops(SEXP R_id, SEXP R_nprops); /* H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times); */ SEXP R_H5Pget_obj_track_times(SEXP R_plist_id, SEXP R_track_times); /* H5_DLL int H5Pget_preserve(hid_t plist_id); */ SEXP R_H5Pget_preserve(SEXP R_plist_id); /* H5_DLL herr_t H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type_flags, unsigned *min_mesg_size); */ SEXP R_H5Pget_shared_mesg_index(SEXP R_plist_id, SEXP R_index_num, SEXP R_mesg_type_flags, SEXP R_min_mesg_size); /* H5_DLL herr_t H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes); */ SEXP R_H5Pget_shared_mesg_nindexes(SEXP R_plist_id, SEXP R_nindexes); /* H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree); */ SEXP R_H5Pget_shared_mesg_phase_change(SEXP R_plist_id, SEXP R_max_list, SEXP R_min_btree); /* H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size); */ SEXP R_H5Pget_sieve_buf_size(SEXP R_fapl_id, SEXP R_size); /* H5_DLL herr_t H5Pget_size(hid_t id, const char *name, size_t *size); */ SEXP R_H5Pget_size(SEXP R_id, SEXP R_name, SEXP R_size); /* H5_DLL herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr, size_t *sizeof_size); */ SEXP R_H5Pget_sizes(SEXP R_plist_id, SEXP R_sizeof_addr, SEXP R_sizeof_size); /* H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size); */ SEXP R_H5Pget_small_data_block_size(SEXP R_fapl_id, SEXP R_size); /* H5_DLL herr_t H5Pget_sym_k(hid_t plist_id, unsigned *ik, unsigned *lk); */ SEXP R_H5Pget_sym_k(SEXP R_plist_id, SEXP R_ik, SEXP R_lk); /* H5_DLL herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size); */ SEXP R_H5Pget_userblock(SEXP R_plist_id, SEXP R_size); /* H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot, unsigned *freelist, unsigned *stab, unsigned *shhdr); */ SEXP R_H5Pget_version(SEXP R_plist_id, SEXP R_boot, SEXP R_freelist, SEXP R_stab, SEXP R_shhdr); /* H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count); */ SEXP R_H5Pget_virtual_count(SEXP R_dcpl_id, SEXP R_count); /* H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name, size_t size); */ SEXP R_H5Pget_virtual_dsetname(SEXP R_dcpl_id, SEXP R_index, SEXP R_name, SEXP R_size); /* H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name, size_t size); */ SEXP R_H5Pget_virtual_filename(SEXP R_dcpl_id, SEXP R_index, SEXP R_name, SEXP R_size); /* H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size); */ SEXP R_H5Pget_virtual_printf_gap(SEXP R_plist_id, SEXP R_gap_size); /* H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index); */ SEXP R_H5Pget_virtual_srcspace(SEXP R_dcpl_id, SEXP R_index); /* H5_DLL herr_t H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view); */ SEXP R_H5Pget_virtual_view(SEXP R_plist_id, SEXP R_view); /* H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index); */ SEXP R_H5Pget_virtual_vspace(SEXP R_dcpl_id, SEXP R_index); /* H5_DLL htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id); */ SEXP R_H5Pisa_class(SEXP R_plist_id, SEXP R_pclass_id); /* H5_DLL herr_t H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[]); */ SEXP R_H5Pmodify_filter(SEXP R_plist_id, SEXP R_filter, SEXP R_flags, SEXP R_cd_nelmts, SEXP R_cd_values); /* H5_DLL herr_t H5Premove(hid_t plist_id, const char *name); */ SEXP R_H5Premove(SEXP R_plist_id, SEXP R_name); /* H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter); */ SEXP R_H5Premove_filter(SEXP R_plist_id, SEXP R_filter); /* H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, void *value); */ SEXP R_H5Pset(SEXP R_plist_id, SEXP R_name, SEXP R_value, SEXP _dupl_value); /* H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment); */ SEXP R_H5Pset_alignment(SEXP R_fapl_id, SEXP R_threshold, SEXP R_alignment); /* H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time); */ SEXP R_H5Pset_alloc_time(SEXP R_plist_id, SEXP R_alloc_time); /* H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags); */ SEXP R_H5Pset_attr_creation_order(SEXP R_plist_id, SEXP R_crt_order_flags); /* H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); */ SEXP R_H5Pset_attr_phase_change(SEXP R_plist_id, SEXP R_max_compact, SEXP R_min_dense); /* H5_DLL herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right); */ SEXP R_H5Pset_btree_ratios(SEXP R_plist_id, SEXP R_left, SEXP R_middle, SEXP R_right); /* H5_DLL herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg); */ SEXP R_H5Pset_buffer(SEXP R_plist_id, SEXP R_size, SEXP R_tconv, SEXP R_bkg, SEXP _dupl_tconv, SEXP _dupl_bkg); /* H5_DLL herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0); */ SEXP R_H5Pset_cache(SEXP R_plist_id, SEXP R_mdc_nelmts, SEXP R_rdcc_nslots, SEXP R_rdcc_nbytes, SEXP R_rdcc_w0); /* H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding); */ SEXP R_H5Pset_char_encoding(SEXP R_plist_id, SEXP R_encoding); /* H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[]); */ SEXP R_H5Pset_chunk(SEXP R_plist_id, SEXP R_ndims, SEXP R_dim); /* H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0); */ SEXP R_H5Pset_chunk_cache(SEXP R_dapl_id, SEXP R_rdcc_nslots, SEXP R_rdcc_nbytes, SEXP R_rdcc_w0); /* H5_DLL herr_t H5Pset_chunk_opts(hid_t plist_id, unsigned opts); */ SEXP R_H5Pset_chunk_opts(SEXP R_plist_id, SEXP R_opts); /* H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned crt_intmd); */ SEXP R_H5Pset_copy_object(SEXP R_plist_id, SEXP R_crt_intmd); /* H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); */ SEXP R_H5Pset_core_write_tracking(SEXP R_fapl_id, SEXP R_is_enabled, SEXP R_page_size); /* H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd); */ SEXP R_H5Pset_create_intermediate_group(SEXP R_plist_id, SEXP R_crt_intmd); /* H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char* expression); */ SEXP R_H5Pset_data_transform(SEXP R_plist_id, SEXP R_expression); /* H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression); */ SEXP R_H5Pset_deflate(SEXP R_plist_id, SEXP R_aggression); /* H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info); */ SEXP R_H5Pset_driver(SEXP R_plist_id, SEXP R_driver_id, SEXP R_driver_info); /* H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check); */ SEXP R_H5Pset_edc_check(SEXP R_plist_id, SEXP R_check); /* H5_DLL herr_t H5Pset_efile_prefix(hid_t dapl_id, const char* prefix); */ SEXP R_H5Pset_efile_prefix(SEXP R_dapl_id, SEXP R_prefix); /* H5_DLL herr_t H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags); */ SEXP R_H5Pset_elink_acc_flags(SEXP R_lapl_id, SEXP R_flags); /* H5_DLL herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id); */ SEXP R_H5Pset_elink_fapl(SEXP R_lapl_id, SEXP R_fapl_id); /* H5_DLL herr_t H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size); */ SEXP R_H5Pset_elink_file_cache_size(SEXP R_plist_id, SEXP R_efc_size); /* H5_DLL herr_t H5Pset_elink_prefix(hid_t plist_id, const char *prefix); */ SEXP R_H5Pset_elink_prefix(SEXP R_plist_id, SEXP R_prefix); /* H5_DLL herr_t H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name_len); */ SEXP R_H5Pset_est_link_info(SEXP R_plist_id, SEXP R_est_num_entries, SEXP R_est_name_len); /* H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size); */ SEXP R_H5Pset_external(SEXP R_plist_id, SEXP R_name, SEXP R_offset, SEXP R_size); /* H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset); */ SEXP R_H5Pset_family_offset(SEXP R_fapl_id, SEXP R_offset); /* H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree); */ SEXP R_H5Pset_fclose_degree(SEXP R_fapl_id, SEXP R_degree); /* H5_DLL herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len); */ SEXP R_H5Pset_file_image(SEXP R_fapl_id, SEXP R_buf_ptr, SEXP R_buf_len, SEXP _dupl_buf_ptr); /* H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold); */ SEXP R_H5Pset_file_space(SEXP R_plist_id, SEXP R_strategy, SEXP R_threshold); /* H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time); */ SEXP R_H5Pset_fill_time(SEXP R_plist_id, SEXP R_fill_time); /* H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value); */ SEXP R_H5Pset_fill_value(SEXP R_plist_id, SEXP R_type_id, SEXP R_value); /* H5_DLL herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int c_values[]); */ SEXP R_H5Pset_filter(SEXP R_plist_id, SEXP R_filter, SEXP R_flags, SEXP R_cd_nelmts, SEXP R_c_values); /* H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id); */ SEXP R_H5Pset_fletcher32(SEXP R_plist_id); /* H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref); */ SEXP R_H5Pset_gc_references(SEXP R_fapl_id, SEXP R_gc_ref); /* H5_DLL herr_t H5Pset_hyper_vector_size(hid_t fapl_id, size_t size); */ SEXP R_H5Pset_hyper_vector_size(SEXP R_fapl_id, SEXP R_size); /* H5_DLL herr_t H5Pset_istore_k(hid_t plist_id, unsigned ik); */ SEXP R_H5Pset_istore_k(SEXP R_plist_id, SEXP R_ik); /* H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout); */ SEXP R_H5Pset_layout(SEXP R_plist_id, SEXP R_layout); /* H5_DLL herr_t H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high); */ SEXP R_H5Pset_libver_bounds(SEXP R_plist_id, SEXP R_low, SEXP R_high); /* H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags); */ SEXP R_H5Pset_link_creation_order(SEXP R_plist_id, SEXP R_crt_order_flags); /* H5_DLL herr_t H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); */ SEXP R_H5Pset_link_phase_change(SEXP R_plist_id, SEXP R_max_compact, SEXP R_min_dense); /* H5_DLL herr_t H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint); */ SEXP R_H5Pset_local_heap_size_hint(SEXP R_plist_id, SEXP R_size_hint); /* H5_DLL herr_t H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Pset_mdc_config(SEXP R_plist_id, SEXP R_config_ptr); /* H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, hbool_t start_on_access); */ SEXP R_H5Pset_mdc_log_options(SEXP R_plist_id, SEXP R_is_enabled, SEXP R_location, SEXP R_start_on_access); /* H5_DLL herr_t H5Pset_meta_block_size(hid_t fapl_id, hsize_t size); */ SEXP R_H5Pset_meta_block_size(SEXP R_fapl_id, SEXP R_size); /* H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts); */ SEXP R_H5Pset_metadata_read_attempts(SEXP R_plist_id, SEXP R_attempts); /* H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type); */ SEXP R_H5Pset_multi_type(SEXP R_fapl_id, SEXP R_type); /* H5_DLL herr_t H5Pset_nbit(hid_t plist_id); */ SEXP R_H5Pset_nbit(SEXP R_plist_id); /* H5_DLL herr_t H5Pset_nlinks(hid_t plist_id, size_t nlinks); */ SEXP R_H5Pset_nlinks(SEXP R_plist_id, SEXP R_nlinks); /* H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times); */ SEXP R_H5Pset_obj_track_times(SEXP R_plist_id, SEXP R_track_times); /* H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status); */ SEXP R_H5Pset_preserve(SEXP R_plist_id, SEXP R_status); /* H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor); */ SEXP R_H5Pset_scaleoffset(SEXP R_plist_id, SEXP R_scale_type, SEXP R_scale_factor); /* H5_DLL herr_t H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_flags, unsigned min_mesg_size); */ SEXP R_H5Pset_shared_mesg_index(SEXP R_plist_id, SEXP R_index_num, SEXP R_mesg_type_flags, SEXP R_min_mesg_size); /* H5_DLL herr_t H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes); */ SEXP R_H5Pset_shared_mesg_nindexes(SEXP R_plist_id, SEXP R_nindexes); /* H5_DLL herr_t H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree); */ SEXP R_H5Pset_shared_mesg_phase_change(SEXP R_plist_id, SEXP R_max_list, SEXP R_min_btree); /* H5_DLL herr_t H5Pset_shuffle(hid_t plist_id); */ SEXP R_H5Pset_shuffle(SEXP R_plist_id); /* H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size); */ SEXP R_H5Pset_sieve_buf_size(SEXP R_fapl_id, SEXP R_size); /* H5_DLL herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size); */ SEXP R_H5Pset_sizes(SEXP R_plist_id, SEXP R_sizeof_addr, SEXP R_sizeof_size); /* H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size); */ SEXP R_H5Pset_small_data_block_size(SEXP R_fapl_id, SEXP R_size); /* H5_DLL herr_t H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk); */ SEXP R_H5Pset_sym_k(SEXP R_plist_id, SEXP R_ik, SEXP R_lk); /* H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block); */ SEXP R_H5Pset_szip(SEXP R_plist_id, SEXP R_options_mask, SEXP R_pixels_per_block); /* H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size); */ SEXP R_H5Pset_userblock(SEXP R_plist_id, SEXP R_size); /* H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const char *src_dset_name, hid_t src_space_id); */ SEXP R_H5Pset_virtual(SEXP R_dcpl_id, SEXP R_vspace_id, SEXP R_src_file_name, SEXP R_src_dset_name, SEXP R_src_space_id); /* H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size); */ SEXP R_H5Pset_virtual_printf_gap(SEXP R_plist_id, SEXP R_gap_size); /* H5_DLL herr_t H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view); */ SEXP R_H5Pset_virtual_view(SEXP R_plist_id, SEXP R_view); /* H5_DLL herr_t H5Punregister(hid_t pclass_id, const char *name); */ SEXP R_H5Punregister(SEXP R_pclass_id, SEXP R_name); #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5.h
#ifndef _WRAPPER_AUTO_H5_H_ #define _WRAPPER_AUTO_H5_H_ #include "global.h" /* H5_DLL herr_t H5check_version(unsigned majnum, unsigned minnum, unsigned relnum); */ SEXP R_H5check_version(SEXP R_majnum, SEXP R_minnum, SEXP R_relnum); /* H5_DLL herr_t H5close(void); */ SEXP R_H5close(void); /* H5_DLL herr_t H5dont_atexit(void); */ SEXP R_H5dont_atexit(void); /* H5_DLL herr_t H5free_memory(void *mem); */ SEXP R_H5free_memory(SEXP R_mem, SEXP _dupl_mem); /* H5_DLL herr_t H5garbage_collect(void); */ SEXP R_H5garbage_collect(void); /* H5_DLL herr_t H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum); */ SEXP R_H5get_libversion(SEXP R_majnum, SEXP R_minnum, SEXP R_relnum); /* H5_DLL herr_t H5is_library_threadsafe(hbool_t *is_ts); */ SEXP R_H5is_library_threadsafe(SEXP R_is_ts); /* H5_DLL herr_t H5open(void); */ SEXP R_H5open(void); /* H5_DLL herr_t H5set_free_list_limits (int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim); */ SEXP R_H5set_free_list_limits(SEXP R_reg_global_lim, SEXP R_reg_list_lim, SEXP R_arr_global_lim, SEXP R_arr_list_lim, SEXP R_blk_global_lim, SEXP R_blk_list_lim); #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5R.h
<reponame>jeroen/hdf5r #ifndef _WRAPPER_AUTO_H5R_H_ #define _WRAPPER_AUTO_H5R_H_ #include "global.h" /* H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id); */ SEXP R_H5Rcreate(SEXP R_ref, SEXP R_loc_id, SEXP R_name, SEXP R_ref_type, SEXP R_space_id, SEXP _dupl_ref); /* H5_DLL hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rdereference(SEXP R_dataset, SEXP R_ref_type, SEXP R_ref); /* H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, char *name, size_t size); */ SEXP R_H5Rget_name(SEXP R_loc_id, SEXP R_ref_type, SEXP R_ref, SEXP R_name, SEXP R_size); /* H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref, H5O_type_t *obj_type); */ SEXP R_H5Rget_obj_type2(SEXP R_id, SEXP R_ref_type, SEXP R__ref, SEXP R_obj_type); /* H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rget_region(SEXP R_dataset, SEXP R_ref_type, SEXP R_ref); #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5I.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5I.h" /* H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force); */ SEXP R_H5Iclear_type(SEXP R_type, SEXP R_force){ int vars_protected=0; H5I_type_t type = SEXP_to_longlong(R_type, 0); hbool_t force = SEXP_to_longlong(R_force, 0); herr_t return_val = H5Iclear_type(type, force); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Idec_ref(hid_t id); */ SEXP R_H5Idec_ref(SEXP R_id){ int vars_protected=0; hid_t id = SEXP_to_longlong(R_id, 0); int return_val = H5Idec_ref(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Idec_type_ref(H5I_type_t type); */ SEXP R_H5Idec_type_ref(SEXP R_type){ int vars_protected=0; H5I_type_t type = SEXP_to_longlong(R_type, 0); int return_val = H5Idec_type_ref(type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Idestroy_type(H5I_type_t type); */ SEXP R_H5Idestroy_type(SEXP R_type){ int vars_protected=0; H5I_type_t type = SEXP_to_longlong(R_type, 0); herr_t return_val = H5Idestroy_type(type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Iget_file_id(hid_t id); */ SEXP R_H5Iget_file_id(SEXP R_id){ int vars_protected=0; hid_t id = SEXP_to_longlong(R_id, 0); hid_t return_val = H5Iget_file_id(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Iget_name(hid_t id, char *name, size_t size); */ SEXP R_H5Iget_name(SEXP R_id, SEXP R_name, SEXP R_size){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t id = SEXP_to_longlong(R_id, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Iget_name(id, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Iget_ref(hid_t id); */ SEXP R_H5Iget_ref(SEXP R_id){ int vars_protected=0; hid_t id = SEXP_to_longlong(R_id, 0); int return_val = H5Iget_ref(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5I_type_t H5Iget_type(hid_t id); */ SEXP R_H5Iget_type(SEXP R_id){ int vars_protected=0; hid_t id = SEXP_to_longlong(R_id, 0); H5I_type_t return_val = H5Iget_type(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5I_type_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Iget_type_ref(H5I_type_t type); */ SEXP R_H5Iget_type_ref(SEXP R_type){ int vars_protected=0; H5I_type_t type = SEXP_to_longlong(R_type, 0); int return_val = H5Iget_type_ref(type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Iinc_ref(hid_t id); */ SEXP R_H5Iinc_ref(SEXP R_id){ int vars_protected=0; hid_t id = SEXP_to_longlong(R_id, 0); int return_val = H5Iinc_ref(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Iinc_type_ref(H5I_type_t type); */ SEXP R_H5Iinc_type_ref(SEXP R_type){ int vars_protected=0; H5I_type_t type = SEXP_to_longlong(R_type, 0); int return_val = H5Iinc_type_ref(type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Iis_valid(hid_t id); */ SEXP R_H5Iis_valid(SEXP R_id){ int vars_protected=0; hid_t id = SEXP_to_longlong(R_id, 0); htri_t return_val = H5Iis_valid(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members); */ SEXP R_H5Inmembers(SEXP R_type, SEXP R_num_members){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_num_members = PROTECT(duplicate(R_num_members)); vars_protected++; H5I_type_t type = SEXP_to_longlong(R_type, 0); hsize_t* num_members; if(XLENGTH(R_num_members) == 0) { num_members = NULL; } else { R_helper = PROTECT(RToH5(R_num_members, h5_datatype[DT_hsize_t], XLENGTH(R_num_members))); num_members= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Inmembers(type, num_members); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_num_members, h5_datatype[DT_hsize_t]); R_num_members = PROTECT(H5ToR_single_step(num_members, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_num_members); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("num_members")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object); */ SEXP R_H5Iregister(SEXP R_type, SEXP R_object){ int vars_protected=0; H5I_type_t type = SEXP_to_longlong(R_type, 0); const void* object; if(XLENGTH(R_object) == 0) { object = NULL; } else { object = (void *) VOIDPTR(R_object); } hid_t return_val = H5Iregister(type, object); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Itype_exists(H5I_type_t type); */ SEXP R_H5Itype_exists(SEXP R_type){ int vars_protected=0; H5I_type_t type = SEXP_to_longlong(R_type, 0); htri_t return_val = H5Itype_exists(type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5O.h
#ifndef _WRAPPER_AUTO_H5O_H_ #define _WRAPPER_AUTO_H5O_H_ #include "global.h" /* H5_DLL herr_t H5Oclose(hid_t object_id); */ SEXP R_H5Oclose(SEXP R_object_id); /* H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id); */ SEXP R_H5Ocopy(SEXP R_src_loc_id, SEXP R_src_name, SEXP R_dst_loc_id, SEXP R_dst_name, SEXP R_ocpypl_id, SEXP R_lcpl_id); /* H5_DLL herr_t H5Odecr_refcount(hid_t object_id); */ SEXP R_H5Odecr_refcount(SEXP R_object_id); /* H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Oexists_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id); /* H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize); */ SEXP R_H5Oget_comment(SEXP R_obj_id, SEXP R_comment, SEXP R_bufsize); /* H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize, hid_t lapl_id); */ SEXP R_H5Oget_comment_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_comment, SEXP R_bufsize, SEXP R_lapl_id); /* H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo); */ SEXP R_H5Oget_info(SEXP R_loc_id, SEXP R_oinfo); /* H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id); */ SEXP R_H5Oget_info_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_oinfo, SEXP R_lapl_id); /* H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id); */ SEXP R_H5Oget_info_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_oinfo, SEXP R_lapl_id); /* H5_DLL herr_t H5Oincr_refcount(hid_t object_id); */ SEXP R_H5Oincr_refcount(SEXP R_object_id); /* H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Olink(SEXP R_obj_id, SEXP R_new_loc_id, SEXP R_new_name, SEXP R_lcpl_id, SEXP R_lapl_id); /* H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Oopen(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id); /* H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr); */ SEXP R_H5Oopen_by_addr(SEXP R_loc_id, SEXP R_addr); /* H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); */ SEXP R_H5Oopen_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_lapl_id); /* H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment); */ SEXP R_H5Oset_comment(SEXP R_obj_id, SEXP R_comment); /* H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id); */ SEXP R_H5Oset_comment_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_comment, SEXP R_lapl_id); #endif
jeroen/hdf5r
src/1_10_3/Wrapper_auto_H5T.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5T.h" /* H5_DLL hid_t H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[]); */ SEXP R_H5Tarray_create2(SEXP R_base_id, SEXP R_ndims, SEXP R_dim){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t base_id = SEXP_to_longlong(R_base_id, 0); unsigned ndims = SEXP_to_longlong(R_ndims, 0); const hsize_t* dim; if(XLENGTH(R_dim) == 0) { dim = NULL; } else { R_helper = PROTECT(RToH5(R_dim, h5_datatype[DT_hsize_t], XLENGTH(R_dim))); dim= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } hid_t return_val = H5Tarray_create2(base_id, ndims, dim); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tclose(hid_t type_id); */ SEXP R_H5Tclose(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); herr_t return_val = H5Tclose(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id); */ SEXP R_H5Tcommit_anon(SEXP R_loc_id, SEXP R_type_id, SEXP R_tcpl_id, SEXP R_tapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); hid_t type_id = SEXP_to_longlong(R_type_id, 0); hid_t tcpl_id = SEXP_to_longlong(R_tcpl_id, 0); hid_t tapl_id = SEXP_to_longlong(R_tapl_id, 0); herr_t return_val = H5Tcommit_anon(loc_id, type_id, tcpl_id, tapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id); */ SEXP R_H5Tcommit2(SEXP R_loc_id, SEXP R_name, SEXP R_type_id, SEXP R_lcpl_id, SEXP R_tcpl_id, SEXP R_tapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t type_id = SEXP_to_longlong(R_type_id, 0); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t tcpl_id = SEXP_to_longlong(R_tcpl_id, 0); hid_t tapl_id = SEXP_to_longlong(R_tapl_id, 0); herr_t return_val = H5Tcommit2(loc_id, name, type_id, lcpl_id, tcpl_id, tapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Tcommitted(hid_t type_id); */ SEXP R_H5Tcommitted(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); htri_t return_val = H5Tcommitted(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id); */ SEXP R_H5Tcompiler_conv(SEXP R_src_id, SEXP R_dst_id){ int vars_protected=0; hid_t src_id = SEXP_to_longlong(R_src_id, 0); hid_t dst_id = SEXP_to_longlong(R_dst_id, 0); htri_t return_val = H5Tcompiler_conv(src_id, dst_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background, hid_t plist_id); */ SEXP R_H5Tconvert(SEXP R_src_id, SEXP R_dst_id, SEXP R_nelmts, SEXP R_buf, SEXP R_background, SEXP R_plist_id, SEXP _dupl_buf, SEXP _dupl_background){ int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } if(SEXP_to_logical(_dupl_background)) { R_background = PROTECT(duplicate(R_background)); vars_protected++; } hid_t src_id = SEXP_to_longlong(R_src_id, 0); hid_t dst_id = SEXP_to_longlong(R_dst_id, 0); size_t nelmts = SEXP_to_longlong(R_nelmts, 0); void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } void* background; if(XLENGTH(R_background) == 0) { background = NULL; } else { background = (void *) VOIDPTR(R_background); } hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); herr_t return_val = H5Tconvert(src_id, dst_id, nelmts, buf, background, plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SET_VECTOR_ELT(__ret_list, 2, R_background); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_STRING_ELT(__ret_list_names, 2, mkChar("background")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Tcopy(hid_t type_id); */ SEXP R_H5Tcopy(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); hid_t return_val = H5Tcopy(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size); */ SEXP R_H5Tcreate(SEXP R_type, SEXP R_size){ int vars_protected=0; H5T_class_t type = SEXP_to_longlong(R_type, 0); size_t size = SEXP_to_longlong(R_size, 0); hid_t return_val = H5Tcreate(type, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Tdecode(const void *buf); */ SEXP R_H5Tdecode(SEXP R_buf){ int vars_protected=0; const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } hid_t return_val = H5Tdecode(buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls); */ SEXP R_H5Tdetect_class(SEXP R_type_id, SEXP R_cls){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_class_t cls = SEXP_to_longlong(R_cls, 0); htri_t return_val = H5Tdetect_class(type_id, cls); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc); */ SEXP R_H5Tencode(SEXP R_obj_id, SEXP R_buf, SEXP R_nalloc, SEXP _dupl_buf){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } R_nalloc = PROTECT(duplicate(R_nalloc)); vars_protected++; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } size_t* nalloc; if(XLENGTH(R_nalloc) == 0) { nalloc = NULL; } else { R_helper = PROTECT(RToH5(R_nalloc, h5_datatype[DT_size_t], XLENGTH(R_nalloc))); nalloc= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Tencode(obj_id, buf, nalloc); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_nalloc, h5_datatype[DT_size_t]); R_nalloc = PROTECT(H5ToR_single_step(nalloc, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SET_VECTOR_ELT(__ret_list, 2, R_nalloc); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_STRING_ELT(__ret_list_names, 2, mkChar("nalloc")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Tenum_create(hid_t base_id); */ SEXP R_H5Tenum_create(SEXP R_base_id){ int vars_protected=0; hid_t base_id = SEXP_to_longlong(R_base_id, 0); hid_t return_val = H5Tenum_create(base_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tenum_insert(hid_t type, const char *name, const void *value); */ SEXP R_H5Tenum_insert(SEXP R_type, SEXP R_name, SEXP R_value){ int vars_protected=0; hid_t type = SEXP_to_longlong(R_type, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); const void* value; if(XLENGTH(R_value) == 0) { value = NULL; } else { value = (void *) VOIDPTR(R_value); } herr_t return_val = H5Tenum_insert(type, name, value); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tenum_nameof(hid_t type, const void *value, char *name, size_t size); */ SEXP R_H5Tenum_nameof(SEXP R_type, SEXP R_value, SEXP R_name, SEXP R_size){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t type = SEXP_to_longlong(R_type, 0); const void* value; if(XLENGTH(R_value) == 0) { value = NULL; } else { value = (void *) VOIDPTR(R_value); } char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5Tenum_nameof(type, value, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tenum_valueof(hid_t type, const char *name, void *value); */ SEXP R_H5Tenum_valueof(SEXP R_type, SEXP R_name, SEXP R_value, SEXP _dupl_value){ int vars_protected=0; if(SEXP_to_logical(_dupl_value)) { R_value = PROTECT(duplicate(R_value)); vars_protected++; } hid_t type = SEXP_to_longlong(R_type, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); void* value; if(XLENGTH(R_value) == 0) { value = NULL; } else { value = (void *) VOIDPTR(R_value); } herr_t return_val = H5Tenum_valueof(type, name, value); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_value); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("value")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Tequal(hid_t type1_id, hid_t type2_id); */ SEXP R_H5Tequal(SEXP R_type1_id, SEXP R_type2_id){ int vars_protected=0; hid_t type1_id = SEXP_to_longlong(R_type1_id, 0); hid_t type2_id = SEXP_to_longlong(R_type2_id, 0); htri_t return_val = H5Tequal(type1_id, type2_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tflush(hid_t type_id); */ SEXP R_H5Tflush(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); herr_t return_val = H5Tflush(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]); */ SEXP R_H5Tget_array_dims2(SEXP R_type_id, SEXP R_dims){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_dims = PROTECT(duplicate(R_dims)); vars_protected++; hid_t type_id = SEXP_to_longlong(R_type_id, 0); hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } int return_val = H5Tget_array_dims2(type_id, dims); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_dims, h5_datatype[DT_hsize_t]); R_dims = PROTECT(H5ToR_single_step(dims, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_dims); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("dims")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Tget_array_ndims(hid_t type_id); */ SEXP R_H5Tget_array_ndims(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); int return_val = H5Tget_array_ndims(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5T_class_t H5Tget_class(hid_t type_id); */ SEXP R_H5Tget_class(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_class_t return_val = H5Tget_class(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5T_class_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Tget_create_plist(hid_t type_id); */ SEXP R_H5Tget_create_plist(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); hid_t return_val = H5Tget_create_plist(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id); */ SEXP R_H5Tget_cset(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_cset_t return_val = H5Tget_cset(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5T_cset_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL size_t H5Tget_ebias(hid_t type_id); */ SEXP R_H5Tget_ebias(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); size_t return_val = H5Tget_ebias(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tget_fields(hid_t type_id, size_t *spos, size_t *epos, size_t *esize, size_t *mpos, size_t *msize); */ SEXP R_H5Tget_fields(SEXP R_type_id, SEXP R_spos, SEXP R_epos, SEXP R_esize, SEXP R_mpos, SEXP R_msize){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_spos = PROTECT(duplicate(R_spos)); vars_protected++; R_epos = PROTECT(duplicate(R_epos)); vars_protected++; R_esize = PROTECT(duplicate(R_esize)); vars_protected++; R_mpos = PROTECT(duplicate(R_mpos)); vars_protected++; R_msize = PROTECT(duplicate(R_msize)); vars_protected++; hid_t type_id = SEXP_to_longlong(R_type_id, 0); size_t* spos; if(XLENGTH(R_spos) == 0) { spos = NULL; } else { R_helper = PROTECT(RToH5(R_spos, h5_datatype[DT_size_t], XLENGTH(R_spos))); spos= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* epos; if(XLENGTH(R_epos) == 0) { epos = NULL; } else { R_helper = PROTECT(RToH5(R_epos, h5_datatype[DT_size_t], XLENGTH(R_epos))); epos= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* esize; if(XLENGTH(R_esize) == 0) { esize = NULL; } else { R_helper = PROTECT(RToH5(R_esize, h5_datatype[DT_size_t], XLENGTH(R_esize))); esize= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* mpos; if(XLENGTH(R_mpos) == 0) { mpos = NULL; } else { R_helper = PROTECT(RToH5(R_mpos, h5_datatype[DT_size_t], XLENGTH(R_mpos))); mpos= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* msize; if(XLENGTH(R_msize) == 0) { msize = NULL; } else { R_helper = PROTECT(RToH5(R_msize, h5_datatype[DT_size_t], XLENGTH(R_msize))); msize= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Tget_fields(type_id, spos, epos, esize, mpos, msize); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_spos, h5_datatype[DT_size_t]); R_spos = PROTECT(H5ToR_single_step(spos, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_epos, h5_datatype[DT_size_t]); R_epos = PROTECT(H5ToR_single_step(epos, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_esize, h5_datatype[DT_size_t]); R_esize = PROTECT(H5ToR_single_step(esize, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_mpos, h5_datatype[DT_size_t]); R_mpos = PROTECT(H5ToR_single_step(mpos, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_msize, h5_datatype[DT_size_t]); R_msize = PROTECT(H5ToR_single_step(msize, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 6)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_spos); SET_VECTOR_ELT(__ret_list, 2, R_epos); SET_VECTOR_ELT(__ret_list, 3, R_esize); SET_VECTOR_ELT(__ret_list, 4, R_mpos); SET_VECTOR_ELT(__ret_list, 5, R_msize); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 6)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("spos")); SET_STRING_ELT(__ret_list_names, 2, mkChar("epos")); SET_STRING_ELT(__ret_list_names, 3, mkChar("esize")); SET_STRING_ELT(__ret_list_names, 4, mkChar("mpos")); SET_STRING_ELT(__ret_list_names, 5, mkChar("msize")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id); */ SEXP R_H5Tget_inpad(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_pad_t return_val = H5Tget_inpad(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5T_pad_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5T_class_t H5Tget_member_class(hid_t type_id, unsigned membno); */ SEXP R_H5Tget_member_class(SEXP R_type_id, SEXP R_membno){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); unsigned membno = SEXP_to_longlong(R_membno, 0); H5T_class_t return_val = H5Tget_member_class(type_id, membno); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5T_class_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Tget_member_index(hid_t type_id, const char *name); */ SEXP R_H5Tget_member_index(SEXP R_type_id, SEXP R_name){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); int return_val = H5Tget_member_index(type_id, name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL char *H5Tget_member_name(hid_t type_id, unsigned membno); */ SEXP R_H5Tget_member_name(SEXP R_type_id, SEXP R_membno){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); unsigned membno = SEXP_to_longlong(R_membno, 0); char* return_val = H5Tget_member_name(type_id, membno); SEXP R_return_val= R_NilValue; if(return_val==NULL) { R_return_val = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_return_val = PROTECT(mkString(return_val)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; H5free_memory(return_val); UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno); */ SEXP R_H5Tget_member_offset(SEXP R_type_id, SEXP R_membno){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); unsigned membno = SEXP_to_longlong(R_membno, 0); size_t return_val = H5Tget_member_offset(type_id, membno); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno); */ SEXP R_H5Tget_member_type(SEXP R_type_id, SEXP R_membno){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); unsigned membno = SEXP_to_longlong(R_membno, 0); hid_t return_val = H5Tget_member_type(type_id, membno); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value); */ SEXP R_H5Tget_member_value(SEXP R_type_id, SEXP R_membno, SEXP R_value, SEXP _dupl_value){ int vars_protected=0; if(SEXP_to_logical(_dupl_value)) { R_value = PROTECT(duplicate(R_value)); vars_protected++; } hid_t type_id = SEXP_to_longlong(R_type_id, 0); unsigned membno = SEXP_to_longlong(R_membno, 0); void* value; if(XLENGTH(R_value) == 0) { value = NULL; } else { value = (void *) VOIDPTR(R_value); } herr_t return_val = H5Tget_member_value(type_id, membno, value); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_value); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("value")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction); */ SEXP R_H5Tget_native_type(SEXP R_type_id, SEXP R_direction){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_direction_t direction = SEXP_to_longlong(R_direction, 0); hid_t return_val = H5Tget_native_type(type_id, direction); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Tget_nmembers(hid_t type_id); */ SEXP R_H5Tget_nmembers(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); int return_val = H5Tget_nmembers(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id); */ SEXP R_H5Tget_norm(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_norm_t return_val = H5Tget_norm(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5T_norm_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Tget_offset(hid_t type_id); */ SEXP R_H5Tget_offset(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); int return_val = H5Tget_offset(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5T_order_t H5Tget_order(hid_t type_id); */ SEXP R_H5Tget_order(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_order_t return_val = H5Tget_order(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5T_order_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb, H5T_pad_t *msb); */ SEXP R_H5Tget_pad(SEXP R_type_id, SEXP R_lsb, SEXP R_msb){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_lsb = PROTECT(duplicate(R_lsb)); vars_protected++; R_msb = PROTECT(duplicate(R_msb)); vars_protected++; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_pad_t* lsb; if(XLENGTH(R_lsb) == 0) { lsb = NULL; } else { R_helper = PROTECT(RToH5(R_lsb, h5_datatype[DT_H5T_pad_t], XLENGTH(R_lsb))); lsb= (H5T_pad_t*) VOIDPTR(R_helper); vars_protected++; } H5T_pad_t* msb; if(XLENGTH(R_msb) == 0) { msb = NULL; } else { R_helper = PROTECT(RToH5(R_msb, h5_datatype[DT_H5T_pad_t], XLENGTH(R_msb))); msb= (H5T_pad_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Tget_pad(type_id, lsb, msb); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_lsb, h5_datatype[DT_H5T_pad_t]); R_lsb = PROTECT(H5ToR_single_step(lsb, h5_datatype[DT_H5T_pad_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_msb, h5_datatype[DT_H5T_pad_t]); R_msb = PROTECT(H5ToR_single_step(msb, h5_datatype[DT_H5T_pad_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_lsb); SET_VECTOR_ELT(__ret_list, 2, R_msb); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("lsb")); SET_STRING_ELT(__ret_list_names, 2, mkChar("msb")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL size_t H5Tget_precision(hid_t type_id); */ SEXP R_H5Tget_precision(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); size_t return_val = H5Tget_precision(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id); */ SEXP R_H5Tget_sign(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_sign_t return_val = H5Tget_sign(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5T_sign_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL size_t H5Tget_size(hid_t type_id); */ SEXP R_H5Tget_size(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); size_t return_val = H5Tget_size(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id); */ SEXP R_H5Tget_strpad(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_str_t return_val = H5Tget_strpad(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5T_str_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Tget_super(hid_t type); */ SEXP R_H5Tget_super(SEXP R_type){ int vars_protected=0; hid_t type = SEXP_to_longlong(R_type, 0); hid_t return_val = H5Tget_super(type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL char *H5Tget_tag(hid_t type); */ SEXP R_H5Tget_tag(SEXP R_type){ int vars_protected=0; hid_t type = SEXP_to_longlong(R_type, 0); char* return_val = H5Tget_tag(type); SEXP R_return_val= R_NilValue; if(return_val==NULL) { R_return_val = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_return_val = PROTECT(mkString(return_val)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; H5free_memory(return_val); UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id); */ SEXP R_H5Tinsert(SEXP R_parent_id, SEXP R_name, SEXP R_offset, SEXP R_member_id){ int vars_protected=0; hid_t parent_id = SEXP_to_longlong(R_parent_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); size_t offset = SEXP_to_longlong(R_offset, 0); hid_t member_id = SEXP_to_longlong(R_member_id, 0); herr_t return_val = H5Tinsert(parent_id, name, offset, member_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Tis_variable_str(hid_t type_id); */ SEXP R_H5Tis_variable_str(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); htri_t return_val = H5Tis_variable_str(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tlock(hid_t type_id); */ SEXP R_H5Tlock(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); herr_t return_val = H5Tlock(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id); */ SEXP R_H5Topen2(SEXP R_loc_id, SEXP R_name, SEXP R_tapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t tapl_id = SEXP_to_longlong(R_tapl_id, 0); hid_t return_val = H5Topen2(loc_id, name, tapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tpack(hid_t type_id); */ SEXP R_H5Tpack(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); herr_t return_val = H5Tpack(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Trefresh(hid_t type_id); */ SEXP R_H5Trefresh(SEXP R_type_id){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); herr_t return_val = H5Trefresh(type_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset); */ SEXP R_H5Tset_cset(SEXP R_type_id, SEXP R_cset){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_cset_t cset = SEXP_to_longlong(R_cset, 0); herr_t return_val = H5Tset_cset(type_id, cset); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_ebias(hid_t type_id, size_t ebias); */ SEXP R_H5Tset_ebias(SEXP R_type_id, SEXP R_ebias){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); size_t ebias = SEXP_to_longlong(R_ebias, 0); herr_t return_val = H5Tset_ebias(type_id, ebias); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize); */ SEXP R_H5Tset_fields(SEXP R_type_id, SEXP R_spos, SEXP R_epos, SEXP R_esize, SEXP R_mpos, SEXP R_msize){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); size_t spos = SEXP_to_longlong(R_spos, 0); size_t epos = SEXP_to_longlong(R_epos, 0); size_t esize = SEXP_to_longlong(R_esize, 0); size_t mpos = SEXP_to_longlong(R_mpos, 0); size_t msize = SEXP_to_longlong(R_msize, 0); herr_t return_val = H5Tset_fields(type_id, spos, epos, esize, mpos, msize); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_inpad(hid_t type_id, H5T_pad_t pad); */ SEXP R_H5Tset_inpad(SEXP R_type_id, SEXP R_pad){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_pad_t pad = SEXP_to_longlong(R_pad, 0); herr_t return_val = H5Tset_inpad(type_id, pad); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_norm(hid_t type_id, H5T_norm_t norm); */ SEXP R_H5Tset_norm(SEXP R_type_id, SEXP R_norm){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_norm_t norm = SEXP_to_longlong(R_norm, 0); herr_t return_val = H5Tset_norm(type_id, norm); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_offset(hid_t type_id, size_t offset); */ SEXP R_H5Tset_offset(SEXP R_type_id, SEXP R_offset){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); size_t offset = SEXP_to_longlong(R_offset, 0); herr_t return_val = H5Tset_offset(type_id, offset); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_order(hid_t type_id, H5T_order_t order); */ SEXP R_H5Tset_order(SEXP R_type_id, SEXP R_order){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_order_t order = SEXP_to_longlong(R_order, 0); herr_t return_val = H5Tset_order(type_id, order); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb); */ SEXP R_H5Tset_pad(SEXP R_type_id, SEXP R_lsb, SEXP R_msb){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_pad_t lsb = SEXP_to_longlong(R_lsb, 0); H5T_pad_t msb = SEXP_to_longlong(R_msb, 0); herr_t return_val = H5Tset_pad(type_id, lsb, msb); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_precision(hid_t type_id, size_t prec); */ SEXP R_H5Tset_precision(SEXP R_type_id, SEXP R_prec){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); size_t prec = SEXP_to_longlong(R_prec, 0); herr_t return_val = H5Tset_precision(type_id, prec); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_sign(hid_t type_id, H5T_sign_t sign); */ SEXP R_H5Tset_sign(SEXP R_type_id, SEXP R_sign){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_sign_t sign = SEXP_to_longlong(R_sign, 0); herr_t return_val = H5Tset_sign(type_id, sign); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_size(hid_t type_id, size_t size); */ SEXP R_H5Tset_size(SEXP R_type_id, SEXP R_size){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); size_t size = SEXP_to_longlong(R_size, 0); // INJECTION CODE START if(isReal(R_size ) && REAL(R_size)[0] == R_PosInf) { size = H5T_VARIABLE; } // INJECTION CODE END herr_t return_val = H5Tset_size(type_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad); */ SEXP R_H5Tset_strpad(SEXP R_type_id, SEXP R_strpad){ int vars_protected=0; hid_t type_id = SEXP_to_longlong(R_type_id, 0); H5T_str_t strpad = SEXP_to_longlong(R_strpad, 0); herr_t return_val = H5Tset_strpad(type_id, strpad); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Tset_tag(hid_t type, const char *tag); */ SEXP R_H5Tset_tag(SEXP R_type, SEXP R_tag){ int vars_protected=0; hid_t type = SEXP_to_longlong(R_type, 0); const char* tag = CHAR(STRING_ELT(R_tag, 0)); herr_t return_val = H5Tset_tag(type, tag); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Tvlen_create(hid_t base_id); */ SEXP R_H5Tvlen_create(SEXP R_base_id){ int vars_protected=0; hid_t base_id = SEXP_to_longlong(R_base_id, 0); hid_t return_val = H5Tvlen_create(base_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_10_3/Wrapper_auto_H5D.c
<reponame>jeroen/hdf5r /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5D.h" /* H5_DLL herr_t H5Dclose(hid_t dset_id); */ SEXP R_H5Dclose(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); herr_t return_val = H5Dclose(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Dcreate_anon(hid_t file_id, hid_t type_id, hid_t space_id, hid_t plist_id, hid_t dapl_id); */ SEXP R_H5Dcreate_anon(SEXP R_file_id, SEXP R_type_id, SEXP R_space_id, SEXP R_plist_id, SEXP R_dapl_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); hid_t type_id = SEXP_to_longlong(R_type_id, 0); hid_t space_id = SEXP_to_longlong(R_space_id, 0); hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hid_t dapl_id = SEXP_to_longlong(R_dapl_id, 0); hid_t return_val = H5Dcreate_anon(file_id, type_id, space_id, plist_id, dapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id); */ SEXP R_H5Dcreate2(SEXP R_loc_id, SEXP R_name, SEXP R_type_id, SEXP R_space_id, SEXP R_lcpl_id, SEXP R_dcpl_id, SEXP R_dapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t type_id = SEXP_to_longlong(R_type_id, 0); hid_t space_id = SEXP_to_longlong(R_space_id, 0); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t dcpl_id = SEXP_to_longlong(R_dcpl_id, 0); hid_t dapl_id = SEXP_to_longlong(R_dapl_id, 0); hid_t return_val = H5Dcreate2(loc_id, name, type_id, space_id, lcpl_id, dcpl_id, dapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Ddebug(hid_t dset_id); */ SEXP R_H5Ddebug(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); herr_t return_val = H5Ddebug(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf, hid_t buf_type, hid_t space); */ SEXP R_H5Dfill(SEXP R_fill, SEXP R_fill_type, SEXP R_buf, SEXP R_buf_type, SEXP R_space, SEXP _dupl_buf){ int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } const void* fill; if(XLENGTH(R_fill) == 0) { fill = NULL; } else { fill = (void *) VOIDPTR(R_fill); } hid_t fill_type = SEXP_to_longlong(R_fill_type, 0); void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } hid_t buf_type = SEXP_to_longlong(R_buf_type, 0); hid_t space = SEXP_to_longlong(R_space, 0); herr_t return_val = H5Dfill(fill, fill_type, buf, buf_type, space); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dflush(hid_t dset_id); */ SEXP R_H5Dflush(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); herr_t return_val = H5Dflush(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dformat_convert(hid_t dset_id); */ SEXP R_H5Dformat_convert(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); herr_t return_val = H5Dformat_convert(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Dget_access_plist(hid_t dset_id); */ SEXP R_H5Dget_access_plist(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); hid_t return_val = H5Dget_access_plist(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); */ SEXP R_H5Dget_chunk_index_type(SEXP R_did, SEXP R_idx_type){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_idx_type = PROTECT(duplicate(R_idx_type)); vars_protected++; hid_t did = SEXP_to_longlong(R_did, 0); H5D_chunk_index_t* idx_type; if(XLENGTH(R_idx_type) == 0) { idx_type = NULL; } else { R_helper = PROTECT(RToH5(R_idx_type, h5_datatype[DT_H5D_chunk_index_t], XLENGTH(R_idx_type))); idx_type= (H5D_chunk_index_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Dget_chunk_index_type(did, idx_type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_idx_type, h5_datatype[DT_H5D_chunk_index_t]); R_idx_type = PROTECT(H5ToR_single_step(idx_type, h5_datatype[DT_H5D_chunk_index_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_idx_type); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("idx_type")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes); */ SEXP R_H5Dget_chunk_storage_size(SEXP R_dset_id, SEXP R_offset, SEXP R_chunk_bytes){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_chunk_bytes = PROTECT(duplicate(R_chunk_bytes)); vars_protected++; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); const hsize_t* offset; if(XLENGTH(R_offset) == 0) { offset = NULL; } else { R_helper = PROTECT(RToH5(R_offset, h5_datatype[DT_hsize_t], XLENGTH(R_offset))); offset= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* chunk_bytes; if(XLENGTH(R_chunk_bytes) == 0) { chunk_bytes = NULL; } else { R_helper = PROTECT(RToH5(R_chunk_bytes, h5_datatype[DT_hsize_t], XLENGTH(R_chunk_bytes))); chunk_bytes= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Dget_chunk_storage_size(dset_id, offset, chunk_bytes); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_chunk_bytes, h5_datatype[DT_hsize_t]); R_chunk_bytes = PROTECT(H5ToR_single_step(chunk_bytes, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_chunk_bytes); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("chunk_bytes")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Dget_create_plist(hid_t dset_id); */ SEXP R_H5Dget_create_plist(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); hid_t return_val = H5Dget_create_plist(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL haddr_t H5Dget_offset(hid_t dset_id); */ SEXP R_H5Dget_offset(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); haddr_t return_val = H5Dget_offset(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Dget_space(hid_t dset_id); */ SEXP R_H5Dget_space(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); hid_t return_val = H5Dget_space(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation); */ SEXP R_H5Dget_space_status(SEXP R_dset_id, SEXP R_allocation){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_allocation = PROTECT(duplicate(R_allocation)); vars_protected++; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); H5D_space_status_t* allocation; if(XLENGTH(R_allocation) == 0) { allocation = NULL; } else { R_helper = PROTECT(RToH5(R_allocation, h5_datatype[DT_H5D_space_status_t], XLENGTH(R_allocation))); allocation= (H5D_space_status_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Dget_space_status(dset_id, allocation); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_allocation, h5_datatype[DT_H5D_space_status_t]); R_allocation = PROTECT(H5ToR_single_step(allocation, h5_datatype[DT_H5D_space_status_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_allocation); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("allocation")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id); */ SEXP R_H5Dget_storage_size(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); hsize_t return_val = H5Dget_storage_size(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Dget_type(hid_t dset_id); */ SEXP R_H5Dget_type(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); hid_t return_val = H5Dget_type(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Dopen2(hid_t file_id, const char *name, hid_t dapl_id); */ SEXP R_H5Dopen2(SEXP R_file_id, SEXP R_name, SEXP R_dapl_id){ int vars_protected=0; hid_t file_id = SEXP_to_longlong(R_file_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t dapl_id = SEXP_to_longlong(R_dapl_id, 0); hid_t return_val = H5Dopen2(file_id, name, dapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, void *buf); */ SEXP R_H5Dread(SEXP R_dset_id, SEXP R_mem_type_id, SEXP R_mem_space_id, SEXP R_file_space_id, SEXP R_plist_id, SEXP R_buf, SEXP _dupl_buf){ int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); hid_t mem_type_id = SEXP_to_longlong(R_mem_type_id, 0); hid_t mem_space_id = SEXP_to_longlong(R_mem_space_id, 0); hid_t file_space_id = SEXP_to_longlong(R_file_space_id, 0); hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5Dread(dset_id, mem_type_id, mem_space_id, file_space_id, plist_id, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *filters, void *buf); */ SEXP R_H5Dread_chunk(SEXP R_dset_id, SEXP R_dxpl_id, SEXP R_offset, SEXP R_filters, SEXP R_buf, SEXP _dupl_buf){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_filters = PROTECT(duplicate(R_filters)); vars_protected++; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); hid_t dxpl_id = SEXP_to_longlong(R_dxpl_id, 0); const hsize_t* offset; if(XLENGTH(R_offset) == 0) { offset = NULL; } else { R_helper = PROTECT(RToH5(R_offset, h5_datatype[DT_hsize_t], XLENGTH(R_offset))); offset= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } uint32_t* filters; if(XLENGTH(R_filters) == 0) { filters = NULL; } else { R_helper = PROTECT(RToH5(R_filters, h5_datatype[DT_uint32_t], XLENGTH(R_filters))); filters= (uint32_t*) VOIDPTR(R_helper); vars_protected++; } void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5Dread_chunk(dset_id, dxpl_id, offset, filters, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_filters, h5_datatype[DT_uint32_t]); R_filters = PROTECT(H5ToR_single_step(filters, h5_datatype[DT_uint32_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_filters); SET_VECTOR_ELT(__ret_list, 2, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("filters")); SET_STRING_ELT(__ret_list_names, 2, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Drefresh(hid_t dset_id); */ SEXP R_H5Drefresh(SEXP R_dset_id){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); herr_t return_val = H5Drefresh(dset_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]); */ SEXP R_H5Dset_extent(SEXP R_dset_id, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); const hsize_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_hsize_t], XLENGTH(R_size))); size= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Dset_extent(dset_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size); */ SEXP R_H5Dvlen_get_buf_size(SEXP R_dataset_id, SEXP R_type_id, SEXP R_space_id, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_size = PROTECT(duplicate(R_size)); vars_protected++; hid_t dataset_id = SEXP_to_longlong(R_dataset_id, 0); hid_t type_id = SEXP_to_longlong(R_type_id, 0); hid_t space_id = SEXP_to_longlong(R_space_id, 0); hsize_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_hsize_t], XLENGTH(R_size))); size= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Dvlen_get_buf_size(dataset_id, type_id, space_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_size, h5_datatype[DT_hsize_t]); R_size = PROTECT(H5ToR_single_step(size, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf); */ SEXP R_H5Dvlen_reclaim(SEXP R_type_id, SEXP R_space_id, SEXP R_plist_id, SEXP R_buf, SEXP _dupl_buf){ int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } hid_t type_id = SEXP_to_longlong(R_type_id, 0); hid_t space_id = SEXP_to_longlong(R_space_id, 0); hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5Dvlen_reclaim(type_id, space_id, plist_id, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, const void *buf); */ SEXP R_H5Dwrite(SEXP R_dset_id, SEXP R_mem_type_id, SEXP R_mem_space_id, SEXP R_file_space_id, SEXP R_plist_id, SEXP R_buf){ int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); hid_t mem_type_id = SEXP_to_longlong(R_mem_type_id, 0); hid_t mem_space_id = SEXP_to_longlong(R_mem_space_id, 0); hid_t file_space_id = SEXP_to_longlong(R_file_space_id, 0); hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5Dwrite(dset_id, mem_type_id, mem_space_id, file_space_id, plist_id, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset, size_t data_size, const void *buf); */ SEXP R_H5Dwrite_chunk(SEXP R_dset_id, SEXP R_dxpl_id, SEXP R_filters, SEXP R_offset, SEXP R_data_size, SEXP R_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); hid_t dxpl_id = SEXP_to_longlong(R_dxpl_id, 0); uint32_t filters = SEXP_to_longlong(R_filters, 0); const hsize_t* offset; if(XLENGTH(R_offset) == 0) { offset = NULL; } else { R_helper = PROTECT(RToH5(R_offset, h5_datatype[DT_hsize_t], XLENGTH(R_offset))); offset= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } size_t data_size = SEXP_to_longlong(R_data_size, 0); const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5Dwrite_chunk(dset_id, dxpl_id, filters, offset, data_size, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5FDfamily.h
#ifndef _WRAPPER_AUTO_H5FDFAMILY_H_ #define _WRAPPER_AUTO_H5FDFAMILY_H_ #include "global.h" /* H5_DLL hid_t H5FD_family_init(void); */ SEXP R_H5FD_family_init(void); /* H5_DLL herr_t H5Pget_fapl_family(hid_t fapl_id, hsize_t *memb_size, hid_t *memb_fapl_id); */ SEXP R_H5Pget_fapl_family(SEXP R_fapl_id, SEXP R_memb_size, SEXP R_memb_fapl_id); /* H5_DLL herr_t H5Pset_fapl_family(hid_t fapl_id, hsize_t memb_size, hid_t memb_fapl_id); */ SEXP R_H5Pset_fapl_family(SEXP R_fapl_id, SEXP R_memb_size, SEXP R_memb_fapl_id); #endif
jeroen/hdf5r
inst/CWrappers_1.8.12/headers/H5Ipublic.h
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * This file contains function prototypes for each exported function in * the H5I module. */ #ifndef _H5Ipublic_H #define _H5Ipublic_H /* Public headers needed by this file */ #include "H5public.h" /* * Library type values. Start with `1' instead of `0' because it makes the * tracing output look better when hid_t values are large numbers. Change the * TYPE_BITS in H5I.c if the MAXID gets larger than 32 (an assertion will * fail otherwise). * * When adding types here, add a section to the 'misc19' test in test/tmisc.c * to verify that the H5I{inc|dec|get}_ref() routines work correctly with in. * */ typedef enum H5I_type_t { H5I_UNINIT = (-2), /*uninitialized type */ H5I_BADID = (-1), /*invalid Type */ H5I_FILE = 1, /*type ID for File objects */ H5I_GROUP, /*type ID for Group objects */ H5I_DATATYPE, /*type ID for Datatype objects */ H5I_DATASPACE, /*type ID for Dataspace objects */ H5I_DATASET, /*type ID for Dataset objects */ H5I_ATTR, /*type ID for Attribute objects */ H5I_REFERENCE, /*type ID for Reference objects */ H5I_VFL, /*type ID for virtual file layer */ H5I_GENPROP_CLS, /*type ID for generic property list classes */ H5I_GENPROP_LST, /*type ID for generic property lists */ H5I_ERROR_CLASS, /*type ID for error classes */ H5I_ERROR_MSG, /*type ID for error messages */ H5I_ERROR_STACK, /*type ID for error stacks */ H5I_NTYPES /*number of library types, MUST BE LAST! */ } H5I_type_t; /* Type of atoms to return to users */ typedef int hid_t; #define H5_SIZEOF_HID_T H5_SIZEOF_INT /* An invalid object ID. This is also negative for error return. */ #define H5I_INVALID_HID (-1) /* * Function for freeing objects. This function will be called with an object * ID type number and a pointer to the object. The function should free the * object and return non-negative to indicate that the object * can be removed from the ID type. If the function returns negative * (failure) then the object will remain in the ID type. */ typedef herr_t (*H5I_free_t)(void*); /* Type of the function to compare objects & keys */ typedef int (*H5I_search_func_t)(void *obj, hid_t id, void *key); #ifdef __cplusplus extern "C" { #endif /* Public API functions */ H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object); H5_DLL void *H5Iobject_verify(hid_t id, H5I_type_t id_type); H5_DLL void *H5Iremove_verify(hid_t id, H5I_type_t id_type); H5_DLL H5I_type_t H5Iget_type(hid_t id); H5_DLL hid_t H5Iget_file_id(hid_t id); H5_DLL ssize_t H5Iget_name(hid_t id, char *name/*out*/, size_t size); H5_DLL int H5Iinc_ref(hid_t id); H5_DLL int H5Idec_ref(hid_t id); H5_DLL int H5Iget_ref(hid_t id); H5_DLL H5I_type_t H5Iregister_type(size_t hash_size, unsigned reserved, H5I_free_t free_func); H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force); H5_DLL herr_t H5Idestroy_type(H5I_type_t type); H5_DLL int H5Iinc_type_ref(H5I_type_t type); H5_DLL int H5Idec_type_ref(H5I_type_t type); H5_DLL int H5Iget_type_ref(H5I_type_t type); H5_DLL void *H5Isearch(H5I_type_t type, H5I_search_func_t func, void *key); H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members); H5_DLL htri_t H5Itype_exists(H5I_type_t type); H5_DLL htri_t H5Iis_valid(hid_t id); #ifdef __cplusplus } #endif #endif /* _H5Ipublic_H */
jeroen/hdf5r
inst/CWrappers_1.8.16/headers/H5IMpublic.h
<reponame>jeroen/hdf5r<gh_stars>100-1000 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5IMpublic_H #define _H5IMpublic_H #ifdef __cplusplus extern "C" { #endif H5_HLDLL herr_t H5IMmake_image_8bit( hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, const unsigned char *buffer ); H5_HLDLL herr_t H5IMmake_image_24bit( hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, const char *interlace, const unsigned char *buffer ); H5_HLDLL herr_t H5IMget_image_info( hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t *height, hsize_t *planes, char *interlace, hssize_t *npals ); H5_HLDLL herr_t H5IMread_image( hid_t loc_id, const char *dset_name, unsigned char *buffer ); H5_HLDLL herr_t H5IMmake_palette( hid_t loc_id, const char *pal_name, const hsize_t *pal_dims, const unsigned char *pal_data ); H5_HLDLL herr_t H5IMlink_palette( hid_t loc_id, const char *image_name, const char *pal_name ); H5_HLDLL herr_t H5IMunlink_palette( hid_t loc_id, const char *image_name, const char *pal_name ); H5_HLDLL herr_t H5IMget_npalettes( hid_t loc_id, const char *image_name, hssize_t *npals ); H5_HLDLL herr_t H5IMget_palette_info( hid_t loc_id, const char *image_name, int pal_number, hsize_t *pal_dims ); H5_HLDLL herr_t H5IMget_palette( hid_t loc_id, const char *image_name, int pal_number, unsigned char *pal_data ); H5_HLDLL herr_t H5IMis_image( hid_t loc_id, const char *dset_name ); H5_HLDLL herr_t H5IMis_palette( hid_t loc_id, const char *dset_name ); #ifdef __cplusplus } #endif #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5I.h
#ifndef _WRAPPER_AUTO_H5I_H_ #define _WRAPPER_AUTO_H5I_H_ #include "global.h" /* H5_DLL herr_t H5Iclear_type(H5I_type_t type, hbool_t force); */ SEXP R_H5Iclear_type(SEXP R_type, SEXP R_force); /* H5_DLL int H5Idec_ref(hid_t id); */ SEXP R_H5Idec_ref(SEXP R_id); /* H5_DLL int H5Idec_type_ref(H5I_type_t type); */ SEXP R_H5Idec_type_ref(SEXP R_type); /* H5_DLL herr_t H5Idestroy_type(H5I_type_t type); */ SEXP R_H5Idestroy_type(SEXP R_type); /* H5_DLL hid_t H5Iget_file_id(hid_t id); */ SEXP R_H5Iget_file_id(SEXP R_id); /* H5_DLL ssize_t H5Iget_name(hid_t id, char *name, size_t size); */ SEXP R_H5Iget_name(SEXP R_id, SEXP R_name, SEXP R_size); /* H5_DLL int H5Iget_ref(hid_t id); */ SEXP R_H5Iget_ref(SEXP R_id); /* H5_DLL H5I_type_t H5Iget_type(hid_t id); */ SEXP R_H5Iget_type(SEXP R_id); /* H5_DLL int H5Iget_type_ref(H5I_type_t type); */ SEXP R_H5Iget_type_ref(SEXP R_type); /* H5_DLL int H5Iinc_ref(hid_t id); */ SEXP R_H5Iinc_ref(SEXP R_id); /* H5_DLL int H5Iinc_type_ref(H5I_type_t type); */ SEXP R_H5Iinc_type_ref(SEXP R_type); /* H5_DLL htri_t H5Iis_valid(hid_t id); */ SEXP R_H5Iis_valid(SEXP R_id); /* H5_DLL herr_t H5Inmembers(H5I_type_t type, hsize_t *num_members); */ SEXP R_H5Inmembers(SEXP R_type, SEXP R_num_members); /* H5_DLL hid_t H5Iregister(H5I_type_t type, const void *object); */ SEXP R_H5Iregister(SEXP R_type, SEXP R_object); /* H5_DLL htri_t H5Itype_exists(H5I_type_t type); */ SEXP R_H5Itype_exists(SEXP R_type); #endif
jeroen/hdf5r
src/1_10_3/Wrapper_auto_H5S.h
#ifndef _WRAPPER_AUTO_H5S_H_ #define _WRAPPER_AUTO_H5S_H_ #include "global.h" /* H5_DLL herr_t H5Sclose(hid_t space_id); */ SEXP R_H5Sclose(SEXP R_space_id); /* H5_DLL hid_t H5Scopy(hid_t space_id); */ SEXP R_H5Scopy(SEXP R_space_id); /* H5_DLL hid_t H5Screate(H5S_class_t type); */ SEXP R_H5Screate(SEXP R_type); /* H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[], const hsize_t maxdims[]); */ SEXP R_H5Screate_simple(SEXP R_rank, SEXP R_dims, SEXP R_maxdims); /* H5_DLL hid_t H5Sdecode(const void *buf); */ SEXP R_H5Sdecode(SEXP R_buf); /* H5_DLL herr_t H5Sencode(hid_t obj_id, void *buf, size_t *nalloc); */ SEXP R_H5Sencode(SEXP R_obj_id, SEXP R_buf, SEXP R_nalloc, SEXP _dupl_buf); /* H5_DLL herr_t H5Sextent_copy(hid_t dst_id,hid_t src_id); */ SEXP R_H5Sextent_copy(SEXP R_dst_id, SEXP R_src_id); /* H5_DLL htri_t H5Sextent_equal(hid_t sid1, hid_t sid2); */ SEXP R_H5Sextent_equal(SEXP R_sid1, SEXP R_sid2); /* H5_DLL htri_t H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[], hsize_t stride[], hsize_t count[], hsize_t block[]); */ SEXP R_H5Sget_regular_hyperslab(SEXP R_spaceid, SEXP R_start, SEXP R_stride, SEXP R_count, SEXP R_block); /* H5_DLL herr_t H5Sget_select_bounds(hid_t spaceid, hsize_t start[], hsize_t end[]); */ SEXP R_H5Sget_select_bounds(SEXP R_spaceid, SEXP R_start, SEXP R_end); /* H5_DLL hssize_t H5Sget_select_elem_npoints(hid_t spaceid); */ SEXP R_H5Sget_select_elem_npoints(SEXP R_spaceid); /* H5_DLL herr_t H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint, hsize_t numpoints, hsize_t buf[]); */ SEXP R_H5Sget_select_elem_pointlist(SEXP R_spaceid, SEXP R_startpoint, SEXP R_numpoints, SEXP R_buf); /* H5_DLL herr_t H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock, hsize_t numblocks, hsize_t buf[]); */ SEXP R_H5Sget_select_hyper_blocklist(SEXP R_spaceid, SEXP R_startblock, SEXP R_numblocks, SEXP R_buf); /* H5_DLL hssize_t H5Sget_select_hyper_nblocks(hid_t spaceid); */ SEXP R_H5Sget_select_hyper_nblocks(SEXP R_spaceid); /* H5_DLL hssize_t H5Sget_select_npoints(hid_t spaceid); */ SEXP R_H5Sget_select_npoints(SEXP R_spaceid); /* H5_DLL H5S_sel_type H5Sget_select_type(hid_t spaceid); */ SEXP R_H5Sget_select_type(SEXP R_spaceid); /* H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[], hsize_t maxdims[]); */ SEXP R_H5Sget_simple_extent_dims(SEXP R_space_id, SEXP R_dims, SEXP R_maxdims); /* H5_DLL int H5Sget_simple_extent_ndims(hid_t space_id); */ SEXP R_H5Sget_simple_extent_ndims(SEXP R_space_id); /* H5_DLL hssize_t H5Sget_simple_extent_npoints(hid_t space_id); */ SEXP R_H5Sget_simple_extent_npoints(SEXP R_space_id); /* H5_DLL H5S_class_t H5Sget_simple_extent_type(hid_t space_id); */ SEXP R_H5Sget_simple_extent_type(SEXP R_space_id); /* H5_DLL htri_t H5Sis_regular_hyperslab(hid_t spaceid); */ SEXP R_H5Sis_regular_hyperslab(SEXP R_spaceid); /* H5_DLL htri_t H5Sis_simple(hid_t space_id); */ SEXP R_H5Sis_simple(SEXP R_space_id); /* H5_DLL herr_t H5Soffset_simple(hid_t space_id, const hssize_t *offset); */ SEXP R_H5Soffset_simple(SEXP R_space_id, SEXP R_offset); /* H5_DLL herr_t H5Sselect_all(hid_t spaceid); */ SEXP R_H5Sselect_all(SEXP R_spaceid); /* H5_DLL herr_t H5Sselect_elements(hid_t space_id, H5S_seloper_t op, size_t num_elem, const hsize_t *coord); */ SEXP R_H5Sselect_elements(SEXP R_space_id, SEXP R_op, SEXP R_num_elem, SEXP R_coord); /* H5_DLL herr_t H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], const hsize_t _stride[], const hsize_t count[], const hsize_t _block[]); */ SEXP R_H5Sselect_hyperslab(SEXP R_space_id, SEXP R_op, SEXP R_start, SEXP R__stride, SEXP R_count, SEXP R__block); /* H5_DLL herr_t H5Sselect_none(hid_t spaceid); */ SEXP R_H5Sselect_none(SEXP R_spaceid); /* H5_DLL htri_t H5Sselect_valid(hid_t spaceid); */ SEXP R_H5Sselect_valid(SEXP R_spaceid); /* H5_DLL herr_t H5Sset_extent_none(hid_t space_id); */ SEXP R_H5Sset_extent_none(SEXP R_space_id); /* H5_DLL herr_t H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[], const hsize_t max[]); */ SEXP R_H5Sset_extent_simple(SEXP R_space_id, SEXP R_rank, SEXP R_dims, SEXP R_max); #endif
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5O.c
<filename>src/1_12_0/Wrapper_auto_H5O.c<gh_stars>10-100 /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5O.h" /* H5_DLL herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled); */ SEXP R_H5Oare_mdc_flushes_disabled(SEXP R_object_id, SEXP R_are_disabled){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_are_disabled = PROTECT(duplicate(R_are_disabled)); vars_protected++; hid_t object_id = SEXP_to_longlong(R_object_id, 0); hbool_t* are_disabled; if(XLENGTH(R_are_disabled) == 0) { are_disabled = NULL; } else { R_helper = PROTECT(RToH5(R_are_disabled, h5_datatype[DT_hbool_t], XLENGTH(R_are_disabled))); are_disabled= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Oare_mdc_flushes_disabled(object_id, are_disabled); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_are_disabled, h5_datatype[DT_hbool_t]); R_are_disabled = PROTECT(H5ToR_single_step(are_disabled, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_are_disabled); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("are_disabled")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oclose(hid_t object_id); */ SEXP R_H5Oclose(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Oclose(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id); */ SEXP R_H5Ocopy(SEXP R_src_loc_id, SEXP R_src_name, SEXP R_dst_loc_id, SEXP R_dst_name, SEXP R_ocpypl_id, SEXP R_lcpl_id){ int vars_protected=0; hid_t src_loc_id = SEXP_to_longlong(R_src_loc_id, 0); const char* src_name = CHAR(STRING_ELT(R_src_name, 0)); hid_t dst_loc_id = SEXP_to_longlong(R_dst_loc_id, 0); const char* dst_name = CHAR(STRING_ELT(R_dst_name, 0)); hid_t ocpypl_id = SEXP_to_longlong(R_ocpypl_id, 0); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); herr_t return_val = H5Ocopy(src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Odecr_refcount(hid_t object_id); */ SEXP R_H5Odecr_refcount(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Odecr_refcount(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Odisable_mdc_flushes(hid_t object_id); */ SEXP R_H5Odisable_mdc_flushes(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Odisable_mdc_flushes(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oenable_mdc_flushes(hid_t object_id); */ SEXP R_H5Oenable_mdc_flushes(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Oenable_mdc_flushes(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Oexists_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); htri_t return_val = H5Oexists_by_name(loc_id, name, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oflush(hid_t obj_id); */ SEXP R_H5Oflush(SEXP R_obj_id){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); herr_t return_val = H5Oflush(obj_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize); */ SEXP R_H5Oget_comment(SEXP R_obj_id, SEXP R_comment, SEXP R_bufsize){ int vars_protected=0; R_comment = PROTECT(duplicate(R_comment)); vars_protected++; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); char* comment; if(XLENGTH(R_comment) == 0) { comment = NULL; } else { comment = R_alloc(strlen(CHAR(STRING_ELT(R_comment, 0))) + 1, 1); strcpy(comment, CHAR(STRING_ELT(R_comment, 0))); } size_t bufsize = SEXP_to_longlong(R_bufsize, 0); ssize_t return_val = H5Oget_comment(obj_id, comment, bufsize); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(comment==NULL) { R_comment = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_comment = PROTECT(mkString(comment)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_comment); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("comment")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize, hid_t lapl_id); */ SEXP R_H5Oget_comment_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_comment, SEXP R_bufsize, SEXP R_lapl_id){ int vars_protected=0; R_comment = PROTECT(duplicate(R_comment)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); char* comment; if(XLENGTH(R_comment) == 0) { comment = NULL; } else { comment = R_alloc(strlen(CHAR(STRING_ELT(R_comment, 0))) + 1, 1); strcpy(comment, CHAR(STRING_ELT(R_comment, 0))); } size_t bufsize = SEXP_to_longlong(R_bufsize, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); ssize_t return_val = H5Oget_comment_by_name(loc_id, name, comment, bufsize, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(comment==NULL) { R_comment = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_comment = PROTECT(mkString(comment)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_comment); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("comment")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info1(hid_t loc_id, H5O_info1_t *oinfo); */ SEXP R_H5Oget_info(SEXP R_loc_id, SEXP R_oinfo){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info1_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]))); H5O_info1_t* oinfo= (H5O_info1_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Oget_info(loc_id, oinfo); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info1_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info1_t *oinfo, hid_t lapl_id); */ SEXP R_H5Oget_info_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_oinfo, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info1_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]))); H5O_info1_t* oinfo= (H5O_info1_t*) VOIDPTR(R_helper); vars_protected++; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_info_by_idx(loc_id, group_name, idx_type, order, n, oinfo, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info1_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info1_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_info_by_idx2(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info1_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]))); H5O_info1_t* oinfo= (H5O_info1_t*) VOIDPTR(R_helper); vars_protected++; unsigned fields = SEXP_to_longlong(R_fields, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_info_by_idx2(loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info1_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info1_t *oinfo, hid_t lapl_id); */ SEXP R_H5Oget_info_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_oinfo, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info1_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]))); H5O_info1_t* oinfo= (H5O_info1_t*) VOIDPTR(R_helper); vars_protected++; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_info_by_name(loc_id, name, oinfo, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info1_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info1_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_info_by_name2(SEXP R_loc_id, SEXP R_name, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info1_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]))); H5O_info1_t* oinfo= (H5O_info1_t*) VOIDPTR(R_helper); vars_protected++; unsigned fields = SEXP_to_longlong(R_fields, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_info_by_name2(loc_id, name, oinfo, fields, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info1_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info2(hid_t loc_id, H5O_info1_t *oinfo, unsigned fields); */ SEXP R_H5Oget_info2(SEXP R_loc_id, SEXP R_oinfo, SEXP R_fields){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info1_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]))); H5O_info1_t* oinfo= (H5O_info1_t*) VOIDPTR(R_helper); vars_protected++; unsigned fields = SEXP_to_longlong(R_fields, 0); herr_t return_val = H5Oget_info2(loc_id, oinfo, fields); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info1_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info1_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo, unsigned fields); */ SEXP R_H5Oget_native_info(SEXP R_loc_id, SEXP R_oinfo, SEXP R_fields){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_native_info_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_native_info_t]))); H5O_native_info_t* oinfo= (H5O_native_info_t*) VOIDPTR(R_helper); vars_protected++; unsigned fields = SEXP_to_longlong(R_fields, 0); herr_t return_val = H5Oget_native_info(loc_id, oinfo, fields); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_native_info_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_native_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_native_info_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_native_info_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_native_info_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_native_info_t]))); H5O_native_info_t* oinfo= (H5O_native_info_t*) VOIDPTR(R_helper); vars_protected++; unsigned fields = SEXP_to_longlong(R_fields, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_native_info_by_idx(loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_native_info_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_native_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_native_info_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_native_info_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_native_info_t]))); H5O_native_info_t* oinfo= (H5O_native_info_t*) VOIDPTR(R_helper); vars_protected++; unsigned fields = SEXP_to_longlong(R_fields, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_native_info_by_name(loc_id, name, oinfo, fields, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_native_info_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_native_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oincr_refcount(hid_t object_id); */ SEXP R_H5Oincr_refcount(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Oincr_refcount(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Olink(SEXP R_obj_id, SEXP R_new_loc_id, SEXP R_new_name, SEXP R_lcpl_id, SEXP R_lapl_id){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); hid_t new_loc_id = SEXP_to_longlong(R_new_loc_id, 0); const char* new_name = CHAR(STRING_ELT(R_new_name, 0)); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Olink(obj_id, new_loc_id, new_name, lcpl_id, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Oopen(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); hid_t return_val = H5Oopen(loc_id, name, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr); */ SEXP R_H5Oopen_by_addr(SEXP R_loc_id, SEXP R_addr){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); haddr_t addr = SEXP_to_longlong(R_addr, 0); hid_t return_val = H5Oopen_by_addr(loc_id, addr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); */ SEXP R_H5Oopen_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); hid_t return_val = H5Oopen_by_idx(loc_id, group_name, idx_type, order, n, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Oopen_by_token(hid_t loc_id, H5O_token_t token); */ SEXP R_H5Oopen_by_token(SEXP R_loc_id, SEXP R_token){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); R_helper = PROTECT(RToH5(R_token, h5_datatype[DT_H5O_token_t], 1)); H5O_token_t token = * ((H5O_token_t*) VOIDPTR(R_helper)); vars_protected++; hid_t return_val = H5Oopen_by_token(loc_id, token); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Orefresh(hid_t oid); */ SEXP R_H5Orefresh(SEXP R_oid){ int vars_protected=0; hid_t oid = SEXP_to_longlong(R_oid, 0); herr_t return_val = H5Orefresh(oid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment); */ SEXP R_H5Oset_comment(SEXP R_obj_id, SEXP R_comment){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); const char* comment = CHAR(STRING_ELT(R_comment, 0)); herr_t return_val = H5Oset_comment(obj_id, comment); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id); */ SEXP R_H5Oset_comment_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_comment, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); const char* comment = CHAR(STRING_ELT(R_comment, 0)); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oset_comment_by_name(loc_id, name, comment, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Otoken_cmp(hid_t loc_id, const H5O_token_t *token1, const H5O_token_t *token2, int *cmp_value); */ SEXP R_H5Otoken_cmp(SEXP R_loc_id, SEXP R_token1, SEXP R_token2, SEXP R_cmp_value){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_cmp_value = PROTECT(duplicate(R_cmp_value)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); R_helper = PROTECT(RToH5(R_token1, h5_datatype[DT_H5O_token_t], guess_nelem(R_token1, h5_datatype[DT_H5O_token_t]))); const H5O_token_t* token1= (const H5O_token_t*) VOIDPTR(R_helper); vars_protected++; R_helper = PROTECT(RToH5(R_token2, h5_datatype[DT_H5O_token_t], guess_nelem(R_token2, h5_datatype[DT_H5O_token_t]))); const H5O_token_t* token2= (const H5O_token_t*) VOIDPTR(R_helper); vars_protected++; int* cmp_value; if(XLENGTH(R_cmp_value) == 0) { cmp_value = NULL; } else { R_helper = PROTECT(RToH5(R_cmp_value, h5_datatype[DT_int], XLENGTH(R_cmp_value))); cmp_value= (int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Otoken_cmp(loc_id, token1, token2, cmp_value); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_cmp_value, h5_datatype[DT_int]); R_cmp_value = PROTECT(H5ToR_single_step(cmp_value, h5_datatype[DT_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_cmp_value); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("cmp_value")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Otoken_from_str(hid_t loc_id, const char *token_str, H5O_token_t *token); */ SEXP R_H5Otoken_from_str(SEXP R_loc_id, SEXP R_token_str, SEXP R_token){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_token = PROTECT(duplicate(R_token)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* token_str = CHAR(STRING_ELT(R_token_str, 0)); R_helper = PROTECT(RToH5(R_token, h5_datatype[DT_H5O_token_t], guess_nelem(R_token, h5_datatype[DT_H5O_token_t]))); H5O_token_t* token= (H5O_token_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Otoken_from_str(loc_id, token_str, token); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_token, h5_datatype[DT_H5O_token_t]); R_token = PROTECT(H5ToR_single_step(token, h5_datatype[DT_H5O_token_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_token); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("token")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Otoken_to_str(hid_t loc_id, const H5O_token_t *token, char **token_str); */ SEXP R_H5Otoken_to_str(SEXP R_loc_id, SEXP R_token, SEXP R_token_str){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_token_str = PROTECT(duplicate(R_token_str)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); R_helper = PROTECT(RToH5(R_token, h5_datatype[DT_H5O_token_t], guess_nelem(R_token, h5_datatype[DT_H5O_token_t]))); const H5O_token_t* token= (const H5O_token_t*) VOIDPTR(R_helper); vars_protected++; char** token_str; if(XLENGTH(R_token_str) == 0) { token_str = NULL; } else { R_helper = PROTECT(RToH5(R_token_str, h5_datatype[DT_char], XLENGTH(R_token_str))); token_str= (char**) VOIDPTR(R_helper); vars_protected++; if(!inherits(R_token_str, "_RToH5_empty")) { for(int i = 0; i < XLENGTH(R_token_str); ++i) { if(XLENGTH(STRING_ELT(R_token_str, i)) == 0) { token_str[i] = NULL; } else { token_str[i] = (char*) R_alloc(XLENGTH(STRING_ELT(R_token_str, i)), 1); strcpy(token_str[i], CHAR(STRING_ELT(R_token_str, i))); } } } } herr_t return_val = H5Otoken_to_str(loc_id, token, token_str); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_token_str, h5_datatype[DT_char]); R_token_str = PROTECT(H5ToR_single_step(token_str, h5_datatype[DT_char], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_token_str); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("token_str")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5FDsec2.h
#ifndef _WRAPPER_AUTO_H5FDSEC2_H_ #define _WRAPPER_AUTO_H5FDSEC2_H_ #include "global.h" /* H5_DLL hid_t H5FD_sec2_init(void); */ SEXP R_H5FD_sec2_init(void); /* H5_DLL void H5FD_sec2_term(void); */ SEXP R_H5FD_sec2_term(void); /* H5_DLL herr_t H5Pset_fapl_sec2(hid_t fapl_id); */ SEXP R_H5Pset_fapl_sec2(SEXP R_fapl_id); #endif
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5R.h
<filename>src/1_12_0/Wrapper_auto_H5R.h #ifndef _WRAPPER_AUTO_H5R_H_ #define _WRAPPER_AUTO_H5R_H_ #include "global.h" /* H5_DLL herr_t H5Rcopy(const H5R_ref_t *src_ref_ptr, H5R_ref_t *dst_ref_ptr); */ SEXP R_H5Rcopy(SEXP R_src_ref_ptr, SEXP R_dst_ref_ptr); /* H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id); */ SEXP R_H5Rcreate(SEXP R_ref, SEXP R_loc_id, SEXP R_name, SEXP R_ref_type, SEXP R_space_id, SEXP _dupl_ref); /* H5_DLL herr_t H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl_id, H5R_ref_t *ref_ptr); */ SEXP R_H5Rcreate_attr(SEXP R_loc_id, SEXP R_name, SEXP R_attr_name, SEXP R_oapl_id, SEXP R_ref_ptr); /* H5_DLL herr_t H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_ptr); */ SEXP R_H5Rcreate_object(SEXP R_loc_id, SEXP R_name, SEXP R_oapl_id, SEXP R_ref_ptr); /* H5_DLL herr_t H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id, H5R_ref_t *ref_ptr); */ SEXP R_H5Rcreate_region(SEXP R_loc_id, SEXP R_name, SEXP R_space_id, SEXP R_oapl_id, SEXP R_ref_ptr); /* H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rdereference1(SEXP R_obj_id, SEXP R_ref_type, SEXP R_ref); /* H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rdereference2(SEXP R_obj_id, SEXP R_oapl_id, SEXP R_ref_type, SEXP R_ref); /* H5_DLL herr_t H5Rdestroy(H5R_ref_t *ref_ptr); */ SEXP R_H5Rdestroy(SEXP R_ref_ptr); /* H5_DLL htri_t H5Requal(const H5R_ref_t *ref1_ptr, const H5R_ref_t *ref2_ptr); */ SEXP R_H5Requal(SEXP R_ref1_ptr, SEXP R_ref2_ptr); /* H5_DLL ssize_t H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *buf, size_t size); */ SEXP R_H5Rget_attr_name(SEXP R_ref_ptr, SEXP R_buf, SEXP R_size); /* H5_DLL ssize_t H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf, size_t size); */ SEXP R_H5Rget_file_name(SEXP R_ref_ptr, SEXP R_buf, SEXP R_size); /* H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, char *name, size_t size); */ SEXP R_H5Rget_name(SEXP R_loc_id, SEXP R_ref_type, SEXP R_ref, SEXP R_name, SEXP R_size); /* H5_DLL ssize_t H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size); */ SEXP R_H5Rget_obj_name(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_buf, SEXP R_size); /* H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H5O_type_t *obj_type); */ SEXP R_H5Rget_obj_type2(SEXP R_id, SEXP R_ref_type, SEXP R_ref, SEXP R_obj_type); /* H5_DLL herr_t H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type); */ SEXP R_H5Rget_obj_type3(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_obj_type); /* H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rget_region(SEXP R_dataset, SEXP R_ref_type, SEXP R_ref); /* H5_DLL H5R_type_t H5Rget_type(const H5R_ref_t *ref_ptr); */ SEXP R_H5Rget_type(SEXP R_ref_ptr); /* H5_DLL hid_t H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id); */ SEXP R_H5Ropen_attr(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_aapl_id); /* H5_DLL hid_t H5Ropen_object(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id); */ SEXP R_H5Ropen_object(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_oapl_id); /* H5_DLL hid_t H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id); */ SEXP R_H5Ropen_region(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_oapl_id); #endif
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5O.h
<reponame>jeroen/hdf5r<gh_stars>10-100 #ifndef _WRAPPER_AUTO_H5O_H_ #define _WRAPPER_AUTO_H5O_H_ #include "global.h" /* H5_DLL herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled); */ SEXP R_H5Oare_mdc_flushes_disabled(SEXP R_object_id, SEXP R_are_disabled); /* H5_DLL herr_t H5Oclose(hid_t object_id); */ SEXP R_H5Oclose(SEXP R_object_id); /* H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id); */ SEXP R_H5Ocopy(SEXP R_src_loc_id, SEXP R_src_name, SEXP R_dst_loc_id, SEXP R_dst_name, SEXP R_ocpypl_id, SEXP R_lcpl_id); /* H5_DLL herr_t H5Odecr_refcount(hid_t object_id); */ SEXP R_H5Odecr_refcount(SEXP R_object_id); /* H5_DLL herr_t H5Odisable_mdc_flushes(hid_t object_id); */ SEXP R_H5Odisable_mdc_flushes(SEXP R_object_id); /* H5_DLL herr_t H5Oenable_mdc_flushes(hid_t object_id); */ SEXP R_H5Oenable_mdc_flushes(SEXP R_object_id); /* H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Oexists_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id); /* H5_DLL herr_t H5Oflush(hid_t obj_id); */ SEXP R_H5Oflush(SEXP R_obj_id); /* H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize); */ SEXP R_H5Oget_comment(SEXP R_obj_id, SEXP R_comment, SEXP R_bufsize); /* H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize, hid_t lapl_id); */ SEXP R_H5Oget_comment_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_comment, SEXP R_bufsize, SEXP R_lapl_id); /* H5_DLL herr_t H5Oget_info1(hid_t loc_id, H5O_info1_t *oinfo); */ SEXP R_H5Oget_info(SEXP R_loc_id, SEXP R_oinfo); /* H5_DLL herr_t H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info1_t *oinfo, hid_t lapl_id); */ SEXP R_H5Oget_info_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_oinfo, SEXP R_lapl_id); /* H5_DLL herr_t H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info1_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_info_by_idx2(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id); /* H5_DLL herr_t H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info1_t *oinfo, hid_t lapl_id); */ SEXP R_H5Oget_info_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_oinfo, SEXP R_lapl_id); /* H5_DLL herr_t H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info1_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_info_by_name2(SEXP R_loc_id, SEXP R_name, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id); /* H5_DLL herr_t H5Oget_info2(hid_t loc_id, H5O_info1_t *oinfo, unsigned fields); */ SEXP R_H5Oget_info2(SEXP R_loc_id, SEXP R_oinfo, SEXP R_fields); /* H5_DLL herr_t H5Oget_native_info(hid_t loc_id, H5O_native_info_t *oinfo, unsigned fields); */ SEXP R_H5Oget_native_info(SEXP R_loc_id, SEXP R_oinfo, SEXP R_fields); /* H5_DLL herr_t H5Oget_native_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_native_info_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_native_info_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id); /* H5_DLL herr_t H5Oget_native_info_by_name(hid_t loc_id, const char *name, H5O_native_info_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_native_info_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id); /* H5_DLL herr_t H5Oincr_refcount(hid_t object_id); */ SEXP R_H5Oincr_refcount(SEXP R_object_id); /* H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Olink(SEXP R_obj_id, SEXP R_new_loc_id, SEXP R_new_name, SEXP R_lcpl_id, SEXP R_lapl_id); /* H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Oopen(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id); /* H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr); */ SEXP R_H5Oopen_by_addr(SEXP R_loc_id, SEXP R_addr); /* H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); */ SEXP R_H5Oopen_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_lapl_id); /* H5_DLL hid_t H5Oopen_by_token(hid_t loc_id, H5O_token_t token); */ SEXP R_H5Oopen_by_token(SEXP R_loc_id, SEXP R_token); /* H5_DLL herr_t H5Orefresh(hid_t oid); */ SEXP R_H5Orefresh(SEXP R_oid); /* H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment); */ SEXP R_H5Oset_comment(SEXP R_obj_id, SEXP R_comment); /* H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id); */ SEXP R_H5Oset_comment_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_comment, SEXP R_lapl_id); /* H5_DLL herr_t H5Otoken_cmp(hid_t loc_id, const H5O_token_t *token1, const H5O_token_t *token2, int *cmp_value); */ SEXP R_H5Otoken_cmp(SEXP R_loc_id, SEXP R_token1, SEXP R_token2, SEXP R_cmp_value); /* H5_DLL herr_t H5Otoken_from_str(hid_t loc_id, const char *token_str, H5O_token_t *token); */ SEXP R_H5Otoken_from_str(SEXP R_loc_id, SEXP R_token_str, SEXP R_token); /* H5_DLL herr_t H5Otoken_to_str(hid_t loc_id, const H5O_token_t *token, char **token_str); */ SEXP R_H5Otoken_to_str(SEXP R_loc_id, SEXP R_token, SEXP R_token_str); #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5G.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5G.h" /* H5_DLL herr_t H5Gclose(hid_t group_id); */ SEXP R_H5Gclose(SEXP R_group_id){ int vars_protected=0; hid_t group_id = SEXP_to_longlong(R_group_id, 0); herr_t return_val = H5Gclose(group_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Gcreate_anon(hid_t loc_id, hid_t gcpl_id, hid_t gapl_id); */ SEXP R_H5Gcreate_anon(SEXP R_loc_id, SEXP R_gcpl_id, SEXP R_gapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); hid_t gcpl_id = SEXP_to_longlong(R_gcpl_id, 0); hid_t gapl_id = SEXP_to_longlong(R_gapl_id, 0); hid_t return_val = H5Gcreate_anon(loc_id, gcpl_id, gapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Gcreate2(hid_t loc_id, const char *name, hid_t lcpl_id, hid_t gcpl_id, hid_t gapl_id); */ SEXP R_H5Gcreate2(SEXP R_loc_id, SEXP R_name, SEXP R_lcpl_id, SEXP R_gcpl_id, SEXP R_gapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t gcpl_id = SEXP_to_longlong(R_gcpl_id, 0); hid_t gapl_id = SEXP_to_longlong(R_gapl_id, 0); hid_t return_val = H5Gcreate2(loc_id, name, lcpl_id, gcpl_id, gapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Gget_create_plist(hid_t group_id); */ SEXP R_H5Gget_create_plist(SEXP R_group_id){ int vars_protected=0; hid_t group_id = SEXP_to_longlong(R_group_id, 0); hid_t return_val = H5Gget_create_plist(group_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Gget_info(hid_t loc_id, H5G_info_t *ginfo); */ SEXP R_H5Gget_info(SEXP R_loc_id, SEXP R_ginfo){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ginfo = PROTECT(duplicate(R_ginfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); R_helper = PROTECT(RToH5(R_ginfo, h5_datatype[DT_H5G_info_t], guess_nelem(R_ginfo, h5_datatype[DT_H5G_info_t]))); H5G_info_t* ginfo= (H5G_info_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Gget_info(loc_id, ginfo); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ginfo, h5_datatype[DT_H5G_info_t]); R_ginfo = PROTECT(H5ToR_single_step(ginfo, h5_datatype[DT_H5G_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ginfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ginfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Gget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5G_info_t *ginfo, hid_t lapl_id); */ SEXP R_H5Gget_info_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_ginfo, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ginfo = PROTECT(duplicate(R_ginfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); R_helper = PROTECT(RToH5(R_ginfo, h5_datatype[DT_H5G_info_t], guess_nelem(R_ginfo, h5_datatype[DT_H5G_info_t]))); H5G_info_t* ginfo= (H5G_info_t*) VOIDPTR(R_helper); vars_protected++; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Gget_info_by_idx(loc_id, group_name, idx_type, order, n, ginfo, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ginfo, h5_datatype[DT_H5G_info_t]); R_ginfo = PROTECT(H5ToR_single_step(ginfo, h5_datatype[DT_H5G_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ginfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ginfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Gget_info_by_name(hid_t loc_id, const char *name, H5G_info_t *ginfo, hid_t lapl_id); */ SEXP R_H5Gget_info_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_ginfo, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ginfo = PROTECT(duplicate(R_ginfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); R_helper = PROTECT(RToH5(R_ginfo, h5_datatype[DT_H5G_info_t], guess_nelem(R_ginfo, h5_datatype[DT_H5G_info_t]))); H5G_info_t* ginfo= (H5G_info_t*) VOIDPTR(R_helper); vars_protected++; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Gget_info_by_name(loc_id, name, ginfo, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ginfo, h5_datatype[DT_H5G_info_t]); R_ginfo = PROTECT(H5ToR_single_step(ginfo, h5_datatype[DT_H5G_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ginfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ginfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Gopen2(hid_t loc_id, const char *name, hid_t gapl_id); */ SEXP R_H5Gopen2(SEXP R_loc_id, SEXP R_name, SEXP R_gapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t gapl_id = SEXP_to_longlong(R_gapl_id, 0); hid_t return_val = H5Gopen2(loc_id, name, gapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name, const char *comment); */ SEXP R_H5Gset_comment(SEXP R_loc_id, SEXP R_name, SEXP R_comment){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); const char* comment = CHAR(STRING_ELT(R_comment, 0)); herr_t return_val = H5Gset_comment(loc_id, name, comment); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5LT.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5LT.h" /* H5_HLDLL herr_t H5LTdtype_to_text(hid_t dtype, char *str, H5LT_lang_t lang_type, size_t *len); */ SEXP R_H5LTdtype_to_text(SEXP R_dtype, SEXP R_str, SEXP R_lang_type, SEXP R_len){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_str = PROTECT(duplicate(R_str)); vars_protected++; R_len = PROTECT(duplicate(R_len)); vars_protected++; hid_t dtype = SEXP_to_longlong(R_dtype, 0); char* str; if(XLENGTH(R_str) == 0) { str = NULL; } else { str = R_alloc(strlen(CHAR(STRING_ELT(R_str, 0))) + 1, 1); strcpy(str, CHAR(STRING_ELT(R_str, 0))); } H5LT_lang_t lang_type = SEXP_to_longlong(R_lang_type, 0); size_t* len; if(XLENGTH(R_len) == 0) { len = NULL; } else { R_helper = PROTECT(RToH5(R_len, h5_datatype[DT_size_t], XLENGTH(R_len))); len= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTdtype_to_text(dtype, str, lang_type, len); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(str==NULL) { R_str = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_str = PROTECT(mkString(str)); vars_protected++; } size_helper = guess_nelem(R_len, h5_datatype[DT_size_t]); R_len = PROTECT(H5ToR_single_step(len, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_str); SET_VECTOR_ELT(__ret_list, 2, R_len); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("str")); SET_STRING_ELT(__ret_list_names, 2, mkChar("len")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTfind_attribute( hid_t loc_id, const char *name ); */ SEXP R_H5LTfind_attribute(SEXP R_loc_id, SEXP R_name){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); herr_t return_val = H5LTfind_attribute(loc_id, name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTfind_dataset( hid_t loc_id, const char *name ); */ SEXP R_H5LTfind_dataset(SEXP R_loc_id, SEXP R_name){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); herr_t return_val = H5LTfind_dataset(loc_id, name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute( hid_t loc_id, const char *obj_name, const char *attr_name, hid_t mem_type_id, void *data ); */ SEXP R_H5LTget_attribute(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_mem_type_id, SEXP R_data, SEXP _dupl_data){ int vars_protected=0; if(SEXP_to_logical(_dupl_data)) { R_data = PROTECT(duplicate(R_data)); vars_protected++; } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); hid_t mem_type_id = SEXP_to_longlong(R_mem_type_id, 0); void* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { data = (void *) VOIDPTR(R_data); } herr_t return_val = H5LTget_attribute(loc_id, obj_name, attr_name, mem_type_id, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_char( hid_t loc_id, const char *obj_name, const char *attr_name, char *data ); */ SEXP R_H5LTget_attribute_char(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); char* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { data = R_alloc(strlen(CHAR(STRING_ELT(R_data, 0))) + 1, 1); strcpy(data, CHAR(STRING_ELT(R_data, 0))); } herr_t return_val = H5LTget_attribute_char(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(data==NULL) { R_data = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_data = PROTECT(mkString(data)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_double( hid_t loc_id, const char *obj_name, const char *attr_name, double *data ); */ SEXP R_H5LTget_attribute_double(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); double* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_double], XLENGTH(R_data))); data= (double*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_double(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_double]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_double], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_float( hid_t loc_id, const char *obj_name, const char *attr_name, float *data ); */ SEXP R_H5LTget_attribute_float(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); float* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_float], XLENGTH(R_data))); data= (float*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_float(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_float]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_float], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_info( hid_t loc_id, const char *obj_name, const char *attr_name, hsize_t *dims, H5T_class_t *type_class, size_t *type_size ); */ SEXP R_H5LTget_attribute_info(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_dims, SEXP R_type_class, SEXP R_type_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_dims = PROTECT(duplicate(R_dims)); vars_protected++; R_type_class = PROTECT(duplicate(R_type_class)); vars_protected++; R_type_size = PROTECT(duplicate(R_type_size)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } H5T_class_t* type_class; if(XLENGTH(R_type_class) == 0) { type_class = NULL; } else { R_helper = PROTECT(RToH5(R_type_class, h5_datatype[DT_H5T_class_t], XLENGTH(R_type_class))); type_class= (H5T_class_t*) VOIDPTR(R_helper); vars_protected++; } size_t* type_size; if(XLENGTH(R_type_size) == 0) { type_size = NULL; } else { R_helper = PROTECT(RToH5(R_type_size, h5_datatype[DT_size_t], XLENGTH(R_type_size))); type_size= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_info(loc_id, obj_name, attr_name, dims, type_class, type_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_dims, h5_datatype[DT_hsize_t]); R_dims = PROTECT(H5ToR_single_step(dims, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_type_class, h5_datatype[DT_H5T_class_t]); R_type_class = PROTECT(H5ToR_single_step(type_class, h5_datatype[DT_H5T_class_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_type_size, h5_datatype[DT_size_t]); R_type_size = PROTECT(H5ToR_single_step(type_size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 4)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_dims); SET_VECTOR_ELT(__ret_list, 2, R_type_class); SET_VECTOR_ELT(__ret_list, 3, R_type_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 4)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("dims")); SET_STRING_ELT(__ret_list_names, 2, mkChar("type_class")); SET_STRING_ELT(__ret_list_names, 3, mkChar("type_size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_int( hid_t loc_id, const char *obj_name, const char *attr_name, int *data ); */ SEXP R_H5LTget_attribute_int(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); int* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_int], XLENGTH(R_data))); data= (int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_int(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_int]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_long( hid_t loc_id, const char *obj_name, const char *attr_name, long *data ); */ SEXP R_H5LTget_attribute_long(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); long* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_long], XLENGTH(R_data))); data= (long*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_long(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_long]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_long], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_long_long( hid_t loc_id, const char *obj_name, const char *attr_name, long long *data ); */ SEXP R_H5LTget_attribute_long_long(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); long long* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_long_long], XLENGTH(R_data))); data= (long long*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_long_long(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_long_long]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_long_long], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_ndims( hid_t loc_id, const char *obj_name, const char *attr_name, int *rank ); */ SEXP R_H5LTget_attribute_ndims(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_rank){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_rank = PROTECT(duplicate(R_rank)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); int* rank; if(XLENGTH(R_rank) == 0) { rank = NULL; } else { R_helper = PROTECT(RToH5(R_rank, h5_datatype[DT_int], XLENGTH(R_rank))); rank= (int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_ndims(loc_id, obj_name, attr_name, rank); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_rank, h5_datatype[DT_int]); R_rank = PROTECT(H5ToR_single_step(rank, h5_datatype[DT_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_rank); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("rank")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_short( hid_t loc_id, const char *obj_name, const char *attr_name, short *data ); */ SEXP R_H5LTget_attribute_short(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); short* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_short], XLENGTH(R_data))); data= (short*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_short(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_short]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_short], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_string( hid_t loc_id, const char *obj_name, const char *attr_name, char *data ); */ SEXP R_H5LTget_attribute_string(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); char* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { data = R_alloc(strlen(CHAR(STRING_ELT(R_data, 0))) + 1, 1); strcpy(data, CHAR(STRING_ELT(R_data, 0))); } herr_t return_val = H5LTget_attribute_string(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(data==NULL) { R_data = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_data = PROTECT(mkString(data)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_uchar( hid_t loc_id, const char *obj_name, const char *attr_name, unsigned char *data ); */ SEXP R_H5LTget_attribute_uchar(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); unsigned char* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_unsigned_char], XLENGTH(R_data))); data= (unsigned char*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_uchar(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_unsigned_char]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_unsigned_char], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_uint( hid_t loc_id, const char *obj_name, const char *attr_name, unsigned int *data ); */ SEXP R_H5LTget_attribute_uint(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); unsigned int* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_unsigned_int], XLENGTH(R_data))); data= (unsigned int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_uint(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_unsigned_int]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_unsigned_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_ulong( hid_t loc_id, const char *obj_name, const char *attr_name, unsigned long *data ); */ SEXP R_H5LTget_attribute_ulong(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); unsigned long* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_unsigned_long], XLENGTH(R_data))); data= (unsigned long*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_ulong(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_unsigned_long]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_unsigned_long], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_attribute_ushort( hid_t loc_id, const char *obj_name, const char *attr_name, unsigned short *data ); */ SEXP R_H5LTget_attribute_ushort(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_data = PROTECT(duplicate(R_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); unsigned short* data; if(XLENGTH(R_data) == 0) { data = NULL; } else { R_helper = PROTECT(RToH5(R_data, h5_datatype[DT_unsigned_short], XLENGTH(R_data))); data= (unsigned short*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_attribute_ushort(loc_id, obj_name, attr_name, data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_data, h5_datatype[DT_unsigned_short]); R_data = PROTECT(H5ToR_single_step(data, h5_datatype[DT_unsigned_short], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_dataset_info( hid_t loc_id, const char *dset_name, hsize_t *dims, H5T_class_t *type_class, size_t *type_size ); */ SEXP R_H5LTget_dataset_info(SEXP R_loc_id, SEXP R_dset_name, SEXP R_dims, SEXP R_type_class, SEXP R_type_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_dims = PROTECT(duplicate(R_dims)); vars_protected++; R_type_class = PROTECT(duplicate(R_type_class)); vars_protected++; R_type_size = PROTECT(duplicate(R_type_size)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } H5T_class_t* type_class; if(XLENGTH(R_type_class) == 0) { type_class = NULL; } else { R_helper = PROTECT(RToH5(R_type_class, h5_datatype[DT_H5T_class_t], XLENGTH(R_type_class))); type_class= (H5T_class_t*) VOIDPTR(R_helper); vars_protected++; } size_t* type_size; if(XLENGTH(R_type_size) == 0) { type_size = NULL; } else { R_helper = PROTECT(RToH5(R_type_size, h5_datatype[DT_size_t], XLENGTH(R_type_size))); type_size= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_dataset_info(loc_id, dset_name, dims, type_class, type_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_dims, h5_datatype[DT_hsize_t]); R_dims = PROTECT(H5ToR_single_step(dims, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_type_class, h5_datatype[DT_H5T_class_t]); R_type_class = PROTECT(H5ToR_single_step(type_class, h5_datatype[DT_H5T_class_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_type_size, h5_datatype[DT_size_t]); R_type_size = PROTECT(H5ToR_single_step(type_size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 4)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_dims); SET_VECTOR_ELT(__ret_list, 2, R_type_class); SET_VECTOR_ELT(__ret_list, 3, R_type_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 4)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("dims")); SET_STRING_ELT(__ret_list_names, 2, mkChar("type_class")); SET_STRING_ELT(__ret_list_names, 3, mkChar("type_size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTget_dataset_ndims( hid_t loc_id, const char *dset_name, int *rank ); */ SEXP R_H5LTget_dataset_ndims(SEXP R_loc_id, SEXP R_dset_name, SEXP R_rank){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_rank = PROTECT(duplicate(R_rank)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); int* rank; if(XLENGTH(R_rank) == 0) { rank = NULL; } else { R_helper = PROTECT(RToH5(R_rank, h5_datatype[DT_int], XLENGTH(R_rank))); rank= (int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTget_dataset_ndims(loc_id, dset_name, rank); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_rank, h5_datatype[DT_int]); R_rank = PROTECT(H5ToR_single_step(rank, h5_datatype[DT_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_rank); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("rank")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTmake_dataset( hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, hid_t type_id, const void *buffer ); */ SEXP R_H5LTmake_dataset(SEXP R_loc_id, SEXP R_dset_name, SEXP R_rank, SEXP R_dims, SEXP R_type_id, SEXP R_buffer){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); int rank = SEXP_to_longlong(R_rank, 0); const hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } hid_t type_id = SEXP_to_longlong(R_type_id, 0); const void* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { buffer = (void *) VOIDPTR(R_buffer); } herr_t return_val = H5LTmake_dataset(loc_id, dset_name, rank, dims, type_id, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTmake_dataset_char( hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const char *buffer ); */ SEXP R_H5LTmake_dataset_char(SEXP R_loc_id, SEXP R_dset_name, SEXP R_rank, SEXP R_dims, SEXP R_buffer){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); int rank = SEXP_to_longlong(R_rank, 0); const hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const char* buffer = CHAR(STRING_ELT(R_buffer, 0)); herr_t return_val = H5LTmake_dataset_char(loc_id, dset_name, rank, dims, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTmake_dataset_double( hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const double *buffer ); */ SEXP R_H5LTmake_dataset_double(SEXP R_loc_id, SEXP R_dset_name, SEXP R_rank, SEXP R_dims, SEXP R_buffer){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); int rank = SEXP_to_longlong(R_rank, 0); const hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const double* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_double], XLENGTH(R_buffer))); buffer= (const double*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTmake_dataset_double(loc_id, dset_name, rank, dims, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTmake_dataset_float( hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const float *buffer ); */ SEXP R_H5LTmake_dataset_float(SEXP R_loc_id, SEXP R_dset_name, SEXP R_rank, SEXP R_dims, SEXP R_buffer){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); int rank = SEXP_to_longlong(R_rank, 0); const hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const float* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_float], XLENGTH(R_buffer))); buffer= (const float*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTmake_dataset_float(loc_id, dset_name, rank, dims, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTmake_dataset_int( hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const int *buffer ); */ SEXP R_H5LTmake_dataset_int(SEXP R_loc_id, SEXP R_dset_name, SEXP R_rank, SEXP R_dims, SEXP R_buffer){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); int rank = SEXP_to_longlong(R_rank, 0); const hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const int* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_int], XLENGTH(R_buffer))); buffer= (const int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTmake_dataset_int(loc_id, dset_name, rank, dims, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTmake_dataset_long( hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const long *buffer ); */ SEXP R_H5LTmake_dataset_long(SEXP R_loc_id, SEXP R_dset_name, SEXP R_rank, SEXP R_dims, SEXP R_buffer){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); int rank = SEXP_to_longlong(R_rank, 0); const hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const long* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_long], XLENGTH(R_buffer))); buffer= (const long*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTmake_dataset_long(loc_id, dset_name, rank, dims, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTmake_dataset_short( hid_t loc_id, const char *dset_name, int rank, const hsize_t *dims, const short *buffer ); */ SEXP R_H5LTmake_dataset_short(SEXP R_loc_id, SEXP R_dset_name, SEXP R_rank, SEXP R_dims, SEXP R_buffer){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); int rank = SEXP_to_longlong(R_rank, 0); const hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const short* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_short], XLENGTH(R_buffer))); buffer= (const short*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTmake_dataset_short(loc_id, dset_name, rank, dims, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTmake_dataset_string( hid_t loc_id, const char *dset_name, const char *buf ); */ SEXP R_H5LTmake_dataset_string(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buf){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); const char* buf = CHAR(STRING_ELT(R_buf, 0)); herr_t return_val = H5LTmake_dataset_string(loc_id, dset_name, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL hid_t H5LTopen_file_image(void *buf_ptr, size_t buf_size, unsigned flags); */ SEXP R_H5LTopen_file_image(SEXP R_buf_ptr, SEXP R_buf_size, SEXP R_flags, SEXP _dupl_buf_ptr){ int vars_protected=0; if(SEXP_to_logical(_dupl_buf_ptr)) { R_buf_ptr = PROTECT(duplicate(R_buf_ptr)); vars_protected++; } void* buf_ptr; if(XLENGTH(R_buf_ptr) == 0) { buf_ptr = NULL; } else { buf_ptr = (void *) VOIDPTR(R_buf_ptr); } size_t buf_size = SEXP_to_longlong(R_buf_size, 0); unsigned flags = SEXP_to_longlong(R_flags, 0); hid_t return_val = H5LTopen_file_image(buf_ptr, buf_size, flags); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL htri_t H5LTpath_valid(hid_t loc_id, const char *path, hbool_t check_object_valid); */ SEXP R_H5LTpath_valid(SEXP R_loc_id, SEXP R_path, SEXP R_check_object_valid){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* path = CHAR(STRING_ELT(R_path, 0)); hbool_t check_object_valid = SEXP_to_longlong(R_check_object_valid, 0); htri_t return_val = H5LTpath_valid(loc_id, path, check_object_valid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTread_dataset( hid_t loc_id, const char *dset_name, hid_t type_id, void *buffer ); */ SEXP R_H5LTread_dataset(SEXP R_loc_id, SEXP R_dset_name, SEXP R_type_id, SEXP R_buffer, SEXP _dupl_buffer){ int vars_protected=0; if(SEXP_to_logical(_dupl_buffer)) { R_buffer = PROTECT(duplicate(R_buffer)); vars_protected++; } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hid_t type_id = SEXP_to_longlong(R_type_id, 0); void* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { buffer = (void *) VOIDPTR(R_buffer); } herr_t return_val = H5LTread_dataset(loc_id, dset_name, type_id, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buffer); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buffer")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTread_dataset_char( hid_t loc_id, const char *dset_name, char *buffer ); */ SEXP R_H5LTread_dataset_char(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buffer){ int vars_protected=0; R_buffer = PROTECT(duplicate(R_buffer)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); char* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { buffer = R_alloc(strlen(CHAR(STRING_ELT(R_buffer, 0))) + 1, 1); strcpy(buffer, CHAR(STRING_ELT(R_buffer, 0))); } herr_t return_val = H5LTread_dataset_char(loc_id, dset_name, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(buffer==NULL) { R_buffer = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_buffer = PROTECT(mkString(buffer)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buffer); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buffer")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTread_dataset_double( hid_t loc_id, const char *dset_name, double *buffer ); */ SEXP R_H5LTread_dataset_double(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buffer){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_buffer = PROTECT(duplicate(R_buffer)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); double* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_double], XLENGTH(R_buffer))); buffer= (double*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTread_dataset_double(loc_id, dset_name, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_buffer, h5_datatype[DT_double]); R_buffer = PROTECT(H5ToR_single_step(buffer, h5_datatype[DT_double], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buffer); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buffer")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTread_dataset_float( hid_t loc_id, const char *dset_name, float *buffer ); */ SEXP R_H5LTread_dataset_float(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buffer){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_buffer = PROTECT(duplicate(R_buffer)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); float* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_float], XLENGTH(R_buffer))); buffer= (float*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTread_dataset_float(loc_id, dset_name, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_buffer, h5_datatype[DT_float]); R_buffer = PROTECT(H5ToR_single_step(buffer, h5_datatype[DT_float], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buffer); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buffer")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTread_dataset_int( hid_t loc_id, const char *dset_name, int *buffer ); */ SEXP R_H5LTread_dataset_int(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buffer){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_buffer = PROTECT(duplicate(R_buffer)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); int* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_int], XLENGTH(R_buffer))); buffer= (int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTread_dataset_int(loc_id, dset_name, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_buffer, h5_datatype[DT_int]); R_buffer = PROTECT(H5ToR_single_step(buffer, h5_datatype[DT_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buffer); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buffer")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTread_dataset_long( hid_t loc_id, const char *dset_name, long *buffer ); */ SEXP R_H5LTread_dataset_long(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buffer){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_buffer = PROTECT(duplicate(R_buffer)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); long* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_long], XLENGTH(R_buffer))); buffer= (long*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTread_dataset_long(loc_id, dset_name, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_buffer, h5_datatype[DT_long]); R_buffer = PROTECT(H5ToR_single_step(buffer, h5_datatype[DT_long], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buffer); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buffer")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTread_dataset_short( hid_t loc_id, const char *dset_name, short *buffer ); */ SEXP R_H5LTread_dataset_short(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buffer){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_buffer = PROTECT(duplicate(R_buffer)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); short* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_short], XLENGTH(R_buffer))); buffer= (short*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5LTread_dataset_short(loc_id, dset_name, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_buffer, h5_datatype[DT_short]); R_buffer = PROTECT(H5ToR_single_step(buffer, h5_datatype[DT_short], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buffer); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buffer")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTread_dataset_string( hid_t loc_id, const char *dset_name, char *buf ); */ SEXP R_H5LTread_dataset_string(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buf){ int vars_protected=0; R_buf = PROTECT(duplicate(R_buf)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); char* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = R_alloc(strlen(CHAR(STRING_ELT(R_buf, 0))) + 1, 1); strcpy(buf, CHAR(STRING_ELT(R_buf, 0))); } herr_t return_val = H5LTread_dataset_string(loc_id, dset_name, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(buf==NULL) { R_buf = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_buf = PROTECT(mkString(buf)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_char( hid_t loc_id, const char *obj_name, const char *attr_name, const char *buffer, size_t size ); */ SEXP R_H5LTset_attribute_char(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const char* buffer = CHAR(STRING_ELT(R_buffer, 0)); size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_char(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_double( hid_t loc_id, const char *obj_name, const char *attr_name, const double *buffer, size_t size ); */ SEXP R_H5LTset_attribute_double(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const double* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_double], XLENGTH(R_buffer))); buffer= (const double*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_double(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_float( hid_t loc_id, const char *obj_name, const char *attr_name, const float *buffer, size_t size ); */ SEXP R_H5LTset_attribute_float(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const float* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_float], XLENGTH(R_buffer))); buffer= (const float*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_float(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_int( hid_t loc_id, const char *obj_name, const char *attr_name, const int *buffer, size_t size ); */ SEXP R_H5LTset_attribute_int(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const int* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_int], XLENGTH(R_buffer))); buffer= (const int*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_int(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_long( hid_t loc_id, const char *obj_name, const char *attr_name, const long *buffer, size_t size ); */ SEXP R_H5LTset_attribute_long(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const long* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_long], XLENGTH(R_buffer))); buffer= (const long*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_long(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_long_long( hid_t loc_id, const char *obj_name, const char *attr_name, const long long *buffer, size_t size ); */ SEXP R_H5LTset_attribute_long_long(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const long long* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_long_long], XLENGTH(R_buffer))); buffer= (const long long*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_long_long(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_short( hid_t loc_id, const char *obj_name, const char *attr_name, const short *buffer, size_t size ); */ SEXP R_H5LTset_attribute_short(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const short* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_short], XLENGTH(R_buffer))); buffer= (const short*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_short(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_string( hid_t loc_id, const char *obj_name, const char *attr_name, const char *attr_data ); */ SEXP R_H5LTset_attribute_string(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_attr_data){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const char* attr_data = CHAR(STRING_ELT(R_attr_data, 0)); herr_t return_val = H5LTset_attribute_string(loc_id, obj_name, attr_name, attr_data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_uchar( hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned char *buffer, size_t size ); */ SEXP R_H5LTset_attribute_uchar(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const unsigned char* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_unsigned_char], XLENGTH(R_buffer))); buffer= (const unsigned char*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_uchar(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_uint( hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned int *buffer, size_t size ); */ SEXP R_H5LTset_attribute_uint(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const unsigned int* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_unsigned_int], XLENGTH(R_buffer))); buffer= (const unsigned int*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_uint(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_ulong( hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned long *buffer, size_t size ); */ SEXP R_H5LTset_attribute_ulong(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const unsigned long* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_unsigned_long], XLENGTH(R_buffer))); buffer= (const unsigned long*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_ulong(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5LTset_attribute_ushort( hid_t loc_id, const char *obj_name, const char *attr_name, const unsigned short *buffer, size_t size ); */ SEXP R_H5LTset_attribute_ushort(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_buffer, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* obj_name = CHAR(STRING_ELT(R_obj_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); const unsigned short* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_unsigned_short], XLENGTH(R_buffer))); buffer= (const unsigned short*) VOIDPTR(R_helper); vars_protected++; } size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5LTset_attribute_ushort(loc_id, obj_name, attr_name, buffer, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL hid_t H5LTtext_to_dtype(const char *text, H5LT_lang_t lang_type); */ SEXP R_H5LTtext_to_dtype(SEXP R_text, SEXP R_lang_type){ int vars_protected=0; const char* text = CHAR(STRING_ELT(R_text, 0)); H5LT_lang_t lang_type = SEXP_to_longlong(R_lang_type, 0); hid_t return_val = H5LTtext_to_dtype(text, lang_type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5FDstdio.h
<filename>src/1_12_0/Wrapper_auto_H5FDstdio.h #ifndef _WRAPPER_AUTO_H5FDSTDIO_H_ #define _WRAPPER_AUTO_H5FDSTDIO_H_ #include "global.h" /* H5_DLL hid_t H5FD_stdio_init(void); */ SEXP R_H5FD_stdio_init(void); /* H5_DLL herr_t H5Pset_fapl_stdio(hid_t fapl_id); */ SEXP R_H5Pset_fapl_stdio(SEXP R_fapl_id); #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5DS.c
<gh_stars>10-100 /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5DS.h" /* H5_HLDLL herr_t H5DSattach_scale( hid_t did, hid_t dsid, unsigned int idx); */ SEXP R_H5DSattach_scale(SEXP R_did, SEXP R_dsid, SEXP R_idx){ int vars_protected=0; hid_t did = SEXP_to_longlong(R_did, 0); hid_t dsid = SEXP_to_longlong(R_dsid, 0); unsigned int idx = SEXP_to_longlong(R_idx, 0); herr_t return_val = H5DSattach_scale(did, dsid, idx); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5DSdetach_scale( hid_t did, hid_t dsid, unsigned int idx); */ SEXP R_H5DSdetach_scale(SEXP R_did, SEXP R_dsid, SEXP R_idx){ int vars_protected=0; hid_t did = SEXP_to_longlong(R_did, 0); hid_t dsid = SEXP_to_longlong(R_dsid, 0); unsigned int idx = SEXP_to_longlong(R_idx, 0); herr_t return_val = H5DSdetach_scale(did, dsid, idx); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL ssize_t H5DSget_label( hid_t did, unsigned int idx, char *label, size_t size); */ SEXP R_H5DSget_label(SEXP R_did, SEXP R_idx, SEXP R_label, SEXP R_size){ int vars_protected=0; R_label = PROTECT(duplicate(R_label)); vars_protected++; hid_t did = SEXP_to_longlong(R_did, 0); unsigned int idx = SEXP_to_longlong(R_idx, 0); char* label; if(XLENGTH(R_label) == 0) { label = NULL; } else { label = R_alloc(strlen(CHAR(STRING_ELT(R_label, 0))) + 1, 1); strcpy(label, CHAR(STRING_ELT(R_label, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5DSget_label(did, idx, label, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(label==NULL) { R_label = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_label = PROTECT(mkString(label)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_label); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("label")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL int H5DSget_num_scales( hid_t did, unsigned int dim); */ SEXP R_H5DSget_num_scales(SEXP R_did, SEXP R_dim){ int vars_protected=0; hid_t did = SEXP_to_longlong(R_did, 0); unsigned int dim = SEXP_to_longlong(R_dim, 0); int return_val = H5DSget_num_scales(did, dim); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL ssize_t H5DSget_scale_name( hid_t did, char *name, size_t size); */ SEXP R_H5DSget_scale_name(SEXP R_did, SEXP R_name, SEXP R_size){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t did = SEXP_to_longlong(R_did, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5DSget_scale_name(did, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL htri_t H5DSis_attached( hid_t did, hid_t dsid, unsigned int idx); */ SEXP R_H5DSis_attached(SEXP R_did, SEXP R_dsid, SEXP R_idx){ int vars_protected=0; hid_t did = SEXP_to_longlong(R_did, 0); hid_t dsid = SEXP_to_longlong(R_dsid, 0); unsigned int idx = SEXP_to_longlong(R_idx, 0); htri_t return_val = H5DSis_attached(did, dsid, idx); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL htri_t H5DSis_scale( hid_t did); */ SEXP R_H5DSis_scale(SEXP R_did){ int vars_protected=0; hid_t did = SEXP_to_longlong(R_did, 0); htri_t return_val = H5DSis_scale(did); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5DSset_label( hid_t did, unsigned int idx, const char *label); */ SEXP R_H5DSset_label(SEXP R_did, SEXP R_idx, SEXP R_label){ int vars_protected=0; hid_t did = SEXP_to_longlong(R_did, 0); unsigned int idx = SEXP_to_longlong(R_idx, 0); const char* label = CHAR(STRING_ELT(R_label, 0)); herr_t return_val = H5DSset_label(did, idx, label); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5DSset_scale( hid_t dsid, const char *dimname); */ SEXP R_H5DSset_scale(SEXP R_dsid, SEXP R_dimname){ int vars_protected=0; hid_t dsid = SEXP_to_longlong(R_dsid, 0); const char* dimname = CHAR(STRING_ELT(R_dimname, 0)); herr_t return_val = H5DSset_scale(dsid, dimname); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5Z.h
<reponame>jeroen/hdf5r #ifndef _WRAPPER_AUTO_H5Z_H_ #define _WRAPPER_AUTO_H5Z_H_ #include "global.h" /* H5_DLL htri_t H5Zfilter_avail(H5Z_filter_t id); */ SEXP R_H5Zfilter_avail(SEXP R_id); /* H5_DLL herr_t H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags); */ SEXP R_H5Zget_filter_info(SEXP R_filter, SEXP R_filter_config_flags); /* H5_DLL herr_t H5Zregister(const void *cls); */ SEXP R_H5Zregister(SEXP R_cls); /* H5_DLL herr_t H5Zunregister(H5Z_filter_t id); */ SEXP R_H5Zunregister(SEXP R_id); #endif
jeroen/hdf5r
inst/CWrappers_1.12.0/headers/H5IMpublic.h
<filename>inst/CWrappers_1.12.0/headers/H5IMpublic.h /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * * If you do not have access to either file, you may request a copy from * * <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5IMpublic_H #define _H5IMpublic_H #ifdef __cplusplus extern "C" { #endif H5_HLDLL herr_t H5IMmake_image_8bit( hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, const unsigned char *buffer ); H5_HLDLL herr_t H5IMmake_image_24bit( hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, const char *interlace, const unsigned char *buffer ); H5_HLDLL herr_t H5IMget_image_info( hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t *height, hsize_t *planes, char *interlace, hssize_t *npals ); H5_HLDLL herr_t H5IMread_image( hid_t loc_id, const char *dset_name, unsigned char *buffer ); H5_HLDLL herr_t H5IMmake_palette( hid_t loc_id, const char *pal_name, const hsize_t *pal_dims, const unsigned char *pal_data ); H5_HLDLL herr_t H5IMlink_palette( hid_t loc_id, const char *image_name, const char *pal_name ); H5_HLDLL herr_t H5IMunlink_palette( hid_t loc_id, const char *image_name, const char *pal_name ); H5_HLDLL herr_t H5IMget_npalettes( hid_t loc_id, const char *image_name, hssize_t *npals ); H5_HLDLL herr_t H5IMget_palette_info( hid_t loc_id, const char *image_name, int pal_number, hsize_t *pal_dims ); H5_HLDLL herr_t H5IMget_palette( hid_t loc_id, const char *image_name, int pal_number, unsigned char *pal_data ); H5_HLDLL herr_t H5IMis_image( hid_t loc_id, const char *dset_name ); H5_HLDLL herr_t H5IMis_palette( hid_t loc_id, const char *dset_name ); #ifdef __cplusplus } #endif #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5FDlog.h
<filename>src/1_8_16/Wrapper_auto_H5FDlog.h #ifndef _WRAPPER_AUTO_H5FDLOG_H_ #define _WRAPPER_AUTO_H5FDLOG_H_ #include "global.h" /* H5_DLL hid_t H5FD_log_init(void); */ SEXP R_H5FD_log_init(void); /* H5_DLL void H5FD_log_term(void); */ SEXP R_H5FD_log_term(void); /* H5_DLL herr_t H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, size_t buf_size); */ SEXP R_H5Pset_fapl_log(SEXP R_fapl_id, SEXP R_logfile, SEXP R_flags, SEXP R_buf_size); #endif
jeroen/hdf5r
inst/CWrappers_1.8.16/headers/H5DSpublic.h
<gh_stars>100-1000 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #ifndef _H5DSpublic_H #define _H5DSpublic_H #define DIMENSION_SCALE_CLASS "DIMENSION_SCALE" #define DIMENSION_LIST "DIMENSION_LIST" #define REFERENCE_LIST "REFERENCE_LIST" #define DIMENSION_LABELS "DIMENSION_LABELS" typedef herr_t (*H5DS_iterate_t)(hid_t dset, unsigned dim, hid_t scale, void *visitor_data); #ifdef __cplusplus extern "C" { #endif H5_HLDLL herr_t H5DSattach_scale( hid_t did, hid_t dsid, unsigned int idx); H5_HLDLL herr_t H5DSdetach_scale( hid_t did, hid_t dsid, unsigned int idx); H5_HLDLL herr_t H5DSset_scale( hid_t dsid, const char *dimname); H5_HLDLL int H5DSget_num_scales( hid_t did, unsigned int dim); H5_HLDLL herr_t H5DSset_label( hid_t did, unsigned int idx, const char *label); H5_HLDLL ssize_t H5DSget_label( hid_t did, unsigned int idx, char *label, size_t size); H5_HLDLL ssize_t H5DSget_scale_name( hid_t did, char *name, size_t size); H5_HLDLL htri_t H5DSis_scale( hid_t did); H5_HLDLL herr_t H5DSiterate_scales( hid_t did, unsigned int dim, int *idx, H5DS_iterate_t visitor, void *visitor_data); H5_HLDLL htri_t H5DSis_attached( hid_t did, hid_t dsid, unsigned int idx); #ifdef __cplusplus } #endif #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5TB.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5TB.h" /* H5_HLDLL herr_t H5TBadd_records_from( hid_t loc_id, const char *dset_name1, hsize_t start1, hsize_t nrecords, const char *dset_name2, hsize_t start2 ); */ SEXP R_H5TBadd_records_from(SEXP R_loc_id, SEXP R_dset_name1, SEXP R_start1, SEXP R_nrecords, SEXP R_dset_name2, SEXP R_start2){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name1 = CHAR(STRING_ELT(R_dset_name1, 0)); hsize_t start1 = SEXP_to_longlong(R_start1, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); const char* dset_name2 = CHAR(STRING_ELT(R_dset_name2, 0)); hsize_t start2 = SEXP_to_longlong(R_start2, 0); herr_t return_val = H5TBadd_records_from(loc_id, dset_name1, start1, nrecords, dset_name2, start2); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL htri_t H5TBAget_fill(hid_t loc_id, const char *dset_name, hid_t dset_id, unsigned char *dst_buf); */ SEXP R_H5TBAget_fill(SEXP R_loc_id, SEXP R_dset_name, SEXP R_dset_id, SEXP R_dst_buf){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_dst_buf = PROTECT(duplicate(R_dst_buf)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hid_t dset_id = SEXP_to_longlong(R_dset_id, 0); unsigned char* dst_buf; if(XLENGTH(R_dst_buf) == 0) { dst_buf = NULL; } else { R_helper = PROTECT(RToH5(R_dst_buf, h5_datatype[DT_unsigned_char], XLENGTH(R_dst_buf))); dst_buf= (unsigned char*) VOIDPTR(R_helper); vars_protected++; } htri_t return_val = H5TBAget_fill(loc_id, dset_name, dset_id, dst_buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_dst_buf, h5_datatype[DT_unsigned_char]); R_dst_buf = PROTECT(H5ToR_single_step(dst_buf, h5_datatype[DT_unsigned_char], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_dst_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("dst_buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBAget_title( hid_t loc_id, char *table_title ); */ SEXP R_H5TBAget_title(SEXP R_loc_id, SEXP R_table_title){ int vars_protected=0; R_table_title = PROTECT(duplicate(R_table_title)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); char* table_title; if(XLENGTH(R_table_title) == 0) { table_title = NULL; } else { table_title = R_alloc(strlen(CHAR(STRING_ELT(R_table_title, 0))) + 1, 1); strcpy(table_title, CHAR(STRING_ELT(R_table_title, 0))); } herr_t return_val = H5TBAget_title(loc_id, table_title); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(table_title==NULL) { R_table_title = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_table_title = PROTECT(mkString(table_title)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_table_title); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("table_title")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBappend_records( hid_t loc_id, const char *dset_name, hsize_t nrecords, size_t type_size, const size_t *field_offset, const size_t *dst_sizes, const void *buf ); */ SEXP R_H5TBappend_records(SEXP R_loc_id, SEXP R_dset_name, SEXP R_nrecords, SEXP R_type_size, SEXP R_field_offset, SEXP R_dst_sizes, SEXP R_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); size_t type_size = SEXP_to_longlong(R_type_size, 0); const size_t* field_offset; if(XLENGTH(R_field_offset) == 0) { field_offset = NULL; } else { R_helper = PROTECT(RToH5(R_field_offset, h5_datatype[DT_size_t], XLENGTH(R_field_offset))); field_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const size_t* dst_sizes; if(XLENGTH(R_dst_sizes) == 0) { dst_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_dst_sizes, h5_datatype[DT_size_t], XLENGTH(R_dst_sizes))); dst_sizes= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBappend_records(loc_id, dset_name, nrecords, type_size, field_offset, dst_sizes, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBcombine_tables( hid_t loc_id1, const char *dset_name1, hid_t loc_id2, const char *dset_name2, const char *dset_name3 ); */ SEXP R_H5TBcombine_tables(SEXP R_loc_id1, SEXP R_dset_name1, SEXP R_loc_id2, SEXP R_dset_name2, SEXP R_dset_name3){ int vars_protected=0; hid_t loc_id1 = SEXP_to_longlong(R_loc_id1, 0); const char* dset_name1 = CHAR(STRING_ELT(R_dset_name1, 0)); hid_t loc_id2 = SEXP_to_longlong(R_loc_id2, 0); const char* dset_name2 = CHAR(STRING_ELT(R_dset_name2, 0)); const char* dset_name3 = CHAR(STRING_ELT(R_dset_name3, 0)); herr_t return_val = H5TBcombine_tables(loc_id1, dset_name1, loc_id2, dset_name2, dset_name3); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBdelete_field( hid_t loc_id, const char *dset_name, const char *field_name ); */ SEXP R_H5TBdelete_field(SEXP R_loc_id, SEXP R_dset_name, SEXP R_field_name){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); const char* field_name = CHAR(STRING_ELT(R_field_name, 0)); herr_t return_val = H5TBdelete_field(loc_id, dset_name, field_name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBdelete_record( hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords ); */ SEXP R_H5TBdelete_record(SEXP R_loc_id, SEXP R_dset_name, SEXP R_start, SEXP R_nrecords){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t start = SEXP_to_longlong(R_start, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); herr_t return_val = H5TBdelete_record(loc_id, dset_name, start, nrecords); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBget_field_info( hid_t loc_id, const char *dset_name, char *field_names[], size_t *field_sizes, size_t *field_offsets, size_t *type_size ); */ SEXP R_H5TBget_field_info(SEXP R_loc_id, SEXP R_dset_name, SEXP R_field_names, SEXP R_field_sizes, SEXP R_field_offsets, SEXP R_type_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_field_names = PROTECT(duplicate(R_field_names)); vars_protected++; R_field_sizes = PROTECT(duplicate(R_field_sizes)); vars_protected++; R_field_offsets = PROTECT(duplicate(R_field_offsets)); vars_protected++; R_type_size = PROTECT(duplicate(R_type_size)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); char** field_names; if(XLENGTH(R_field_names) == 0) { field_names = NULL; } else { R_helper = PROTECT(RToH5(R_field_names, h5_datatype[DT_char], XLENGTH(R_field_names))); field_names= (char**) VOIDPTR(R_helper); vars_protected++; if(!inherits(R_field_names, "_RToH5_empty")) { for(int i = 0; i < XLENGTH(R_field_names); ++i) { if(XLENGTH(STRING_ELT(R_field_names, i)) == 0) { field_names[i] = NULL; } else { field_names[i] = (char*) R_alloc(XLENGTH(STRING_ELT(R_field_names, i)), 1); strcpy(field_names[i], CHAR(STRING_ELT(R_field_names, i))); } } } } size_t* field_sizes; if(XLENGTH(R_field_sizes) == 0) { field_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_field_sizes, h5_datatype[DT_size_t], XLENGTH(R_field_sizes))); field_sizes= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* field_offsets; if(XLENGTH(R_field_offsets) == 0) { field_offsets = NULL; } else { R_helper = PROTECT(RToH5(R_field_offsets, h5_datatype[DT_size_t], XLENGTH(R_field_offsets))); field_offsets= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* type_size; if(XLENGTH(R_type_size) == 0) { type_size = NULL; } else { R_helper = PROTECT(RToH5(R_type_size, h5_datatype[DT_size_t], XLENGTH(R_type_size))); type_size= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5TBget_field_info(loc_id, dset_name, field_names, field_sizes, field_offsets, type_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_field_names, h5_datatype[DT_char]); R_field_names = PROTECT(H5ToR_single_step(field_names, h5_datatype[DT_char], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_field_sizes, h5_datatype[DT_size_t]); R_field_sizes = PROTECT(H5ToR_single_step(field_sizes, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_field_offsets, h5_datatype[DT_size_t]); R_field_offsets = PROTECT(H5ToR_single_step(field_offsets, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_type_size, h5_datatype[DT_size_t]); R_type_size = PROTECT(H5ToR_single_step(type_size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 5)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_field_names); SET_VECTOR_ELT(__ret_list, 2, R_field_sizes); SET_VECTOR_ELT(__ret_list, 3, R_field_offsets); SET_VECTOR_ELT(__ret_list, 4, R_type_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 5)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("field_names")); SET_STRING_ELT(__ret_list_names, 2, mkChar("field_sizes")); SET_STRING_ELT(__ret_list_names, 3, mkChar("field_offsets")); SET_STRING_ELT(__ret_list_names, 4, mkChar("type_size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBget_table_info ( hid_t loc_id, const char *dset_name, hsize_t *nfields, hsize_t *nrecords ); */ SEXP R_H5TBget_table_info(SEXP R_loc_id, SEXP R_dset_name, SEXP R_nfields, SEXP R_nrecords){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_nfields = PROTECT(duplicate(R_nfields)); vars_protected++; R_nrecords = PROTECT(duplicate(R_nrecords)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t* nfields; if(XLENGTH(R_nfields) == 0) { nfields = NULL; } else { R_helper = PROTECT(RToH5(R_nfields, h5_datatype[DT_hsize_t], XLENGTH(R_nfields))); nfields= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* nrecords; if(XLENGTH(R_nrecords) == 0) { nrecords = NULL; } else { R_helper = PROTECT(RToH5(R_nrecords, h5_datatype[DT_hsize_t], XLENGTH(R_nrecords))); nrecords= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5TBget_table_info(loc_id, dset_name, nfields, nrecords); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_nfields, h5_datatype[DT_hsize_t]); R_nfields = PROTECT(H5ToR_single_step(nfields, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_nrecords, h5_datatype[DT_hsize_t]); R_nrecords = PROTECT(H5ToR_single_step(nrecords, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_nfields); SET_VECTOR_ELT(__ret_list, 2, R_nrecords); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("nfields")); SET_STRING_ELT(__ret_list_names, 2, mkChar("nrecords")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBinsert_field( hid_t loc_id, const char *dset_name, const char *field_name, hid_t field_type, hsize_t position, const void *fill_data, const void *buf ); */ SEXP R_H5TBinsert_field(SEXP R_loc_id, SEXP R_dset_name, SEXP R_field_name, SEXP R_field_type, SEXP R_position, SEXP R_fill_data, SEXP R_buf){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); const char* field_name = CHAR(STRING_ELT(R_field_name, 0)); hid_t field_type = SEXP_to_longlong(R_field_type, 0); hsize_t position = SEXP_to_longlong(R_position, 0); const void* fill_data; if(XLENGTH(R_fill_data) == 0) { fill_data = NULL; } else { fill_data = (void *) VOIDPTR(R_fill_data); } const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBinsert_field(loc_id, dset_name, field_name, field_type, position, fill_data, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBinsert_record( hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords, size_t dst_size, const size_t *dst_offset, const size_t *dst_sizes, void *buf ); */ SEXP R_H5TBinsert_record(SEXP R_loc_id, SEXP R_dset_name, SEXP R_start, SEXP R_nrecords, SEXP R_dst_size, SEXP R_dst_offset, SEXP R_dst_sizes, SEXP R_buf, SEXP _dupl_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t start = SEXP_to_longlong(R_start, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); size_t dst_size = SEXP_to_longlong(R_dst_size, 0); const size_t* dst_offset; if(XLENGTH(R_dst_offset) == 0) { dst_offset = NULL; } else { R_helper = PROTECT(RToH5(R_dst_offset, h5_datatype[DT_size_t], XLENGTH(R_dst_offset))); dst_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const size_t* dst_sizes; if(XLENGTH(R_dst_sizes) == 0) { dst_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_dst_sizes, h5_datatype[DT_size_t], XLENGTH(R_dst_sizes))); dst_sizes= (const size_t*) VOIDPTR(R_helper); vars_protected++; } void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBinsert_record(loc_id, dset_name, start, nrecords, dst_size, dst_offset, dst_sizes, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBmake_table( const char *table_title, hid_t loc_id, const char *dset_name, hsize_t nfields, hsize_t nrecords, size_t type_size, const char *field_names[], const size_t *field_offset, const hid_t *field_types, hsize_t chunk_size, void *fill_data, int compress, const void *buf ); */ SEXP R_H5TBmake_table(SEXP R_table_title, SEXP R_loc_id, SEXP R_dset_name, SEXP R_nfields, SEXP R_nrecords, SEXP R_type_size, SEXP R_field_names, SEXP R_field_offset, SEXP R_field_types, SEXP R_chunk_size, SEXP R_fill_data, SEXP R_compress, SEXP R_buf, SEXP _dupl_fill_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_field_names = PROTECT(duplicate(R_field_names)); vars_protected++; if(SEXP_to_logical(_dupl_fill_data)) { R_fill_data = PROTECT(duplicate(R_fill_data)); vars_protected++; } const char* table_title = CHAR(STRING_ELT(R_table_title, 0)); hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t nfields = SEXP_to_longlong(R_nfields, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); size_t type_size = SEXP_to_longlong(R_type_size, 0); const char** field_names; if(XLENGTH(R_field_names) == 0) { field_names = NULL; } else { R_helper = PROTECT(RToH5(R_field_names, h5_datatype[DT_char], XLENGTH(R_field_names))); field_names= (const char**) VOIDPTR(R_helper); vars_protected++; } const size_t* field_offset; if(XLENGTH(R_field_offset) == 0) { field_offset = NULL; } else { R_helper = PROTECT(RToH5(R_field_offset, h5_datatype[DT_size_t], XLENGTH(R_field_offset))); field_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const hid_t* field_types; if(XLENGTH(R_field_types) == 0) { field_types = NULL; } else { R_helper = PROTECT(RToH5(R_field_types, h5_datatype[DT_hid_t], XLENGTH(R_field_types))); field_types= (const hid_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t chunk_size = SEXP_to_longlong(R_chunk_size, 0); void* fill_data; if(XLENGTH(R_fill_data) == 0) { fill_data = NULL; } else { fill_data = (void *) VOIDPTR(R_fill_data); } int compress = SEXP_to_longlong(R_compress, 0); const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBmake_table(table_title, loc_id, dset_name, nfields, nrecords, type_size, field_names, field_offset, field_types, chunk_size, fill_data, compress, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_field_names, h5_datatype[DT_char]); R_field_names = PROTECT(H5ToR_single_step(field_names, h5_datatype[DT_char], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_field_names); SET_VECTOR_ELT(__ret_list, 2, R_fill_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("field_names")); SET_STRING_ELT(__ret_list_names, 2, mkChar("fill_data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBread_fields_index( hid_t loc_id, const char *dset_name, hsize_t nfields, const int *field_index, hsize_t start, hsize_t nrecords, size_t type_size, const size_t *field_offset, const size_t *dst_sizes, void *buf ); */ SEXP R_H5TBread_fields_index(SEXP R_loc_id, SEXP R_dset_name, SEXP R_nfields, SEXP R_field_index, SEXP R_start, SEXP R_nrecords, SEXP R_type_size, SEXP R_field_offset, SEXP R_dst_sizes, SEXP R_buf, SEXP _dupl_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t nfields = SEXP_to_longlong(R_nfields, 0); const int* field_index; if(XLENGTH(R_field_index) == 0) { field_index = NULL; } else { R_helper = PROTECT(RToH5(R_field_index, h5_datatype[DT_int], XLENGTH(R_field_index))); field_index= (const int*) VOIDPTR(R_helper); vars_protected++; } hsize_t start = SEXP_to_longlong(R_start, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); size_t type_size = SEXP_to_longlong(R_type_size, 0); const size_t* field_offset; if(XLENGTH(R_field_offset) == 0) { field_offset = NULL; } else { R_helper = PROTECT(RToH5(R_field_offset, h5_datatype[DT_size_t], XLENGTH(R_field_offset))); field_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const size_t* dst_sizes; if(XLENGTH(R_dst_sizes) == 0) { dst_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_dst_sizes, h5_datatype[DT_size_t], XLENGTH(R_dst_sizes))); dst_sizes= (const size_t*) VOIDPTR(R_helper); vars_protected++; } void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBread_fields_index(loc_id, dset_name, nfields, field_index, start, nrecords, type_size, field_offset, dst_sizes, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBread_fields_name( hid_t loc_id, const char *dset_name, const char *field_names, hsize_t start, hsize_t nrecords, size_t type_size, const size_t *field_offset, const size_t *dst_sizes, void *buf ); */ SEXP R_H5TBread_fields_name(SEXP R_loc_id, SEXP R_dset_name, SEXP R_field_names, SEXP R_start, SEXP R_nrecords, SEXP R_type_size, SEXP R_field_offset, SEXP R_dst_sizes, SEXP R_buf, SEXP _dupl_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); const char* field_names = CHAR(STRING_ELT(R_field_names, 0)); hsize_t start = SEXP_to_longlong(R_start, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); size_t type_size = SEXP_to_longlong(R_type_size, 0); const size_t* field_offset; if(XLENGTH(R_field_offset) == 0) { field_offset = NULL; } else { R_helper = PROTECT(RToH5(R_field_offset, h5_datatype[DT_size_t], XLENGTH(R_field_offset))); field_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const size_t* dst_sizes; if(XLENGTH(R_dst_sizes) == 0) { dst_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_dst_sizes, h5_datatype[DT_size_t], XLENGTH(R_dst_sizes))); dst_sizes= (const size_t*) VOIDPTR(R_helper); vars_protected++; } void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBread_fields_name(loc_id, dset_name, field_names, start, nrecords, type_size, field_offset, dst_sizes, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBread_records( hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords, size_t type_size, const size_t *dst_offset, const size_t *dst_sizes, void *buf ); */ SEXP R_H5TBread_records(SEXP R_loc_id, SEXP R_dset_name, SEXP R_start, SEXP R_nrecords, SEXP R_type_size, SEXP R_dst_offset, SEXP R_dst_sizes, SEXP R_buf, SEXP _dupl_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t start = SEXP_to_longlong(R_start, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); size_t type_size = SEXP_to_longlong(R_type_size, 0); const size_t* dst_offset; if(XLENGTH(R_dst_offset) == 0) { dst_offset = NULL; } else { R_helper = PROTECT(RToH5(R_dst_offset, h5_datatype[DT_size_t], XLENGTH(R_dst_offset))); dst_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const size_t* dst_sizes; if(XLENGTH(R_dst_sizes) == 0) { dst_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_dst_sizes, h5_datatype[DT_size_t], XLENGTH(R_dst_sizes))); dst_sizes= (const size_t*) VOIDPTR(R_helper); vars_protected++; } void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBread_records(loc_id, dset_name, start, nrecords, type_size, dst_offset, dst_sizes, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBread_table( hid_t loc_id, const char *dset_name, size_t dst_size, const size_t *dst_offset, const size_t *dst_sizes, void *dst_buf ); */ SEXP R_H5TBread_table(SEXP R_loc_id, SEXP R_dset_name, SEXP R_dst_size, SEXP R_dst_offset, SEXP R_dst_sizes, SEXP R_dst_buf, SEXP _dupl_dst_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; if(SEXP_to_logical(_dupl_dst_buf)) { R_dst_buf = PROTECT(duplicate(R_dst_buf)); vars_protected++; } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); size_t dst_size = SEXP_to_longlong(R_dst_size, 0); const size_t* dst_offset; if(XLENGTH(R_dst_offset) == 0) { dst_offset = NULL; } else { R_helper = PROTECT(RToH5(R_dst_offset, h5_datatype[DT_size_t], XLENGTH(R_dst_offset))); dst_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const size_t* dst_sizes; if(XLENGTH(R_dst_sizes) == 0) { dst_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_dst_sizes, h5_datatype[DT_size_t], XLENGTH(R_dst_sizes))); dst_sizes= (const size_t*) VOIDPTR(R_helper); vars_protected++; } void* dst_buf; if(XLENGTH(R_dst_buf) == 0) { dst_buf = NULL; } else { dst_buf = (void *) VOIDPTR(R_dst_buf); } herr_t return_val = H5TBread_table(loc_id, dset_name, dst_size, dst_offset, dst_sizes, dst_buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_dst_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("dst_buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBwrite_fields_index( hid_t loc_id, const char *dset_name, hsize_t nfields, const int *field_index, hsize_t start, hsize_t nrecords, size_t type_size, const size_t *field_offset, const size_t *dst_sizes, const void *buf ); */ SEXP R_H5TBwrite_fields_index(SEXP R_loc_id, SEXP R_dset_name, SEXP R_nfields, SEXP R_field_index, SEXP R_start, SEXP R_nrecords, SEXP R_type_size, SEXP R_field_offset, SEXP R_dst_sizes, SEXP R_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t nfields = SEXP_to_longlong(R_nfields, 0); const int* field_index; if(XLENGTH(R_field_index) == 0) { field_index = NULL; } else { R_helper = PROTECT(RToH5(R_field_index, h5_datatype[DT_int], XLENGTH(R_field_index))); field_index= (const int*) VOIDPTR(R_helper); vars_protected++; } hsize_t start = SEXP_to_longlong(R_start, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); size_t type_size = SEXP_to_longlong(R_type_size, 0); const size_t* field_offset; if(XLENGTH(R_field_offset) == 0) { field_offset = NULL; } else { R_helper = PROTECT(RToH5(R_field_offset, h5_datatype[DT_size_t], XLENGTH(R_field_offset))); field_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const size_t* dst_sizes; if(XLENGTH(R_dst_sizes) == 0) { dst_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_dst_sizes, h5_datatype[DT_size_t], XLENGTH(R_dst_sizes))); dst_sizes= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBwrite_fields_index(loc_id, dset_name, nfields, field_index, start, nrecords, type_size, field_offset, dst_sizes, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBwrite_fields_name( hid_t loc_id, const char *dset_name, const char *field_names, hsize_t start, hsize_t nrecords, size_t type_size, const size_t *field_offset, const size_t *dst_sizes, const void *buf ); */ SEXP R_H5TBwrite_fields_name(SEXP R_loc_id, SEXP R_dset_name, SEXP R_field_names, SEXP R_start, SEXP R_nrecords, SEXP R_type_size, SEXP R_field_offset, SEXP R_dst_sizes, SEXP R_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); const char* field_names = CHAR(STRING_ELT(R_field_names, 0)); hsize_t start = SEXP_to_longlong(R_start, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); size_t type_size = SEXP_to_longlong(R_type_size, 0); const size_t* field_offset; if(XLENGTH(R_field_offset) == 0) { field_offset = NULL; } else { R_helper = PROTECT(RToH5(R_field_offset, h5_datatype[DT_size_t], XLENGTH(R_field_offset))); field_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const size_t* dst_sizes; if(XLENGTH(R_dst_sizes) == 0) { dst_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_dst_sizes, h5_datatype[DT_size_t], XLENGTH(R_dst_sizes))); dst_sizes= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBwrite_fields_name(loc_id, dset_name, field_names, start, nrecords, type_size, field_offset, dst_sizes, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5TBwrite_records( hid_t loc_id, const char *dset_name, hsize_t start, hsize_t nrecords, size_t type_size, const size_t *field_offset, const size_t *dst_sizes, const void *buf ); */ SEXP R_H5TBwrite_records(SEXP R_loc_id, SEXP R_dset_name, SEXP R_start, SEXP R_nrecords, SEXP R_type_size, SEXP R_field_offset, SEXP R_dst_sizes, SEXP R_buf){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t start = SEXP_to_longlong(R_start, 0); hsize_t nrecords = SEXP_to_longlong(R_nrecords, 0); size_t type_size = SEXP_to_longlong(R_type_size, 0); const size_t* field_offset; if(XLENGTH(R_field_offset) == 0) { field_offset = NULL; } else { R_helper = PROTECT(RToH5(R_field_offset, h5_datatype[DT_size_t], XLENGTH(R_field_offset))); field_offset= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const size_t* dst_sizes; if(XLENGTH(R_dst_sizes) == 0) { dst_sizes = NULL; } else { R_helper = PROTECT(RToH5(R_dst_sizes, h5_datatype[DT_size_t], XLENGTH(R_dst_sizes))); dst_sizes= (const size_t*) VOIDPTR(R_helper); vars_protected++; } const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } herr_t return_val = H5TBwrite_records(loc_id, dset_name, start, nrecords, type_size, field_offset, dst_sizes, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
inst/CWrappers_1.12.0/headers/H5FDlog.h
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the COPYING file, which can be found at the root of the source code * * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. * * If you do not have access to either file, you may request a copy from * * <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * Programmer: <NAME> <<EMAIL>> * Monday, April 17, 2000 * * Purpose: The public header file for the log driver. */ #ifndef H5FDlog_H #define H5FDlog_H #define H5FD_LOG (H5FD_log_init()) /* Flags for H5Pset_fapl_log() */ /* Flags for tracking 'meta' operations (truncate) */ #define H5FD_LOG_TRUNCATE 0x00000001 #define H5FD_LOG_META_IO (H5FD_LOG_TRUNCATE) /* Flags for tracking where reads/writes/seeks occur */ #define H5FD_LOG_LOC_READ 0x00000002 #define H5FD_LOG_LOC_WRITE 0x00000004 #define H5FD_LOG_LOC_SEEK 0x00000008 #define H5FD_LOG_LOC_IO (H5FD_LOG_LOC_READ|H5FD_LOG_LOC_WRITE|H5FD_LOG_LOC_SEEK) /* Flags for tracking number of times each byte is read/written */ #define H5FD_LOG_FILE_READ 0x00000010 #define H5FD_LOG_FILE_WRITE 0x00000020 #define H5FD_LOG_FILE_IO (H5FD_LOG_FILE_READ|H5FD_LOG_FILE_WRITE) /* Flag for tracking "flavor" (type) of information stored at each byte */ #define H5FD_LOG_FLAVOR 0x00000040 /* Flags for tracking total number of reads/writes/seeks/truncates */ #define H5FD_LOG_NUM_READ 0x00000080 #define H5FD_LOG_NUM_WRITE 0x00000100 #define H5FD_LOG_NUM_SEEK 0x00000200 #define H5FD_LOG_NUM_TRUNCATE 0x00000400 #define H5FD_LOG_NUM_IO (H5FD_LOG_NUM_READ|H5FD_LOG_NUM_WRITE|H5FD_LOG_NUM_SEEK|H5FD_LOG_NUM_TRUNCATE) /* Flags for tracking time spent in open/stat/read/write/seek/truncate/close */ #define H5FD_LOG_TIME_OPEN 0x00000800 #define H5FD_LOG_TIME_STAT 0x00001000 #define H5FD_LOG_TIME_READ 0x00002000 #define H5FD_LOG_TIME_WRITE 0x00004000 #define H5FD_LOG_TIME_SEEK 0x00008000 #define H5FD_LOG_TIME_TRUNCATE 0x00010000 #define H5FD_LOG_TIME_CLOSE 0x00020000 #define H5FD_LOG_TIME_IO (H5FD_LOG_TIME_OPEN|H5FD_LOG_TIME_STAT|H5FD_LOG_TIME_READ|H5FD_LOG_TIME_WRITE|H5FD_LOG_TIME_SEEK|H5FD_LOG_TIME_TRUNCATE|H5FD_LOG_TIME_CLOSE) /* Flags for tracking allocation/release of space in file */ #define H5FD_LOG_ALLOC 0x00040000 #define H5FD_LOG_FREE 0x00080000 #define H5FD_LOG_ALL (H5FD_LOG_FREE|H5FD_LOG_ALLOC|H5FD_LOG_TIME_IO|H5FD_LOG_NUM_IO|H5FD_LOG_FLAVOR|H5FD_LOG_FILE_IO|H5FD_LOG_LOC_IO|H5FD_LOG_META_IO) #ifdef __cplusplus extern "C" { #endif H5_DLL hid_t H5FD_log_init(void); H5_DLL herr_t H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, size_t buf_size); #ifdef __cplusplus } #endif #endif
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5R.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5R.h" /* H5_DLL herr_t H5Rcopy(const H5R_ref_t *src_ref_ptr, H5R_ref_t *dst_ref_ptr); */ SEXP R_H5Rcopy(SEXP R_src_ref_ptr, SEXP R_dst_ref_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_dst_ref_ptr = PROTECT(duplicate(R_dst_ref_ptr)); vars_protected++; R_helper = PROTECT(RToH5(R_src_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_src_ref_ptr, h5_datatype[DT_H5R_ref_t]))); const H5R_ref_t* src_ref_ptr= (const H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; R_helper = PROTECT(RToH5(R_dst_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_dst_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* dst_ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Rcopy(src_ref_ptr, dst_ref_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_dst_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_dst_ref_ptr = PROTECT(H5ToR_single_step(dst_ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_dst_ref_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("dst_ref_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id); */ SEXP R_H5Rcreate(SEXP R_ref, SEXP R_loc_id, SEXP R_name, SEXP R_ref_type, SEXP R_space_id, SEXP _dupl_ref){ int vars_protected=0; if(SEXP_to_logical(_dupl_ref)) { R_ref = PROTECT(duplicate(R_ref)); vars_protected++; } void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); hid_t space_id = SEXP_to_longlong(R_space_id, 0); herr_t return_val = H5Rcreate(ref, loc_id, name, ref_type, space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Rcreate_attr(hid_t loc_id, const char *name, const char *attr_name, hid_t oapl_id, H5R_ref_t *ref_ptr); */ SEXP R_H5Rcreate_attr(SEXP R_loc_id, SEXP R_name, SEXP R_attr_name, SEXP R_oapl_id, SEXP R_ref_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ref_ptr = PROTECT(duplicate(R_ref_ptr)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); const char* attr_name = CHAR(STRING_ELT(R_attr_name, 0)); hid_t oapl_id = SEXP_to_longlong(R_oapl_id, 0); R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Rcreate_attr(loc_id, name, attr_name, oapl_id, ref_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_ref_ptr = PROTECT(H5ToR_single_step(ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Rcreate_object(hid_t loc_id, const char *name, hid_t oapl_id, H5R_ref_t *ref_ptr); */ SEXP R_H5Rcreate_object(SEXP R_loc_id, SEXP R_name, SEXP R_oapl_id, SEXP R_ref_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ref_ptr = PROTECT(duplicate(R_ref_ptr)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t oapl_id = SEXP_to_longlong(R_oapl_id, 0); R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Rcreate_object(loc_id, name, oapl_id, ref_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_ref_ptr = PROTECT(H5ToR_single_step(ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Rcreate_region(hid_t loc_id, const char *name, hid_t space_id, hid_t oapl_id, H5R_ref_t *ref_ptr); */ SEXP R_H5Rcreate_region(SEXP R_loc_id, SEXP R_name, SEXP R_space_id, SEXP R_oapl_id, SEXP R_ref_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ref_ptr = PROTECT(duplicate(R_ref_ptr)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t space_id = SEXP_to_longlong(R_space_id, 0); hid_t oapl_id = SEXP_to_longlong(R_oapl_id, 0); R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Rcreate_region(loc_id, name, space_id, oapl_id, ref_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_ref_ptr = PROTECT(H5ToR_single_step(ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rdereference1(SEXP R_obj_id, SEXP R_ref_type, SEXP R_ref){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } hid_t return_val = H5Rdereference1(obj_id, ref_type, ref); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rdereference2(SEXP R_obj_id, SEXP R_oapl_id, SEXP R_ref_type, SEXP R_ref){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); hid_t oapl_id = SEXP_to_longlong(R_oapl_id, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } hid_t return_val = H5Rdereference2(obj_id, oapl_id, ref_type, ref); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Rdestroy(H5R_ref_t *ref_ptr); */ SEXP R_H5Rdestroy(SEXP R_ref_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ref_ptr = PROTECT(duplicate(R_ref_ptr)); vars_protected++; R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Rdestroy(ref_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_ref_ptr = PROTECT(H5ToR_single_step(ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Requal(const H5R_ref_t *ref1_ptr, const H5R_ref_t *ref2_ptr); */ SEXP R_H5Requal(SEXP R_ref1_ptr, SEXP R_ref2_ptr){ SEXP R_helper = R_NilValue; int vars_protected=0; R_helper = PROTECT(RToH5(R_ref1_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref1_ptr, h5_datatype[DT_H5R_ref_t]))); const H5R_ref_t* ref1_ptr= (const H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; R_helper = PROTECT(RToH5(R_ref2_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref2_ptr, h5_datatype[DT_H5R_ref_t]))); const H5R_ref_t* ref2_ptr= (const H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; htri_t return_val = H5Requal(ref1_ptr, ref2_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Rget_attr_name(const H5R_ref_t *ref_ptr, char *buf, size_t size); */ SEXP R_H5Rget_attr_name(SEXP R_ref_ptr, SEXP R_buf, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; R_buf = PROTECT(duplicate(R_buf)); vars_protected++; R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); const H5R_ref_t* ref_ptr= (const H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; char* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = R_alloc(strlen(CHAR(STRING_ELT(R_buf, 0))) + 1, 1); strcpy(buf, CHAR(STRING_ELT(R_buf, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Rget_attr_name(ref_ptr, buf, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(buf==NULL) { R_buf = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_buf = PROTECT(mkString(buf)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Rget_file_name(const H5R_ref_t *ref_ptr, char *buf, size_t size); */ SEXP R_H5Rget_file_name(SEXP R_ref_ptr, SEXP R_buf, SEXP R_size){ SEXP R_helper = R_NilValue; int vars_protected=0; R_buf = PROTECT(duplicate(R_buf)); vars_protected++; R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); const H5R_ref_t* ref_ptr= (const H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; char* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = R_alloc(strlen(CHAR(STRING_ELT(R_buf, 0))) + 1, 1); strcpy(buf, CHAR(STRING_ELT(R_buf, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Rget_file_name(ref_ptr, buf, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(buf==NULL) { R_buf = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_buf = PROTECT(mkString(buf)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, char *name, size_t size); */ SEXP R_H5Rget_name(SEXP R_loc_id, SEXP R_ref_type, SEXP R_ref, SEXP R_name, SEXP R_size){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Rget_name(loc_id, ref_type, ref, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Rget_obj_name(H5R_ref_t *ref_ptr, hid_t rapl_id, char *buf, size_t size); */ SEXP R_H5Rget_obj_name(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_buf, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ref_ptr = PROTECT(duplicate(R_ref_ptr)); vars_protected++; R_buf = PROTECT(duplicate(R_buf)); vars_protected++; R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; hid_t rapl_id = SEXP_to_longlong(R_rapl_id, 0); char* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = R_alloc(strlen(CHAR(STRING_ELT(R_buf, 0))) + 1, 1); strcpy(buf, CHAR(STRING_ELT(R_buf, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Rget_obj_name(ref_ptr, rapl_id, buf, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_ref_ptr = PROTECT(H5ToR_single_step(ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; if(buf==NULL) { R_buf = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_buf = PROTECT(mkString(buf)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref_ptr); SET_VECTOR_ELT(__ret_list, 2, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref_ptr")); SET_STRING_ELT(__ret_list_names, 2, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *ref, H5O_type_t *obj_type); */ SEXP R_H5Rget_obj_type2(SEXP R_id, SEXP R_ref_type, SEXP R_ref, SEXP R_obj_type){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_obj_type = PROTECT(duplicate(R_obj_type)); vars_protected++; hid_t id = SEXP_to_longlong(R_id, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } H5O_type_t* obj_type; if(XLENGTH(R_obj_type) == 0) { obj_type = NULL; } else { R_helper = PROTECT(RToH5(R_obj_type, h5_datatype[DT_H5O_type_t], XLENGTH(R_obj_type))); obj_type= (H5O_type_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Rget_obj_type2(id, ref_type, ref, obj_type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_obj_type, h5_datatype[DT_H5O_type_t]); R_obj_type = PROTECT(H5ToR_single_step(obj_type, h5_datatype[DT_H5O_type_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_obj_type); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("obj_type")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Rget_obj_type3(H5R_ref_t *ref_ptr, hid_t rapl_id, H5O_type_t *obj_type); */ SEXP R_H5Rget_obj_type3(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_obj_type){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ref_ptr = PROTECT(duplicate(R_ref_ptr)); vars_protected++; R_obj_type = PROTECT(duplicate(R_obj_type)); vars_protected++; R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; hid_t rapl_id = SEXP_to_longlong(R_rapl_id, 0); H5O_type_t* obj_type; if(XLENGTH(R_obj_type) == 0) { obj_type = NULL; } else { R_helper = PROTECT(RToH5(R_obj_type, h5_datatype[DT_H5O_type_t], XLENGTH(R_obj_type))); obj_type= (H5O_type_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Rget_obj_type3(ref_ptr, rapl_id, obj_type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_ref_ptr = PROTECT(H5ToR_single_step(ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_obj_type, h5_datatype[DT_H5O_type_t]); R_obj_type = PROTECT(H5ToR_single_step(obj_type, h5_datatype[DT_H5O_type_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref_ptr); SET_VECTOR_ELT(__ret_list, 2, R_obj_type); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref_ptr")); SET_STRING_ELT(__ret_list_names, 2, mkChar("obj_type")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rget_region(SEXP R_dataset, SEXP R_ref_type, SEXP R_ref){ int vars_protected=0; hid_t dataset = SEXP_to_longlong(R_dataset, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } hid_t return_val = H5Rget_region(dataset, ref_type, ref); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5R_type_t H5Rget_type(const H5R_ref_t *ref_ptr); */ SEXP R_H5Rget_type(SEXP R_ref_ptr){ SEXP R_helper = R_NilValue; int vars_protected=0; R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); const H5R_ref_t* ref_ptr= (const H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; H5R_type_t return_val = H5Rget_type(ref_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5R_type_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Ropen_attr(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t aapl_id); */ SEXP R_H5Ropen_attr(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_aapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ref_ptr = PROTECT(duplicate(R_ref_ptr)); vars_protected++; R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; hid_t rapl_id = SEXP_to_longlong(R_rapl_id, 0); hid_t aapl_id = SEXP_to_longlong(R_aapl_id, 0); hid_t return_val = H5Ropen_attr(ref_ptr, rapl_id, aapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_ref_ptr = PROTECT(H5ToR_single_step(ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Ropen_object(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id); */ SEXP R_H5Ropen_object(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_oapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ref_ptr = PROTECT(duplicate(R_ref_ptr)); vars_protected++; R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; hid_t rapl_id = SEXP_to_longlong(R_rapl_id, 0); hid_t oapl_id = SEXP_to_longlong(R_oapl_id, 0); hid_t return_val = H5Ropen_object(ref_ptr, rapl_id, oapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_ref_ptr = PROTECT(H5ToR_single_step(ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Ropen_region(H5R_ref_t *ref_ptr, hid_t rapl_id, hid_t oapl_id); */ SEXP R_H5Ropen_region(SEXP R_ref_ptr, SEXP R_rapl_id, SEXP R_oapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ref_ptr = PROTECT(duplicate(R_ref_ptr)); vars_protected++; R_helper = PROTECT(RToH5(R_ref_ptr, h5_datatype[DT_H5R_ref_t], guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]))); H5R_ref_t* ref_ptr= (H5R_ref_t*) VOIDPTR(R_helper); vars_protected++; hid_t rapl_id = SEXP_to_longlong(R_rapl_id, 0); hid_t oapl_id = SEXP_to_longlong(R_oapl_id, 0); hid_t return_val = H5Ropen_region(ref_ptr, rapl_id, oapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ref_ptr, h5_datatype[DT_H5R_ref_t]); R_ref_ptr = PROTECT(H5ToR_single_step(ref_ptr, h5_datatype[DT_H5R_ref_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_12_0/datatype_export.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "datatype_export.h" hid_t h5_datatype[DT_LAST_ITEM]; hid_t get_h5_equiv(int size, bool sign) { switch(size) { case 1: { if(sign) { return(H5T_NATIVE_INT8); } else { return(H5T_NATIVE_UINT8); } } case 2: { if(sign) { return(H5T_NATIVE_INT16); } else { return(H5T_NATIVE_UINT16); } } case 4: { if(sign) { return(H5T_NATIVE_INT32); } else { return(H5T_NATIVE_UINT32); } } case 8: { if(sign) { return(H5T_NATIVE_INT64); } else { return(H5T_NATIVE_UINT64); } } default: error("Unknown size\n"); } } SEXP print_dtypes_array() { Rprintf("New -------------------------------------\n"); for(int i=0; i < DT_LAST_ITEM; ++i) { Rprintf("%d: %I64d\n", i, h5_datatype[i]); } return(R_NilValue); } SEXP init_dtypes(void) { // The predefined hdf5 datatypes h5_datatype[DT_H5T_IEEE_F32BE] = H5T_IEEE_F32BE; h5_datatype[DT_H5T_IEEE_F32LE] = H5T_IEEE_F32LE; h5_datatype[DT_H5T_IEEE_F64BE] = H5T_IEEE_F64BE; h5_datatype[DT_H5T_IEEE_F64LE] = H5T_IEEE_F64LE; h5_datatype[DT_H5T_STD_I8BE] = H5T_STD_I8BE; h5_datatype[DT_H5T_STD_I8LE] = H5T_STD_I8LE; h5_datatype[DT_H5T_STD_I16BE] = H5T_STD_I16BE; h5_datatype[DT_H5T_STD_I16LE] = H5T_STD_I16LE; h5_datatype[DT_H5T_STD_I32BE] = H5T_STD_I32BE; h5_datatype[DT_H5T_STD_I32LE] = H5T_STD_I32LE; h5_datatype[DT_H5T_STD_I64BE] = H5T_STD_I64BE; h5_datatype[DT_H5T_STD_I64LE] = H5T_STD_I64LE; h5_datatype[DT_H5T_STD_U8BE] = H5T_STD_U8BE; h5_datatype[DT_H5T_STD_U8LE] = H5T_STD_U8LE; h5_datatype[DT_H5T_STD_U16BE] = H5T_STD_U16BE; h5_datatype[DT_H5T_STD_U16LE] = H5T_STD_U16LE; h5_datatype[DT_H5T_STD_U32BE] = H5T_STD_U32BE; h5_datatype[DT_H5T_STD_U32LE] = H5T_STD_U32LE; h5_datatype[DT_H5T_STD_U64BE] = H5T_STD_U64BE; h5_datatype[DT_H5T_STD_U64LE] = H5T_STD_U64LE; h5_datatype[DT_H5T_STD_B8BE] = H5T_STD_B8BE; h5_datatype[DT_H5T_STD_B8LE] = H5T_STD_B8LE; h5_datatype[DT_H5T_STD_B16BE] = H5T_STD_B16BE; h5_datatype[DT_H5T_STD_B16LE] = H5T_STD_B16LE; h5_datatype[DT_H5T_STD_B32BE] = H5T_STD_B32BE; h5_datatype[DT_H5T_STD_B32LE] = H5T_STD_B32LE; h5_datatype[DT_H5T_STD_B64BE] = H5T_STD_B64BE; h5_datatype[DT_H5T_STD_B64LE] = H5T_STD_B64LE; h5_datatype[DT_H5T_STD_REF_OBJ] = H5T_STD_REF_OBJ; h5_datatype[DT_H5T_STD_REF_DSETREG] = H5T_STD_REF_DSETREG; h5_datatype[DT_H5T_STD_REF] = H5T_STD_REF; h5_datatype[DT_H5T_UNIX_D32BE] = H5T_UNIX_D32BE; h5_datatype[DT_H5T_UNIX_D32LE] = H5T_UNIX_D32LE; h5_datatype[DT_H5T_UNIX_D64BE] = H5T_UNIX_D64BE; h5_datatype[DT_H5T_UNIX_D64LE] = H5T_UNIX_D64LE; h5_datatype[DT_H5T_C_S1] = H5T_C_S1; h5_datatype[DT_H5T_FORTRAN_S1] = H5T_FORTRAN_S1; h5_datatype[DT_H5T_INTEL_I8] = H5T_INTEL_I8; h5_datatype[DT_H5T_INTEL_I16] = H5T_INTEL_I16; h5_datatype[DT_H5T_INTEL_I32] = H5T_INTEL_I32; h5_datatype[DT_H5T_INTEL_I64] = H5T_INTEL_I64; h5_datatype[DT_H5T_INTEL_U8] = H5T_INTEL_U8; h5_datatype[DT_H5T_INTEL_U16] = H5T_INTEL_U16; h5_datatype[DT_H5T_INTEL_U32] = H5T_INTEL_U32; h5_datatype[DT_H5T_INTEL_U64] = H5T_INTEL_U64; h5_datatype[DT_H5T_INTEL_B8] = H5T_INTEL_B8; h5_datatype[DT_H5T_INTEL_B16] = H5T_INTEL_B16; h5_datatype[DT_H5T_INTEL_B32] = H5T_INTEL_B32; h5_datatype[DT_H5T_INTEL_B64] = H5T_INTEL_B64; h5_datatype[DT_H5T_INTEL_F32] = H5T_INTEL_F32; h5_datatype[DT_H5T_INTEL_F64] = H5T_INTEL_F64; h5_datatype[DT_H5T_ALPHA_I8] = H5T_ALPHA_I8; h5_datatype[DT_H5T_ALPHA_I16] = H5T_ALPHA_I16; h5_datatype[DT_H5T_ALPHA_I32] = H5T_ALPHA_I32; h5_datatype[DT_H5T_ALPHA_I64] = H5T_ALPHA_I64; h5_datatype[DT_H5T_ALPHA_U8] = H5T_ALPHA_U8; h5_datatype[DT_H5T_ALPHA_U16] = H5T_ALPHA_U16; h5_datatype[DT_H5T_ALPHA_U32] = H5T_ALPHA_U32; h5_datatype[DT_H5T_ALPHA_U64] = H5T_ALPHA_U64; h5_datatype[DT_H5T_ALPHA_B8] = H5T_ALPHA_B8; h5_datatype[DT_H5T_ALPHA_B16] = H5T_ALPHA_B16; h5_datatype[DT_H5T_ALPHA_B32] = H5T_ALPHA_B32; h5_datatype[DT_H5T_ALPHA_B64] = H5T_ALPHA_B64; h5_datatype[DT_H5T_ALPHA_F32] = H5T_ALPHA_F32; h5_datatype[DT_H5T_ALPHA_F64] = H5T_ALPHA_F64; h5_datatype[DT_H5T_MIPS_I8] = H5T_MIPS_I8; h5_datatype[DT_H5T_MIPS_I16] = H5T_MIPS_I16; h5_datatype[DT_H5T_MIPS_I32] = H5T_MIPS_I32; h5_datatype[DT_H5T_MIPS_I64] = H5T_MIPS_I64; h5_datatype[DT_H5T_MIPS_U8] = H5T_MIPS_U8; h5_datatype[DT_H5T_MIPS_U16] = H5T_MIPS_U16; h5_datatype[DT_H5T_MIPS_U32] = H5T_MIPS_U32; h5_datatype[DT_H5T_MIPS_U64] = H5T_MIPS_U64; h5_datatype[DT_H5T_MIPS_B8] = H5T_MIPS_B8; h5_datatype[DT_H5T_MIPS_B16] = H5T_MIPS_B16; h5_datatype[DT_H5T_MIPS_B32] = H5T_MIPS_B32; h5_datatype[DT_H5T_MIPS_B64] = H5T_MIPS_B64; h5_datatype[DT_H5T_MIPS_F32] = H5T_MIPS_F32; h5_datatype[DT_H5T_MIPS_F64] = H5T_MIPS_F64; h5_datatype[DT_H5T_VAX_F32] = H5T_VAX_F32; h5_datatype[DT_H5T_VAX_F64] = H5T_VAX_F64; h5_datatype[DT_H5T_NATIVE_CHAR] = H5T_NATIVE_CHAR; h5_datatype[DT_H5T_NATIVE_SCHAR] = H5T_NATIVE_SCHAR; h5_datatype[DT_H5T_NATIVE_UCHAR] = H5T_NATIVE_UCHAR; h5_datatype[DT_H5T_NATIVE_SHORT] = H5T_NATIVE_SHORT; h5_datatype[DT_H5T_NATIVE_USHORT] = H5T_NATIVE_USHORT; h5_datatype[DT_H5T_NATIVE_INT] = H5T_NATIVE_INT; h5_datatype[DT_H5T_NATIVE_UINT] = H5T_NATIVE_UINT; h5_datatype[DT_H5T_NATIVE_LONG] = H5T_NATIVE_LONG; h5_datatype[DT_H5T_NATIVE_ULONG] = H5T_NATIVE_ULONG; h5_datatype[DT_H5T_NATIVE_LLONG] = H5T_NATIVE_LLONG; h5_datatype[DT_H5T_NATIVE_ULLONG] = H5T_NATIVE_ULLONG; h5_datatype[DT_H5T_NATIVE_FLOAT] = H5T_NATIVE_FLOAT; h5_datatype[DT_H5T_NATIVE_DOUBLE] = H5T_NATIVE_DOUBLE; h5_datatype[DT_H5T_NATIVE_B8] = H5T_NATIVE_B8; h5_datatype[DT_H5T_NATIVE_B16] = H5T_NATIVE_B16; h5_datatype[DT_H5T_NATIVE_B32] = H5T_NATIVE_B32; h5_datatype[DT_H5T_NATIVE_B64] = H5T_NATIVE_B64; h5_datatype[DT_H5T_NATIVE_OPAQUE] = H5T_NATIVE_OPAQUE; h5_datatype[DT_H5T_NATIVE_HADDR] = H5T_NATIVE_HADDR; h5_datatype[DT_H5T_NATIVE_HSIZE] = H5T_NATIVE_HSIZE; h5_datatype[DT_H5T_NATIVE_HSSIZE] = H5T_NATIVE_HSSIZE; h5_datatype[DT_H5T_NATIVE_HERR] = H5T_NATIVE_HERR; h5_datatype[DT_H5T_NATIVE_HBOOL] = H5T_NATIVE_HBOOL; h5_datatype[DT_H5T_NATIVE_INT8] = H5T_NATIVE_INT8; h5_datatype[DT_H5T_NATIVE_UINT8] = H5T_NATIVE_UINT8; h5_datatype[DT_H5T_NATIVE_INT_LEAST8] = H5T_NATIVE_INT_LEAST8; h5_datatype[DT_H5T_NATIVE_UINT_LEAST8] = H5T_NATIVE_UINT_LEAST8; h5_datatype[DT_H5T_NATIVE_INT_FAST8] = H5T_NATIVE_INT_FAST8; h5_datatype[DT_H5T_NATIVE_UINT_FAST8] = H5T_NATIVE_UINT_FAST8; h5_datatype[DT_H5T_NATIVE_INT16] = H5T_NATIVE_INT16; h5_datatype[DT_H5T_NATIVE_UINT16] = H5T_NATIVE_UINT16; h5_datatype[DT_H5T_NATIVE_INT_LEAST16] = H5T_NATIVE_INT_LEAST16; h5_datatype[DT_H5T_NATIVE_UINT_LEAST16] = H5T_NATIVE_UINT_LEAST16; h5_datatype[DT_H5T_NATIVE_INT_FAST16] = H5T_NATIVE_INT_FAST16; h5_datatype[DT_H5T_NATIVE_UINT_FAST16] = H5T_NATIVE_UINT_FAST16; h5_datatype[DT_H5T_NATIVE_INT32] = H5T_NATIVE_INT32; h5_datatype[DT_H5T_NATIVE_UINT32] = H5T_NATIVE_UINT32; h5_datatype[DT_H5T_NATIVE_INT_LEAST32] = H5T_NATIVE_INT_LEAST32; h5_datatype[DT_H5T_NATIVE_UINT_LEAST32] = H5T_NATIVE_UINT_LEAST32; h5_datatype[DT_H5T_NATIVE_INT_FAST32] = H5T_NATIVE_INT_FAST32; h5_datatype[DT_H5T_NATIVE_UINT_FAST32] = H5T_NATIVE_UINT_FAST32; h5_datatype[DT_H5T_NATIVE_INT64] = H5T_NATIVE_INT64; h5_datatype[DT_H5T_NATIVE_UINT64] = H5T_NATIVE_UINT64; h5_datatype[DT_H5T_NATIVE_INT_LEAST64] = H5T_NATIVE_INT_LEAST64; h5_datatype[DT_H5T_NATIVE_UINT_LEAST64] = H5T_NATIVE_UINT_LEAST64; h5_datatype[DT_H5T_NATIVE_INT_FAST64] = H5T_NATIVE_INT_FAST64; h5_datatype[DT_H5T_NATIVE_UINT_FAST64] = H5T_NATIVE_UINT_FAST64; #if H5_SIZEOF_LONG_DOUBLE !=0 h5_datatype[DT_H5T_NATIVE_LDOUBLE] = H5T_NATIVE_LDOUBLE; #endif // the C_API_types h5_datatype[DT_ssize_t] = get_h5_equiv(sizeof(ssize_t), issigned(ssize_t)); h5_datatype[DT_hsize_t] = get_h5_equiv(sizeof(hsize_t), issigned(hsize_t)); h5_datatype[DT_size_t] = get_h5_equiv(sizeof(size_t), issigned(size_t)); h5_datatype[DT_haddr_t] = get_h5_equiv(sizeof(haddr_t), issigned(haddr_t)); h5_datatype[DT_hssize_t] = get_h5_equiv(sizeof(hssize_t), issigned(hssize_t)); h5_datatype[DT_unsigned_long] = get_h5_equiv(sizeof(unsigned long), issigned(unsigned long)); h5_datatype[DT_off_t] = get_h5_equiv(sizeof(off_t), issigned(off_t)); h5_datatype[DT_uint64_t] = get_h5_equiv(sizeof(uint64_t), issigned(uint64_t)); h5_datatype[DT_long_int] = get_h5_equiv(sizeof(long int), issigned(long int)); h5_datatype[DT_int64_t] = get_h5_equiv(sizeof(int64_t), issigned(int64_t)); h5_datatype[DT_time_t] = get_h5_equiv(sizeof(time_t), issigned(time_t)); h5_datatype[DT_hid_t] = get_h5_equiv(sizeof(hid_t), issigned(hid_t)); h5_datatype[DT_herr_t] = get_h5_equiv(sizeof(herr_t), issigned(herr_t)); h5_datatype[DT_htri_t] = get_h5_equiv(sizeof(htri_t), issigned(htri_t)); h5_datatype[DT_int] = get_h5_equiv(sizeof(int), issigned(int)); h5_datatype[DT_unsigned] = get_h5_equiv(sizeof(unsigned), issigned(unsigned)); h5_datatype[DT_hbool_t] = get_h5_equiv(sizeof(hbool_t), issigned(hbool_t)); h5_datatype[DT_unsigned_int] = get_h5_equiv(sizeof(unsigned int), issigned(unsigned int)); h5_datatype[DT_H5E_major_t] = get_h5_equiv(sizeof(H5E_major_t), issigned(H5E_major_t)); h5_datatype[DT_H5E_minor_t] = get_h5_equiv(sizeof(H5E_minor_t), issigned(H5E_minor_t)); h5_datatype[DT_H5G_link_t] = get_h5_equiv(sizeof(H5G_link_t), issigned(H5G_link_t)); h5_datatype[DT_H5Z_filter_t] = get_h5_equiv(sizeof(H5Z_filter_t), issigned(H5Z_filter_t)); h5_datatype[DT_H5FD_mem_t] = get_h5_equiv(sizeof(H5FD_mem_t), issigned(H5FD_mem_t)); h5_datatype[DT_H5O_msg_crt_idx_t] = get_h5_equiv(sizeof(H5O_msg_crt_idx_t), issigned(H5O_msg_crt_idx_t)); h5_datatype[DT_unsigned_char] = get_h5_equiv(sizeof(unsigned char), issigned(unsigned char)); h5_datatype[DT_long] = get_h5_equiv(sizeof(long), issigned(long)); h5_datatype[DT_long_long] = get_h5_equiv(sizeof(long long), issigned(long long)); h5_datatype[DT_short] = get_h5_equiv(sizeof(short), issigned(short)); h5_datatype[DT_unsigned_short] = get_h5_equiv(sizeof(unsigned short), issigned(unsigned short)); h5_datatype[DT_uint32_t] = get_h5_equiv(sizeof(uint32_t), issigned(uint32_t)); h5_datatype[DT_unsigned_long_long] = get_h5_equiv(sizeof(unsigned long long), issigned(unsigned long long)); h5_datatype[DT_uint8_t] = get_h5_equiv(sizeof(uint8_t), issigned(uint8_t)); // the string and double datatypes h5_datatype[DT_char] = H5Tcopy(H5T_C_S1); H5Tset_size(h5_datatype[DT_char], H5T_VARIABLE); h5_datatype[DT_double] = H5T_NATIVE_DOUBLE; h5_datatype[DT_float] = H5T_NATIVE_FLOAT; // the enums h5_datatype[DT_H5C_cache_decr_mode] = create_DT_H5C_cache_decr_mode(); h5_datatype[DT_H5C_cache_flash_incr_mode] = create_DT_H5C_cache_flash_incr_mode(); h5_datatype[DT_H5C_cache_incr_mode] = create_DT_H5C_cache_incr_mode(); h5_datatype[DT_H5D_alloc_time_t] = create_DT_H5D_alloc_time_t(); h5_datatype[DT_H5D_chunk_index_t] = create_DT_H5D_chunk_index_t(); h5_datatype[DT_H5D_fill_time_t] = create_DT_H5D_fill_time_t(); h5_datatype[DT_H5D_fill_value_t] = create_DT_H5D_fill_value_t(); h5_datatype[DT_H5D_layout_t] = create_DT_H5D_layout_t(); h5_datatype[DT_H5D_space_status_t] = create_DT_H5D_space_status_t(); h5_datatype[DT_H5D_vds_view_t] = create_DT_H5D_vds_view_t(); h5_datatype[DT_H5E_direction_t] = create_DT_H5E_direction_t(); h5_datatype[DT_H5E_type_t] = create_DT_H5E_type_t(); h5_datatype[DT_H5ES_status_t] = create_DT_H5ES_status_t(); h5_datatype[DT_H5FD_file_image_op_t] = create_DT_H5FD_file_image_op_t(); h5_datatype[DT_H5F_close_degree_t] = create_DT_H5F_close_degree_t(); h5_datatype[DT_H5F_file_space_type_t] = create_DT_H5F_file_space_type_t(); h5_datatype[DT_H5F_fspace_strategy_t] = create_DT_H5F_fspace_strategy_t(); h5_datatype[DT_H5F_libver_t] = create_DT_H5F_libver_t(); h5_datatype[DT_H5F_mem_t] = create_DT_H5F_mem_t(); h5_datatype[DT_H5F_scope_t] = create_DT_H5F_scope_t(); h5_datatype[DT_H5G_obj_t] = create_DT_H5G_obj_t(); h5_datatype[DT_H5G_storage_type_t] = create_DT_H5G_storage_type_t(); h5_datatype[DT_H5I_type_t] = create_DT_H5I_type_t(); h5_datatype[DT_H5L_type_t] = create_DT_H5L_type_t(); h5_datatype[DT_H5LT_lang_t] = create_DT_H5LT_lang_t(); h5_datatype[DT_H5VL_map_get_t] = create_DT_H5VL_map_get_t(); h5_datatype[DT_H5VL_map_specific_t] = create_DT_H5VL_map_specific_t(); h5_datatype[DT_H5O_mcdt_search_ret_t] = create_DT_H5O_mcdt_search_ret_t(); h5_datatype[DT_H5O_type_t] = create_DT_H5O_type_t(); h5_datatype[DT_H5PL_type_t] = create_DT_H5PL_type_t(); h5_datatype[DT_H5D_mpio_actual_chunk_opt_mode_t] = create_DT_H5D_mpio_actual_chunk_opt_mode_t(); h5_datatype[DT_H5D_mpio_actual_io_mode_t] = create_DT_H5D_mpio_actual_io_mode_t(); h5_datatype[DT_H5D_mpio_no_collective_cause_t] = create_DT_H5D_mpio_no_collective_cause_t(); h5_datatype[DT_H5_iter_order_t] = create_DT_H5_iter_order_t(); h5_datatype[DT_H5_index_t] = create_DT_H5_index_t(); h5_datatype[DT_H5R_type_t] = create_DT_H5R_type_t(); h5_datatype[DT_H5S_sel_type] = create_DT_H5S_sel_type(); h5_datatype[DT_H5S_class_t] = create_DT_H5S_class_t(); h5_datatype[DT_H5S_seloper_t] = create_DT_H5S_seloper_t(); h5_datatype[DT_H5T_bkg_t] = create_DT_H5T_bkg_t(); h5_datatype[DT_H5T_class_t] = create_DT_H5T_class_t(); h5_datatype[DT_H5T_cmd_t] = create_DT_H5T_cmd_t(); h5_datatype[DT_H5T_conv_except_t] = create_DT_H5T_conv_except_t(); h5_datatype[DT_H5T_conv_ret_t] = create_DT_H5T_conv_ret_t(); h5_datatype[DT_H5T_cset_t] = create_DT_H5T_cset_t(); h5_datatype[DT_H5T_direction_t] = create_DT_H5T_direction_t(); h5_datatype[DT_H5T_norm_t] = create_DT_H5T_norm_t(); h5_datatype[DT_H5T_order_t] = create_DT_H5T_order_t(); h5_datatype[DT_H5T_pad_t] = create_DT_H5T_pad_t(); h5_datatype[DT_H5T_pers_t] = create_DT_H5T_pers_t(); h5_datatype[DT_H5T_sign_t] = create_DT_H5T_sign_t(); h5_datatype[DT_H5T_str_t] = create_DT_H5T_str_t(); h5_datatype[DT_H5Z_cb_return_t] = create_DT_H5Z_cb_return_t(); h5_datatype[DT_H5Z_EDC_t] = create_DT_H5Z_EDC_t(); h5_datatype[DT_H5Z_SO_scale_type_t] = create_DT_H5Z_SO_scale_type_t(); // the structs; the following are out of order, as more basic structs need to be created first // for DT_H5L_info_helper_t careful; not a struct but a union; only address specified, not size // will only work properly in both cases if haddr_t and size_t are the same type h5_datatype[DT_H5_ih_info_t] = create_DT_H5_ih_info_t(); h5_datatype[DT_H5A_info_t] = create_DT_H5A_info_t(); h5_datatype[DT_H5F_sect_info_t] = create_DT_H5F_sect_info_t(); h5_datatype[DT_H5O_hdr_info_helper_space_t] = create_DT_H5O_hdr_info_helper_space_t(); h5_datatype[DT_H5AC_cache_image_config_t] = create_DT_H5AC_cache_image_config_t(); h5_datatype[DT_H5D_info_t] = create_DT_H5D_info_t(); h5_datatype[DT_H5G_info_t] = create_DT_H5G_info_t(); h5_datatype[DT_H5AC_cache_config_t] = create_DT_H5AC_cache_config_t(); h5_datatype[DT_H5L_info1_helper_t] = create_DT_H5L_info1_helper_t(); h5_datatype[DT_H5O_hdr_info_helper_msg_t] = create_DT_H5O_hdr_info_helper_msg_t(); h5_datatype[DT_H5R_ref_helper_t] = create_DT_H5R_ref_helper_t(); h5_datatype[DT_H5O_token_t] = create_DT_H5O_token_t(); h5_datatype[DT_hdset_reg_ref_t] = create_DT_hdset_reg_ref_t(); h5_datatype[DT_H5E_error1_t] = create_DT_H5E_error1_t(); h5_datatype[DT_H5E_error2_t] = create_DT_H5E_error2_t(); h5_datatype[DT_H5F_info2_free_t] = create_DT_H5F_info2_free_t(); h5_datatype[DT_H5F_info2_super_t] = create_DT_H5F_info2_super_t(); h5_datatype[DT_H5F_retry_info_t] = create_DT_H5F_retry_info_t(); h5_datatype[DT_H5O_stat_t] = create_DT_H5O_stat_t(); h5_datatype[DT_H5F_info1_helper_t] = create_DT_H5F_info1_helper_t(); h5_datatype[DT_H5F_info2_sohm_t] = create_DT_H5F_info2_sohm_t(); h5_datatype[DT_H5O_info_helper_t] = create_DT_H5O_info_helper_t(); h5_datatype[DT_H5L_info1_t] = create_DT_H5L_info1_t(); h5_datatype[DT_H5O_hdr_info_t] = create_DT_H5O_hdr_info_t(); h5_datatype[DT_H5R_ref_t] = create_DT_H5R_ref_t(); h5_datatype[DT_H5L_info2_helper_t] = create_DT_H5L_info2_helper_t(); h5_datatype[DT_H5O_info2_t] = create_DT_H5O_info2_t(); h5_datatype[DT_H5F_info1_t] = create_DT_H5F_info1_t(); h5_datatype[DT_H5F_info2_t] = create_DT_H5F_info2_t(); h5_datatype[DT_H5ls_info_t] = create_DT_H5ls_info_t(); h5_datatype[DT_H5O_info1_t] = create_DT_H5O_info1_t(); h5_datatype[DT_H5O_native_info_t] = create_DT_H5O_native_info_t(); h5_datatype[DT_H5L_info2_t] = create_DT_H5L_info2_t(); return(R_NilValue); } /************************************************************************* * * Create the dataframe with all the type information * *************************************************************************/ SEXP show_all_types_data_frame(void) { SEXP df = PROTECT(allocVector(VECSXP, 3)); SET_VECTOR_ELT(df, 0, NEW_CHARACTER(DT_LAST_ITEM)); SET_VECTOR_ELT(df, 1, NEW_CHARACTER(DT_LAST_ITEM)); SEXP R_type = PROTECT(NEW_NUMERIC(DT_LAST_ITEM)); SET_CLASS(R_type, ScalarString(mkChar("integer64"))); SET_VECTOR_ELT(df, 2, R_type); SEXP df_rownames = PROTECT(NEW_INTEGER(DT_LAST_ITEM)); for(R_xlen_t i = 0; i < DT_LAST_ITEM; ++i) { INTEGER(df_rownames)[i] = i + 1; } SET_CLASS(df, mkString("data.frame")); SET_ATTR(df, install("row.names"), df_rownames); SEXP df_names = PROTECT(NEW_CHARACTER(3)); SET_STRING_ELT(df_names, 0, mkChar("Category")); SET_STRING_ELT(df_names, 1, mkChar("Name")); SET_STRING_ELT(df_names, 2, mkChar("Type_id")); SET_NAMES(df, df_names); SEXP R_categ = VECTOR_ELT(df, 0); SEXP R_name = VECTOR_ELT(df, 1); R_type = VECTOR_ELT(df, 2); SET_STRING_ELT(R_categ, DT_H5T_IEEE_F32BE, mkChar("IEEE")); SET_STRING_ELT(R_name, DT_H5T_IEEE_F32BE, mkChar("H5T_IEEE_F32BE")); ((long long *) REAL(R_type))[DT_H5T_IEEE_F32BE] = h5_datatype[DT_H5T_IEEE_F32BE]; SET_STRING_ELT(R_categ, DT_H5T_IEEE_F32LE, mkChar("IEEE")); SET_STRING_ELT(R_name, DT_H5T_IEEE_F32LE, mkChar("H5T_IEEE_F32LE")); ((long long *) REAL(R_type))[DT_H5T_IEEE_F32LE] = h5_datatype[DT_H5T_IEEE_F32LE]; SET_STRING_ELT(R_categ, DT_H5T_IEEE_F64BE, mkChar("IEEE")); SET_STRING_ELT(R_name, DT_H5T_IEEE_F64BE, mkChar("H5T_IEEE_F64BE")); ((long long *) REAL(R_type))[DT_H5T_IEEE_F64BE] = h5_datatype[DT_H5T_IEEE_F64BE]; SET_STRING_ELT(R_categ, DT_H5T_IEEE_F64LE, mkChar("IEEE")); SET_STRING_ELT(R_name, DT_H5T_IEEE_F64LE, mkChar("H5T_IEEE_F64LE")); ((long long *) REAL(R_type))[DT_H5T_IEEE_F64LE] = h5_datatype[DT_H5T_IEEE_F64LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_I8BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_I8BE, mkChar("H5T_STD_I8BE")); ((long long *) REAL(R_type))[DT_H5T_STD_I8BE] = h5_datatype[DT_H5T_STD_I8BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_I8LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_I8LE, mkChar("H5T_STD_I8LE")); ((long long *) REAL(R_type))[DT_H5T_STD_I8LE] = h5_datatype[DT_H5T_STD_I8LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_I16BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_I16BE, mkChar("H5T_STD_I16BE")); ((long long *) REAL(R_type))[DT_H5T_STD_I16BE] = h5_datatype[DT_H5T_STD_I16BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_I16LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_I16LE, mkChar("H5T_STD_I16LE")); ((long long *) REAL(R_type))[DT_H5T_STD_I16LE] = h5_datatype[DT_H5T_STD_I16LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_I32BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_I32BE, mkChar("H5T_STD_I32BE")); ((long long *) REAL(R_type))[DT_H5T_STD_I32BE] = h5_datatype[DT_H5T_STD_I32BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_I32LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_I32LE, mkChar("H5T_STD_I32LE")); ((long long *) REAL(R_type))[DT_H5T_STD_I32LE] = h5_datatype[DT_H5T_STD_I32LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_I64BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_I64BE, mkChar("H5T_STD_I64BE")); ((long long *) REAL(R_type))[DT_H5T_STD_I64BE] = h5_datatype[DT_H5T_STD_I64BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_I64LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_I64LE, mkChar("H5T_STD_I64LE")); ((long long *) REAL(R_type))[DT_H5T_STD_I64LE] = h5_datatype[DT_H5T_STD_I64LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_U8BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_U8BE, mkChar("H5T_STD_U8BE")); ((long long *) REAL(R_type))[DT_H5T_STD_U8BE] = h5_datatype[DT_H5T_STD_U8BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_U8LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_U8LE, mkChar("H5T_STD_U8LE")); ((long long *) REAL(R_type))[DT_H5T_STD_U8LE] = h5_datatype[DT_H5T_STD_U8LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_U16BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_U16BE, mkChar("H5T_STD_U16BE")); ((long long *) REAL(R_type))[DT_H5T_STD_U16BE] = h5_datatype[DT_H5T_STD_U16BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_U16LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_U16LE, mkChar("H5T_STD_U16LE")); ((long long *) REAL(R_type))[DT_H5T_STD_U16LE] = h5_datatype[DT_H5T_STD_U16LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_U32BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_U32BE, mkChar("H5T_STD_U32BE")); ((long long *) REAL(R_type))[DT_H5T_STD_U32BE] = h5_datatype[DT_H5T_STD_U32BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_U32LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_U32LE, mkChar("H5T_STD_U32LE")); ((long long *) REAL(R_type))[DT_H5T_STD_U32LE] = h5_datatype[DT_H5T_STD_U32LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_U64BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_U64BE, mkChar("H5T_STD_U64BE")); ((long long *) REAL(R_type))[DT_H5T_STD_U64BE] = h5_datatype[DT_H5T_STD_U64BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_U64LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_U64LE, mkChar("H5T_STD_U64LE")); ((long long *) REAL(R_type))[DT_H5T_STD_U64LE] = h5_datatype[DT_H5T_STD_U64LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_B8BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_B8BE, mkChar("H5T_STD_B8BE")); ((long long *) REAL(R_type))[DT_H5T_STD_B8BE] = h5_datatype[DT_H5T_STD_B8BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_B8LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_B8LE, mkChar("H5T_STD_B8LE")); ((long long *) REAL(R_type))[DT_H5T_STD_B8LE] = h5_datatype[DT_H5T_STD_B8LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_B16BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_B16BE, mkChar("H5T_STD_B16BE")); ((long long *) REAL(R_type))[DT_H5T_STD_B16BE] = h5_datatype[DT_H5T_STD_B16BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_B16LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_B16LE, mkChar("H5T_STD_B16LE")); ((long long *) REAL(R_type))[DT_H5T_STD_B16LE] = h5_datatype[DT_H5T_STD_B16LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_B32BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_B32BE, mkChar("H5T_STD_B32BE")); ((long long *) REAL(R_type))[DT_H5T_STD_B32BE] = h5_datatype[DT_H5T_STD_B32BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_B32LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_B32LE, mkChar("H5T_STD_B32LE")); ((long long *) REAL(R_type))[DT_H5T_STD_B32LE] = h5_datatype[DT_H5T_STD_B32LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_B64BE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_B64BE, mkChar("H5T_STD_B64BE")); ((long long *) REAL(R_type))[DT_H5T_STD_B64BE] = h5_datatype[DT_H5T_STD_B64BE]; SET_STRING_ELT(R_categ, DT_H5T_STD_B64LE, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_B64LE, mkChar("H5T_STD_B64LE")); ((long long *) REAL(R_type))[DT_H5T_STD_B64LE] = h5_datatype[DT_H5T_STD_B64LE]; SET_STRING_ELT(R_categ, DT_H5T_STD_REF_OBJ, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_REF_OBJ, mkChar("H5T_STD_REF_OBJ")); ((long long *) REAL(R_type))[DT_H5T_STD_REF_OBJ] = h5_datatype[DT_H5T_STD_REF_OBJ]; SET_STRING_ELT(R_categ, DT_H5T_STD_REF_DSETREG, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_REF_DSETREG, mkChar("H5T_STD_REF_DSETREG")); ((long long *) REAL(R_type))[DT_H5T_STD_REF_DSETREG] = h5_datatype[DT_H5T_STD_REF_DSETREG]; SET_STRING_ELT(R_categ, DT_H5T_STD_REF, mkChar("STD")); SET_STRING_ELT(R_name, DT_H5T_STD_REF, mkChar("H5T_STD_REF")); ((long long *) REAL(R_type))[DT_H5T_STD_REF] = h5_datatype[DT_H5T_STD_REF]; SET_STRING_ELT(R_categ, DT_H5T_UNIX_D32BE, mkChar("UNIX")); SET_STRING_ELT(R_name, DT_H5T_UNIX_D32BE, mkChar("H5T_UNIX_D32BE")); ((long long *) REAL(R_type))[DT_H5T_UNIX_D32BE] = h5_datatype[DT_H5T_UNIX_D32BE]; SET_STRING_ELT(R_categ, DT_H5T_UNIX_D32LE, mkChar("UNIX")); SET_STRING_ELT(R_name, DT_H5T_UNIX_D32LE, mkChar("H5T_UNIX_D32LE")); ((long long *) REAL(R_type))[DT_H5T_UNIX_D32LE] = h5_datatype[DT_H5T_UNIX_D32LE]; SET_STRING_ELT(R_categ, DT_H5T_UNIX_D64BE, mkChar("UNIX")); SET_STRING_ELT(R_name, DT_H5T_UNIX_D64BE, mkChar("H5T_UNIX_D64BE")); ((long long *) REAL(R_type))[DT_H5T_UNIX_D64BE] = h5_datatype[DT_H5T_UNIX_D64BE]; SET_STRING_ELT(R_categ, DT_H5T_UNIX_D64LE, mkChar("UNIX")); SET_STRING_ELT(R_name, DT_H5T_UNIX_D64LE, mkChar("H5T_UNIX_D64LE")); ((long long *) REAL(R_type))[DT_H5T_UNIX_D64LE] = h5_datatype[DT_H5T_UNIX_D64LE]; SET_STRING_ELT(R_categ, DT_H5T_C_S1, mkChar("STRING")); SET_STRING_ELT(R_name, DT_H5T_C_S1, mkChar("H5T_C_S1")); ((long long *) REAL(R_type))[DT_H5T_C_S1] = h5_datatype[DT_H5T_C_S1]; SET_STRING_ELT(R_categ, DT_H5T_FORTRAN_S1, mkChar("STRING")); SET_STRING_ELT(R_name, DT_H5T_FORTRAN_S1, mkChar("H5T_FORTRAN_S1")); ((long long *) REAL(R_type))[DT_H5T_FORTRAN_S1] = h5_datatype[DT_H5T_FORTRAN_S1]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_I8, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_I8, mkChar("H5T_INTEL_I8")); ((long long *) REAL(R_type))[DT_H5T_INTEL_I8] = h5_datatype[DT_H5T_INTEL_I8]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_I16, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_I16, mkChar("H5T_INTEL_I16")); ((long long *) REAL(R_type))[DT_H5T_INTEL_I16] = h5_datatype[DT_H5T_INTEL_I16]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_I32, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_I32, mkChar("H5T_INTEL_I32")); ((long long *) REAL(R_type))[DT_H5T_INTEL_I32] = h5_datatype[DT_H5T_INTEL_I32]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_I64, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_I64, mkChar("H5T_INTEL_I64")); ((long long *) REAL(R_type))[DT_H5T_INTEL_I64] = h5_datatype[DT_H5T_INTEL_I64]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_U8, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_U8, mkChar("H5T_INTEL_U8")); ((long long *) REAL(R_type))[DT_H5T_INTEL_U8] = h5_datatype[DT_H5T_INTEL_U8]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_U16, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_U16, mkChar("H5T_INTEL_U16")); ((long long *) REAL(R_type))[DT_H5T_INTEL_U16] = h5_datatype[DT_H5T_INTEL_U16]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_U32, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_U32, mkChar("H5T_INTEL_U32")); ((long long *) REAL(R_type))[DT_H5T_INTEL_U32] = h5_datatype[DT_H5T_INTEL_U32]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_U64, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_U64, mkChar("H5T_INTEL_U64")); ((long long *) REAL(R_type))[DT_H5T_INTEL_U64] = h5_datatype[DT_H5T_INTEL_U64]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_B8, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_B8, mkChar("H5T_INTEL_B8")); ((long long *) REAL(R_type))[DT_H5T_INTEL_B8] = h5_datatype[DT_H5T_INTEL_B8]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_B16, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_B16, mkChar("H5T_INTEL_B16")); ((long long *) REAL(R_type))[DT_H5T_INTEL_B16] = h5_datatype[DT_H5T_INTEL_B16]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_B32, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_B32, mkChar("H5T_INTEL_B32")); ((long long *) REAL(R_type))[DT_H5T_INTEL_B32] = h5_datatype[DT_H5T_INTEL_B32]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_B64, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_B64, mkChar("H5T_INTEL_B64")); ((long long *) REAL(R_type))[DT_H5T_INTEL_B64] = h5_datatype[DT_H5T_INTEL_B64]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_F32, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_F32, mkChar("H5T_INTEL_F32")); ((long long *) REAL(R_type))[DT_H5T_INTEL_F32] = h5_datatype[DT_H5T_INTEL_F32]; SET_STRING_ELT(R_categ, DT_H5T_INTEL_F64, mkChar("INTEL")); SET_STRING_ELT(R_name, DT_H5T_INTEL_F64, mkChar("H5T_INTEL_F64")); ((long long *) REAL(R_type))[DT_H5T_INTEL_F64] = h5_datatype[DT_H5T_INTEL_F64]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_I8, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_I8, mkChar("H5T_ALPHA_I8")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_I8] = h5_datatype[DT_H5T_ALPHA_I8]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_I16, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_I16, mkChar("H5T_ALPHA_I16")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_I16] = h5_datatype[DT_H5T_ALPHA_I16]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_I32, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_I32, mkChar("H5T_ALPHA_I32")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_I32] = h5_datatype[DT_H5T_ALPHA_I32]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_I64, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_I64, mkChar("H5T_ALPHA_I64")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_I64] = h5_datatype[DT_H5T_ALPHA_I64]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_U8, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_U8, mkChar("H5T_ALPHA_U8")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_U8] = h5_datatype[DT_H5T_ALPHA_U8]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_U16, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_U16, mkChar("H5T_ALPHA_U16")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_U16] = h5_datatype[DT_H5T_ALPHA_U16]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_U32, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_U32, mkChar("H5T_ALPHA_U32")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_U32] = h5_datatype[DT_H5T_ALPHA_U32]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_U64, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_U64, mkChar("H5T_ALPHA_U64")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_U64] = h5_datatype[DT_H5T_ALPHA_U64]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_B8, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_B8, mkChar("H5T_ALPHA_B8")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_B8] = h5_datatype[DT_H5T_ALPHA_B8]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_B16, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_B16, mkChar("H5T_ALPHA_B16")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_B16] = h5_datatype[DT_H5T_ALPHA_B16]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_B32, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_B32, mkChar("H5T_ALPHA_B32")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_B32] = h5_datatype[DT_H5T_ALPHA_B32]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_B64, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_B64, mkChar("H5T_ALPHA_B64")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_B64] = h5_datatype[DT_H5T_ALPHA_B64]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_F32, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_F32, mkChar("H5T_ALPHA_F32")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_F32] = h5_datatype[DT_H5T_ALPHA_F32]; SET_STRING_ELT(R_categ, DT_H5T_ALPHA_F64, mkChar("ALPHA")); SET_STRING_ELT(R_name, DT_H5T_ALPHA_F64, mkChar("H5T_ALPHA_F64")); ((long long *) REAL(R_type))[DT_H5T_ALPHA_F64] = h5_datatype[DT_H5T_ALPHA_F64]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_I8, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_I8, mkChar("H5T_MIPS_I8")); ((long long *) REAL(R_type))[DT_H5T_MIPS_I8] = h5_datatype[DT_H5T_MIPS_I8]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_I16, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_I16, mkChar("H5T_MIPS_I16")); ((long long *) REAL(R_type))[DT_H5T_MIPS_I16] = h5_datatype[DT_H5T_MIPS_I16]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_I32, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_I32, mkChar("H5T_MIPS_I32")); ((long long *) REAL(R_type))[DT_H5T_MIPS_I32] = h5_datatype[DT_H5T_MIPS_I32]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_I64, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_I64, mkChar("H5T_MIPS_I64")); ((long long *) REAL(R_type))[DT_H5T_MIPS_I64] = h5_datatype[DT_H5T_MIPS_I64]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_U8, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_U8, mkChar("H5T_MIPS_U8")); ((long long *) REAL(R_type))[DT_H5T_MIPS_U8] = h5_datatype[DT_H5T_MIPS_U8]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_U16, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_U16, mkChar("H5T_MIPS_U16")); ((long long *) REAL(R_type))[DT_H5T_MIPS_U16] = h5_datatype[DT_H5T_MIPS_U16]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_U32, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_U32, mkChar("H5T_MIPS_U32")); ((long long *) REAL(R_type))[DT_H5T_MIPS_U32] = h5_datatype[DT_H5T_MIPS_U32]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_U64, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_U64, mkChar("H5T_MIPS_U64")); ((long long *) REAL(R_type))[DT_H5T_MIPS_U64] = h5_datatype[DT_H5T_MIPS_U64]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_B8, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_B8, mkChar("H5T_MIPS_B8")); ((long long *) REAL(R_type))[DT_H5T_MIPS_B8] = h5_datatype[DT_H5T_MIPS_B8]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_B16, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_B16, mkChar("H5T_MIPS_B16")); ((long long *) REAL(R_type))[DT_H5T_MIPS_B16] = h5_datatype[DT_H5T_MIPS_B16]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_B32, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_B32, mkChar("H5T_MIPS_B32")); ((long long *) REAL(R_type))[DT_H5T_MIPS_B32] = h5_datatype[DT_H5T_MIPS_B32]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_B64, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_B64, mkChar("H5T_MIPS_B64")); ((long long *) REAL(R_type))[DT_H5T_MIPS_B64] = h5_datatype[DT_H5T_MIPS_B64]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_F32, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_F32, mkChar("H5T_MIPS_F32")); ((long long *) REAL(R_type))[DT_H5T_MIPS_F32] = h5_datatype[DT_H5T_MIPS_F32]; SET_STRING_ELT(R_categ, DT_H5T_MIPS_F64, mkChar("MIPS")); SET_STRING_ELT(R_name, DT_H5T_MIPS_F64, mkChar("H5T_MIPS_F64")); ((long long *) REAL(R_type))[DT_H5T_MIPS_F64] = h5_datatype[DT_H5T_MIPS_F64]; SET_STRING_ELT(R_categ, DT_H5T_VAX_F32, mkChar("VAX")); SET_STRING_ELT(R_name, DT_H5T_VAX_F32, mkChar("H5T_VAX_F32")); ((long long *) REAL(R_type))[DT_H5T_VAX_F32] = h5_datatype[DT_H5T_VAX_F32]; SET_STRING_ELT(R_categ, DT_H5T_VAX_F64, mkChar("VAX")); SET_STRING_ELT(R_name, DT_H5T_VAX_F64, mkChar("H5T_VAX_F64")); ((long long *) REAL(R_type))[DT_H5T_VAX_F64] = h5_datatype[DT_H5T_VAX_F64]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_CHAR, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_CHAR, mkChar("H5T_NATIVE_CHAR")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_CHAR] = h5_datatype[DT_H5T_NATIVE_CHAR]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_SCHAR, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_SCHAR, mkChar("H5T_NATIVE_SCHAR")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_SCHAR] = h5_datatype[DT_H5T_NATIVE_SCHAR]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UCHAR, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UCHAR, mkChar("H5T_NATIVE_UCHAR")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UCHAR] = h5_datatype[DT_H5T_NATIVE_UCHAR]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_SHORT, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_SHORT, mkChar("H5T_NATIVE_SHORT")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_SHORT] = h5_datatype[DT_H5T_NATIVE_SHORT]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_USHORT, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_USHORT, mkChar("H5T_NATIVE_USHORT")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_USHORT] = h5_datatype[DT_H5T_NATIVE_USHORT]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT, mkChar("H5T_NATIVE_INT")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT] = h5_datatype[DT_H5T_NATIVE_INT]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT, mkChar("H5T_NATIVE_UINT")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT] = h5_datatype[DT_H5T_NATIVE_UINT]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_LONG, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_LONG, mkChar("H5T_NATIVE_LONG")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_LONG] = h5_datatype[DT_H5T_NATIVE_LONG]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_ULONG, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_ULONG, mkChar("H5T_NATIVE_ULONG")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_ULONG] = h5_datatype[DT_H5T_NATIVE_ULONG]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_LLONG, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_LLONG, mkChar("H5T_NATIVE_LLONG")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_LLONG] = h5_datatype[DT_H5T_NATIVE_LLONG]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_ULLONG, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_ULLONG, mkChar("H5T_NATIVE_ULLONG")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_ULLONG] = h5_datatype[DT_H5T_NATIVE_ULLONG]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_FLOAT, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_FLOAT, mkChar("H5T_NATIVE_FLOAT")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_FLOAT] = h5_datatype[DT_H5T_NATIVE_FLOAT]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_DOUBLE, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_DOUBLE, mkChar("H5T_NATIVE_DOUBLE")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_DOUBLE] = h5_datatype[DT_H5T_NATIVE_DOUBLE]; #if H5_SIZEOF_LONG_DOUBLE !=0 SET_STRING_ELT(R_categ, DT_H5T_NATIVE_LDOUBLE, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_LDOUBLE, mkChar("H5T_NATIVE_LDOUBLE")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_LDOUBLE] = h5_datatype[DT_H5T_NATIVE_LDOUBLE]; #endif SET_STRING_ELT(R_categ, DT_H5T_NATIVE_B8, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_B8, mkChar("H5T_NATIVE_B8")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_B8] = h5_datatype[DT_H5T_NATIVE_B8]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_B16, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_B16, mkChar("H5T_NATIVE_B16")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_B16] = h5_datatype[DT_H5T_NATIVE_B16]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_B32, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_B32, mkChar("H5T_NATIVE_B32")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_B32] = h5_datatype[DT_H5T_NATIVE_B32]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_B64, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_B64, mkChar("H5T_NATIVE_B64")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_B64] = h5_datatype[DT_H5T_NATIVE_B64]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_OPAQUE, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_OPAQUE, mkChar("H5T_NATIVE_OPAQUE")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_OPAQUE] = h5_datatype[DT_H5T_NATIVE_OPAQUE]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_HADDR, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_HADDR, mkChar("H5T_NATIVE_HADDR")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_HADDR] = h5_datatype[DT_H5T_NATIVE_HADDR]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_HSIZE, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_HSIZE, mkChar("H5T_NATIVE_HSIZE")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_HSIZE] = h5_datatype[DT_H5T_NATIVE_HSIZE]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_HSSIZE, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_HSSIZE, mkChar("H5T_NATIVE_HSSIZE")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_HSSIZE] = h5_datatype[DT_H5T_NATIVE_HSSIZE]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_HERR, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_HERR, mkChar("H5T_NATIVE_HERR")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_HERR] = h5_datatype[DT_H5T_NATIVE_HERR]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_HBOOL, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_HBOOL, mkChar("H5T_NATIVE_HBOOL")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_HBOOL] = h5_datatype[DT_H5T_NATIVE_HBOOL]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT8, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT8, mkChar("H5T_NATIVE_INT8")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT8] = h5_datatype[DT_H5T_NATIVE_INT8]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT8, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT8, mkChar("H5T_NATIVE_UINT8")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT8] = h5_datatype[DT_H5T_NATIVE_UINT8]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT_LEAST8, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT_LEAST8, mkChar("H5T_NATIVE_INT_LEAST8")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT_LEAST8] = h5_datatype[DT_H5T_NATIVE_INT_LEAST8]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT_LEAST8, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT_LEAST8, mkChar("H5T_NATIVE_UINT_LEAST8")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT_LEAST8] = h5_datatype[DT_H5T_NATIVE_UINT_LEAST8]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT_FAST8, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT_FAST8, mkChar("H5T_NATIVE_INT_FAST8")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT_FAST8] = h5_datatype[DT_H5T_NATIVE_INT_FAST8]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT_FAST8, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT_FAST8, mkChar("H5T_NATIVE_UINT_FAST8")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT_FAST8] = h5_datatype[DT_H5T_NATIVE_UINT_FAST8]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT16, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT16, mkChar("H5T_NATIVE_INT16")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT16] = h5_datatype[DT_H5T_NATIVE_INT16]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT16, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT16, mkChar("H5T_NATIVE_UINT16")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT16] = h5_datatype[DT_H5T_NATIVE_UINT16]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT_LEAST16, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT_LEAST16, mkChar("H5T_NATIVE_INT_LEAST16")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT_LEAST16] = h5_datatype[DT_H5T_NATIVE_INT_LEAST16]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT_LEAST16, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT_LEAST16, mkChar("H5T_NATIVE_UINT_LEAST16")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT_LEAST16] = h5_datatype[DT_H5T_NATIVE_UINT_LEAST16]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT_FAST16, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT_FAST16, mkChar("H5T_NATIVE_INT_FAST16")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT_FAST16] = h5_datatype[DT_H5T_NATIVE_INT_FAST16]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT_FAST16, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT_FAST16, mkChar("H5T_NATIVE_UINT_FAST16")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT_FAST16] = h5_datatype[DT_H5T_NATIVE_UINT_FAST16]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT32, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT32, mkChar("H5T_NATIVE_INT32")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT32] = h5_datatype[DT_H5T_NATIVE_INT32]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT32, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT32, mkChar("H5T_NATIVE_UINT32")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT32] = h5_datatype[DT_H5T_NATIVE_UINT32]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT_LEAST32, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT_LEAST32, mkChar("H5T_NATIVE_INT_LEAST32")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT_LEAST32] = h5_datatype[DT_H5T_NATIVE_INT_LEAST32]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT_LEAST32, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT_LEAST32, mkChar("H5T_NATIVE_UINT_LEAST32")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT_LEAST32] = h5_datatype[DT_H5T_NATIVE_UINT_LEAST32]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT_FAST32, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT_FAST32, mkChar("H5T_NATIVE_INT_FAST32")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT_FAST32] = h5_datatype[DT_H5T_NATIVE_INT_FAST32]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT_FAST32, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT_FAST32, mkChar("H5T_NATIVE_UINT_FAST32")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT_FAST32] = h5_datatype[DT_H5T_NATIVE_UINT_FAST32]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT64, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT64, mkChar("H5T_NATIVE_INT64")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT64] = h5_datatype[DT_H5T_NATIVE_INT64]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT64, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT64, mkChar("H5T_NATIVE_UINT64")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT64] = h5_datatype[DT_H5T_NATIVE_UINT64]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT_LEAST64, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT_LEAST64, mkChar("H5T_NATIVE_INT_LEAST64")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT_LEAST64] = h5_datatype[DT_H5T_NATIVE_INT_LEAST64]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT_LEAST64, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT_LEAST64, mkChar("H5T_NATIVE_UINT_LEAST64")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT_LEAST64] = h5_datatype[DT_H5T_NATIVE_UINT_LEAST64]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_INT_FAST64, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_INT_FAST64, mkChar("H5T_NATIVE_INT_FAST64")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_INT_FAST64] = h5_datatype[DT_H5T_NATIVE_INT_FAST64]; SET_STRING_ELT(R_categ, DT_H5T_NATIVE_UINT_FAST64, mkChar("NATIVE")); SET_STRING_ELT(R_name, DT_H5T_NATIVE_UINT_FAST64, mkChar("H5T_NATIVE_UINT_FAST64")); ((long long *) REAL(R_type))[DT_H5T_NATIVE_UINT_FAST64] = h5_datatype[DT_H5T_NATIVE_UINT_FAST64]; SET_STRING_ELT(R_categ, DT_H5E_major_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_H5E_major_t, mkChar("H5E_major_t")); ((long long *) REAL(R_type))[DT_H5E_major_t] = h5_datatype[DT_H5E_major_t]; SET_STRING_ELT(R_categ, DT_H5E_minor_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_H5E_minor_t, mkChar("H5E_minor_t")); ((long long *) REAL(R_type))[DT_H5E_minor_t] = h5_datatype[DT_H5E_minor_t]; SET_STRING_ELT(R_categ, DT_H5FD_mem_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_H5FD_mem_t, mkChar("H5FD_mem_t")); ((long long *) REAL(R_type))[DT_H5FD_mem_t] = h5_datatype[DT_H5FD_mem_t]; SET_STRING_ELT(R_categ, DT_H5G_link_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_H5G_link_t, mkChar("H5G_link_t")); ((long long *) REAL(R_type))[DT_H5G_link_t] = h5_datatype[DT_H5G_link_t]; SET_STRING_ELT(R_categ, DT_H5O_msg_crt_idx_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_H5O_msg_crt_idx_t, mkChar("H5O_msg_crt_idx_t")); ((long long *) REAL(R_type))[DT_H5O_msg_crt_idx_t] = h5_datatype[DT_H5O_msg_crt_idx_t]; SET_STRING_ELT(R_categ, DT_H5Z_filter_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_H5Z_filter_t, mkChar("H5Z_filter_t")); ((long long *) REAL(R_type))[DT_H5Z_filter_t] = h5_datatype[DT_H5Z_filter_t]; SET_STRING_ELT(R_categ, DT_haddr_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_haddr_t, mkChar("haddr_t")); ((long long *) REAL(R_type))[DT_haddr_t] = h5_datatype[DT_haddr_t]; SET_STRING_ELT(R_categ, DT_hbool_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_hbool_t, mkChar("hbool_t")); ((long long *) REAL(R_type))[DT_hbool_t] = h5_datatype[DT_hbool_t]; SET_STRING_ELT(R_categ, DT_herr_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_herr_t, mkChar("herr_t")); ((long long *) REAL(R_type))[DT_herr_t] = h5_datatype[DT_herr_t]; SET_STRING_ELT(R_categ, DT_hid_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_hid_t, mkChar("hid_t")); ((long long *) REAL(R_type))[DT_hid_t] = h5_datatype[DT_hid_t]; SET_STRING_ELT(R_categ, DT_hsize_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_hsize_t, mkChar("hsize_t")); ((long long *) REAL(R_type))[DT_hsize_t] = h5_datatype[DT_hsize_t]; SET_STRING_ELT(R_categ, DT_hssize_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_hssize_t, mkChar("hssize_t")); ((long long *) REAL(R_type))[DT_hssize_t] = h5_datatype[DT_hssize_t]; SET_STRING_ELT(R_categ, DT_htri_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_htri_t, mkChar("htri_t")); ((long long *) REAL(R_type))[DT_htri_t] = h5_datatype[DT_htri_t]; SET_STRING_ELT(R_categ, DT_int, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_int, mkChar("int")); ((long long *) REAL(R_type))[DT_int] = h5_datatype[DT_int]; SET_STRING_ELT(R_categ, DT_int64_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_int64_t, mkChar("int64_t")); ((long long *) REAL(R_type))[DT_int64_t] = h5_datatype[DT_int64_t]; SET_STRING_ELT(R_categ, DT_long, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_long, mkChar("long")); ((long long *) REAL(R_type))[DT_long] = h5_datatype[DT_long]; SET_STRING_ELT(R_categ, DT_long_int, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_long_int, mkChar("long_int")); ((long long *) REAL(R_type))[DT_long_int] = h5_datatype[DT_long_int]; SET_STRING_ELT(R_categ, DT_long_long, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_long_long, mkChar("long_long")); ((long long *) REAL(R_type))[DT_long_long] = h5_datatype[DT_long_long]; SET_STRING_ELT(R_categ, DT_off_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_off_t, mkChar("off_t")); ((long long *) REAL(R_type))[DT_off_t] = h5_datatype[DT_off_t]; SET_STRING_ELT(R_categ, DT_short, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_short, mkChar("short")); ((long long *) REAL(R_type))[DT_short] = h5_datatype[DT_short]; SET_STRING_ELT(R_categ, DT_size_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_size_t, mkChar("size_t")); ((long long *) REAL(R_type))[DT_size_t] = h5_datatype[DT_size_t]; SET_STRING_ELT(R_categ, DT_ssize_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_ssize_t, mkChar("ssize_t")); ((long long *) REAL(R_type))[DT_ssize_t] = h5_datatype[DT_ssize_t]; SET_STRING_ELT(R_categ, DT_time_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_time_t, mkChar("time_t")); ((long long *) REAL(R_type))[DT_time_t] = h5_datatype[DT_time_t]; SET_STRING_ELT(R_categ, DT_uint32_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_uint32_t, mkChar("uint32_t")); ((long long *) REAL(R_type))[DT_uint32_t] = h5_datatype[DT_uint32_t]; SET_STRING_ELT(R_categ, DT_uint64_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_uint64_t, mkChar("uint64_t")); ((long long *) REAL(R_type))[DT_uint64_t] = h5_datatype[DT_uint64_t]; SET_STRING_ELT(R_categ, DT_uint8_t, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_uint8_t, mkChar("uint8_t")); ((long long *) REAL(R_type))[DT_uint8_t] = h5_datatype[DT_uint8_t]; SET_STRING_ELT(R_categ, DT_unsigned, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_unsigned, mkChar("unsigned")); ((long long *) REAL(R_type))[DT_unsigned] = h5_datatype[DT_unsigned]; SET_STRING_ELT(R_categ, DT_unsigned_char, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_unsigned_char, mkChar("unsigned_char")); ((long long *) REAL(R_type))[DT_unsigned_char] = h5_datatype[DT_unsigned_char]; SET_STRING_ELT(R_categ, DT_unsigned_int, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_unsigned_int, mkChar("unsigned_int")); ((long long *) REAL(R_type))[DT_unsigned_int] = h5_datatype[DT_unsigned_int]; SET_STRING_ELT(R_categ, DT_unsigned_long, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_unsigned_long, mkChar("unsigned_long")); ((long long *) REAL(R_type))[DT_unsigned_long] = h5_datatype[DT_unsigned_long]; SET_STRING_ELT(R_categ, DT_unsigned_long_long, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_unsigned_long_long, mkChar("unsigned_long_long")); ((long long *) REAL(R_type))[DT_unsigned_long_long] = h5_datatype[DT_unsigned_long_long]; SET_STRING_ELT(R_categ, DT_unsigned_short, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_unsigned_short, mkChar("unsigned_short")); ((long long *) REAL(R_type))[DT_unsigned_short] = h5_datatype[DT_unsigned_short]; SET_STRING_ELT(R_categ, DT_char, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_char, mkChar("char")); ((long long *) REAL(R_type))[DT_char] = h5_datatype[DT_char]; SET_STRING_ELT(R_categ, DT_double, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_double, mkChar("double")); ((long long *) REAL(R_type))[DT_double] = h5_datatype[DT_double]; SET_STRING_ELT(R_categ, DT_float, mkChar("C_API_types")); SET_STRING_ELT(R_name, DT_float, mkChar("float")); ((long long *) REAL(R_type))[DT_float] = h5_datatype[DT_float]; SET_STRING_ELT(R_categ, DT_H5_index_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5_index_t, mkChar("H5_index_t")); ((long long *) REAL(R_type))[DT_H5_index_t] = h5_datatype[DT_H5_index_t]; SET_STRING_ELT(R_categ, DT_H5_iter_order_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5_iter_order_t, mkChar("H5_iter_order_t")); ((long long *) REAL(R_type))[DT_H5_iter_order_t] = h5_datatype[DT_H5_iter_order_t]; SET_STRING_ELT(R_categ, DT_H5C_cache_decr_mode, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5C_cache_decr_mode, mkChar("H5C_cache_decr_mode")); ((long long *) REAL(R_type))[DT_H5C_cache_decr_mode] = h5_datatype[DT_H5C_cache_decr_mode]; SET_STRING_ELT(R_categ, DT_H5C_cache_flash_incr_mode, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5C_cache_flash_incr_mode, mkChar("H5C_cache_flash_incr_mode")); ((long long *) REAL(R_type))[DT_H5C_cache_flash_incr_mode] = h5_datatype[DT_H5C_cache_flash_incr_mode]; SET_STRING_ELT(R_categ, DT_H5C_cache_incr_mode, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5C_cache_incr_mode, mkChar("H5C_cache_incr_mode")); ((long long *) REAL(R_type))[DT_H5C_cache_incr_mode] = h5_datatype[DT_H5C_cache_incr_mode]; SET_STRING_ELT(R_categ, DT_H5D_alloc_time_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_alloc_time_t, mkChar("H5D_alloc_time_t")); ((long long *) REAL(R_type))[DT_H5D_alloc_time_t] = h5_datatype[DT_H5D_alloc_time_t]; SET_STRING_ELT(R_categ, DT_H5D_chunk_index_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_chunk_index_t, mkChar("H5D_chunk_index_t")); ((long long *) REAL(R_type))[DT_H5D_chunk_index_t] = h5_datatype[DT_H5D_chunk_index_t]; SET_STRING_ELT(R_categ, DT_H5D_fill_time_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_fill_time_t, mkChar("H5D_fill_time_t")); ((long long *) REAL(R_type))[DT_H5D_fill_time_t] = h5_datatype[DT_H5D_fill_time_t]; SET_STRING_ELT(R_categ, DT_H5D_fill_value_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_fill_value_t, mkChar("H5D_fill_value_t")); ((long long *) REAL(R_type))[DT_H5D_fill_value_t] = h5_datatype[DT_H5D_fill_value_t]; SET_STRING_ELT(R_categ, DT_H5D_layout_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_layout_t, mkChar("H5D_layout_t")); ((long long *) REAL(R_type))[DT_H5D_layout_t] = h5_datatype[DT_H5D_layout_t]; SET_STRING_ELT(R_categ, DT_H5D_mpio_actual_chunk_opt_mode_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_mpio_actual_chunk_opt_mode_t, mkChar("H5D_mpio_actual_chunk_opt_mode_t")); ((long long *) REAL(R_type))[DT_H5D_mpio_actual_chunk_opt_mode_t] = h5_datatype[DT_H5D_mpio_actual_chunk_opt_mode_t]; SET_STRING_ELT(R_categ, DT_H5D_mpio_actual_io_mode_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_mpio_actual_io_mode_t, mkChar("H5D_mpio_actual_io_mode_t")); ((long long *) REAL(R_type))[DT_H5D_mpio_actual_io_mode_t] = h5_datatype[DT_H5D_mpio_actual_io_mode_t]; SET_STRING_ELT(R_categ, DT_H5D_mpio_no_collective_cause_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_mpio_no_collective_cause_t, mkChar("H5D_mpio_no_collective_cause_t")); ((long long *) REAL(R_type))[DT_H5D_mpio_no_collective_cause_t] = h5_datatype[DT_H5D_mpio_no_collective_cause_t]; SET_STRING_ELT(R_categ, DT_H5D_space_status_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_space_status_t, mkChar("H5D_space_status_t")); ((long long *) REAL(R_type))[DT_H5D_space_status_t] = h5_datatype[DT_H5D_space_status_t]; SET_STRING_ELT(R_categ, DT_H5D_vds_view_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5D_vds_view_t, mkChar("H5D_vds_view_t")); ((long long *) REAL(R_type))[DT_H5D_vds_view_t] = h5_datatype[DT_H5D_vds_view_t]; SET_STRING_ELT(R_categ, DT_H5E_direction_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5E_direction_t, mkChar("H5E_direction_t")); ((long long *) REAL(R_type))[DT_H5E_direction_t] = h5_datatype[DT_H5E_direction_t]; SET_STRING_ELT(R_categ, DT_H5E_type_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5E_type_t, mkChar("H5E_type_t")); ((long long *) REAL(R_type))[DT_H5E_type_t] = h5_datatype[DT_H5E_type_t]; SET_STRING_ELT(R_categ, DT_H5ES_status_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5ES_status_t, mkChar("H5ES_status_t")); ((long long *) REAL(R_type))[DT_H5ES_status_t] = h5_datatype[DT_H5ES_status_t]; SET_STRING_ELT(R_categ, DT_H5F_close_degree_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5F_close_degree_t, mkChar("H5F_close_degree_t")); ((long long *) REAL(R_type))[DT_H5F_close_degree_t] = h5_datatype[DT_H5F_close_degree_t]; SET_STRING_ELT(R_categ, DT_H5F_file_space_type_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5F_file_space_type_t, mkChar("H5F_file_space_type_t")); ((long long *) REAL(R_type))[DT_H5F_file_space_type_t] = h5_datatype[DT_H5F_file_space_type_t]; SET_STRING_ELT(R_categ, DT_H5F_fspace_strategy_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5F_fspace_strategy_t, mkChar("H5F_fspace_strategy_t")); ((long long *) REAL(R_type))[DT_H5F_fspace_strategy_t] = h5_datatype[DT_H5F_fspace_strategy_t]; SET_STRING_ELT(R_categ, DT_H5F_libver_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5F_libver_t, mkChar("H5F_libver_t")); ((long long *) REAL(R_type))[DT_H5F_libver_t] = h5_datatype[DT_H5F_libver_t]; SET_STRING_ELT(R_categ, DT_H5F_mem_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5F_mem_t, mkChar("H5F_mem_t")); ((long long *) REAL(R_type))[DT_H5F_mem_t] = h5_datatype[DT_H5F_mem_t]; SET_STRING_ELT(R_categ, DT_H5F_scope_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5F_scope_t, mkChar("H5F_scope_t")); ((long long *) REAL(R_type))[DT_H5F_scope_t] = h5_datatype[DT_H5F_scope_t]; SET_STRING_ELT(R_categ, DT_H5FD_file_image_op_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5FD_file_image_op_t, mkChar("H5FD_file_image_op_t")); ((long long *) REAL(R_type))[DT_H5FD_file_image_op_t] = h5_datatype[DT_H5FD_file_image_op_t]; SET_STRING_ELT(R_categ, DT_H5G_obj_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5G_obj_t, mkChar("H5G_obj_t")); ((long long *) REAL(R_type))[DT_H5G_obj_t] = h5_datatype[DT_H5G_obj_t]; SET_STRING_ELT(R_categ, DT_H5G_storage_type_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5G_storage_type_t, mkChar("H5G_storage_type_t")); ((long long *) REAL(R_type))[DT_H5G_storage_type_t] = h5_datatype[DT_H5G_storage_type_t]; SET_STRING_ELT(R_categ, DT_H5I_type_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5I_type_t, mkChar("H5I_type_t")); ((long long *) REAL(R_type))[DT_H5I_type_t] = h5_datatype[DT_H5I_type_t]; SET_STRING_ELT(R_categ, DT_H5L_type_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5L_type_t, mkChar("H5L_type_t")); ((long long *) REAL(R_type))[DT_H5L_type_t] = h5_datatype[DT_H5L_type_t]; SET_STRING_ELT(R_categ, DT_H5LT_lang_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5LT_lang_t, mkChar("H5LT_lang_t")); ((long long *) REAL(R_type))[DT_H5LT_lang_t] = h5_datatype[DT_H5LT_lang_t]; SET_STRING_ELT(R_categ, DT_H5O_mcdt_search_ret_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5O_mcdt_search_ret_t, mkChar("H5O_mcdt_search_ret_t")); ((long long *) REAL(R_type))[DT_H5O_mcdt_search_ret_t] = h5_datatype[DT_H5O_mcdt_search_ret_t]; SET_STRING_ELT(R_categ, DT_H5O_type_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5O_type_t, mkChar("H5O_type_t")); ((long long *) REAL(R_type))[DT_H5O_type_t] = h5_datatype[DT_H5O_type_t]; SET_STRING_ELT(R_categ, DT_H5PL_type_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5PL_type_t, mkChar("H5PL_type_t")); ((long long *) REAL(R_type))[DT_H5PL_type_t] = h5_datatype[DT_H5PL_type_t]; SET_STRING_ELT(R_categ, DT_H5R_type_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5R_type_t, mkChar("H5R_type_t")); ((long long *) REAL(R_type))[DT_H5R_type_t] = h5_datatype[DT_H5R_type_t]; SET_STRING_ELT(R_categ, DT_H5S_class_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5S_class_t, mkChar("H5S_class_t")); ((long long *) REAL(R_type))[DT_H5S_class_t] = h5_datatype[DT_H5S_class_t]; SET_STRING_ELT(R_categ, DT_H5S_sel_type, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5S_sel_type, mkChar("H5S_sel_type")); ((long long *) REAL(R_type))[DT_H5S_sel_type] = h5_datatype[DT_H5S_sel_type]; SET_STRING_ELT(R_categ, DT_H5S_seloper_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5S_seloper_t, mkChar("H5S_seloper_t")); ((long long *) REAL(R_type))[DT_H5S_seloper_t] = h5_datatype[DT_H5S_seloper_t]; SET_STRING_ELT(R_categ, DT_H5T_bkg_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_bkg_t, mkChar("H5T_bkg_t")); ((long long *) REAL(R_type))[DT_H5T_bkg_t] = h5_datatype[DT_H5T_bkg_t]; SET_STRING_ELT(R_categ, DT_H5T_class_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_class_t, mkChar("H5T_class_t")); ((long long *) REAL(R_type))[DT_H5T_class_t] = h5_datatype[DT_H5T_class_t]; SET_STRING_ELT(R_categ, DT_H5T_cmd_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_cmd_t, mkChar("H5T_cmd_t")); ((long long *) REAL(R_type))[DT_H5T_cmd_t] = h5_datatype[DT_H5T_cmd_t]; SET_STRING_ELT(R_categ, DT_H5T_conv_except_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_conv_except_t, mkChar("H5T_conv_except_t")); ((long long *) REAL(R_type))[DT_H5T_conv_except_t] = h5_datatype[DT_H5T_conv_except_t]; SET_STRING_ELT(R_categ, DT_H5T_conv_ret_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_conv_ret_t, mkChar("H5T_conv_ret_t")); ((long long *) REAL(R_type))[DT_H5T_conv_ret_t] = h5_datatype[DT_H5T_conv_ret_t]; SET_STRING_ELT(R_categ, DT_H5T_cset_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_cset_t, mkChar("H5T_cset_t")); ((long long *) REAL(R_type))[DT_H5T_cset_t] = h5_datatype[DT_H5T_cset_t]; SET_STRING_ELT(R_categ, DT_H5T_direction_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_direction_t, mkChar("H5T_direction_t")); ((long long *) REAL(R_type))[DT_H5T_direction_t] = h5_datatype[DT_H5T_direction_t]; SET_STRING_ELT(R_categ, DT_H5T_norm_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_norm_t, mkChar("H5T_norm_t")); ((long long *) REAL(R_type))[DT_H5T_norm_t] = h5_datatype[DT_H5T_norm_t]; SET_STRING_ELT(R_categ, DT_H5T_order_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_order_t, mkChar("H5T_order_t")); ((long long *) REAL(R_type))[DT_H5T_order_t] = h5_datatype[DT_H5T_order_t]; SET_STRING_ELT(R_categ, DT_H5T_pad_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_pad_t, mkChar("H5T_pad_t")); ((long long *) REAL(R_type))[DT_H5T_pad_t] = h5_datatype[DT_H5T_pad_t]; SET_STRING_ELT(R_categ, DT_H5T_pers_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_pers_t, mkChar("H5T_pers_t")); ((long long *) REAL(R_type))[DT_H5T_pers_t] = h5_datatype[DT_H5T_pers_t]; SET_STRING_ELT(R_categ, DT_H5T_sign_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_sign_t, mkChar("H5T_sign_t")); ((long long *) REAL(R_type))[DT_H5T_sign_t] = h5_datatype[DT_H5T_sign_t]; SET_STRING_ELT(R_categ, DT_H5T_str_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5T_str_t, mkChar("H5T_str_t")); ((long long *) REAL(R_type))[DT_H5T_str_t] = h5_datatype[DT_H5T_str_t]; SET_STRING_ELT(R_categ, DT_H5VL_map_get_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5VL_map_get_t, mkChar("H5VL_map_get_t")); ((long long *) REAL(R_type))[DT_H5VL_map_get_t] = h5_datatype[DT_H5VL_map_get_t]; SET_STRING_ELT(R_categ, DT_H5VL_map_specific_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5VL_map_specific_t, mkChar("H5VL_map_specific_t")); ((long long *) REAL(R_type))[DT_H5VL_map_specific_t] = h5_datatype[DT_H5VL_map_specific_t]; SET_STRING_ELT(R_categ, DT_H5Z_cb_return_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5Z_cb_return_t, mkChar("H5Z_cb_return_t")); ((long long *) REAL(R_type))[DT_H5Z_cb_return_t] = h5_datatype[DT_H5Z_cb_return_t]; SET_STRING_ELT(R_categ, DT_H5Z_EDC_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5Z_EDC_t, mkChar("H5Z_EDC_t")); ((long long *) REAL(R_type))[DT_H5Z_EDC_t] = h5_datatype[DT_H5Z_EDC_t]; SET_STRING_ELT(R_categ, DT_H5Z_SO_scale_type_t, mkChar("enum")); SET_STRING_ELT(R_name, DT_H5Z_SO_scale_type_t, mkChar("H5Z_SO_scale_type_t")); ((long long *) REAL(R_type))[DT_H5Z_SO_scale_type_t] = h5_datatype[DT_H5Z_SO_scale_type_t]; SET_STRING_ELT(R_categ, DT_H5L_info1_helper_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5L_info1_helper_t, mkChar("H5L_info1_helper_t")); ((long long *) REAL(R_type))[DT_H5L_info1_helper_t] = h5_datatype[DT_H5L_info1_helper_t]; SET_STRING_ELT(R_categ, DT_H5L_info2_helper_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5L_info2_helper_t, mkChar("H5L_info2_helper_t")); ((long long *) REAL(R_type))[DT_H5L_info2_helper_t] = h5_datatype[DT_H5L_info2_helper_t]; SET_STRING_ELT(R_categ, DT_H5_ih_info_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5_ih_info_t, mkChar("H5_ih_info_t")); ((long long *) REAL(R_type))[DT_H5_ih_info_t] = h5_datatype[DT_H5_ih_info_t]; SET_STRING_ELT(R_categ, DT_H5A_info_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5A_info_t, mkChar("H5A_info_t")); ((long long *) REAL(R_type))[DT_H5A_info_t] = h5_datatype[DT_H5A_info_t]; SET_STRING_ELT(R_categ, DT_H5AC_cache_config_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5AC_cache_config_t, mkChar("H5AC_cache_config_t")); ((long long *) REAL(R_type))[DT_H5AC_cache_config_t] = h5_datatype[DT_H5AC_cache_config_t]; SET_STRING_ELT(R_categ, DT_H5AC_cache_image_config_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5AC_cache_image_config_t, mkChar("H5AC_cache_image_config_t")); ((long long *) REAL(R_type))[DT_H5AC_cache_image_config_t] = h5_datatype[DT_H5AC_cache_image_config_t]; SET_STRING_ELT(R_categ, DT_H5D_info_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5D_info_t, mkChar("H5D_info_t")); ((long long *) REAL(R_type))[DT_H5D_info_t] = h5_datatype[DT_H5D_info_t]; SET_STRING_ELT(R_categ, DT_H5E_error1_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5E_error1_t, mkChar("H5E_error1_t")); ((long long *) REAL(R_type))[DT_H5E_error1_t] = h5_datatype[DT_H5E_error1_t]; SET_STRING_ELT(R_categ, DT_H5E_error2_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5E_error2_t, mkChar("H5E_error2_t")); ((long long *) REAL(R_type))[DT_H5E_error2_t] = h5_datatype[DT_H5E_error2_t]; SET_STRING_ELT(R_categ, DT_H5F_info1_helper_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5F_info1_helper_t, mkChar("H5F_info1_helper_t")); ((long long *) REAL(R_type))[DT_H5F_info1_helper_t] = h5_datatype[DT_H5F_info1_helper_t]; SET_STRING_ELT(R_categ, DT_H5F_info1_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5F_info1_t, mkChar("H5F_info1_t")); ((long long *) REAL(R_type))[DT_H5F_info1_t] = h5_datatype[DT_H5F_info1_t]; SET_STRING_ELT(R_categ, DT_H5F_info2_free_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5F_info2_free_t, mkChar("H5F_info2_free_t")); ((long long *) REAL(R_type))[DT_H5F_info2_free_t] = h5_datatype[DT_H5F_info2_free_t]; SET_STRING_ELT(R_categ, DT_H5F_info2_sohm_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5F_info2_sohm_t, mkChar("H5F_info2_sohm_t")); ((long long *) REAL(R_type))[DT_H5F_info2_sohm_t] = h5_datatype[DT_H5F_info2_sohm_t]; SET_STRING_ELT(R_categ, DT_H5F_info2_super_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5F_info2_super_t, mkChar("H5F_info2_super_t")); ((long long *) REAL(R_type))[DT_H5F_info2_super_t] = h5_datatype[DT_H5F_info2_super_t]; SET_STRING_ELT(R_categ, DT_H5F_info2_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5F_info2_t, mkChar("H5F_info2_t")); ((long long *) REAL(R_type))[DT_H5F_info2_t] = h5_datatype[DT_H5F_info2_t]; SET_STRING_ELT(R_categ, DT_H5F_retry_info_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5F_retry_info_t, mkChar("H5F_retry_info_t")); ((long long *) REAL(R_type))[DT_H5F_retry_info_t] = h5_datatype[DT_H5F_retry_info_t]; SET_STRING_ELT(R_categ, DT_H5F_sect_info_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5F_sect_info_t, mkChar("H5F_sect_info_t")); ((long long *) REAL(R_type))[DT_H5F_sect_info_t] = h5_datatype[DT_H5F_sect_info_t]; SET_STRING_ELT(R_categ, DT_H5G_info_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5G_info_t, mkChar("H5G_info_t")); ((long long *) REAL(R_type))[DT_H5G_info_t] = h5_datatype[DT_H5G_info_t]; SET_STRING_ELT(R_categ, DT_H5L_info1_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5L_info1_t, mkChar("H5L_info1_t")); ((long long *) REAL(R_type))[DT_H5L_info1_t] = h5_datatype[DT_H5L_info1_t]; SET_STRING_ELT(R_categ, DT_H5L_info2_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5L_info2_t, mkChar("H5L_info2_t")); ((long long *) REAL(R_type))[DT_H5L_info2_t] = h5_datatype[DT_H5L_info2_t]; SET_STRING_ELT(R_categ, DT_H5ls_info_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5ls_info_t, mkChar("H5ls_info_t")); ((long long *) REAL(R_type))[DT_H5ls_info_t] = h5_datatype[DT_H5ls_info_t]; SET_STRING_ELT(R_categ, DT_H5O_hdr_info_helper_msg_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5O_hdr_info_helper_msg_t, mkChar("H5O_hdr_info_helper_msg_t")); ((long long *) REAL(R_type))[DT_H5O_hdr_info_helper_msg_t] = h5_datatype[DT_H5O_hdr_info_helper_msg_t]; SET_STRING_ELT(R_categ, DT_H5O_hdr_info_helper_space_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5O_hdr_info_helper_space_t, mkChar("H5O_hdr_info_helper_space_t")); ((long long *) REAL(R_type))[DT_H5O_hdr_info_helper_space_t] = h5_datatype[DT_H5O_hdr_info_helper_space_t]; SET_STRING_ELT(R_categ, DT_H5O_hdr_info_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5O_hdr_info_t, mkChar("H5O_hdr_info_t")); ((long long *) REAL(R_type))[DT_H5O_hdr_info_t] = h5_datatype[DT_H5O_hdr_info_t]; SET_STRING_ELT(R_categ, DT_H5O_info_helper_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5O_info_helper_t, mkChar("H5O_info_helper_t")); ((long long *) REAL(R_type))[DT_H5O_info_helper_t] = h5_datatype[DT_H5O_info_helper_t]; SET_STRING_ELT(R_categ, DT_H5O_info1_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5O_info1_t, mkChar("H5O_info1_t")); ((long long *) REAL(R_type))[DT_H5O_info1_t] = h5_datatype[DT_H5O_info1_t]; SET_STRING_ELT(R_categ, DT_H5O_info2_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5O_info2_t, mkChar("H5O_info2_t")); ((long long *) REAL(R_type))[DT_H5O_info2_t] = h5_datatype[DT_H5O_info2_t]; SET_STRING_ELT(R_categ, DT_H5O_native_info_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5O_native_info_t, mkChar("H5O_native_info_t")); ((long long *) REAL(R_type))[DT_H5O_native_info_t] = h5_datatype[DT_H5O_native_info_t]; SET_STRING_ELT(R_categ, DT_H5O_stat_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5O_stat_t, mkChar("H5O_stat_t")); ((long long *) REAL(R_type))[DT_H5O_stat_t] = h5_datatype[DT_H5O_stat_t]; SET_STRING_ELT(R_categ, DT_H5O_token_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5O_token_t, mkChar("H5O_token_t")); ((long long *) REAL(R_type))[DT_H5O_token_t] = h5_datatype[DT_H5O_token_t]; SET_STRING_ELT(R_categ, DT_H5R_ref_helper_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5R_ref_helper_t, mkChar("H5R_ref_helper_t")); ((long long *) REAL(R_type))[DT_H5R_ref_helper_t] = h5_datatype[DT_H5R_ref_helper_t]; SET_STRING_ELT(R_categ, DT_H5R_ref_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_H5R_ref_t, mkChar("H5R_ref_t")); ((long long *) REAL(R_type))[DT_H5R_ref_t] = h5_datatype[DT_H5R_ref_t]; SET_STRING_ELT(R_categ, DT_hdset_reg_ref_t, mkChar("struct")); SET_STRING_ELT(R_name, DT_hdset_reg_ref_t, mkChar("hdset_reg_ref_t")); ((long long *) REAL(R_type))[DT_hdset_reg_ref_t] = h5_datatype[DT_hdset_reg_ref_t]; UNPROTECT(4); return(df); } /************************************************************************* * * Enums * *************************************************************************/ /* typedef enum H5_index_t { H5_INDEX_UNKNOWN = -1, H5_INDEX_NAME, H5_INDEX_CRT_ORDER, H5_INDEX_N } H5_index_t; */ hid_t create_DT_H5_index_t(void) { enum H5_index_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5_index_t), issigned(enum H5_index_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5_INDEX_UNKNOWN; H5Tenum_insert(dtype_id, "H5_INDEX_UNKNOWN", &myenum); myenum = H5_INDEX_NAME; H5Tenum_insert(dtype_id, "H5_INDEX_NAME", &myenum); myenum = H5_INDEX_CRT_ORDER; H5Tenum_insert(dtype_id, "H5_INDEX_CRT_ORDER", &myenum); myenum = H5_INDEX_N; H5Tenum_insert(dtype_id, "H5_INDEX_N", &myenum); return(dtype_id); } /* typedef enum { H5_ITER_UNKNOWN = -1, H5_ITER_INC, H5_ITER_DEC, H5_ITER_NATIVE, H5_ITER_N } H5_iter_order_t; */ hid_t create_DT_H5_iter_order_t(void) { H5_iter_order_t myenum; hid_t base_type = get_h5_equiv(sizeof(H5_iter_order_t), issigned(H5_iter_order_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5_ITER_UNKNOWN; H5Tenum_insert(dtype_id, "H5_ITER_UNKNOWN", &myenum); myenum = H5_ITER_INC; H5Tenum_insert(dtype_id, "H5_ITER_INC", &myenum); myenum = H5_ITER_DEC; H5Tenum_insert(dtype_id, "H5_ITER_DEC", &myenum); myenum = H5_ITER_NATIVE; H5Tenum_insert(dtype_id, "H5_ITER_NATIVE", &myenum); myenum = H5_ITER_N; H5Tenum_insert(dtype_id, "H5_ITER_N", &myenum); return(dtype_id); } /* typedef enum H5C_cache_decr_mode{ H5C_decr__off, H5C_decr__threshold, H5C_decr__age_out, H5C_decr__age_out_with_threshold} H5C_cache_decr_mode; */ hid_t create_DT_H5C_cache_decr_mode(void) { enum H5C_cache_decr_mode myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5C_cache_decr_mode), issigned(enum H5C_cache_decr_mode)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5C_decr__off; H5Tenum_insert(dtype_id, "H5C_decr__off", &myenum); myenum = H5C_decr__threshold; H5Tenum_insert(dtype_id, "H5C_decr__threshold", &myenum); myenum = H5C_decr__age_out; H5Tenum_insert(dtype_id, "H5C_decr__age_out", &myenum); myenum = H5C_decr__age_out_with_threshold; H5Tenum_insert(dtype_id, "H5C_decr__age_out_with_threshold", &myenum); return(dtype_id); } /* typedef enum H5C_cache_flash_incr_mode{ H5C_flash_incr__off, H5C_flash_incr__add_space} H5C_cache_flash_incr_mode; */ hid_t create_DT_H5C_cache_flash_incr_mode(void) { enum H5C_cache_flash_incr_mode myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5C_cache_flash_incr_mode), issigned(enum H5C_cache_flash_incr_mode)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5C_flash_incr__off; H5Tenum_insert(dtype_id, "H5C_flash_incr__off", &myenum); myenum = H5C_flash_incr__add_space; H5Tenum_insert(dtype_id, "H5C_flash_incr__add_space", &myenum); return(dtype_id); } /* typedef enum H5C_cache_incr_mode{ H5C_incr__off, H5C_incr__threshold} H5C_cache_incr_mode; */ hid_t create_DT_H5C_cache_incr_mode(void) { enum H5C_cache_incr_mode myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5C_cache_incr_mode), issigned(enum H5C_cache_incr_mode)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5C_incr__off; H5Tenum_insert(dtype_id, "H5C_incr__off", &myenum); myenum = H5C_incr__threshold; H5Tenum_insert(dtype_id, "H5C_incr__threshold", &myenum); return(dtype_id); } /* typedef enum H5D_alloc_time_t { H5D_ALLOC_TIME_ERROR = -1, H5D_ALLOC_TIME_DEFAULT = 0, H5D_ALLOC_TIME_EARLY = 1, H5D_ALLOC_TIME_LATE = 2, H5D_ALLOC_TIME_INCR = 3} H5D_alloc_time_t; */ hid_t create_DT_H5D_alloc_time_t(void) { enum H5D_alloc_time_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_alloc_time_t), issigned(enum H5D_alloc_time_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_ALLOC_TIME_ERROR; H5Tenum_insert(dtype_id, "H5D_ALLOC_TIME_ERROR", &myenum); myenum = H5D_ALLOC_TIME_DEFAULT; H5Tenum_insert(dtype_id, "H5D_ALLOC_TIME_DEFAULT", &myenum); myenum = H5D_ALLOC_TIME_EARLY; H5Tenum_insert(dtype_id, "H5D_ALLOC_TIME_EARLY", &myenum); myenum = H5D_ALLOC_TIME_LATE; H5Tenum_insert(dtype_id, "H5D_ALLOC_TIME_LATE", &myenum); myenum = H5D_ALLOC_TIME_INCR; H5Tenum_insert(dtype_id, "H5D_ALLOC_TIME_INCR", &myenum); return(dtype_id); } /* typedef enum H5D_chunk_index_t { H5D_CHUNK_IDX_BTREE = 0, H5D_CHUNK_IDX_SINGLE = 1, H5D_CHUNK_IDX_NONE = 2, H5D_CHUNK_IDX_FARRAY = 3, H5D_CHUNK_IDX_EARRAY = 4, H5D_CHUNK_IDX_BT2 = 5, H5D_CHUNK_IDX_NTYPES } H5D_chunk_index_t; */ hid_t create_DT_H5D_chunk_index_t(void) { enum H5D_chunk_index_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_chunk_index_t), issigned(enum H5D_chunk_index_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_CHUNK_IDX_BTREE; H5Tenum_insert(dtype_id, "H5D_CHUNK_IDX_BTREE", &myenum); myenum = H5D_CHUNK_IDX_SINGLE; H5Tenum_insert(dtype_id, "H5D_CHUNK_IDX_SINGLE", &myenum); myenum = H5D_CHUNK_IDX_NONE; H5Tenum_insert(dtype_id, "H5D_CHUNK_IDX_NONE", &myenum); myenum = H5D_CHUNK_IDX_FARRAY; H5Tenum_insert(dtype_id, "H5D_CHUNK_IDX_FARRAY", &myenum); myenum = H5D_CHUNK_IDX_EARRAY; H5Tenum_insert(dtype_id, "H5D_CHUNK_IDX_EARRAY", &myenum); myenum = H5D_CHUNK_IDX_BT2; H5Tenum_insert(dtype_id, "H5D_CHUNK_IDX_BT2", &myenum); myenum = H5D_CHUNK_IDX_NTYPES; H5Tenum_insert(dtype_id, "H5D_CHUNK_IDX_NTYPES", &myenum); return(dtype_id); } /* typedef enum H5D_fill_time_t { H5D_FILL_TIME_ERROR = -1, H5D_FILL_TIME_ALLOC = 0, H5D_FILL_TIME_NEVER = 1, H5D_FILL_TIME_IFSET = 2} H5D_fill_time_t; */ hid_t create_DT_H5D_fill_time_t(void) { enum H5D_fill_time_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_fill_time_t), issigned(enum H5D_fill_time_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_FILL_TIME_ERROR; H5Tenum_insert(dtype_id, "H5D_FILL_TIME_ERROR", &myenum); myenum = H5D_FILL_TIME_ALLOC; H5Tenum_insert(dtype_id, "H5D_FILL_TIME_ALLOC", &myenum); myenum = H5D_FILL_TIME_NEVER; H5Tenum_insert(dtype_id, "H5D_FILL_TIME_NEVER", &myenum); myenum = H5D_FILL_TIME_IFSET; H5Tenum_insert(dtype_id, "H5D_FILL_TIME_IFSET", &myenum); return(dtype_id); } /* typedef enum H5D_fill_value_t { H5D_FILL_VALUE_ERROR =-1, H5D_FILL_VALUE_UNDEFINED =0, H5D_FILL_VALUE_DEFAULT =1, H5D_FILL_VALUE_USER_DEFINED =2} H5D_fill_value_t; */ hid_t create_DT_H5D_fill_value_t(void) { enum H5D_fill_value_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_fill_value_t), issigned(enum H5D_fill_value_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_FILL_VALUE_ERROR; H5Tenum_insert(dtype_id, "H5D_FILL_VALUE_ERROR", &myenum); myenum = H5D_FILL_VALUE_UNDEFINED; H5Tenum_insert(dtype_id, "H5D_FILL_VALUE_UNDEFINED", &myenum); myenum = H5D_FILL_VALUE_DEFAULT; H5Tenum_insert(dtype_id, "H5D_FILL_VALUE_DEFAULT", &myenum); myenum = H5D_FILL_VALUE_USER_DEFINED; H5Tenum_insert(dtype_id, "H5D_FILL_VALUE_USER_DEFINED", &myenum); return(dtype_id); } /* typedef enum H5D_layout_t { H5D_LAYOUT_ERROR = -1, H5D_COMPACT = 0, H5D_CONTIGUOUS = 1, H5D_CHUNKED = 2, H5D_VIRTUAL = 3, H5D_NLAYOUTS = 4 } H5D_layout_t; */ hid_t create_DT_H5D_layout_t(void) { enum H5D_layout_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_layout_t), issigned(enum H5D_layout_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_LAYOUT_ERROR; H5Tenum_insert(dtype_id, "H5D_LAYOUT_ERROR", &myenum); myenum = H5D_COMPACT; H5Tenum_insert(dtype_id, "H5D_COMPACT", &myenum); myenum = H5D_CONTIGUOUS; H5Tenum_insert(dtype_id, "H5D_CONTIGUOUS", &myenum); myenum = H5D_CHUNKED; H5Tenum_insert(dtype_id, "H5D_CHUNKED", &myenum); myenum = H5D_VIRTUAL; H5Tenum_insert(dtype_id, "H5D_VIRTUAL", &myenum); myenum = H5D_NLAYOUTS; H5Tenum_insert(dtype_id, "H5D_NLAYOUTS", &myenum); return(dtype_id); } /* typedef enum H5D_mpio_actual_chunk_opt_mode_t { H5D_MPIO_NO_CHUNK_OPTIMIZATION = 0, H5D_MPIO_LINK_CHUNK, H5D_MPIO_MULTI_CHUNK} H5D_mpio_actual_chunk_opt_mode_t; */ hid_t create_DT_H5D_mpio_actual_chunk_opt_mode_t(void) { enum H5D_mpio_actual_chunk_opt_mode_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_mpio_actual_chunk_opt_mode_t), issigned(enum H5D_mpio_actual_chunk_opt_mode_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_MPIO_NO_CHUNK_OPTIMIZATION; H5Tenum_insert(dtype_id, "H5D_MPIO_NO_CHUNK_OPTIMIZATION", &myenum); myenum = H5D_MPIO_LINK_CHUNK; H5Tenum_insert(dtype_id, "H5D_MPIO_LINK_CHUNK", &myenum); myenum = H5D_MPIO_MULTI_CHUNK; H5Tenum_insert(dtype_id, "H5D_MPIO_MULTI_CHUNK", &myenum); return(dtype_id); } /* typedef enum H5D_mpio_actual_io_mode_t { H5D_MPIO_NO_COLLECTIVE = 0x0, H5D_MPIO_CHUNK_INDEPENDENT = 0x1, H5D_MPIO_CHUNK_COLLECTIVE = 0x2, H5D_MPIO_CHUNK_MIXED = 0x1 | 0x2, H5D_MPIO_CONTIGUOUS_COLLECTIVE = 0x4} H5D_mpio_actual_io_mode_t; */ hid_t create_DT_H5D_mpio_actual_io_mode_t(void) { enum H5D_mpio_actual_io_mode_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_mpio_actual_io_mode_t), issigned(enum H5D_mpio_actual_io_mode_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_MPIO_NO_COLLECTIVE; H5Tenum_insert(dtype_id, "H5D_MPIO_NO_COLLECTIVE", &myenum); myenum = H5D_MPIO_CHUNK_INDEPENDENT; H5Tenum_insert(dtype_id, "H5D_MPIO_CHUNK_INDEPENDENT", &myenum); myenum = H5D_MPIO_CHUNK_COLLECTIVE; H5Tenum_insert(dtype_id, "H5D_MPIO_CHUNK_COLLECTIVE", &myenum); myenum = H5D_MPIO_CHUNK_MIXED; H5Tenum_insert(dtype_id, "H5D_MPIO_CHUNK_MIXED", &myenum); myenum = H5D_MPIO_CONTIGUOUS_COLLECTIVE; H5Tenum_insert(dtype_id, "H5D_MPIO_CONTIGUOUS_COLLECTIVE", &myenum); return(dtype_id); } /* typedef enum H5D_mpio_no_collective_cause_t { H5D_MPIO_COLLECTIVE = 0x00, H5D_MPIO_SET_INDEPENDENT = 0x01, H5D_MPIO_DATATYPE_CONVERSION = 0x02, H5D_MPIO_DATA_TRANSFORMS = 0x04, H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED = 0x08, H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES = 0x10, H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET = 0x20, H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED = 0x40, H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE = 0x80, H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE = 0x100} H5D_mpio_no_collective_cause_t; */ hid_t create_DT_H5D_mpio_no_collective_cause_t(void) { enum H5D_mpio_no_collective_cause_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_mpio_no_collective_cause_t), issigned(enum H5D_mpio_no_collective_cause_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_MPIO_COLLECTIVE; H5Tenum_insert(dtype_id, "H5D_MPIO_COLLECTIVE", &myenum); myenum = H5D_MPIO_SET_INDEPENDENT; H5Tenum_insert(dtype_id, "H5D_MPIO_SET_INDEPENDENT", &myenum); myenum = H5D_MPIO_DATATYPE_CONVERSION; H5Tenum_insert(dtype_id, "H5D_MPIO_DATATYPE_CONVERSION", &myenum); myenum = H5D_MPIO_DATA_TRANSFORMS; H5Tenum_insert(dtype_id, "H5D_MPIO_DATA_TRANSFORMS", &myenum); myenum = H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED; H5Tenum_insert(dtype_id, "H5D_MPIO_MPI_OPT_TYPES_ENV_VAR_DISABLED", &myenum); myenum = H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES; H5Tenum_insert(dtype_id, "H5D_MPIO_NOT_SIMPLE_OR_SCALAR_DATASPACES", &myenum); myenum = H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET; H5Tenum_insert(dtype_id, "H5D_MPIO_NOT_CONTIGUOUS_OR_CHUNKED_DATASET", &myenum); myenum = H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED; H5Tenum_insert(dtype_id, "H5D_MPIO_PARALLEL_FILTERED_WRITES_DISABLED", &myenum); myenum = H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE; H5Tenum_insert(dtype_id, "H5D_MPIO_ERROR_WHILE_CHECKING_COLLECTIVE_POSSIBLE", &myenum); myenum = H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE; H5Tenum_insert(dtype_id, "H5D_MPIO_NO_COLLECTIVE_MAX_CAUSE", &myenum); return(dtype_id); } /* typedef enum H5D_space_status_t { H5D_SPACE_STATUS_ERROR = -1, H5D_SPACE_STATUS_NOT_ALLOCATED = 0, H5D_SPACE_STATUS_PART_ALLOCATED = 1, H5D_SPACE_STATUS_ALLOCATED = 2} H5D_space_status_t; */ hid_t create_DT_H5D_space_status_t(void) { enum H5D_space_status_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_space_status_t), issigned(enum H5D_space_status_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_SPACE_STATUS_ERROR; H5Tenum_insert(dtype_id, "H5D_SPACE_STATUS_ERROR", &myenum); myenum = H5D_SPACE_STATUS_NOT_ALLOCATED; H5Tenum_insert(dtype_id, "H5D_SPACE_STATUS_NOT_ALLOCATED", &myenum); myenum = H5D_SPACE_STATUS_PART_ALLOCATED; H5Tenum_insert(dtype_id, "H5D_SPACE_STATUS_PART_ALLOCATED", &myenum); myenum = H5D_SPACE_STATUS_ALLOCATED; H5Tenum_insert(dtype_id, "H5D_SPACE_STATUS_ALLOCATED", &myenum); return(dtype_id); } /* typedef enum H5D_vds_view_t { H5D_VDS_ERROR = -1, H5D_VDS_FIRST_MISSING = 0, H5D_VDS_LAST_AVAILABLE = 1} H5D_vds_view_t; */ hid_t create_DT_H5D_vds_view_t(void) { enum H5D_vds_view_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5D_vds_view_t), issigned(enum H5D_vds_view_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5D_VDS_ERROR; H5Tenum_insert(dtype_id, "H5D_VDS_ERROR", &myenum); myenum = H5D_VDS_FIRST_MISSING; H5Tenum_insert(dtype_id, "H5D_VDS_FIRST_MISSING", &myenum); myenum = H5D_VDS_LAST_AVAILABLE; H5Tenum_insert(dtype_id, "H5D_VDS_LAST_AVAILABLE", &myenum); return(dtype_id); } /* typedef enum H5E_direction_t { H5E_WALK_UPWARD = 0, H5E_WALK_DOWNWARD = 1 } H5E_direction_t; */ hid_t create_DT_H5E_direction_t(void) { enum H5E_direction_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5E_direction_t), issigned(enum H5E_direction_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5E_WALK_UPWARD; H5Tenum_insert(dtype_id, "H5E_WALK_UPWARD", &myenum); myenum = H5E_WALK_DOWNWARD; H5Tenum_insert(dtype_id, "H5E_WALK_DOWNWARD", &myenum); return(dtype_id); } /* typedef enum H5E_type_t { H5E_MAJOR, H5E_MINOR} H5E_type_t; */ hid_t create_DT_H5E_type_t(void) { enum H5E_type_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5E_type_t), issigned(enum H5E_type_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5E_MAJOR; H5Tenum_insert(dtype_id, "H5E_MAJOR", &myenum); myenum = H5E_MINOR; H5Tenum_insert(dtype_id, "H5E_MINOR", &myenum); return(dtype_id); } /* typedef enum H5ES_status_t { H5ES_STATUS_IN_PROGRESS, H5ES_STATUS_SUCCEED, H5ES_STATUS_FAIL, H5ES_STATUS_CANCELED } H5ES_status_t; */ hid_t create_DT_H5ES_status_t(void) { enum H5ES_status_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5ES_status_t), issigned(enum H5ES_status_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5ES_STATUS_IN_PROGRESS; H5Tenum_insert(dtype_id, "H5ES_STATUS_IN_PROGRESS", &myenum); myenum = H5ES_STATUS_SUCCEED; H5Tenum_insert(dtype_id, "H5ES_STATUS_SUCCEED", &myenum); myenum = H5ES_STATUS_FAIL; H5Tenum_insert(dtype_id, "H5ES_STATUS_FAIL", &myenum); myenum = H5ES_STATUS_CANCELED; H5Tenum_insert(dtype_id, "H5ES_STATUS_CANCELED", &myenum); return(dtype_id); } /* typedef enum H5F_close_degree_t { H5F_CLOSE_DEFAULT = 0, H5F_CLOSE_WEAK = 1, H5F_CLOSE_SEMI = 2, H5F_CLOSE_STRONG = 3} H5F_close_degree_t; */ hid_t create_DT_H5F_close_degree_t(void) { enum H5F_close_degree_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5F_close_degree_t), issigned(enum H5F_close_degree_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5F_CLOSE_DEFAULT; H5Tenum_insert(dtype_id, "H5F_CLOSE_DEFAULT", &myenum); myenum = H5F_CLOSE_WEAK; H5Tenum_insert(dtype_id, "H5F_CLOSE_WEAK", &myenum); myenum = H5F_CLOSE_SEMI; H5Tenum_insert(dtype_id, "H5F_CLOSE_SEMI", &myenum); myenum = H5F_CLOSE_STRONG; H5Tenum_insert(dtype_id, "H5F_CLOSE_STRONG", &myenum); return(dtype_id); } /* typedef enum H5F_file_space_type_t { H5F_FILE_SPACE_DEFAULT = 0, H5F_FILE_SPACE_ALL_PERSIST = 1, H5F_FILE_SPACE_ALL = 2, H5F_FILE_SPACE_AGGR_VFD = 3, H5F_FILE_SPACE_VFD = 4, H5F_FILE_SPACE_NTYPES } H5F_file_space_type_t; */ hid_t create_DT_H5F_file_space_type_t(void) { enum H5F_file_space_type_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5F_file_space_type_t), issigned(enum H5F_file_space_type_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5F_FILE_SPACE_DEFAULT; H5Tenum_insert(dtype_id, "H5F_FILE_SPACE_DEFAULT", &myenum); myenum = H5F_FILE_SPACE_ALL_PERSIST; H5Tenum_insert(dtype_id, "H5F_FILE_SPACE_ALL_PERSIST", &myenum); myenum = H5F_FILE_SPACE_ALL; H5Tenum_insert(dtype_id, "H5F_FILE_SPACE_ALL", &myenum); myenum = H5F_FILE_SPACE_AGGR_VFD; H5Tenum_insert(dtype_id, "H5F_FILE_SPACE_AGGR_VFD", &myenum); myenum = H5F_FILE_SPACE_VFD; H5Tenum_insert(dtype_id, "H5F_FILE_SPACE_VFD", &myenum); myenum = H5F_FILE_SPACE_NTYPES; H5Tenum_insert(dtype_id, "H5F_FILE_SPACE_NTYPES", &myenum); return(dtype_id); } /* typedef enum H5F_fspace_strategy_t { H5F_FSPACE_STRATEGY_FSM_AGGR = 0, H5F_FSPACE_STRATEGY_PAGE = 1, H5F_FSPACE_STRATEGY_AGGR = 2, H5F_FSPACE_STRATEGY_NONE = 3, H5F_FSPACE_STRATEGY_NTYPES } H5F_fspace_strategy_t; */ hid_t create_DT_H5F_fspace_strategy_t(void) { enum H5F_fspace_strategy_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5F_fspace_strategy_t), issigned(enum H5F_fspace_strategy_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5F_FSPACE_STRATEGY_FSM_AGGR; H5Tenum_insert(dtype_id, "H5F_FSPACE_STRATEGY_FSM_AGGR", &myenum); myenum = H5F_FSPACE_STRATEGY_PAGE; H5Tenum_insert(dtype_id, "H5F_FSPACE_STRATEGY_PAGE", &myenum); myenum = H5F_FSPACE_STRATEGY_AGGR; H5Tenum_insert(dtype_id, "H5F_FSPACE_STRATEGY_AGGR", &myenum); myenum = H5F_FSPACE_STRATEGY_NONE; H5Tenum_insert(dtype_id, "H5F_FSPACE_STRATEGY_NONE", &myenum); myenum = H5F_FSPACE_STRATEGY_NTYPES; H5Tenum_insert(dtype_id, "H5F_FSPACE_STRATEGY_NTYPES", &myenum); return(dtype_id); } /* typedef enum H5F_libver_t { H5F_LIBVER_ERROR = -1, H5F_LIBVER_EARLIEST = 0, H5F_LIBVER_V18 = 1, H5F_LIBVER_V110 = 2, H5F_LIBVER_V112 = 3, H5F_LIBVER_NBOUNDS} H5F_libver_t; */ hid_t create_DT_H5F_libver_t(void) { enum H5F_libver_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5F_libver_t), issigned(enum H5F_libver_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5F_LIBVER_ERROR; H5Tenum_insert(dtype_id, "H5F_LIBVER_ERROR", &myenum); myenum = H5F_LIBVER_EARLIEST; H5Tenum_insert(dtype_id, "H5F_LIBVER_EARLIEST", &myenum); myenum = H5F_LIBVER_V18; H5Tenum_insert(dtype_id, "H5F_LIBVER_V18", &myenum); myenum = H5F_LIBVER_V110; H5Tenum_insert(dtype_id, "H5F_LIBVER_V110", &myenum); myenum = H5F_LIBVER_V112; H5Tenum_insert(dtype_id, "H5F_LIBVER_V112", &myenum); myenum = H5F_LIBVER_NBOUNDS; H5Tenum_insert(dtype_id, "H5F_LIBVER_NBOUNDS", &myenum); return(dtype_id); } /* typedef enum H5F_mem_t { H5FD_MEM_NOLIST = -1, H5FD_MEM_DEFAULT = 0, H5FD_MEM_SUPER = 1, H5FD_MEM_BTREE = 2, H5FD_MEM_DRAW = 3, H5FD_MEM_GHEAP = 4, H5FD_MEM_LHEAP = 5, H5FD_MEM_OHDR = 6, H5FD_MEM_NTYPES } H5F_mem_t; */ hid_t create_DT_H5F_mem_t(void) { enum H5F_mem_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5F_mem_t), issigned(enum H5F_mem_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5FD_MEM_NOLIST; H5Tenum_insert(dtype_id, "H5FD_MEM_NOLIST", &myenum); myenum = H5FD_MEM_DEFAULT; H5Tenum_insert(dtype_id, "H5FD_MEM_DEFAULT", &myenum); myenum = H5FD_MEM_SUPER; H5Tenum_insert(dtype_id, "H5FD_MEM_SUPER", &myenum); myenum = H5FD_MEM_BTREE; H5Tenum_insert(dtype_id, "H5FD_MEM_BTREE", &myenum); myenum = H5FD_MEM_DRAW; H5Tenum_insert(dtype_id, "H5FD_MEM_DRAW", &myenum); myenum = H5FD_MEM_GHEAP; H5Tenum_insert(dtype_id, "H5FD_MEM_GHEAP", &myenum); myenum = H5FD_MEM_LHEAP; H5Tenum_insert(dtype_id, "H5FD_MEM_LHEAP", &myenum); myenum = H5FD_MEM_OHDR; H5Tenum_insert(dtype_id, "H5FD_MEM_OHDR", &myenum); myenum = H5FD_MEM_NTYPES; H5Tenum_insert(dtype_id, "H5FD_MEM_NTYPES", &myenum); return(dtype_id); } /* typedef enum H5F_scope_t { H5F_SCOPE_LOCAL = 0, H5F_SCOPE_GLOBAL = 1 } H5F_scope_t; */ hid_t create_DT_H5F_scope_t(void) { enum H5F_scope_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5F_scope_t), issigned(enum H5F_scope_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5F_SCOPE_LOCAL; H5Tenum_insert(dtype_id, "H5F_SCOPE_LOCAL", &myenum); myenum = H5F_SCOPE_GLOBAL; H5Tenum_insert(dtype_id, "H5F_SCOPE_GLOBAL", &myenum); return(dtype_id); } /* typedef enum { H5FD_FILE_IMAGE_OP_NO_OP, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET, H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE, H5FD_FILE_IMAGE_OP_FILE_OPEN, H5FD_FILE_IMAGE_OP_FILE_RESIZE, H5FD_FILE_IMAGE_OP_FILE_CLOSE} H5FD_file_image_op_t; */ hid_t create_DT_H5FD_file_image_op_t(void) { H5FD_file_image_op_t myenum; hid_t base_type = get_h5_equiv(sizeof(H5FD_file_image_op_t), issigned(H5FD_file_image_op_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5FD_FILE_IMAGE_OP_NO_OP; H5Tenum_insert(dtype_id, "H5FD_FILE_IMAGE_OP_NO_OP", &myenum); myenum = H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET; H5Tenum_insert(dtype_id, "H5FD_FILE_IMAGE_OP_PROPERTY_LIST_SET", &myenum); myenum = H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY; H5Tenum_insert(dtype_id, "H5FD_FILE_IMAGE_OP_PROPERTY_LIST_COPY", &myenum); myenum = H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET; H5Tenum_insert(dtype_id, "H5FD_FILE_IMAGE_OP_PROPERTY_LIST_GET", &myenum); myenum = H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE; H5Tenum_insert(dtype_id, "H5FD_FILE_IMAGE_OP_PROPERTY_LIST_CLOSE", &myenum); myenum = H5FD_FILE_IMAGE_OP_FILE_OPEN; H5Tenum_insert(dtype_id, "H5FD_FILE_IMAGE_OP_FILE_OPEN", &myenum); myenum = H5FD_FILE_IMAGE_OP_FILE_RESIZE; H5Tenum_insert(dtype_id, "H5FD_FILE_IMAGE_OP_FILE_RESIZE", &myenum); myenum = H5FD_FILE_IMAGE_OP_FILE_CLOSE; H5Tenum_insert(dtype_id, "H5FD_FILE_IMAGE_OP_FILE_CLOSE", &myenum); return(dtype_id); } /* typedef enum H5G_obj_t { H5G_UNKNOWN = -1, H5G_GROUP, H5G_DATASET, H5G_TYPE, H5G_LINK, H5G_UDLINK, H5G_RESERVED_5, H5G_RESERVED_6, H5G_RESERVED_7 } H5G_obj_t; */ hid_t create_DT_H5G_obj_t(void) { enum H5G_obj_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5G_obj_t), issigned(enum H5G_obj_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5G_UNKNOWN; H5Tenum_insert(dtype_id, "H5G_UNKNOWN", &myenum); myenum = H5G_GROUP; H5Tenum_insert(dtype_id, "H5G_GROUP", &myenum); myenum = H5G_DATASET; H5Tenum_insert(dtype_id, "H5G_DATASET", &myenum); myenum = H5G_TYPE; H5Tenum_insert(dtype_id, "H5G_TYPE", &myenum); myenum = H5G_LINK; H5Tenum_insert(dtype_id, "H5G_LINK", &myenum); myenum = H5G_UDLINK; H5Tenum_insert(dtype_id, "H5G_UDLINK", &myenum); myenum = H5G_RESERVED_5; H5Tenum_insert(dtype_id, "H5G_RESERVED_5", &myenum); myenum = H5G_RESERVED_6; H5Tenum_insert(dtype_id, "H5G_RESERVED_6", &myenum); myenum = H5G_RESERVED_7; H5Tenum_insert(dtype_id, "H5G_RESERVED_7", &myenum); return(dtype_id); } /* typedef enum H5G_storage_type_t { H5G_STORAGE_TYPE_UNKNOWN = -1, H5G_STORAGE_TYPE_SYMBOL_TABLE, H5G_STORAGE_TYPE_COMPACT, H5G_STORAGE_TYPE_DENSE } H5G_storage_type_t; */ hid_t create_DT_H5G_storage_type_t(void) { enum H5G_storage_type_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5G_storage_type_t), issigned(enum H5G_storage_type_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5G_STORAGE_TYPE_UNKNOWN; H5Tenum_insert(dtype_id, "H5G_STORAGE_TYPE_UNKNOWN", &myenum); myenum = H5G_STORAGE_TYPE_SYMBOL_TABLE; H5Tenum_insert(dtype_id, "H5G_STORAGE_TYPE_SYMBOL_TABLE", &myenum); myenum = H5G_STORAGE_TYPE_COMPACT; H5Tenum_insert(dtype_id, "H5G_STORAGE_TYPE_COMPACT", &myenum); myenum = H5G_STORAGE_TYPE_DENSE; H5Tenum_insert(dtype_id, "H5G_STORAGE_TYPE_DENSE", &myenum); return(dtype_id); } /* typedef enum H5I_type_t { H5I_UNINIT = (-2), H5I_BADID = (-1), H5I_FILE = 1, H5I_GROUP, H5I_DATATYPE, H5I_DATASPACE, H5I_DATASET, H5I_MAP, H5I_ATTR, H5I_VFL, H5I_VOL, H5I_GENPROP_CLS, H5I_GENPROP_LST, H5I_ERROR_CLASS, H5I_ERROR_MSG, H5I_ERROR_STACK, H5I_SPACE_SEL_ITER, H5I_NTYPES } H5I_type_t; */ hid_t create_DT_H5I_type_t(void) { enum H5I_type_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5I_type_t), issigned(enum H5I_type_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5I_UNINIT; H5Tenum_insert(dtype_id, "H5I_UNINIT", &myenum); myenum = H5I_BADID; H5Tenum_insert(dtype_id, "H5I_BADID", &myenum); myenum = H5I_FILE; H5Tenum_insert(dtype_id, "H5I_FILE", &myenum); myenum = H5I_GROUP; H5Tenum_insert(dtype_id, "H5I_GROUP", &myenum); myenum = H5I_DATATYPE; H5Tenum_insert(dtype_id, "H5I_DATATYPE", &myenum); myenum = H5I_DATASPACE; H5Tenum_insert(dtype_id, "H5I_DATASPACE", &myenum); myenum = H5I_DATASET; H5Tenum_insert(dtype_id, "H5I_DATASET", &myenum); myenum = H5I_MAP; H5Tenum_insert(dtype_id, "H5I_MAP", &myenum); myenum = H5I_ATTR; H5Tenum_insert(dtype_id, "H5I_ATTR", &myenum); myenum = H5I_VFL; H5Tenum_insert(dtype_id, "H5I_VFL", &myenum); myenum = H5I_VOL; H5Tenum_insert(dtype_id, "H5I_VOL", &myenum); myenum = H5I_GENPROP_CLS; H5Tenum_insert(dtype_id, "H5I_GENPROP_CLS", &myenum); myenum = H5I_GENPROP_LST; H5Tenum_insert(dtype_id, "H5I_GENPROP_LST", &myenum); myenum = H5I_ERROR_CLASS; H5Tenum_insert(dtype_id, "H5I_ERROR_CLASS", &myenum); myenum = H5I_ERROR_MSG; H5Tenum_insert(dtype_id, "H5I_ERROR_MSG", &myenum); myenum = H5I_ERROR_STACK; H5Tenum_insert(dtype_id, "H5I_ERROR_STACK", &myenum); myenum = H5I_SPACE_SEL_ITER; H5Tenum_insert(dtype_id, "H5I_SPACE_SEL_ITER", &myenum); myenum = H5I_NTYPES; H5Tenum_insert(dtype_id, "H5I_NTYPES", &myenum); return(dtype_id); } /* typedef enum { H5L_TYPE_ERROR = (-1), H5L_TYPE_HARD = 0, H5L_TYPE_SOFT = 1, H5L_TYPE_EXTERNAL = 64, H5L_TYPE_MAX = 255 } H5L_type_t; */ hid_t create_DT_H5L_type_t(void) { H5L_type_t myenum; hid_t base_type = get_h5_equiv(sizeof(H5L_type_t), issigned(H5L_type_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5L_TYPE_ERROR; H5Tenum_insert(dtype_id, "H5L_TYPE_ERROR", &myenum); myenum = H5L_TYPE_HARD; H5Tenum_insert(dtype_id, "H5L_TYPE_HARD", &myenum); myenum = H5L_TYPE_SOFT; H5Tenum_insert(dtype_id, "H5L_TYPE_SOFT", &myenum); myenum = H5L_TYPE_EXTERNAL; H5Tenum_insert(dtype_id, "H5L_TYPE_EXTERNAL", &myenum); myenum = H5L_TYPE_MAX; H5Tenum_insert(dtype_id, "H5L_TYPE_MAX", &myenum); return(dtype_id); } /* typedef enum H5LT_lang_t { H5LT_LANG_ERR = -1, H5LT_DDL = 0, H5LT_C = 1, H5LT_FORTRAN = 2, H5LT_NO_LANG = 3 } H5LT_lang_t; */ hid_t create_DT_H5LT_lang_t(void) { enum H5LT_lang_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5LT_lang_t), issigned(enum H5LT_lang_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5LT_LANG_ERR; H5Tenum_insert(dtype_id, "H5LT_LANG_ERR", &myenum); myenum = H5LT_DDL; H5Tenum_insert(dtype_id, "H5LT_DDL", &myenum); myenum = H5LT_C; H5Tenum_insert(dtype_id, "H5LT_C", &myenum); myenum = H5LT_FORTRAN; H5Tenum_insert(dtype_id, "H5LT_FORTRAN", &myenum); myenum = H5LT_NO_LANG; H5Tenum_insert(dtype_id, "H5LT_NO_LANG", &myenum); return(dtype_id); } /* typedef enum H5O_mcdt_search_ret_t { H5O_MCDT_SEARCH_ERROR = -1, H5O_MCDT_SEARCH_CONT, H5O_MCDT_SEARCH_STOP } H5O_mcdt_search_ret_t; */ hid_t create_DT_H5O_mcdt_search_ret_t(void) { enum H5O_mcdt_search_ret_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5O_mcdt_search_ret_t), issigned(enum H5O_mcdt_search_ret_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5O_MCDT_SEARCH_ERROR; H5Tenum_insert(dtype_id, "H5O_MCDT_SEARCH_ERROR", &myenum); myenum = H5O_MCDT_SEARCH_CONT; H5Tenum_insert(dtype_id, "H5O_MCDT_SEARCH_CONT", &myenum); myenum = H5O_MCDT_SEARCH_STOP; H5Tenum_insert(dtype_id, "H5O_MCDT_SEARCH_STOP", &myenum); return(dtype_id); } /* typedef enum H5O_type_t { H5O_TYPE_UNKNOWN = -1, H5O_TYPE_GROUP, H5O_TYPE_DATASET, H5O_TYPE_NAMED_DATATYPE, H5O_TYPE_MAP, H5O_TYPE_NTYPES } H5O_type_t; */ hid_t create_DT_H5O_type_t(void) { enum H5O_type_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5O_type_t), issigned(enum H5O_type_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5O_TYPE_UNKNOWN; H5Tenum_insert(dtype_id, "H5O_TYPE_UNKNOWN", &myenum); myenum = H5O_TYPE_GROUP; H5Tenum_insert(dtype_id, "H5O_TYPE_GROUP", &myenum); myenum = H5O_TYPE_DATASET; H5Tenum_insert(dtype_id, "H5O_TYPE_DATASET", &myenum); myenum = H5O_TYPE_NAMED_DATATYPE; H5Tenum_insert(dtype_id, "H5O_TYPE_NAMED_DATATYPE", &myenum); myenum = H5O_TYPE_MAP; H5Tenum_insert(dtype_id, "H5O_TYPE_MAP", &myenum); myenum = H5O_TYPE_NTYPES; H5Tenum_insert(dtype_id, "H5O_TYPE_NTYPES", &myenum); return(dtype_id); } /* typedef enum H5PL_type_t { H5PL_TYPE_ERROR = -1, H5PL_TYPE_FILTER = 0, H5PL_TYPE_VOL = 1, H5PL_TYPE_NONE = 2 } H5PL_type_t; */ hid_t create_DT_H5PL_type_t(void) { enum H5PL_type_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5PL_type_t), issigned(enum H5PL_type_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5PL_TYPE_ERROR; H5Tenum_insert(dtype_id, "H5PL_TYPE_ERROR", &myenum); myenum = H5PL_TYPE_FILTER; H5Tenum_insert(dtype_id, "H5PL_TYPE_FILTER", &myenum); myenum = H5PL_TYPE_VOL; H5Tenum_insert(dtype_id, "H5PL_TYPE_VOL", &myenum); myenum = H5PL_TYPE_NONE; H5Tenum_insert(dtype_id, "H5PL_TYPE_NONE", &myenum); return(dtype_id); } /* typedef enum { H5R_BADTYPE = (-1), H5R_OBJECT1 = 0, H5R_DATASET_REGION1 = 1, H5R_OBJECT2 = 2, H5R_DATASET_REGION2 = 3, H5R_ATTR = 4, H5R_MAXTYPE = 5 } H5R_type_t; */ hid_t create_DT_H5R_type_t(void) { H5R_type_t myenum; hid_t base_type = get_h5_equiv(sizeof(H5R_type_t), issigned(H5R_type_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5R_BADTYPE; H5Tenum_insert(dtype_id, "H5R_BADTYPE", &myenum); myenum = H5R_OBJECT1; H5Tenum_insert(dtype_id, "H5R_OBJECT1", &myenum); myenum = H5R_DATASET_REGION1; H5Tenum_insert(dtype_id, "H5R_DATASET_REGION1", &myenum); myenum = H5R_OBJECT2; H5Tenum_insert(dtype_id, "H5R_OBJECT2", &myenum); myenum = H5R_DATASET_REGION2; H5Tenum_insert(dtype_id, "H5R_DATASET_REGION2", &myenum); myenum = H5R_ATTR; H5Tenum_insert(dtype_id, "H5R_ATTR", &myenum); myenum = H5R_MAXTYPE; H5Tenum_insert(dtype_id, "H5R_MAXTYPE", &myenum); return(dtype_id); } /* typedef enum H5S_class_t { H5S_NO_CLASS = -1, H5S_SCALAR = 0, H5S_SIMPLE = 1, H5S_NULL = 2 } H5S_class_t; */ hid_t create_DT_H5S_class_t(void) { enum H5S_class_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5S_class_t), issigned(enum H5S_class_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5S_NO_CLASS; H5Tenum_insert(dtype_id, "H5S_NO_CLASS", &myenum); myenum = H5S_SCALAR; H5Tenum_insert(dtype_id, "H5S_SCALAR", &myenum); myenum = H5S_SIMPLE; H5Tenum_insert(dtype_id, "H5S_SIMPLE", &myenum); myenum = H5S_NULL; H5Tenum_insert(dtype_id, "H5S_NULL", &myenum); return(dtype_id); } /* typedef enum { H5S_SEL_ERROR = -1, H5S_SEL_NONE = 0, H5S_SEL_POINTS = 1, H5S_SEL_HYPERSLABS = 2, H5S_SEL_ALL = 3, H5S_SEL_N } H5S_sel_type; */ hid_t create_DT_H5S_sel_type(void) { H5S_sel_type myenum; hid_t base_type = get_h5_equiv(sizeof(H5S_sel_type), issigned(H5S_sel_type)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5S_SEL_ERROR; H5Tenum_insert(dtype_id, "H5S_SEL_ERROR", &myenum); myenum = H5S_SEL_NONE; H5Tenum_insert(dtype_id, "H5S_SEL_NONE", &myenum); myenum = H5S_SEL_POINTS; H5Tenum_insert(dtype_id, "H5S_SEL_POINTS", &myenum); myenum = H5S_SEL_HYPERSLABS; H5Tenum_insert(dtype_id, "H5S_SEL_HYPERSLABS", &myenum); myenum = H5S_SEL_ALL; H5Tenum_insert(dtype_id, "H5S_SEL_ALL", &myenum); myenum = H5S_SEL_N; H5Tenum_insert(dtype_id, "H5S_SEL_N", &myenum); return(dtype_id); } /* typedef enum H5S_seloper_t { H5S_SELECT_NOOP = -1, H5S_SELECT_SET = 0, H5S_SELECT_OR, H5S_SELECT_AND, H5S_SELECT_XOR, H5S_SELECT_NOTB, H5S_SELECT_NOTA, H5S_SELECT_APPEND, H5S_SELECT_PREPEND, H5S_SELECT_INVALID } H5S_seloper_t; */ hid_t create_DT_H5S_seloper_t(void) { enum H5S_seloper_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5S_seloper_t), issigned(enum H5S_seloper_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5S_SELECT_NOOP; H5Tenum_insert(dtype_id, "H5S_SELECT_NOOP", &myenum); myenum = H5S_SELECT_SET; H5Tenum_insert(dtype_id, "H5S_SELECT_SET", &myenum); myenum = H5S_SELECT_OR; H5Tenum_insert(dtype_id, "H5S_SELECT_OR", &myenum); myenum = H5S_SELECT_AND; H5Tenum_insert(dtype_id, "H5S_SELECT_AND", &myenum); myenum = H5S_SELECT_XOR; H5Tenum_insert(dtype_id, "H5S_SELECT_XOR", &myenum); myenum = H5S_SELECT_NOTB; H5Tenum_insert(dtype_id, "H5S_SELECT_NOTB", &myenum); myenum = H5S_SELECT_NOTA; H5Tenum_insert(dtype_id, "H5S_SELECT_NOTA", &myenum); myenum = H5S_SELECT_APPEND; H5Tenum_insert(dtype_id, "H5S_SELECT_APPEND", &myenum); myenum = H5S_SELECT_PREPEND; H5Tenum_insert(dtype_id, "H5S_SELECT_PREPEND", &myenum); myenum = H5S_SELECT_INVALID; H5Tenum_insert(dtype_id, "H5S_SELECT_INVALID", &myenum); return(dtype_id); } /* typedef enum H5T_bkg_t { H5T_BKG_NO = 0, H5T_BKG_TEMP = 1, H5T_BKG_YES = 2 } H5T_bkg_t; */ hid_t create_DT_H5T_bkg_t(void) { enum H5T_bkg_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_bkg_t), issigned(enum H5T_bkg_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_BKG_NO; H5Tenum_insert(dtype_id, "H5T_BKG_NO", &myenum); myenum = H5T_BKG_TEMP; H5Tenum_insert(dtype_id, "H5T_BKG_TEMP", &myenum); myenum = H5T_BKG_YES; H5Tenum_insert(dtype_id, "H5T_BKG_YES", &myenum); return(dtype_id); } /* typedef enum H5T_class_t { H5T_NO_CLASS = -1, H5T_INTEGER = 0, H5T_FLOAT = 1, H5T_TIME = 2, H5T_STRING = 3, H5T_BITFIELD = 4, H5T_OPAQUE = 5, H5T_COMPOUND = 6, H5T_REFERENCE = 7, H5T_ENUM = 8, H5T_VLEN = 9, H5T_ARRAY = 10, H5T_NCLASSES } H5T_class_t; */ hid_t create_DT_H5T_class_t(void) { enum H5T_class_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_class_t), issigned(enum H5T_class_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_NO_CLASS; H5Tenum_insert(dtype_id, "H5T_NO_CLASS", &myenum); myenum = H5T_INTEGER; H5Tenum_insert(dtype_id, "H5T_INTEGER", &myenum); myenum = H5T_FLOAT; H5Tenum_insert(dtype_id, "H5T_FLOAT", &myenum); myenum = H5T_TIME; H5Tenum_insert(dtype_id, "H5T_TIME", &myenum); myenum = H5T_STRING; H5Tenum_insert(dtype_id, "H5T_STRING", &myenum); myenum = H5T_BITFIELD; H5Tenum_insert(dtype_id, "H5T_BITFIELD", &myenum); myenum = H5T_OPAQUE; H5Tenum_insert(dtype_id, "H5T_OPAQUE", &myenum); myenum = H5T_COMPOUND; H5Tenum_insert(dtype_id, "H5T_COMPOUND", &myenum); myenum = H5T_REFERENCE; H5Tenum_insert(dtype_id, "H5T_REFERENCE", &myenum); myenum = H5T_ENUM; H5Tenum_insert(dtype_id, "H5T_ENUM", &myenum); myenum = H5T_VLEN; H5Tenum_insert(dtype_id, "H5T_VLEN", &myenum); myenum = H5T_ARRAY; H5Tenum_insert(dtype_id, "H5T_ARRAY", &myenum); myenum = H5T_NCLASSES; H5Tenum_insert(dtype_id, "H5T_NCLASSES", &myenum); return(dtype_id); } /* typedef enum H5T_cmd_t { H5T_CONV_INIT = 0, H5T_CONV_CONV = 1, H5T_CONV_FREE = 2 } H5T_cmd_t; */ hid_t create_DT_H5T_cmd_t(void) { enum H5T_cmd_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_cmd_t), issigned(enum H5T_cmd_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_CONV_INIT; H5Tenum_insert(dtype_id, "H5T_CONV_INIT", &myenum); myenum = H5T_CONV_CONV; H5Tenum_insert(dtype_id, "H5T_CONV_CONV", &myenum); myenum = H5T_CONV_FREE; H5Tenum_insert(dtype_id, "H5T_CONV_FREE", &myenum); return(dtype_id); } /* typedef enum H5T_conv_except_t { H5T_CONV_EXCEPT_RANGE_HI = 0, H5T_CONV_EXCEPT_RANGE_LOW = 1, H5T_CONV_EXCEPT_PRECISION = 2, H5T_CONV_EXCEPT_TRUNCATE = 3, H5T_CONV_EXCEPT_PINF = 4, H5T_CONV_EXCEPT_NINF = 5, H5T_CONV_EXCEPT_NAN = 6 } H5T_conv_except_t; */ hid_t create_DT_H5T_conv_except_t(void) { enum H5T_conv_except_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_conv_except_t), issigned(enum H5T_conv_except_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_CONV_EXCEPT_RANGE_HI; H5Tenum_insert(dtype_id, "H5T_CONV_EXCEPT_RANGE_HI", &myenum); myenum = H5T_CONV_EXCEPT_RANGE_LOW; H5Tenum_insert(dtype_id, "H5T_CONV_EXCEPT_RANGE_LOW", &myenum); myenum = H5T_CONV_EXCEPT_PRECISION; H5Tenum_insert(dtype_id, "H5T_CONV_EXCEPT_PRECISION", &myenum); myenum = H5T_CONV_EXCEPT_TRUNCATE; H5Tenum_insert(dtype_id, "H5T_CONV_EXCEPT_TRUNCATE", &myenum); myenum = H5T_CONV_EXCEPT_PINF; H5Tenum_insert(dtype_id, "H5T_CONV_EXCEPT_PINF", &myenum); myenum = H5T_CONV_EXCEPT_NINF; H5Tenum_insert(dtype_id, "H5T_CONV_EXCEPT_NINF", &myenum); myenum = H5T_CONV_EXCEPT_NAN; H5Tenum_insert(dtype_id, "H5T_CONV_EXCEPT_NAN", &myenum); return(dtype_id); } /* typedef enum H5T_conv_ret_t { H5T_CONV_ABORT = -1, H5T_CONV_UNHANDLED = 0, H5T_CONV_HANDLED = 1 } H5T_conv_ret_t; */ hid_t create_DT_H5T_conv_ret_t(void) { enum H5T_conv_ret_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_conv_ret_t), issigned(enum H5T_conv_ret_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_CONV_ABORT; H5Tenum_insert(dtype_id, "H5T_CONV_ABORT", &myenum); myenum = H5T_CONV_UNHANDLED; H5Tenum_insert(dtype_id, "H5T_CONV_UNHANDLED", &myenum); myenum = H5T_CONV_HANDLED; H5Tenum_insert(dtype_id, "H5T_CONV_HANDLED", &myenum); return(dtype_id); } /* typedef enum H5T_cset_t { H5T_CSET_ERROR = -1, H5T_CSET_ASCII = 0, H5T_CSET_UTF8 = 1, H5T_CSET_RESERVED_2 = 2, H5T_CSET_RESERVED_3 = 3, H5T_CSET_RESERVED_4 = 4, H5T_CSET_RESERVED_5 = 5, H5T_CSET_RESERVED_6 = 6, H5T_CSET_RESERVED_7 = 7, H5T_CSET_RESERVED_8 = 8, H5T_CSET_RESERVED_9 = 9, H5T_CSET_RESERVED_10 = 10, H5T_CSET_RESERVED_11 = 11, H5T_CSET_RESERVED_12 = 12, H5T_CSET_RESERVED_13 = 13, H5T_CSET_RESERVED_14 = 14, H5T_CSET_RESERVED_15 = 15 } H5T_cset_t; */ hid_t create_DT_H5T_cset_t(void) { enum H5T_cset_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_cset_t), issigned(enum H5T_cset_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_CSET_ERROR; H5Tenum_insert(dtype_id, "H5T_CSET_ERROR", &myenum); myenum = H5T_CSET_ASCII; H5Tenum_insert(dtype_id, "H5T_CSET_ASCII", &myenum); myenum = H5T_CSET_UTF8; H5Tenum_insert(dtype_id, "H5T_CSET_UTF8", &myenum); myenum = H5T_CSET_RESERVED_2; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_2", &myenum); myenum = H5T_CSET_RESERVED_3; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_3", &myenum); myenum = H5T_CSET_RESERVED_4; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_4", &myenum); myenum = H5T_CSET_RESERVED_5; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_5", &myenum); myenum = H5T_CSET_RESERVED_6; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_6", &myenum); myenum = H5T_CSET_RESERVED_7; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_7", &myenum); myenum = H5T_CSET_RESERVED_8; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_8", &myenum); myenum = H5T_CSET_RESERVED_9; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_9", &myenum); myenum = H5T_CSET_RESERVED_10; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_10", &myenum); myenum = H5T_CSET_RESERVED_11; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_11", &myenum); myenum = H5T_CSET_RESERVED_12; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_12", &myenum); myenum = H5T_CSET_RESERVED_13; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_13", &myenum); myenum = H5T_CSET_RESERVED_14; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_14", &myenum); myenum = H5T_CSET_RESERVED_15; H5Tenum_insert(dtype_id, "H5T_CSET_RESERVED_15", &myenum); return(dtype_id); } /* typedef enum H5T_direction_t { H5T_DIR_DEFAULT = 0, H5T_DIR_ASCEND = 1, H5T_DIR_DESCEND = 2 } H5T_direction_t; */ hid_t create_DT_H5T_direction_t(void) { enum H5T_direction_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_direction_t), issigned(enum H5T_direction_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_DIR_DEFAULT; H5Tenum_insert(dtype_id, "H5T_DIR_DEFAULT", &myenum); myenum = H5T_DIR_ASCEND; H5Tenum_insert(dtype_id, "H5T_DIR_ASCEND", &myenum); myenum = H5T_DIR_DESCEND; H5Tenum_insert(dtype_id, "H5T_DIR_DESCEND", &myenum); return(dtype_id); } /* typedef enum H5T_norm_t { H5T_NORM_ERROR = -1, H5T_NORM_IMPLIED = 0, H5T_NORM_MSBSET = 1, H5T_NORM_NONE = 2 } H5T_norm_t; */ hid_t create_DT_H5T_norm_t(void) { enum H5T_norm_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_norm_t), issigned(enum H5T_norm_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_NORM_ERROR; H5Tenum_insert(dtype_id, "H5T_NORM_ERROR", &myenum); myenum = H5T_NORM_IMPLIED; H5Tenum_insert(dtype_id, "H5T_NORM_IMPLIED", &myenum); myenum = H5T_NORM_MSBSET; H5Tenum_insert(dtype_id, "H5T_NORM_MSBSET", &myenum); myenum = H5T_NORM_NONE; H5Tenum_insert(dtype_id, "H5T_NORM_NONE", &myenum); return(dtype_id); } /* typedef enum H5T_order_t { H5T_ORDER_ERROR = -1, H5T_ORDER_LE = 0, H5T_ORDER_BE = 1, H5T_ORDER_VAX = 2, H5T_ORDER_MIXED = 3, H5T_ORDER_NONE = 4 } H5T_order_t; */ hid_t create_DT_H5T_order_t(void) { enum H5T_order_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_order_t), issigned(enum H5T_order_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_ORDER_ERROR; H5Tenum_insert(dtype_id, "H5T_ORDER_ERROR", &myenum); myenum = H5T_ORDER_LE; H5Tenum_insert(dtype_id, "H5T_ORDER_LE", &myenum); myenum = H5T_ORDER_BE; H5Tenum_insert(dtype_id, "H5T_ORDER_BE", &myenum); myenum = H5T_ORDER_VAX; H5Tenum_insert(dtype_id, "H5T_ORDER_VAX", &myenum); myenum = H5T_ORDER_MIXED; H5Tenum_insert(dtype_id, "H5T_ORDER_MIXED", &myenum); myenum = H5T_ORDER_NONE; H5Tenum_insert(dtype_id, "H5T_ORDER_NONE", &myenum); return(dtype_id); } /* typedef enum H5T_pad_t { H5T_PAD_ERROR = -1, H5T_PAD_ZERO = 0, H5T_PAD_ONE = 1, H5T_PAD_BACKGROUND = 2, H5T_NPAD = 3 } H5T_pad_t; */ hid_t create_DT_H5T_pad_t(void) { enum H5T_pad_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_pad_t), issigned(enum H5T_pad_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_PAD_ERROR; H5Tenum_insert(dtype_id, "H5T_PAD_ERROR", &myenum); myenum = H5T_PAD_ZERO; H5Tenum_insert(dtype_id, "H5T_PAD_ZERO", &myenum); myenum = H5T_PAD_ONE; H5Tenum_insert(dtype_id, "H5T_PAD_ONE", &myenum); myenum = H5T_PAD_BACKGROUND; H5Tenum_insert(dtype_id, "H5T_PAD_BACKGROUND", &myenum); myenum = H5T_NPAD; H5Tenum_insert(dtype_id, "H5T_NPAD", &myenum); return(dtype_id); } /* typedef enum H5T_pers_t { H5T_PERS_DONTCARE = -1, H5T_PERS_HARD = 0, H5T_PERS_SOFT = 1 } H5T_pers_t; */ hid_t create_DT_H5T_pers_t(void) { enum H5T_pers_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_pers_t), issigned(enum H5T_pers_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_PERS_DONTCARE; H5Tenum_insert(dtype_id, "H5T_PERS_DONTCARE", &myenum); myenum = H5T_PERS_HARD; H5Tenum_insert(dtype_id, "H5T_PERS_HARD", &myenum); myenum = H5T_PERS_SOFT; H5Tenum_insert(dtype_id, "H5T_PERS_SOFT", &myenum); return(dtype_id); } /* typedef enum H5T_sign_t { H5T_SGN_ERROR = -1, H5T_SGN_NONE = 0, H5T_SGN_2 = 1, H5T_NSGN = 2 } H5T_sign_t; */ hid_t create_DT_H5T_sign_t(void) { enum H5T_sign_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_sign_t), issigned(enum H5T_sign_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_SGN_ERROR; H5Tenum_insert(dtype_id, "H5T_SGN_ERROR", &myenum); myenum = H5T_SGN_NONE; H5Tenum_insert(dtype_id, "H5T_SGN_NONE", &myenum); myenum = H5T_SGN_2; H5Tenum_insert(dtype_id, "H5T_SGN_2", &myenum); myenum = H5T_NSGN; H5Tenum_insert(dtype_id, "H5T_NSGN", &myenum); return(dtype_id); } /* typedef enum H5T_str_t { H5T_STR_ERROR = -1, H5T_STR_NULLTERM = 0, H5T_STR_NULLPAD = 1, H5T_STR_SPACEPAD = 2, H5T_STR_RESERVED_3 = 3, H5T_STR_RESERVED_4 = 4, H5T_STR_RESERVED_5 = 5, H5T_STR_RESERVED_6 = 6, H5T_STR_RESERVED_7 = 7, H5T_STR_RESERVED_8 = 8, H5T_STR_RESERVED_9 = 9, H5T_STR_RESERVED_10 = 10, H5T_STR_RESERVED_11 = 11, H5T_STR_RESERVED_12 = 12, H5T_STR_RESERVED_13 = 13, H5T_STR_RESERVED_14 = 14, H5T_STR_RESERVED_15 = 15 } H5T_str_t; */ hid_t create_DT_H5T_str_t(void) { enum H5T_str_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5T_str_t), issigned(enum H5T_str_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5T_STR_ERROR; H5Tenum_insert(dtype_id, "H5T_STR_ERROR", &myenum); myenum = H5T_STR_NULLTERM; H5Tenum_insert(dtype_id, "H5T_STR_NULLTERM", &myenum); myenum = H5T_STR_NULLPAD; H5Tenum_insert(dtype_id, "H5T_STR_NULLPAD", &myenum); myenum = H5T_STR_SPACEPAD; H5Tenum_insert(dtype_id, "H5T_STR_SPACEPAD", &myenum); myenum = H5T_STR_RESERVED_3; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_3", &myenum); myenum = H5T_STR_RESERVED_4; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_4", &myenum); myenum = H5T_STR_RESERVED_5; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_5", &myenum); myenum = H5T_STR_RESERVED_6; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_6", &myenum); myenum = H5T_STR_RESERVED_7; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_7", &myenum); myenum = H5T_STR_RESERVED_8; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_8", &myenum); myenum = H5T_STR_RESERVED_9; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_9", &myenum); myenum = H5T_STR_RESERVED_10; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_10", &myenum); myenum = H5T_STR_RESERVED_11; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_11", &myenum); myenum = H5T_STR_RESERVED_12; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_12", &myenum); myenum = H5T_STR_RESERVED_13; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_13", &myenum); myenum = H5T_STR_RESERVED_14; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_14", &myenum); myenum = H5T_STR_RESERVED_15; H5Tenum_insert(dtype_id, "H5T_STR_RESERVED_15", &myenum); return(dtype_id); } /* typedef enum H5VL_map_get_t { H5VL_MAP_GET_MAPL, H5VL_MAP_GET_MCPL, H5VL_MAP_GET_KEY_TYPE, H5VL_MAP_GET_VAL_TYPE, H5VL_MAP_GET_COUNT } H5VL_map_get_t; */ hid_t create_DT_H5VL_map_get_t(void) { enum H5VL_map_get_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5VL_map_get_t), issigned(enum H5VL_map_get_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5VL_MAP_GET_MAPL; H5Tenum_insert(dtype_id, "H5VL_MAP_GET_MAPL", &myenum); myenum = H5VL_MAP_GET_MCPL; H5Tenum_insert(dtype_id, "H5VL_MAP_GET_MCPL", &myenum); myenum = H5VL_MAP_GET_KEY_TYPE; H5Tenum_insert(dtype_id, "H5VL_MAP_GET_KEY_TYPE", &myenum); myenum = H5VL_MAP_GET_VAL_TYPE; H5Tenum_insert(dtype_id, "H5VL_MAP_GET_VAL_TYPE", &myenum); myenum = H5VL_MAP_GET_COUNT; H5Tenum_insert(dtype_id, "H5VL_MAP_GET_COUNT", &myenum); return(dtype_id); } /* typedef enum H5VL_map_specific_t { H5VL_MAP_ITER, H5VL_MAP_DELETE } H5VL_map_specific_t; */ hid_t create_DT_H5VL_map_specific_t(void) { enum H5VL_map_specific_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5VL_map_specific_t), issigned(enum H5VL_map_specific_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5VL_MAP_ITER; H5Tenum_insert(dtype_id, "H5VL_MAP_ITER", &myenum); myenum = H5VL_MAP_DELETE; H5Tenum_insert(dtype_id, "H5VL_MAP_DELETE", &myenum); return(dtype_id); } /* typedef enum H5Z_cb_return_t { H5Z_CB_ERROR = -1, H5Z_CB_FAIL = 0, H5Z_CB_CONT = 1, H5Z_CB_NO = 2} H5Z_cb_return_t; */ hid_t create_DT_H5Z_cb_return_t(void) { enum H5Z_cb_return_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5Z_cb_return_t), issigned(enum H5Z_cb_return_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5Z_CB_ERROR; H5Tenum_insert(dtype_id, "H5Z_CB_ERROR", &myenum); myenum = H5Z_CB_FAIL; H5Tenum_insert(dtype_id, "H5Z_CB_FAIL", &myenum); myenum = H5Z_CB_CONT; H5Tenum_insert(dtype_id, "H5Z_CB_CONT", &myenum); myenum = H5Z_CB_NO; H5Tenum_insert(dtype_id, "H5Z_CB_NO", &myenum); return(dtype_id); } /* typedef enum H5Z_EDC_t { H5Z_ERROR_EDC = -1, H5Z_DISABLE_EDC = 0, H5Z_ENABLE_EDC = 1, H5Z_NO_EDC = 2 } H5Z_EDC_t; */ hid_t create_DT_H5Z_EDC_t(void) { enum H5Z_EDC_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5Z_EDC_t), issigned(enum H5Z_EDC_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5Z_ERROR_EDC; H5Tenum_insert(dtype_id, "H5Z_ERROR_EDC", &myenum); myenum = H5Z_DISABLE_EDC; H5Tenum_insert(dtype_id, "H5Z_DISABLE_EDC", &myenum); myenum = H5Z_ENABLE_EDC; H5Tenum_insert(dtype_id, "H5Z_ENABLE_EDC", &myenum); myenum = H5Z_NO_EDC; H5Tenum_insert(dtype_id, "H5Z_NO_EDC", &myenum); return(dtype_id); } /* typedef enum H5Z_SO_scale_type_t { H5Z_SO_FLOAT_DSCALE = 0, H5Z_SO_FLOAT_ESCALE = 1, H5Z_SO_INT = 2} H5Z_SO_scale_type_t; */ hid_t create_DT_H5Z_SO_scale_type_t(void) { enum H5Z_SO_scale_type_t myenum; hid_t base_type = get_h5_equiv(sizeof(enum H5Z_SO_scale_type_t), issigned(enum H5Z_SO_scale_type_t)); hid_t dtype_id = H5Tenum_create(base_type); myenum = H5Z_SO_FLOAT_DSCALE; H5Tenum_insert(dtype_id, "H5Z_SO_FLOAT_DSCALE", &myenum); myenum = H5Z_SO_FLOAT_ESCALE; H5Tenum_insert(dtype_id, "H5Z_SO_FLOAT_ESCALE", &myenum); myenum = H5Z_SO_INT; H5Tenum_insert(dtype_id, "H5Z_SO_INT", &myenum); return(dtype_id); } /************************************************************************* * * Structs * *************************************************************************/ /* typedef struct H5_ih_info_t { hsize_t index_size; hsize_t heap_size} H5_ih_info_t; */ hid_t create_DT_H5_ih_info_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5_ih_info_t)); H5Tinsert(dtype_id, "index_size", HOFFSET(H5_ih_info_t, index_size), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "heap_size", HOFFSET(H5_ih_info_t, heap_size), h5_datatype[DT_hsize_t]); return(dtype_id); } /* typedef struct { hbool_t corder_valid; H5O_msg_crt_idx_t corder; H5T_cset_t cset; hsize_t data_size} H5A_info_t; */ hid_t create_DT_H5A_info_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5A_info_t)); H5Tinsert(dtype_id, "corder_valid", HOFFSET(H5A_info_t, corder_valid), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "corder", HOFFSET(H5A_info_t, corder), h5_datatype[DT_H5O_msg_crt_idx_t]); H5Tinsert(dtype_id, "cset", HOFFSET(H5A_info_t, cset), h5_datatype[DT_H5T_cset_t]); H5Tinsert(dtype_id, "data_size", HOFFSET(H5A_info_t, data_size), h5_datatype[DT_hsize_t]); return(dtype_id); } /* typedef struct H5AC_cache_config_t{ int version; hbool_t rpt_fcn_enabled; hbool_t open_trace_file; hbool_t close_trace_file; char trace_file_name[H5AC__MAX_TRACE_FILE_NAME_LEN + 1]; hbool_t evictions_enabled; hbool_t set_initial_size; size_t initial_size; double min_clean_fraction; size_t max_size; size_t min_size; long int epoch_length; enum H5C_cache_incr_mode incr_mode; double lower_hr_threshold; double increment; hbool_t apply_max_increment; size_t max_increment; enum H5C_cache_flash_incr_mode flash_incr_mode; double flash_multiple; double flash_threshold; enum H5C_cache_decr_mode decr_mode; double upper_hr_threshold; double decrement; hbool_t apply_max_decrement; size_t max_decrement; int epochs_before_eviction; hbool_t apply_empty_reserve; double empty_reserve; size_t dirty_bytes_threshold; int metadata_write_strategy} H5AC_cache_config_t; */ hid_t create_DT_H5AC_cache_config_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5AC_cache_config_t)); H5Tinsert(dtype_id, "version", HOFFSET(H5AC_cache_config_t, version), h5_datatype[DT_int]); H5Tinsert(dtype_id, "rpt_fcn_enabled", HOFFSET(H5AC_cache_config_t, rpt_fcn_enabled), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "open_trace_file", HOFFSET(H5AC_cache_config_t, open_trace_file), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "close_trace_file", HOFFSET(H5AC_cache_config_t, close_trace_file), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "trace_file_name", HOFFSET(H5AC_cache_config_t, trace_file_name), h5_datatype[DT_char]); H5Tinsert(dtype_id, "evictions_enabled", HOFFSET(H5AC_cache_config_t, evictions_enabled), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "set_initial_size", HOFFSET(H5AC_cache_config_t, set_initial_size), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "initial_size", HOFFSET(H5AC_cache_config_t, initial_size), h5_datatype[DT_size_t]); H5Tinsert(dtype_id, "min_clean_fraction", HOFFSET(H5AC_cache_config_t, min_clean_fraction), h5_datatype[DT_double]); H5Tinsert(dtype_id, "max_size", HOFFSET(H5AC_cache_config_t, max_size), h5_datatype[DT_size_t]); H5Tinsert(dtype_id, "min_size", HOFFSET(H5AC_cache_config_t, min_size), h5_datatype[DT_size_t]); H5Tinsert(dtype_id, "epoch_length", HOFFSET(H5AC_cache_config_t, epoch_length), h5_datatype[DT_long_int]); H5Tinsert(dtype_id, "incr_mode", HOFFSET(H5AC_cache_config_t, incr_mode), h5_datatype[DT_H5C_cache_incr_mode]); H5Tinsert(dtype_id, "lower_hr_threshold", HOFFSET(H5AC_cache_config_t, lower_hr_threshold), h5_datatype[DT_double]); H5Tinsert(dtype_id, "increment", HOFFSET(H5AC_cache_config_t, increment), h5_datatype[DT_double]); H5Tinsert(dtype_id, "apply_max_increment", HOFFSET(H5AC_cache_config_t, apply_max_increment), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "max_increment", HOFFSET(H5AC_cache_config_t, max_increment), h5_datatype[DT_size_t]); H5Tinsert(dtype_id, "flash_incr_mode", HOFFSET(H5AC_cache_config_t, flash_incr_mode), h5_datatype[DT_H5C_cache_flash_incr_mode]); H5Tinsert(dtype_id, "flash_multiple", HOFFSET(H5AC_cache_config_t, flash_multiple), h5_datatype[DT_double]); H5Tinsert(dtype_id, "flash_threshold", HOFFSET(H5AC_cache_config_t, flash_threshold), h5_datatype[DT_double]); H5Tinsert(dtype_id, "decr_mode", HOFFSET(H5AC_cache_config_t, decr_mode), h5_datatype[DT_H5C_cache_decr_mode]); H5Tinsert(dtype_id, "upper_hr_threshold", HOFFSET(H5AC_cache_config_t, upper_hr_threshold), h5_datatype[DT_double]); H5Tinsert(dtype_id, "decrement", HOFFSET(H5AC_cache_config_t, decrement), h5_datatype[DT_double]); H5Tinsert(dtype_id, "apply_max_decrement", HOFFSET(H5AC_cache_config_t, apply_max_decrement), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "max_decrement", HOFFSET(H5AC_cache_config_t, max_decrement), h5_datatype[DT_size_t]); H5Tinsert(dtype_id, "epochs_before_eviction", HOFFSET(H5AC_cache_config_t, epochs_before_eviction), h5_datatype[DT_int]); H5Tinsert(dtype_id, "apply_empty_reserve", HOFFSET(H5AC_cache_config_t, apply_empty_reserve), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "empty_reserve", HOFFSET(H5AC_cache_config_t, empty_reserve), h5_datatype[DT_double]); H5Tinsert(dtype_id, "dirty_bytes_threshold", HOFFSET(H5AC_cache_config_t, dirty_bytes_threshold), h5_datatype[DT_size_t]); H5Tinsert(dtype_id, "metadata_write_strategy", HOFFSET(H5AC_cache_config_t, metadata_write_strategy), h5_datatype[DT_int]); return(dtype_id); } /* typedef struct H5AC_cache_image_config_t { int version; hbool_t generate_image; hbool_t save_resize_status; int entry_ageout} H5AC_cache_image_config_t; */ hid_t create_DT_H5AC_cache_image_config_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5AC_cache_image_config_t)); H5Tinsert(dtype_id, "version", HOFFSET(H5AC_cache_image_config_t, version), h5_datatype[DT_int]); H5Tinsert(dtype_id, "generate_image", HOFFSET(H5AC_cache_image_config_t, generate_image), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "save_resize_status", HOFFSET(H5AC_cache_image_config_t, save_resize_status), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "entry_ageout", HOFFSET(H5AC_cache_image_config_t, entry_ageout), h5_datatype[DT_int]); return(dtype_id); } /* typedef struct H5D_info_t { int rank; char* dims; char* maxdims; H5T_class_t type_class; H5S_class_t space_class} H5D_info_t; */ hid_t create_DT_H5D_info_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5D_info_t)); H5Tinsert(dtype_id, "rank", HOFFSET(H5D_info_t, rank), h5_datatype[DT_int]); H5Tinsert(dtype_id, "dims", HOFFSET(H5D_info_t, dims), h5_datatype[DT_char]); H5Tinsert(dtype_id, "maxdims", HOFFSET(H5D_info_t, maxdims), h5_datatype[DT_char]); H5Tinsert(dtype_id, "type_class", HOFFSET(H5D_info_t, type_class), h5_datatype[DT_H5T_class_t]); H5Tinsert(dtype_id, "space_class", HOFFSET(H5D_info_t, space_class), h5_datatype[DT_H5S_class_t]); return(dtype_id); } /* typedef struct H5E_error1_t { H5E_major_t maj_num; H5E_minor_t min_num; const char *func_name; const char *file_name; unsigned line; const char *desc} H5E_error1_t; */ hid_t create_DT_H5E_error1_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5E_error1_t)); H5Tinsert(dtype_id, "maj_num", HOFFSET(H5E_error1_t, maj_num), h5_datatype[DT_H5E_major_t]); H5Tinsert(dtype_id, "min_num", HOFFSET(H5E_error1_t, min_num), h5_datatype[DT_H5E_minor_t]); H5Tinsert(dtype_id, "func_name", HOFFSET(H5E_error1_t, func_name), h5_datatype[DT_char]); H5Tinsert(dtype_id, "file_name", HOFFSET(H5E_error1_t, file_name), h5_datatype[DT_char]); H5Tinsert(dtype_id, "line", HOFFSET(H5E_error1_t, line), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "desc", HOFFSET(H5E_error1_t, desc), h5_datatype[DT_char]); return(dtype_id); } /* typedef struct H5E_error2_t { hid_t cls_id; hid_t maj_num; hid_t min_num; unsigned line; const char *func_name; const char *file_name; const char *desc} H5E_error2_t; */ hid_t create_DT_H5E_error2_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5E_error2_t)); H5Tinsert(dtype_id, "cls_id", HOFFSET(H5E_error2_t, cls_id), h5_datatype[DT_hid_t]); H5Tinsert(dtype_id, "maj_num", HOFFSET(H5E_error2_t, maj_num), h5_datatype[DT_hid_t]); H5Tinsert(dtype_id, "min_num", HOFFSET(H5E_error2_t, min_num), h5_datatype[DT_hid_t]); H5Tinsert(dtype_id, "line", HOFFSET(H5E_error2_t, line), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "func_name", HOFFSET(H5E_error2_t, func_name), h5_datatype[DT_char]); H5Tinsert(dtype_id, "file_name", HOFFSET(H5E_error2_t, file_name), h5_datatype[DT_char]); H5Tinsert(dtype_id, "desc", HOFFSET(H5E_error2_t, desc), h5_datatype[DT_char]); return(dtype_id); } /* typedef struct H5F_info1_helper_t { hsize_t hdr_size; H5_ih_info_t msgs_info} H5F_info1_helper_t; */ hid_t create_DT_H5F_info1_helper_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5F_info1_helper_t)); H5Tinsert(dtype_id, "hdr_size", HOFFSET(H5F_info1_helper_t, hdr_size), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "msgs_info", HOFFSET(H5F_info1_helper_t, msgs_info), h5_datatype[DT_H5_ih_info_t]); return(dtype_id); } /* typedef struct H5F_info1_t { hsize_t super_ext_size; H5F_info1_helper_t sohm} H5F_info1_t; */ hid_t create_DT_H5F_info1_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5F_info1_t)); H5Tinsert(dtype_id, "super_ext_size", HOFFSET(H5F_info1_t, super_ext_size), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "sohm", HOFFSET(H5F_info1_t, sohm), h5_datatype[DT_H5F_info1_helper_t]); return(dtype_id); } /* typedef struct H5F_info2_free_t { unsigned version; hsize_t meta_size; hsize_t tot_space} H5F_info2_free_t; */ hid_t create_DT_H5F_info2_free_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5F_info2_free_t)); H5Tinsert(dtype_id, "version", HOFFSET(H5F_info2_free_t, version), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "meta_size", HOFFSET(H5F_info2_free_t, meta_size), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "tot_space", HOFFSET(H5F_info2_free_t, tot_space), h5_datatype[DT_hsize_t]); return(dtype_id); } /* typedef struct H5F_info2_sohm_t { unsigned version; hsize_t hdr_size; H5_ih_info_t msgs_info} H5F_info2_sohm_t; */ hid_t create_DT_H5F_info2_sohm_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5F_info2_sohm_t)); H5Tinsert(dtype_id, "version", HOFFSET(H5F_info2_sohm_t, version), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "hdr_size", HOFFSET(H5F_info2_sohm_t, hdr_size), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "msgs_info", HOFFSET(H5F_info2_sohm_t, msgs_info), h5_datatype[DT_H5_ih_info_t]); return(dtype_id); } /* typedef struct H5F_info2_super_t { unsigned version; hsize_t super_size; hsize_t super_ext_size} H5F_info2_super_t; */ hid_t create_DT_H5F_info2_super_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5F_info2_super_t)); H5Tinsert(dtype_id, "version", HOFFSET(H5F_info2_super_t, version), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "super_size", HOFFSET(H5F_info2_super_t, super_size), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "super_ext_size", HOFFSET(H5F_info2_super_t, super_ext_size), h5_datatype[DT_hsize_t]); return(dtype_id); } /* typedef struct H5F_info2_t { H5F_info2_super_t super; H5F_info2_free_t free; H5F_info2_sohm_t sohm} H5F_info2_t; */ hid_t create_DT_H5F_info2_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5F_info2_t)); H5Tinsert(dtype_id, "super", HOFFSET(H5F_info2_t, super), h5_datatype[DT_H5F_info2_super_t]); H5Tinsert(dtype_id, "free", HOFFSET(H5F_info2_t, free), h5_datatype[DT_H5F_info2_free_t]); H5Tinsert(dtype_id, "sohm", HOFFSET(H5F_info2_t, sohm), h5_datatype[DT_H5F_info2_sohm_t]); return(dtype_id); } /* typedef struct H5F_retry_info_t { unsigned nbins; uint32_t *retries[H5F_NUM_METADATA_READ_RETRY_TYPES]} H5F_retry_info_t; */ hid_t create_DT_H5F_retry_info_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5F_retry_info_t)); H5Tinsert(dtype_id, "nbins", HOFFSET(H5F_retry_info_t, nbins), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "retries", HOFFSET(H5F_retry_info_t, retries), h5_datatype[DT_uint32_t]); return(dtype_id); } /* typedef struct H5F_sect_info_t { haddr_t addr; hsize_t size} H5F_sect_info_t; */ hid_t create_DT_H5F_sect_info_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5F_sect_info_t)); H5Tinsert(dtype_id, "addr", HOFFSET(H5F_sect_info_t, addr), h5_datatype[DT_haddr_t]); H5Tinsert(dtype_id, "size", HOFFSET(H5F_sect_info_t, size), h5_datatype[DT_hsize_t]); return(dtype_id); } /* typedef struct H5G_info_t { H5G_storage_type_t storage_type; hsize_t nlinks; int64_t max_corder; hbool_t mounted} H5G_info_t; */ hid_t create_DT_H5G_info_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5G_info_t)); H5Tinsert(dtype_id, "storage_type", HOFFSET(H5G_info_t, storage_type), h5_datatype[DT_H5G_storage_type_t]); H5Tinsert(dtype_id, "nlinks", HOFFSET(H5G_info_t, nlinks), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "max_corder", HOFFSET(H5G_info_t, max_corder), h5_datatype[DT_int64_t]); H5Tinsert(dtype_id, "mounted", HOFFSET(H5G_info_t, mounted), h5_datatype[DT_hbool_t]); return(dtype_id); } /* typedef union H5L_info1_helper_t { haddr_t address; size_t val_size} H5L_info1_helper_t; */ hid_t create_DT_H5L_info1_helper_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5L_info1_helper_t)); H5Tinsert(dtype_id, "address", HOFFSET(H5L_info1_helper_t, address), h5_datatype[DT_haddr_t]); return(dtype_id); } /* typedef struct H5L_info1_t { H5L_type_t type; hbool_t corder_valid; int64_t corder; H5T_cset_t cset; H5L_info1_helper_t u} H5L_info1_t; */ hid_t create_DT_H5L_info1_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5L_info1_t)); H5Tinsert(dtype_id, "type", HOFFSET(H5L_info1_t, type), h5_datatype[DT_H5L_type_t]); H5Tinsert(dtype_id, "corder_valid", HOFFSET(H5L_info1_t, corder_valid), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "corder", HOFFSET(H5L_info1_t, corder), h5_datatype[DT_int64_t]); H5Tinsert(dtype_id, "cset", HOFFSET(H5L_info1_t, cset), h5_datatype[DT_H5T_cset_t]); H5Tinsert(dtype_id, "u", HOFFSET(H5L_info1_t, u), h5_datatype[DT_H5L_info1_helper_t]); return(dtype_id); } /* typedef union H5L_info2_helper_t { H5O_token_t token; size_t val_size} H5L_info2_helper_t; */ hid_t create_DT_H5L_info2_helper_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5L_info2_helper_t)); H5Tinsert(dtype_id, "token", HOFFSET(H5L_info2_helper_t, token), h5_datatype[DT_H5O_token_t]); return(dtype_id); } /* typedef struct H5L_info2_t { H5L_type_t type; hbool_t corder_valid; int64_t corder; H5T_cset_t cset; H5L_info2_helper_t u} H5L_info2_t; */ hid_t create_DT_H5L_info2_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5L_info2_t)); H5Tinsert(dtype_id, "type", HOFFSET(H5L_info2_t, type), h5_datatype[DT_H5L_type_t]); H5Tinsert(dtype_id, "corder_valid", HOFFSET(H5L_info2_t, corder_valid), h5_datatype[DT_hbool_t]); H5Tinsert(dtype_id, "corder", HOFFSET(H5L_info2_t, corder), h5_datatype[DT_int64_t]); H5Tinsert(dtype_id, "cset", HOFFSET(H5L_info2_t, cset), h5_datatype[DT_H5T_cset_t]); H5Tinsert(dtype_id, "u", HOFFSET(H5L_info2_t, u), h5_datatype[DT_H5L_info2_helper_t]); return(dtype_id); } /* typedef struct H5ls_info_t { char* name; int link_success; H5L_info1_t link; int obj_type_success; H5I_type_t obj_type; int num_attrs; int group_success; H5G_info_t group; int dataset_success; H5D_info_t dataset; int type_success; H5T_class_t committed_type} H5ls_info_t; */ hid_t create_DT_H5ls_info_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5ls_info_t)); H5Tinsert(dtype_id, "name", HOFFSET(H5ls_info_t, name), h5_datatype[DT_char]); H5Tinsert(dtype_id, "link_success", HOFFSET(H5ls_info_t, link_success), h5_datatype[DT_int]); H5Tinsert(dtype_id, "link", HOFFSET(H5ls_info_t, link), h5_datatype[DT_H5L_info1_t]); H5Tinsert(dtype_id, "obj_type_success", HOFFSET(H5ls_info_t, obj_type_success), h5_datatype[DT_int]); H5Tinsert(dtype_id, "obj_type", HOFFSET(H5ls_info_t, obj_type), h5_datatype[DT_H5I_type_t]); H5Tinsert(dtype_id, "num_attrs", HOFFSET(H5ls_info_t, num_attrs), h5_datatype[DT_int]); H5Tinsert(dtype_id, "group_success", HOFFSET(H5ls_info_t, group_success), h5_datatype[DT_int]); H5Tinsert(dtype_id, "group", HOFFSET(H5ls_info_t, group), h5_datatype[DT_H5G_info_t]); H5Tinsert(dtype_id, "dataset_success", HOFFSET(H5ls_info_t, dataset_success), h5_datatype[DT_int]); H5Tinsert(dtype_id, "dataset", HOFFSET(H5ls_info_t, dataset), h5_datatype[DT_H5D_info_t]); H5Tinsert(dtype_id, "type_success", HOFFSET(H5ls_info_t, type_success), h5_datatype[DT_int]); H5Tinsert(dtype_id, "committed_type", HOFFSET(H5ls_info_t, committed_type), h5_datatype[DT_H5T_class_t]); return(dtype_id); } /* typedef struct H5O_hdr_info_helper_msg_t { uint64_t present; uint64_t shared} H5O_hdr_info_helper_msg_t; */ hid_t create_DT_H5O_hdr_info_helper_msg_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5O_hdr_info_helper_msg_t)); H5Tinsert(dtype_id, "present", HOFFSET(H5O_hdr_info_helper_msg_t, present), h5_datatype[DT_uint64_t]); H5Tinsert(dtype_id, "shared", HOFFSET(H5O_hdr_info_helper_msg_t, shared), h5_datatype[DT_uint64_t]); return(dtype_id); } /* typedef struct H5O_hdr_info_helper_space_t { hsize_t total; hsize_t meta; hsize_t mesg; hsize_t free} H5O_hdr_info_helper_space_t; */ hid_t create_DT_H5O_hdr_info_helper_space_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5O_hdr_info_helper_space_t)); H5Tinsert(dtype_id, "total", HOFFSET(H5O_hdr_info_helper_space_t, total), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "meta", HOFFSET(H5O_hdr_info_helper_space_t, meta), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "mesg", HOFFSET(H5O_hdr_info_helper_space_t, mesg), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "free", HOFFSET(H5O_hdr_info_helper_space_t, free), h5_datatype[DT_hsize_t]); return(dtype_id); } /* typedef struct H5O_hdr_info_t { unsigned version; unsigned nmesgs; unsigned nchunks; unsigned flags; H5O_hdr_info_helper_space_t space; H5O_hdr_info_helper_msg_t mesg} H5O_hdr_info_t; */ hid_t create_DT_H5O_hdr_info_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5O_hdr_info_t)); H5Tinsert(dtype_id, "version", HOFFSET(H5O_hdr_info_t, version), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "nmesgs", HOFFSET(H5O_hdr_info_t, nmesgs), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "nchunks", HOFFSET(H5O_hdr_info_t, nchunks), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "flags", HOFFSET(H5O_hdr_info_t, flags), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "space", HOFFSET(H5O_hdr_info_t, space), h5_datatype[DT_H5O_hdr_info_helper_space_t]); H5Tinsert(dtype_id, "mesg", HOFFSET(H5O_hdr_info_t, mesg), h5_datatype[DT_H5O_hdr_info_helper_msg_t]); return(dtype_id); } /* typedef struct H5O_info_helper_t { H5_ih_info_t obj; H5_ih_info_t attr} H5O_info_helper_t; */ hid_t create_DT_H5O_info_helper_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5O_info_helper_t)); H5Tinsert(dtype_id, "obj", HOFFSET(H5O_info_helper_t, obj), h5_datatype[DT_H5_ih_info_t]); H5Tinsert(dtype_id, "attr", HOFFSET(H5O_info_helper_t, attr), h5_datatype[DT_H5_ih_info_t]); return(dtype_id); } /* typedef struct H5O_info1_t { unsigned long fileno; haddr_t addr; H5O_type_t type; unsigned rc; time_t atime; time_t mtime; time_t ctime; time_t btime; hsize_t num_attrs; H5O_hdr_info_t hdr; H5O_info_helper_t meta_size} H5O_info1_t; */ hid_t create_DT_H5O_info1_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5O_info1_t)); H5Tinsert(dtype_id, "fileno", HOFFSET(H5O_info1_t, fileno), h5_datatype[DT_unsigned_long]); H5Tinsert(dtype_id, "addr", HOFFSET(H5O_info1_t, addr), h5_datatype[DT_haddr_t]); H5Tinsert(dtype_id, "type", HOFFSET(H5O_info1_t, type), h5_datatype[DT_H5O_type_t]); H5Tinsert(dtype_id, "rc", HOFFSET(H5O_info1_t, rc), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "atime", HOFFSET(H5O_info1_t, atime), h5_datatype[DT_time_t]); H5Tinsert(dtype_id, "mtime", HOFFSET(H5O_info1_t, mtime), h5_datatype[DT_time_t]); H5Tinsert(dtype_id, "ctime", HOFFSET(H5O_info1_t, ctime), h5_datatype[DT_time_t]); H5Tinsert(dtype_id, "btime", HOFFSET(H5O_info1_t, btime), h5_datatype[DT_time_t]); H5Tinsert(dtype_id, "num_attrs", HOFFSET(H5O_info1_t, num_attrs), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "hdr", HOFFSET(H5O_info1_t, hdr), h5_datatype[DT_H5O_hdr_info_t]); H5Tinsert(dtype_id, "meta_size", HOFFSET(H5O_info1_t, meta_size), h5_datatype[DT_H5O_info_helper_t]); return(dtype_id); } /* typedef struct H5O_info2_t { unsigned long fileno; H5O_token_t token; H5O_type_t type; unsigned rc; time_t atime; time_t mtime; time_t ctime; time_t btime; hsize_t num_attrs} H5O_info2_t; */ hid_t create_DT_H5O_info2_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5O_info2_t)); H5Tinsert(dtype_id, "fileno", HOFFSET(H5O_info2_t, fileno), h5_datatype[DT_unsigned_long]); H5Tinsert(dtype_id, "token", HOFFSET(H5O_info2_t, token), h5_datatype[DT_H5O_token_t]); H5Tinsert(dtype_id, "type", HOFFSET(H5O_info2_t, type), h5_datatype[DT_H5O_type_t]); H5Tinsert(dtype_id, "rc", HOFFSET(H5O_info2_t, rc), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "atime", HOFFSET(H5O_info2_t, atime), h5_datatype[DT_time_t]); H5Tinsert(dtype_id, "mtime", HOFFSET(H5O_info2_t, mtime), h5_datatype[DT_time_t]); H5Tinsert(dtype_id, "ctime", HOFFSET(H5O_info2_t, ctime), h5_datatype[DT_time_t]); H5Tinsert(dtype_id, "btime", HOFFSET(H5O_info2_t, btime), h5_datatype[DT_time_t]); H5Tinsert(dtype_id, "num_attrs", HOFFSET(H5O_info2_t, num_attrs), h5_datatype[DT_hsize_t]); return(dtype_id); } /* typedef struct H5O_native_info_t { H5O_hdr_info_t hdr; H5O_info_helper_t meta_size} H5O_native_info_t; */ hid_t create_DT_H5O_native_info_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5O_native_info_t)); H5Tinsert(dtype_id, "hdr", HOFFSET(H5O_native_info_t, hdr), h5_datatype[DT_H5O_hdr_info_t]); H5Tinsert(dtype_id, "meta_size", HOFFSET(H5O_native_info_t, meta_size), h5_datatype[DT_H5O_info_helper_t]); return(dtype_id); } /* typedef struct H5O_stat_t { hsize_t size; hsize_t free; unsigned nmesgs; unsigned nchunks} H5O_stat_t; */ hid_t create_DT_H5O_stat_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5O_stat_t)); H5Tinsert(dtype_id, "size", HOFFSET(H5O_stat_t, size), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "free", HOFFSET(H5O_stat_t, free), h5_datatype[DT_hsize_t]); H5Tinsert(dtype_id, "nmesgs", HOFFSET(H5O_stat_t, nmesgs), h5_datatype[DT_unsigned]); H5Tinsert(dtype_id, "nchunks", HOFFSET(H5O_stat_t, nchunks), h5_datatype[DT_unsigned]); return(dtype_id); } /* typedef struct H5O_token_t { uint8_t __data[H5O_MAX_TOKEN_SIZE]} H5O_token_t; */ hid_t create_DT_H5O_token_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5O_token_t)); H5Tinsert(dtype_id, "__data", HOFFSET(H5O_token_t, __data), h5_datatype[DT_uint8_t]); return(dtype_id); } /* typedef struct H5R_ref_helper_t { uint64_t part0; uint64_t part1; uint64_t part2; uint64_t part3; uint64_t part4; uint64_t part5; uint64_t part6; uint64_t part7} H5R_ref_helper_t; */ hid_t create_DT_H5R_ref_helper_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5R_ref_helper_t)); H5Tinsert(dtype_id, "part0", HOFFSET(H5R_ref_helper_t, part0), h5_datatype[DT_uint64_t]); H5Tinsert(dtype_id, "part1", HOFFSET(H5R_ref_helper_t, part1), h5_datatype[DT_uint64_t]); H5Tinsert(dtype_id, "part2", HOFFSET(H5R_ref_helper_t, part2), h5_datatype[DT_uint64_t]); H5Tinsert(dtype_id, "part3", HOFFSET(H5R_ref_helper_t, part3), h5_datatype[DT_uint64_t]); H5Tinsert(dtype_id, "part4", HOFFSET(H5R_ref_helper_t, part4), h5_datatype[DT_uint64_t]); H5Tinsert(dtype_id, "part5", HOFFSET(H5R_ref_helper_t, part5), h5_datatype[DT_uint64_t]); H5Tinsert(dtype_id, "part6", HOFFSET(H5R_ref_helper_t, part6), h5_datatype[DT_uint64_t]); H5Tinsert(dtype_id, "part7", HOFFSET(H5R_ref_helper_t, part7), h5_datatype[DT_uint64_t]); return(dtype_id); } /* typedef struct H5R_ref_t { H5R_ref_helper_t u} H5R_ref_t; */ hid_t create_DT_H5R_ref_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(H5R_ref_t)); H5Tinsert(dtype_id, "u", HOFFSET(H5R_ref_t, u), h5_datatype[DT_H5R_ref_helper_t]); return(dtype_id); } /* typedef struct { uint8_t __data[H5R_DSET_REG_REF_BUF_SIZE]} hdset_reg_ref_t; */ hid_t create_DT_hdset_reg_ref_t(void) { hid_t dtype_id = H5Tcreate(H5T_COMPOUND, sizeof(hdset_reg_ref_t)); H5Tinsert(dtype_id, "__data", HOFFSET(hdset_reg_ref_t, __data), h5_datatype[DT_uint8_t]); return(dtype_id); }
jeroen/hdf5r
src/1_8_12/Wrapper_auto_H5E.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5E.h" /* H5_DLL herr_t H5Eauto_is_v2(hid_t err_stack, unsigned *is_stack); */ SEXP R_H5Eauto_is_v2(SEXP R_err_stack, SEXP R_is_stack){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_is_stack = PROTECT(duplicate(R_is_stack)); vars_protected++; hid_t err_stack = SEXP_to_longlong(R_err_stack, 0); unsigned* is_stack; if(XLENGTH(R_is_stack) == 0) { is_stack = NULL; } else { R_helper = PROTECT(RToH5(R_is_stack, h5_datatype[DT_unsigned], XLENGTH(R_is_stack))); is_stack= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Eauto_is_v2(err_stack, is_stack); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_is_stack, h5_datatype[DT_unsigned]); R_is_stack = PROTECT(H5ToR_single_step(is_stack, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_is_stack); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("is_stack")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Eclear2(hid_t err_stack); */ SEXP R_H5Eclear2(SEXP R_err_stack){ int vars_protected=0; hid_t err_stack = SEXP_to_longlong(R_err_stack, 0); herr_t return_val = H5Eclear2(err_stack); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Eclose_msg(hid_t err_id); */ SEXP R_H5Eclose_msg(SEXP R_err_id){ int vars_protected=0; hid_t err_id = SEXP_to_longlong(R_err_id, 0); herr_t return_val = H5Eclose_msg(err_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Eclose_stack(hid_t stack_id); */ SEXP R_H5Eclose_stack(SEXP R_stack_id){ int vars_protected=0; hid_t stack_id = SEXP_to_longlong(R_stack_id, 0); herr_t return_val = H5Eclose_stack(stack_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Ecreate_msg(hid_t cls, H5E_type_t msg_type, const char *msg); */ SEXP R_H5Ecreate_msg(SEXP R_cls, SEXP R_msg_type, SEXP R_msg){ int vars_protected=0; hid_t cls = SEXP_to_longlong(R_cls, 0); H5E_type_t msg_type = SEXP_to_longlong(R_msg_type, 0); const char* msg = CHAR(STRING_ELT(R_msg, 0)); hid_t return_val = H5Ecreate_msg(cls, msg_type, msg); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Ecreate_stack(void); */ SEXP R_H5Ecreate_stack(void){ int vars_protected=0; hid_t return_val = H5Ecreate_stack(); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Eget_class_name(hid_t class_id, char *name, size_t size); */ SEXP R_H5Eget_class_name(SEXP R_class_id, SEXP R_name, SEXP R_size){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t class_id = SEXP_to_longlong(R_class_id, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Eget_class_name(class_id, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Eget_current_stack(void); */ SEXP R_H5Eget_current_stack(void){ int vars_protected=0; hid_t return_val = H5Eget_current_stack(); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL char *H5Eget_major(H5E_major_t maj); */ SEXP R_H5Eget_major(SEXP R_maj){ int vars_protected=0; H5E_major_t maj = SEXP_to_longlong(R_maj, 0); char* return_val = H5Eget_major(maj); SEXP R_return_val= R_NilValue; if(return_val==NULL) { R_return_val = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_return_val = PROTECT(mkString(return_val)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; free(return_val); UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL char *H5Eget_minor(H5E_minor_t min); */ SEXP R_H5Eget_minor(SEXP R_min){ int vars_protected=0; H5E_minor_t min = SEXP_to_longlong(R_min, 0); char* return_val = H5Eget_minor(min); SEXP R_return_val= R_NilValue; if(return_val==NULL) { R_return_val = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_return_val = PROTECT(mkString(return_val)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; free(return_val); UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Eget_msg(hid_t msg_id, H5E_type_t *type, char *msg, size_t size); */ SEXP R_H5Eget_msg(SEXP R_msg_id, SEXP R_type, SEXP R_msg, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_type = PROTECT(duplicate(R_type)); vars_protected++; R_msg = PROTECT(duplicate(R_msg)); vars_protected++; hid_t msg_id = SEXP_to_longlong(R_msg_id, 0); H5E_type_t* type; if(XLENGTH(R_type) == 0) { type = NULL; } else { R_helper = PROTECT(RToH5(R_type, h5_datatype[DT_H5E_type_t], XLENGTH(R_type))); type= (H5E_type_t*) VOIDPTR(R_helper); vars_protected++; } char* msg; if(XLENGTH(R_msg) == 0) { msg = NULL; } else { msg = R_alloc(strlen(CHAR(STRING_ELT(R_msg, 0))) + 1, 1); strcpy(msg, CHAR(STRING_ELT(R_msg, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Eget_msg(msg_id, type, msg, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_type, h5_datatype[DT_H5E_type_t]); R_type = PROTECT(H5ToR_single_step(type, h5_datatype[DT_H5E_type_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; if(msg==NULL) { R_msg = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_msg = PROTECT(mkString(msg)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_type); SET_VECTOR_ELT(__ret_list, 2, R_msg); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("type")); SET_STRING_ELT(__ret_list_names, 2, mkChar("msg")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Eget_num(hid_t error_stack_id); */ SEXP R_H5Eget_num(SEXP R_error_stack_id){ int vars_protected=0; hid_t error_stack_id = SEXP_to_longlong(R_error_stack_id, 0); ssize_t return_val = H5Eget_num(error_stack_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Epop(hid_t err_stack, size_t count); */ SEXP R_H5Epop(SEXP R_err_stack, SEXP R_count){ int vars_protected=0; hid_t err_stack = SEXP_to_longlong(R_err_stack, 0); size_t count = SEXP_to_longlong(R_count, 0); herr_t return_val = H5Epop(err_stack, count); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Epush2(hid_t err_stack, const char *file, const char *func, unsigned line, hid_t cls_id, hid_t maj_id, hid_t min_id, const char *msg, ...); */ SEXP R_H5Epush2(SEXP R_err_stack, SEXP R_file, SEXP R_func, SEXP R_line, SEXP R_cls_id, SEXP R_maj_id, SEXP R_min_id, SEXP R_msg){ int vars_protected=0; hid_t err_stack = SEXP_to_longlong(R_err_stack, 0); const char* file = CHAR(STRING_ELT(R_file, 0)); const char* func = CHAR(STRING_ELT(R_func, 0)); unsigned line = SEXP_to_longlong(R_line, 0); hid_t cls_id = SEXP_to_longlong(R_cls_id, 0); hid_t maj_id = SEXP_to_longlong(R_maj_id, 0); hid_t min_id = SEXP_to_longlong(R_min_id, 0); const char* msg = CHAR(STRING_ELT(R_msg, 0)); herr_t return_val = H5Epush2(err_stack, file, func, line, cls_id, maj_id, min_id, msg); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Eregister_class(const char *cls_name, const char *lib_name, const char *version); */ SEXP R_H5Eregister_class(SEXP R_cls_name, SEXP R_lib_name, SEXP R_version){ int vars_protected=0; const char* cls_name = CHAR(STRING_ELT(R_cls_name, 0)); const char* lib_name = CHAR(STRING_ELT(R_lib_name, 0)); const char* version = CHAR(STRING_ELT(R_version, 0)); hid_t return_val = H5Eregister_class(cls_name, lib_name, version); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Eset_current_stack(hid_t err_stack_id); */ SEXP R_H5Eset_current_stack(SEXP R_err_stack_id){ int vars_protected=0; hid_t err_stack_id = SEXP_to_longlong(R_err_stack_id, 0); herr_t return_val = H5Eset_current_stack(err_stack_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Eunregister_class(hid_t class_id); */ SEXP R_H5Eunregister_class(SEXP R_class_id){ int vars_protected=0; hid_t class_id = SEXP_to_longlong(R_class_id, 0); herr_t return_val = H5Eunregister_class(class_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_10_3/Wrapper_auto_H5O.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5O.h" /* H5_DLL herr_t H5Oare_mdc_flushes_disabled(hid_t object_id, hbool_t *are_disabled); */ SEXP R_H5Oare_mdc_flushes_disabled(SEXP R_object_id, SEXP R_are_disabled){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_are_disabled = PROTECT(duplicate(R_are_disabled)); vars_protected++; hid_t object_id = SEXP_to_longlong(R_object_id, 0); hbool_t* are_disabled; if(XLENGTH(R_are_disabled) == 0) { are_disabled = NULL; } else { R_helper = PROTECT(RToH5(R_are_disabled, h5_datatype[DT_hbool_t], XLENGTH(R_are_disabled))); are_disabled= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Oare_mdc_flushes_disabled(object_id, are_disabled); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_are_disabled, h5_datatype[DT_hbool_t]); R_are_disabled = PROTECT(H5ToR_single_step(are_disabled, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_are_disabled); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("are_disabled")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oclose(hid_t object_id); */ SEXP R_H5Oclose(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Oclose(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id); */ SEXP R_H5Ocopy(SEXP R_src_loc_id, SEXP R_src_name, SEXP R_dst_loc_id, SEXP R_dst_name, SEXP R_ocpypl_id, SEXP R_lcpl_id){ int vars_protected=0; hid_t src_loc_id = SEXP_to_longlong(R_src_loc_id, 0); const char* src_name = CHAR(STRING_ELT(R_src_name, 0)); hid_t dst_loc_id = SEXP_to_longlong(R_dst_loc_id, 0); const char* dst_name = CHAR(STRING_ELT(R_dst_name, 0)); hid_t ocpypl_id = SEXP_to_longlong(R_ocpypl_id, 0); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); herr_t return_val = H5Ocopy(src_loc_id, src_name, dst_loc_id, dst_name, ocpypl_id, lcpl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Odecr_refcount(hid_t object_id); */ SEXP R_H5Odecr_refcount(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Odecr_refcount(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Odisable_mdc_flushes(hid_t object_id); */ SEXP R_H5Odisable_mdc_flushes(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Odisable_mdc_flushes(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oenable_mdc_flushes(hid_t object_id); */ SEXP R_H5Oenable_mdc_flushes(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Oenable_mdc_flushes(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Oexists_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); htri_t return_val = H5Oexists_by_name(loc_id, name, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oflush(hid_t obj_id); */ SEXP R_H5Oflush(SEXP R_obj_id){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); herr_t return_val = H5Oflush(obj_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize); */ SEXP R_H5Oget_comment(SEXP R_obj_id, SEXP R_comment, SEXP R_bufsize){ int vars_protected=0; R_comment = PROTECT(duplicate(R_comment)); vars_protected++; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); char* comment; if(XLENGTH(R_comment) == 0) { comment = NULL; } else { comment = R_alloc(strlen(CHAR(STRING_ELT(R_comment, 0))) + 1, 1); strcpy(comment, CHAR(STRING_ELT(R_comment, 0))); } size_t bufsize = SEXP_to_longlong(R_bufsize, 0); ssize_t return_val = H5Oget_comment(obj_id, comment, bufsize); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(comment==NULL) { R_comment = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_comment = PROTECT(mkString(comment)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_comment); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("comment")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize, hid_t lapl_id); */ SEXP R_H5Oget_comment_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_comment, SEXP R_bufsize, SEXP R_lapl_id){ int vars_protected=0; R_comment = PROTECT(duplicate(R_comment)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); char* comment; if(XLENGTH(R_comment) == 0) { comment = NULL; } else { comment = R_alloc(strlen(CHAR(STRING_ELT(R_comment, 0))) + 1, 1); strcpy(comment, CHAR(STRING_ELT(R_comment, 0))); } size_t bufsize = SEXP_to_longlong(R_bufsize, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); ssize_t return_val = H5Oget_comment_by_name(loc_id, name, comment, bufsize, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(comment==NULL) { R_comment = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_comment = PROTECT(mkString(comment)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_comment); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("comment")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info_by_idx1(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id); */ SEXP R_H5Oget_info_by_idx1(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_oinfo, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]))); H5O_info_t* oinfo= (H5O_info_t*) VOIDPTR(R_helper); vars_protected++; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_info_by_idx1(loc_id, group_name, idx_type, order, n, oinfo, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info_by_idx2(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_info_by_idx2(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]))); H5O_info_t* oinfo= (H5O_info_t*) VOIDPTR(R_helper); vars_protected++; unsigned fields = SEXP_to_longlong(R_fields, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_info_by_idx2(loc_id, group_name, idx_type, order, n, oinfo, fields, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info_by_name1(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id); */ SEXP R_H5Oget_info_by_name1(SEXP R_loc_id, SEXP R_name, SEXP R_oinfo, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]))); H5O_info_t* oinfo= (H5O_info_t*) VOIDPTR(R_helper); vars_protected++; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_info_by_name1(loc_id, name, oinfo, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info_by_name2(hid_t loc_id, const char *name, H5O_info_t *oinfo, unsigned fields, hid_t lapl_id); */ SEXP R_H5Oget_info_by_name2(SEXP R_loc_id, SEXP R_name, SEXP R_oinfo, SEXP R_fields, SEXP R_lapl_id){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]))); H5O_info_t* oinfo= (H5O_info_t*) VOIDPTR(R_helper); vars_protected++; unsigned fields = SEXP_to_longlong(R_fields, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oget_info_by_name2(loc_id, name, oinfo, fields, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info1(hid_t loc_id, H5O_info_t *oinfo); */ SEXP R_H5Oget_info1(SEXP R_loc_id, SEXP R_oinfo){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]))); H5O_info_t* oinfo= (H5O_info_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Oget_info1(loc_id, oinfo); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oget_info2(hid_t loc_id, H5O_info_t *oinfo, unsigned fields); */ SEXP R_H5Oget_info2(SEXP R_loc_id, SEXP R_oinfo, SEXP R_fields){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_oinfo = PROTECT(duplicate(R_oinfo)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); R_helper = PROTECT(RToH5(R_oinfo, h5_datatype[DT_H5O_info_t], guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]))); H5O_info_t* oinfo= (H5O_info_t*) VOIDPTR(R_helper); vars_protected++; unsigned fields = SEXP_to_longlong(R_fields, 0); herr_t return_val = H5Oget_info2(loc_id, oinfo, fields); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_oinfo, h5_datatype[DT_H5O_info_t]); R_oinfo = PROTECT(H5ToR_single_step(oinfo, h5_datatype[DT_H5O_info_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_oinfo); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("oinfo")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oincr_refcount(hid_t object_id); */ SEXP R_H5Oincr_refcount(SEXP R_object_id){ int vars_protected=0; hid_t object_id = SEXP_to_longlong(R_object_id, 0); herr_t return_val = H5Oincr_refcount(object_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id); */ SEXP R_H5Olink(SEXP R_obj_id, SEXP R_new_loc_id, SEXP R_new_name, SEXP R_lcpl_id, SEXP R_lapl_id){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); hid_t new_loc_id = SEXP_to_longlong(R_new_loc_id, 0); const char* new_name = CHAR(STRING_ELT(R_new_name, 0)); hid_t lcpl_id = SEXP_to_longlong(R_lcpl_id, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Olink(obj_id, new_loc_id, new_name, lcpl_id, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); */ SEXP R_H5Oopen(SEXP R_loc_id, SEXP R_name, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); hid_t return_val = H5Oopen(loc_id, name, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr); */ SEXP R_H5Oopen_by_addr(SEXP R_loc_id, SEXP R_addr){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); haddr_t addr = SEXP_to_longlong(R_addr, 0); hid_t return_val = H5Oopen_by_addr(loc_id, addr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); */ SEXP R_H5Oopen_by_idx(SEXP R_loc_id, SEXP R_group_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* group_name = CHAR(STRING_ELT(R_group_name, 0)); H5_index_t idx_type = SEXP_to_longlong(R_idx_type, 0); H5_iter_order_t order = SEXP_to_longlong(R_order, 0); hsize_t n = SEXP_to_longlong(R_n, 0); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); hid_t return_val = H5Oopen_by_idx(loc_id, group_name, idx_type, order, n, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Orefresh(hid_t oid); */ SEXP R_H5Orefresh(SEXP R_oid){ int vars_protected=0; hid_t oid = SEXP_to_longlong(R_oid, 0); herr_t return_val = H5Orefresh(oid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment); */ SEXP R_H5Oset_comment(SEXP R_obj_id, SEXP R_comment){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); const char* comment = CHAR(STRING_ELT(R_comment, 0)); herr_t return_val = H5Oset_comment(obj_id, comment); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id); */ SEXP R_H5Oset_comment_by_name(SEXP R_loc_id, SEXP R_name, SEXP R_comment, SEXP R_lapl_id){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); const char* comment = CHAR(STRING_ELT(R_comment, 0)); hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); herr_t return_val = H5Oset_comment_by_name(loc_id, name, comment, lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5T.h
<gh_stars>10-100 #ifndef _WRAPPER_AUTO_H5T_H_ #define _WRAPPER_AUTO_H5T_H_ #include "global.h" /* H5_DLL hid_t H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[]); */ SEXP R_H5Tarray_create2(SEXP R_base_id, SEXP R_ndims, SEXP R_dim); /* H5_DLL herr_t H5Tclose(hid_t type_id); */ SEXP R_H5Tclose(SEXP R_type_id); /* H5_DLL herr_t H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id); */ SEXP R_H5Tcommit_anon(SEXP R_loc_id, SEXP R_type_id, SEXP R_tcpl_id, SEXP R_tapl_id); /* H5_DLL herr_t H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id); */ SEXP R_H5Tcommit2(SEXP R_loc_id, SEXP R_name, SEXP R_type_id, SEXP R_lcpl_id, SEXP R_tcpl_id, SEXP R_tapl_id); /* H5_DLL htri_t H5Tcommitted(hid_t type_id); */ SEXP R_H5Tcommitted(SEXP R_type_id); /* H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id); */ SEXP R_H5Tcompiler_conv(SEXP R_src_id, SEXP R_dst_id); /* H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background, hid_t plist_id); */ SEXP R_H5Tconvert(SEXP R_src_id, SEXP R_dst_id, SEXP R_nelmts, SEXP R_buf, SEXP R_background, SEXP R_plist_id, SEXP _dupl_buf, SEXP _dupl_background); /* H5_DLL hid_t H5Tcopy(hid_t type_id); */ SEXP R_H5Tcopy(SEXP R_type_id); /* H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size); */ SEXP R_H5Tcreate(SEXP R_type, SEXP R_size); /* H5_DLL hid_t H5Tdecode(const void *buf); */ SEXP R_H5Tdecode(SEXP R_buf); /* H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls); */ SEXP R_H5Tdetect_class(SEXP R_type_id, SEXP R_cls); /* H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc); */ SEXP R_H5Tencode(SEXP R_obj_id, SEXP R_buf, SEXP R_nalloc, SEXP _dupl_buf); /* H5_DLL hid_t H5Tenum_create(hid_t base_id); */ SEXP R_H5Tenum_create(SEXP R_base_id); /* H5_DLL herr_t H5Tenum_insert(hid_t type, const char *name, const void *value); */ SEXP R_H5Tenum_insert(SEXP R_type, SEXP R_name, SEXP R_value); /* H5_DLL herr_t H5Tenum_nameof(hid_t type, const void *value, char *name, size_t size); */ SEXP R_H5Tenum_nameof(SEXP R_type, SEXP R_value, SEXP R_name, SEXP R_size); /* H5_DLL herr_t H5Tenum_valueof(hid_t type, const char *name, void *value); */ SEXP R_H5Tenum_valueof(SEXP R_type, SEXP R_name, SEXP R_value, SEXP _dupl_value); /* H5_DLL htri_t H5Tequal(hid_t type1_id, hid_t type2_id); */ SEXP R_H5Tequal(SEXP R_type1_id, SEXP R_type2_id); /* H5_DLL herr_t H5Tflush(hid_t type_id); */ SEXP R_H5Tflush(SEXP R_type_id); /* H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]); */ SEXP R_H5Tget_array_dims2(SEXP R_type_id, SEXP R_dims); /* H5_DLL int H5Tget_array_ndims(hid_t type_id); */ SEXP R_H5Tget_array_ndims(SEXP R_type_id); /* H5_DLL H5T_class_t H5Tget_class(hid_t type_id); */ SEXP R_H5Tget_class(SEXP R_type_id); /* H5_DLL hid_t H5Tget_create_plist(hid_t type_id); */ SEXP R_H5Tget_create_plist(SEXP R_type_id); /* H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id); */ SEXP R_H5Tget_cset(SEXP R_type_id); /* H5_DLL size_t H5Tget_ebias(hid_t type_id); */ SEXP R_H5Tget_ebias(SEXP R_type_id); /* H5_DLL herr_t H5Tget_fields(hid_t type_id, size_t *spos, size_t *epos, size_t *esize, size_t *mpos, size_t *msize); */ SEXP R_H5Tget_fields(SEXP R_type_id, SEXP R_spos, SEXP R_epos, SEXP R_esize, SEXP R_mpos, SEXP R_msize); /* H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id); */ SEXP R_H5Tget_inpad(SEXP R_type_id); /* H5_DLL H5T_class_t H5Tget_member_class(hid_t type_id, unsigned membno); */ SEXP R_H5Tget_member_class(SEXP R_type_id, SEXP R_membno); /* H5_DLL int H5Tget_member_index(hid_t type_id, const char *name); */ SEXP R_H5Tget_member_index(SEXP R_type_id, SEXP R_name); /* H5_DLL char *H5Tget_member_name(hid_t type_id, unsigned membno); */ SEXP R_H5Tget_member_name(SEXP R_type_id, SEXP R_membno); /* H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno); */ SEXP R_H5Tget_member_offset(SEXP R_type_id, SEXP R_membno); /* H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno); */ SEXP R_H5Tget_member_type(SEXP R_type_id, SEXP R_membno); /* H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value); */ SEXP R_H5Tget_member_value(SEXP R_type_id, SEXP R_membno, SEXP R_value, SEXP _dupl_value); /* H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction); */ SEXP R_H5Tget_native_type(SEXP R_type_id, SEXP R_direction); /* H5_DLL int H5Tget_nmembers(hid_t type_id); */ SEXP R_H5Tget_nmembers(SEXP R_type_id); /* H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id); */ SEXP R_H5Tget_norm(SEXP R_type_id); /* H5_DLL int H5Tget_offset(hid_t type_id); */ SEXP R_H5Tget_offset(SEXP R_type_id); /* H5_DLL H5T_order_t H5Tget_order(hid_t type_id); */ SEXP R_H5Tget_order(SEXP R_type_id); /* H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb, H5T_pad_t *msb); */ SEXP R_H5Tget_pad(SEXP R_type_id, SEXP R_lsb, SEXP R_msb); /* H5_DLL size_t H5Tget_precision(hid_t type_id); */ SEXP R_H5Tget_precision(SEXP R_type_id); /* H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id); */ SEXP R_H5Tget_sign(SEXP R_type_id); /* H5_DLL size_t H5Tget_size(hid_t type_id); */ SEXP R_H5Tget_size(SEXP R_type_id); /* H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id); */ SEXP R_H5Tget_strpad(SEXP R_type_id); /* H5_DLL hid_t H5Tget_super(hid_t type); */ SEXP R_H5Tget_super(SEXP R_type); /* H5_DLL char *H5Tget_tag(hid_t type); */ SEXP R_H5Tget_tag(SEXP R_type); /* H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id); */ SEXP R_H5Tinsert(SEXP R_parent_id, SEXP R_name, SEXP R_offset, SEXP R_member_id); /* H5_DLL htri_t H5Tis_variable_str(hid_t type_id); */ SEXP R_H5Tis_variable_str(SEXP R_type_id); /* H5_DLL herr_t H5Tlock(hid_t type_id); */ SEXP R_H5Tlock(SEXP R_type_id); /* H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id); */ SEXP R_H5Topen2(SEXP R_loc_id, SEXP R_name, SEXP R_tapl_id); /* H5_DLL herr_t H5Tpack(hid_t type_id); */ SEXP R_H5Tpack(SEXP R_type_id); /* H5_DLL herr_t H5Treclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf); */ SEXP R_H5Treclaim(SEXP R_type_id, SEXP R_space_id, SEXP R_plist_id, SEXP R_buf, SEXP _dupl_buf); /* H5_DLL herr_t H5Trefresh(hid_t type_id); */ SEXP R_H5Trefresh(SEXP R_type_id); /* H5_DLL herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset); */ SEXP R_H5Tset_cset(SEXP R_type_id, SEXP R_cset); /* H5_DLL herr_t H5Tset_ebias(hid_t type_id, size_t ebias); */ SEXP R_H5Tset_ebias(SEXP R_type_id, SEXP R_ebias); /* H5_DLL herr_t H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize); */ SEXP R_H5Tset_fields(SEXP R_type_id, SEXP R_spos, SEXP R_epos, SEXP R_esize, SEXP R_mpos, SEXP R_msize); /* H5_DLL herr_t H5Tset_inpad(hid_t type_id, H5T_pad_t pad); */ SEXP R_H5Tset_inpad(SEXP R_type_id, SEXP R_pad); /* H5_DLL herr_t H5Tset_norm(hid_t type_id, H5T_norm_t norm); */ SEXP R_H5Tset_norm(SEXP R_type_id, SEXP R_norm); /* H5_DLL herr_t H5Tset_offset(hid_t type_id, size_t offset); */ SEXP R_H5Tset_offset(SEXP R_type_id, SEXP R_offset); /* H5_DLL herr_t H5Tset_order(hid_t type_id, H5T_order_t order); */ SEXP R_H5Tset_order(SEXP R_type_id, SEXP R_order); /* H5_DLL herr_t H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb); */ SEXP R_H5Tset_pad(SEXP R_type_id, SEXP R_lsb, SEXP R_msb); /* H5_DLL herr_t H5Tset_precision(hid_t type_id, size_t prec); */ SEXP R_H5Tset_precision(SEXP R_type_id, SEXP R_prec); /* H5_DLL herr_t H5Tset_sign(hid_t type_id, H5T_sign_t sign); */ SEXP R_H5Tset_sign(SEXP R_type_id, SEXP R_sign); /* H5_DLL herr_t H5Tset_size(hid_t type_id, size_t size); */ SEXP R_H5Tset_size(SEXP R_type_id, SEXP R_size); /* H5_DLL herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad); */ SEXP R_H5Tset_strpad(SEXP R_type_id, SEXP R_strpad); /* H5_DLL herr_t H5Tset_tag(hid_t type, const char *tag); */ SEXP R_H5Tset_tag(SEXP R_type, SEXP R_tag); /* H5_DLL hid_t H5Tvlen_create(hid_t base_id); */ SEXP R_H5Tvlen_create(SEXP R_base_id); #endif
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5D.h
<reponame>jeroen/hdf5r #ifndef _WRAPPER_AUTO_H5D_H_ #define _WRAPPER_AUTO_H5D_H_ #include "global.h" /* H5_DLL herr_t H5Dclose(hid_t dset_id); */ SEXP R_H5Dclose(SEXP R_dset_id); /* H5_DLL hid_t H5Dcreate_anon(hid_t file_id, hid_t type_id, hid_t space_id, hid_t plist_id, hid_t dapl_id); */ SEXP R_H5Dcreate_anon(SEXP R_file_id, SEXP R_type_id, SEXP R_space_id, SEXP R_plist_id, SEXP R_dapl_id); /* H5_DLL hid_t H5Dcreate2(hid_t loc_id, const char *name, hid_t type_id, hid_t space_id, hid_t lcpl_id, hid_t dcpl_id, hid_t dapl_id); */ SEXP R_H5Dcreate2(SEXP R_loc_id, SEXP R_name, SEXP R_type_id, SEXP R_space_id, SEXP R_lcpl_id, SEXP R_dcpl_id, SEXP R_dapl_id); /* H5_DLL herr_t H5Ddebug(hid_t dset_id); */ SEXP R_H5Ddebug(SEXP R_dset_id); /* H5_DLL herr_t H5Dfill(const void *fill, hid_t fill_type, void *buf, hid_t buf_type, hid_t space); */ SEXP R_H5Dfill(SEXP R_fill, SEXP R_fill_type, SEXP R_buf, SEXP R_buf_type, SEXP R_space, SEXP _dupl_buf); /* H5_DLL herr_t H5Dflush(hid_t dset_id); */ SEXP R_H5Dflush(SEXP R_dset_id); /* H5_DLL herr_t H5Dformat_convert(hid_t dset_id); */ SEXP R_H5Dformat_convert(SEXP R_dset_id); /* H5_DLL hid_t H5Dget_access_plist(hid_t dset_id); */ SEXP R_H5Dget_access_plist(SEXP R_dset_id); /* H5_DLL herr_t H5Dget_chunk_index_type(hid_t did, H5D_chunk_index_t *idx_type); */ SEXP R_H5Dget_chunk_index_type(SEXP R_did, SEXP R_idx_type); /* H5_DLL herr_t H5Dget_chunk_info(hid_t dset_id, hid_t fspace_id, hsize_t chk_idx, hsize_t *coord, unsigned *filter_mask, haddr_t *addr, hsize_t *size); */ SEXP R_H5Dget_chunk_info(SEXP R_dset_id, SEXP R_fspace_id, SEXP R_chk_idx, SEXP R_coord, SEXP R_filter_mask, SEXP R_addr, SEXP R_size); /* H5_DLL herr_t H5Dget_chunk_info_by_coord(hid_t dset_id, const hsize_t *coord, unsigned *filter_mask, haddr_t *addr, hsize_t *size); */ SEXP R_H5Dget_chunk_info_by_coord(SEXP R_dset_id, SEXP R_coord, SEXP R_filter_mask, SEXP R_addr, SEXP R_size); /* H5_DLL herr_t H5Dget_chunk_storage_size(hid_t dset_id, const hsize_t *offset, hsize_t *chunk_bytes); */ SEXP R_H5Dget_chunk_storage_size(SEXP R_dset_id, SEXP R_offset, SEXP R_chunk_bytes); /* H5_DLL hid_t H5Dget_create_plist(hid_t dset_id); */ SEXP R_H5Dget_create_plist(SEXP R_dset_id); /* H5_DLL herr_t H5Dget_num_chunks(hid_t dset_id, hid_t fspace_id, hsize_t *nchunks); */ SEXP R_H5Dget_num_chunks(SEXP R_dset_id, SEXP R_fspace_id, SEXP R_nchunks); /* H5_DLL haddr_t H5Dget_offset(hid_t dset_id); */ SEXP R_H5Dget_offset(SEXP R_dset_id); /* H5_DLL hid_t H5Dget_space(hid_t dset_id); */ SEXP R_H5Dget_space(SEXP R_dset_id); /* H5_DLL herr_t H5Dget_space_status(hid_t dset_id, H5D_space_status_t *allocation); */ SEXP R_H5Dget_space_status(SEXP R_dset_id, SEXP R_allocation); /* H5_DLL hsize_t H5Dget_storage_size(hid_t dset_id); */ SEXP R_H5Dget_storage_size(SEXP R_dset_id); /* H5_DLL hid_t H5Dget_type(hid_t dset_id); */ SEXP R_H5Dget_type(SEXP R_dset_id); /* H5_DLL hid_t H5Dopen2(hid_t file_id, const char *name, hid_t dapl_id); */ SEXP R_H5Dopen2(SEXP R_file_id, SEXP R_name, SEXP R_dapl_id); /* H5_DLL herr_t H5Dread(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, void *buf); */ SEXP R_H5Dread(SEXP R_dset_id, SEXP R_mem_type_id, SEXP R_mem_space_id, SEXP R_file_space_id, SEXP R_plist_id, SEXP R_buf, SEXP _dupl_buf); /* H5_DLL herr_t H5Dread_chunk(hid_t dset_id, hid_t dxpl_id, const hsize_t *offset, uint32_t *filters, void *buf); */ SEXP R_H5Dread_chunk(SEXP R_dset_id, SEXP R_dxpl_id, SEXP R_offset, SEXP R_filters, SEXP R_buf, SEXP _dupl_buf); /* H5_DLL herr_t H5Drefresh(hid_t dset_id); */ SEXP R_H5Drefresh(SEXP R_dset_id); /* H5_DLL herr_t H5Dset_extent(hid_t dset_id, const hsize_t size[]); */ SEXP R_H5Dset_extent(SEXP R_dset_id, SEXP R_size); /* H5_DLL herr_t H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id, hsize_t *size); */ SEXP R_H5Dvlen_get_buf_size(SEXP R_dataset_id, SEXP R_type_id, SEXP R_space_id, SEXP R_size); /* H5_DLL herr_t H5Dvlen_reclaim(hid_t type_id, hid_t space_id, hid_t plist_id, void *buf); */ SEXP R_H5Dvlen_reclaim(SEXP R_type_id, SEXP R_space_id, SEXP R_plist_id, SEXP R_buf, SEXP _dupl_buf); /* H5_DLL herr_t H5Dwrite(hid_t dset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t plist_id, const void *buf); */ SEXP R_H5Dwrite(SEXP R_dset_id, SEXP R_mem_type_id, SEXP R_mem_space_id, SEXP R_file_space_id, SEXP R_plist_id, SEXP R_buf); /* H5_DLL herr_t H5Dwrite_chunk(hid_t dset_id, hid_t dxpl_id, uint32_t filters, const hsize_t *offset, size_t data_size, const void *buf); */ SEXP R_H5Dwrite_chunk(SEXP R_dset_id, SEXP R_dxpl_id, SEXP R_filters, SEXP R_offset, SEXP R_data_size, SEXP R_buf); #endif
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5FDcore.h
<reponame>jeroen/hdf5r #ifndef _WRAPPER_AUTO_H5FDCORE_H_ #define _WRAPPER_AUTO_H5FDCORE_H_ #include "global.h" /* H5_DLL herr_t H5Pget_fapl_core(hid_t fapl_id, size_t *increment, hbool_t *backing_store); */ SEXP R_H5Pget_fapl_core(SEXP R_fapl_id, SEXP R_increment, SEXP R_backing_store); /* H5_DLL herr_t H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store); */ SEXP R_H5Pset_fapl_core(SEXP R_fapl_id, SEXP R_increment, SEXP R_backing_store); #endif
jeroen/hdf5r
src/1_10_3/HelperStructs.h
#ifndef _HELPER_STRUCTS_H #define _HELPER_STRUCTS_H typedef struct H5F_info1_helper_t { hsize_t hdr_size; H5_ih_info_t msgs_info; } H5F_info1_helper_t; typedef struct H5O_hdr_info_helper_space_t { hsize_t total; hsize_t meta; hsize_t mesg; hsize_t free; } H5O_hdr_info_helper_space_t; typedef struct H5O_hdr_info_helper_msg_t { uint64_t present; uint64_t shared; } H5O_hdr_info_helper_msg_t; typedef struct H5O_info_helper_t { H5_ih_info_t obj; H5_ih_info_t attr; } H5O_info_helper_t; typedef union H5L_info_helper_t { haddr_t address; size_t val_size; } H5L_info_helper_t; typedef struct H5F_info2_super_t { unsigned version; hsize_t super_size; hsize_t super_ext_size; } H5F_info2_super_t; typedef struct H5F_info2_free_t { unsigned version; hsize_t meta_size; hsize_t tot_space; } H5F_info2_free_t; typedef struct H5F_info2_sohm_t { unsigned version; hsize_t hdr_size; H5_ih_info_t msgs_info; } H5F_info2_sohm_t; // More structs to help with ls functionality typedef struct H5D_info_t { int rank; char* dims; char* maxdims; H5T_class_t type_class; H5S_class_t space_class; } H5D_info_t; // and now for the info structs a version that stores the information to be gathered typedef struct H5ls_info_t { char* name; int link_success; H5L_info_t link; int obj_type_success; H5I_type_t obj_type; int num_attrs; int group_success; H5G_info_t group; int dataset_success; H5D_info_t dataset; int type_success; H5T_class_t committed_type; } H5ls_info_t; #endif
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5S.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5S.h" /* H5_DLL herr_t H5Sclose(hid_t space_id); */ SEXP R_H5Sclose(SEXP R_space_id){ int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); herr_t return_val = H5Sclose(space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Scopy(hid_t space_id); */ SEXP R_H5Scopy(SEXP R_space_id){ int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); hid_t return_val = H5Scopy(space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Screate(H5S_class_t type); */ SEXP R_H5Screate(SEXP R_type){ int vars_protected=0; H5S_class_t type = SEXP_to_longlong(R_type, 0); hid_t return_val = H5Screate(type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[], const hsize_t maxdims[]); */ SEXP R_H5Screate_simple(SEXP R_rank, SEXP R_dims, SEXP R_maxdims){ SEXP R_helper = R_NilValue; int vars_protected=0; int rank = SEXP_to_longlong(R_rank, 0); const hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const hsize_t* maxdims; if(XLENGTH(R_maxdims) == 0) { maxdims = NULL; } else { R_helper = PROTECT(RToH5(R_maxdims, h5_datatype[DT_hsize_t], XLENGTH(R_maxdims))); maxdims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } // INJECTION CODE START // the pointer is to const; need to cast it when I detect an Inf value if(isReal(R_maxdims)) { hsize_t* maxdims_helper = (hsize_t *) VOIDPTR(R_helper); for(int i=0; i < rank; ++i) { if(REAL(R_maxdims)[i] == R_PosInf) { maxdims_helper[i] = H5S_UNLIMITED; } } } // INJECTION CODE END hid_t return_val = H5Screate_simple(rank, dims, maxdims); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Sdecode(const void *buf); */ SEXP R_H5Sdecode(SEXP R_buf){ int vars_protected=0; const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } hid_t return_val = H5Sdecode(buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sencode(hid_t obj_id, void *buf, size_t *nalloc); */ SEXP R_H5Sencode(SEXP R_obj_id, SEXP R_buf, SEXP R_nalloc, SEXP _dupl_buf){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } R_nalloc = PROTECT(duplicate(R_nalloc)); vars_protected++; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } size_t* nalloc; if(XLENGTH(R_nalloc) == 0) { nalloc = NULL; } else { R_helper = PROTECT(RToH5(R_nalloc, h5_datatype[DT_size_t], XLENGTH(R_nalloc))); nalloc= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Sencode(obj_id, buf, nalloc); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_nalloc, h5_datatype[DT_size_t]); R_nalloc = PROTECT(H5ToR_single_step(nalloc, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SET_VECTOR_ELT(__ret_list, 2, R_nalloc); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_STRING_ELT(__ret_list_names, 2, mkChar("nalloc")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sextent_copy(hid_t dst_id,hid_t src_id); */ SEXP R_H5Sextent_copy(SEXP R_dst_id, SEXP R_src_id){ int vars_protected=0; hid_t dst_id = SEXP_to_longlong(R_dst_id, 0); hid_t src_id = SEXP_to_longlong(R_src_id, 0); herr_t return_val = H5Sextent_copy(dst_id, src_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Sextent_equal(hid_t sid1, hid_t sid2); */ SEXP R_H5Sextent_equal(SEXP R_sid1, SEXP R_sid2){ int vars_protected=0; hid_t sid1 = SEXP_to_longlong(R_sid1, 0); hid_t sid2 = SEXP_to_longlong(R_sid2, 0); htri_t return_val = H5Sextent_equal(sid1, sid2); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sget_select_bounds(hid_t spaceid, hsize_t start[], hsize_t end[]); */ SEXP R_H5Sget_select_bounds(SEXP R_spaceid, SEXP R_start, SEXP R_end){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_start = PROTECT(duplicate(R_start)); vars_protected++; R_end = PROTECT(duplicate(R_end)); vars_protected++; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); hsize_t* start; if(XLENGTH(R_start) == 0) { start = NULL; } else { R_helper = PROTECT(RToH5(R_start, h5_datatype[DT_hsize_t], XLENGTH(R_start))); start= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* end; if(XLENGTH(R_end) == 0) { end = NULL; } else { R_helper = PROTECT(RToH5(R_end, h5_datatype[DT_hsize_t], XLENGTH(R_end))); end= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Sget_select_bounds(spaceid, start, end); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_start, h5_datatype[DT_hsize_t]); R_start = PROTECT(H5ToR_single_step(start, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_end, h5_datatype[DT_hsize_t]); R_end = PROTECT(H5ToR_single_step(end, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_start); SET_VECTOR_ELT(__ret_list, 2, R_end); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("start")); SET_STRING_ELT(__ret_list_names, 2, mkChar("end")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hssize_t H5Sget_select_elem_npoints(hid_t spaceid); */ SEXP R_H5Sget_select_elem_npoints(SEXP R_spaceid){ int vars_protected=0; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); hssize_t return_val = H5Sget_select_elem_npoints(spaceid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint, hsize_t numpoints, hsize_t buf[]); */ SEXP R_H5Sget_select_elem_pointlist(SEXP R_spaceid, SEXP R_startpoint, SEXP R_numpoints, SEXP R_buf){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_buf = PROTECT(duplicate(R_buf)); vars_protected++; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); hsize_t startpoint = SEXP_to_longlong(R_startpoint, 0); hsize_t numpoints = SEXP_to_longlong(R_numpoints, 0); hsize_t* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { R_helper = PROTECT(RToH5(R_buf, h5_datatype[DT_hsize_t], XLENGTH(R_buf))); buf= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Sget_select_elem_pointlist(spaceid, startpoint, numpoints, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_buf, h5_datatype[DT_hsize_t]); R_buf = PROTECT(H5ToR_single_step(buf, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock, hsize_t numblocks, hsize_t buf[]); */ SEXP R_H5Sget_select_hyper_blocklist(SEXP R_spaceid, SEXP R_startblock, SEXP R_numblocks, SEXP R_buf){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_buf = PROTECT(duplicate(R_buf)); vars_protected++; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); hsize_t startblock = SEXP_to_longlong(R_startblock, 0); hsize_t numblocks = SEXP_to_longlong(R_numblocks, 0); hsize_t* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { R_helper = PROTECT(RToH5(R_buf, h5_datatype[DT_hsize_t], XLENGTH(R_buf))); buf= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Sget_select_hyper_blocklist(spaceid, startblock, numblocks, buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_buf, h5_datatype[DT_hsize_t]); R_buf = PROTECT(H5ToR_single_step(buf, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hssize_t H5Sget_select_hyper_nblocks(hid_t spaceid); */ SEXP R_H5Sget_select_hyper_nblocks(SEXP R_spaceid){ int vars_protected=0; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); hssize_t return_val = H5Sget_select_hyper_nblocks(spaceid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hssize_t H5Sget_select_npoints(hid_t spaceid); */ SEXP R_H5Sget_select_npoints(SEXP R_spaceid){ int vars_protected=0; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); hssize_t return_val = H5Sget_select_npoints(spaceid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5S_sel_type H5Sget_select_type(hid_t spaceid); */ SEXP R_H5Sget_select_type(SEXP R_spaceid){ int vars_protected=0; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); H5S_sel_type return_val = H5Sget_select_type(spaceid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5S_sel_type])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[], hsize_t maxdims[]); */ SEXP R_H5Sget_simple_extent_dims(SEXP R_space_id, SEXP R_dims, SEXP R_maxdims){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_dims = PROTECT(duplicate(R_dims)); vars_protected++; R_maxdims = PROTECT(duplicate(R_maxdims)); vars_protected++; hid_t space_id = SEXP_to_longlong(R_space_id, 0); hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* maxdims; if(XLENGTH(R_maxdims) == 0) { maxdims = NULL; } else { R_helper = PROTECT(RToH5(R_maxdims, h5_datatype[DT_hsize_t], XLENGTH(R_maxdims))); maxdims= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } int return_val = H5Sget_simple_extent_dims(space_id, dims, maxdims); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_dims, h5_datatype[DT_hsize_t]); R_dims = PROTECT(H5ToR_single_step(dims, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_maxdims, h5_datatype[DT_hsize_t]); R_maxdims = PROTECT(H5ToR_single_step(maxdims, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; // INJECTION CODE START // check if it is an int64 vector, and if yes which is H5S_UNLIMITED // in that case, the return needs to be a real vector, so that Inf can be set if(is_rint64(R_maxdims)) { R_maxdims = PROTECT(convert_int64_using_flags(R_maxdims, H5TOR_CONV_INT64_FLOAT_FORCE)); vars_protected++; double dbl_unlimited = (double) LLONG_MAX; R_xlen_t len = XLENGTH(R_maxdims); for(R_xlen_t i = 0; i < len; ++i) { if(REAL(R_maxdims)[i] == dbl_unlimited) { REAL(R_maxdims)[i] = R_PosInf; } } } // INJECTION CODE END SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_dims); SET_VECTOR_ELT(__ret_list, 2, R_maxdims); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("dims")); SET_STRING_ELT(__ret_list_names, 2, mkChar("maxdims")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Sget_simple_extent_ndims(hid_t space_id); */ SEXP R_H5Sget_simple_extent_ndims(SEXP R_space_id){ int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); int return_val = H5Sget_simple_extent_ndims(space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hssize_t H5Sget_simple_extent_npoints(hid_t space_id); */ SEXP R_H5Sget_simple_extent_npoints(SEXP R_space_id){ int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); hssize_t return_val = H5Sget_simple_extent_npoints(space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5S_class_t H5Sget_simple_extent_type(hid_t space_id); */ SEXP R_H5Sget_simple_extent_type(SEXP R_space_id){ int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); H5S_class_t return_val = H5Sget_simple_extent_type(space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5S_class_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Sis_simple(hid_t space_id); */ SEXP R_H5Sis_simple(SEXP R_space_id){ int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); htri_t return_val = H5Sis_simple(space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Soffset_simple(hid_t space_id, const hssize_t *offset); */ SEXP R_H5Soffset_simple(SEXP R_space_id, SEXP R_offset){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); const hssize_t* offset; if(XLENGTH(R_offset) == 0) { offset = NULL; } else { R_helper = PROTECT(RToH5(R_offset, h5_datatype[DT_hssize_t], XLENGTH(R_offset))); offset= (const hssize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Soffset_simple(space_id, offset); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sselect_all(hid_t spaceid); */ SEXP R_H5Sselect_all(SEXP R_spaceid){ int vars_protected=0; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); herr_t return_val = H5Sselect_all(spaceid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sselect_elements(hid_t space_id, H5S_seloper_t op, size_t num_elem, const hsize_t *coord); */ SEXP R_H5Sselect_elements(SEXP R_space_id, SEXP R_op, SEXP R_num_elem, SEXP R_coord){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); H5S_seloper_t op = SEXP_to_longlong(R_op, 0); size_t num_elem = SEXP_to_longlong(R_num_elem, 0); const hsize_t* coord; if(XLENGTH(R_coord) == 0) { coord = NULL; } else { R_helper = PROTECT(RToH5(R_coord, h5_datatype[DT_hsize_t], XLENGTH(R_coord))); coord= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Sselect_elements(space_id, op, num_elem, coord); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], const hsize_t _stride[], const hsize_t count[], const hsize_t _block[]); */ SEXP R_H5Sselect_hyperslab(SEXP R_space_id, SEXP R_op, SEXP R_start, SEXP R__stride, SEXP R_count, SEXP R__block){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); H5S_seloper_t op = SEXP_to_longlong(R_op, 0); const hsize_t* start; if(XLENGTH(R_start) == 0) { start = NULL; } else { R_helper = PROTECT(RToH5(R_start, h5_datatype[DT_hsize_t], XLENGTH(R_start))); start= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const hsize_t* _stride; if(XLENGTH(R__stride) == 0) { _stride = NULL; } else { R_helper = PROTECT(RToH5(R__stride, h5_datatype[DT_hsize_t], XLENGTH(R__stride))); _stride= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const hsize_t* count; if(XLENGTH(R_count) == 0) { count = NULL; } else { R_helper = PROTECT(RToH5(R_count, h5_datatype[DT_hsize_t], XLENGTH(R_count))); count= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const hsize_t* _block; if(XLENGTH(R__block) == 0) { _block = NULL; } else { R_helper = PROTECT(RToH5(R__block, h5_datatype[DT_hsize_t], XLENGTH(R__block))); _block= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Sselect_hyperslab(space_id, op, start, _stride, count, _block); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sselect_none(hid_t spaceid); */ SEXP R_H5Sselect_none(SEXP R_spaceid){ int vars_protected=0; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); herr_t return_val = H5Sselect_none(spaceid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Sselect_valid(hid_t spaceid); */ SEXP R_H5Sselect_valid(SEXP R_spaceid){ int vars_protected=0; hid_t spaceid = SEXP_to_longlong(R_spaceid, 0); htri_t return_val = H5Sselect_valid(spaceid); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sset_extent_none(hid_t space_id); */ SEXP R_H5Sset_extent_none(SEXP R_space_id){ int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); herr_t return_val = H5Sset_extent_none(space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[], const hsize_t max[]); */ SEXP R_H5Sset_extent_simple(SEXP R_space_id, SEXP R_rank, SEXP R_dims, SEXP R_max){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t space_id = SEXP_to_longlong(R_space_id, 0); int rank = SEXP_to_longlong(R_rank, 0); const hsize_t* dims; if(XLENGTH(R_dims) == 0) { dims = NULL; } else { R_helper = PROTECT(RToH5(R_dims, h5_datatype[DT_hsize_t], XLENGTH(R_dims))); dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const hsize_t* max; if(XLENGTH(R_max) == 0) { max = NULL; } else { R_helper = PROTECT(RToH5(R_max, h5_datatype[DT_hsize_t], XLENGTH(R_max))); max= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } // INJECTION CODE START // the pointer is to const; need to cast it when I detect an Inf value if(isReal(R_max)) { hsize_t* max_helper = (hsize_t *) VOIDPTR(R_helper); for(int i=0; i < rank; ++i) { if(REAL(R_max)[i] == R_PosInf) { max_helper[i] = H5S_UNLIMITED; } } } // INJECTION CODE END herr_t return_val = H5Sset_extent_simple(space_id, rank, dims, max); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_10_3/Wrapper_auto_H5P.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5P.h" /* H5_DLL herr_t H5Padd_merge_committed_dtype_path(hid_t plist_id, const char *path); */ SEXP R_H5Padd_merge_committed_dtype_path(SEXP R_plist_id, SEXP R_path){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); const char* path = CHAR(STRING_ELT(R_path, 0)); herr_t return_val = H5Padd_merge_committed_dtype_path(plist_id, path); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Pall_filters_avail(hid_t plist_id); */ SEXP R_H5Pall_filters_avail(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); htri_t return_val = H5Pall_filters_avail(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pclose(hid_t plist_id); */ SEXP R_H5Pclose(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); herr_t return_val = H5Pclose(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pclose_class(hid_t plist_id); */ SEXP R_H5Pclose_class(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); herr_t return_val = H5Pclose_class(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Pcopy(hid_t plist_id); */ SEXP R_H5Pcopy(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hid_t return_val = H5Pcopy(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pcopy_prop(hid_t dst_id, hid_t src_id, const char *name); */ SEXP R_H5Pcopy_prop(SEXP R_dst_id, SEXP R_src_id, SEXP R_name){ int vars_protected=0; hid_t dst_id = SEXP_to_longlong(R_dst_id, 0); hid_t src_id = SEXP_to_longlong(R_src_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); herr_t return_val = H5Pcopy_prop(dst_id, src_id, name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Pcreate(hid_t cls_id); */ SEXP R_H5Pcreate(SEXP R_cls_id){ int vars_protected=0; hid_t cls_id = SEXP_to_longlong(R_cls_id, 0); hid_t return_val = H5Pcreate(cls_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Pdecode(const void *buf); */ SEXP R_H5Pdecode(SEXP R_buf){ int vars_protected=0; const void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } hid_t return_val = H5Pdecode(buf); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pencode(hid_t plist_id, void *buf, size_t *nalloc); */ SEXP R_H5Pencode(SEXP R_plist_id, SEXP R_buf, SEXP R_nalloc, SEXP _dupl_buf){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; if(SEXP_to_logical(_dupl_buf)) { R_buf = PROTECT(duplicate(R_buf)); vars_protected++; } R_nalloc = PROTECT(duplicate(R_nalloc)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); void* buf; if(XLENGTH(R_buf) == 0) { buf = NULL; } else { buf = (void *) VOIDPTR(R_buf); } size_t* nalloc; if(XLENGTH(R_nalloc) == 0) { nalloc = NULL; } else { R_helper = PROTECT(RToH5(R_nalloc, h5_datatype[DT_size_t], XLENGTH(R_nalloc))); nalloc= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pencode(plist_id, buf, nalloc); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_nalloc, h5_datatype[DT_size_t]); R_nalloc = PROTECT(H5ToR_single_step(nalloc, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf); SET_VECTOR_ELT(__ret_list, 2, R_nalloc); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf")); SET_STRING_ELT(__ret_list_names, 2, mkChar("nalloc")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Pequal(hid_t id1, hid_t id2); */ SEXP R_H5Pequal(SEXP R_id1, SEXP R_id2){ int vars_protected=0; hid_t id1 = SEXP_to_longlong(R_id1, 0); hid_t id2 = SEXP_to_longlong(R_id2, 0); htri_t return_val = H5Pequal(id1, id2); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Pexist(hid_t plist_id, const char *name); */ SEXP R_H5Pexist(SEXP R_plist_id, SEXP R_name){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); htri_t return_val = H5Pexist(plist_id, name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pfill_value_defined(hid_t plist, H5D_fill_value_t *status); */ SEXP R_H5Pfill_value_defined(SEXP R_plist, SEXP R_status){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_status = PROTECT(duplicate(R_status)); vars_protected++; hid_t plist = SEXP_to_longlong(R_plist, 0); H5D_fill_value_t* status; if(XLENGTH(R_status) == 0) { status = NULL; } else { R_helper = PROTECT(RToH5(R_status, h5_datatype[DT_H5D_fill_value_t], XLENGTH(R_status))); status= (H5D_fill_value_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pfill_value_defined(plist, status); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_status, h5_datatype[DT_H5D_fill_value_t]); R_status = PROTECT(H5ToR_single_step(status, h5_datatype[DT_H5D_fill_value_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_status); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("status")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pfree_merge_committed_dtype_paths(hid_t plist_id); */ SEXP R_H5Pfree_merge_committed_dtype_paths(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); herr_t return_val = H5Pfree_merge_committed_dtype_paths(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget(hid_t plist_id, const char *name, void * value); */ SEXP R_H5Pget(SEXP R_plist_id, SEXP R_name, SEXP R_value, SEXP _dupl_value){ int vars_protected=0; if(SEXP_to_logical(_dupl_value)) { R_value = PROTECT(duplicate(R_value)); vars_protected++; } hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); void* value; if(XLENGTH(R_value) == 0) { value = NULL; } else { value = (void *) VOIDPTR(R_value); } herr_t return_val = H5Pget(plist_id, name, value); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_value); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("value")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_alignment(hid_t fapl_id, hsize_t *threshold, hsize_t *alignment); */ SEXP R_H5Pget_alignment(SEXP R_fapl_id, SEXP R_threshold, SEXP R_alignment){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_threshold = PROTECT(duplicate(R_threshold)); vars_protected++; R_alignment = PROTECT(duplicate(R_alignment)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hsize_t* threshold; if(XLENGTH(R_threshold) == 0) { threshold = NULL; } else { R_helper = PROTECT(RToH5(R_threshold, h5_datatype[DT_hsize_t], XLENGTH(R_threshold))); threshold= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* alignment; if(XLENGTH(R_alignment) == 0) { alignment = NULL; } else { R_helper = PROTECT(RToH5(R_alignment, h5_datatype[DT_hsize_t], XLENGTH(R_alignment))); alignment= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_alignment(fapl_id, threshold, alignment); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_threshold, h5_datatype[DT_hsize_t]); R_threshold = PROTECT(H5ToR_single_step(threshold, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_alignment, h5_datatype[DT_hsize_t]); R_alignment = PROTECT(H5ToR_single_step(alignment, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_threshold); SET_VECTOR_ELT(__ret_list, 2, R_alignment); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("threshold")); SET_STRING_ELT(__ret_list_names, 2, mkChar("alignment")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_alloc_time(hid_t plist_id, H5D_alloc_time_t *alloc_time); */ SEXP R_H5Pget_alloc_time(SEXP R_plist_id, SEXP R_alloc_time){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_alloc_time = PROTECT(duplicate(R_alloc_time)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5D_alloc_time_t* alloc_time; if(XLENGTH(R_alloc_time) == 0) { alloc_time = NULL; } else { R_helper = PROTECT(RToH5(R_alloc_time, h5_datatype[DT_H5D_alloc_time_t], XLENGTH(R_alloc_time))); alloc_time= (H5D_alloc_time_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_alloc_time(plist_id, alloc_time); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_alloc_time, h5_datatype[DT_H5D_alloc_time_t]); R_alloc_time = PROTECT(H5ToR_single_step(alloc_time, h5_datatype[DT_H5D_alloc_time_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_alloc_time); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("alloc_time")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_attr_creation_order(hid_t plist_id, unsigned *crt_order_flags); */ SEXP R_H5Pget_attr_creation_order(SEXP R_plist_id, SEXP R_crt_order_flags){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_crt_order_flags = PROTECT(duplicate(R_crt_order_flags)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* crt_order_flags; if(XLENGTH(R_crt_order_flags) == 0) { crt_order_flags = NULL; } else { R_helper = PROTECT(RToH5(R_crt_order_flags, h5_datatype[DT_unsigned], XLENGTH(R_crt_order_flags))); crt_order_flags= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_attr_creation_order(plist_id, crt_order_flags); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_crt_order_flags, h5_datatype[DT_unsigned]); R_crt_order_flags = PROTECT(H5ToR_single_step(crt_order_flags, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_crt_order_flags); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("crt_order_flags")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_attr_phase_change(hid_t plist_id, unsigned *max_compact, unsigned *min_dense); */ SEXP R_H5Pget_attr_phase_change(SEXP R_plist_id, SEXP R_max_compact, SEXP R_min_dense){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_max_compact = PROTECT(duplicate(R_max_compact)); vars_protected++; R_min_dense = PROTECT(duplicate(R_min_dense)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* max_compact; if(XLENGTH(R_max_compact) == 0) { max_compact = NULL; } else { R_helper = PROTECT(RToH5(R_max_compact, h5_datatype[DT_unsigned], XLENGTH(R_max_compact))); max_compact= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* min_dense; if(XLENGTH(R_min_dense) == 0) { min_dense = NULL; } else { R_helper = PROTECT(RToH5(R_min_dense, h5_datatype[DT_unsigned], XLENGTH(R_min_dense))); min_dense= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_attr_phase_change(plist_id, max_compact, min_dense); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_max_compact, h5_datatype[DT_unsigned]); R_max_compact = PROTECT(H5ToR_single_step(max_compact, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_min_dense, h5_datatype[DT_unsigned]); R_min_dense = PROTECT(H5ToR_single_step(min_dense, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_max_compact); SET_VECTOR_ELT(__ret_list, 2, R_min_dense); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("max_compact")); SET_STRING_ELT(__ret_list_names, 2, mkChar("min_dense")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_btree_ratios(hid_t plist_id, double *left, double *middle, double *right); */ SEXP R_H5Pget_btree_ratios(SEXP R_plist_id, SEXP R_left, SEXP R_middle, SEXP R_right){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_left = PROTECT(duplicate(R_left)); vars_protected++; R_middle = PROTECT(duplicate(R_middle)); vars_protected++; R_right = PROTECT(duplicate(R_right)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); double* left; if(XLENGTH(R_left) == 0) { left = NULL; } else { R_helper = PROTECT(RToH5(R_left, h5_datatype[DT_double], XLENGTH(R_left))); left= (double*) VOIDPTR(R_helper); vars_protected++; } double* middle; if(XLENGTH(R_middle) == 0) { middle = NULL; } else { R_helper = PROTECT(RToH5(R_middle, h5_datatype[DT_double], XLENGTH(R_middle))); middle= (double*) VOIDPTR(R_helper); vars_protected++; } double* right; if(XLENGTH(R_right) == 0) { right = NULL; } else { R_helper = PROTECT(RToH5(R_right, h5_datatype[DT_double], XLENGTH(R_right))); right= (double*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_btree_ratios(plist_id, left, middle, right); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_left, h5_datatype[DT_double]); R_left = PROTECT(H5ToR_single_step(left, h5_datatype[DT_double], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_middle, h5_datatype[DT_double]); R_middle = PROTECT(H5ToR_single_step(middle, h5_datatype[DT_double], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_right, h5_datatype[DT_double]); R_right = PROTECT(H5ToR_single_step(right, h5_datatype[DT_double], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 4)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_left); SET_VECTOR_ELT(__ret_list, 2, R_middle); SET_VECTOR_ELT(__ret_list, 3, R_right); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 4)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("left")); SET_STRING_ELT(__ret_list_names, 2, mkChar("middle")); SET_STRING_ELT(__ret_list_names, 3, mkChar("right")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_cache(hid_t plist_id, int *mdc_nelmts, size_t *rdcc_nslots, size_t *rdcc_nbytes, double *rdcc_w0); */ SEXP R_H5Pget_cache(SEXP R_plist_id, SEXP R_mdc_nelmts, SEXP R_rdcc_nslots, SEXP R_rdcc_nbytes, SEXP R_rdcc_w0){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_mdc_nelmts = PROTECT(duplicate(R_mdc_nelmts)); vars_protected++; R_rdcc_nslots = PROTECT(duplicate(R_rdcc_nslots)); vars_protected++; R_rdcc_nbytes = PROTECT(duplicate(R_rdcc_nbytes)); vars_protected++; R_rdcc_w0 = PROTECT(duplicate(R_rdcc_w0)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); int* mdc_nelmts; if(XLENGTH(R_mdc_nelmts) == 0) { mdc_nelmts = NULL; } else { R_helper = PROTECT(RToH5(R_mdc_nelmts, h5_datatype[DT_int], XLENGTH(R_mdc_nelmts))); mdc_nelmts= (int*) VOIDPTR(R_helper); vars_protected++; } size_t* rdcc_nslots; if(XLENGTH(R_rdcc_nslots) == 0) { rdcc_nslots = NULL; } else { R_helper = PROTECT(RToH5(R_rdcc_nslots, h5_datatype[DT_size_t], XLENGTH(R_rdcc_nslots))); rdcc_nslots= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* rdcc_nbytes; if(XLENGTH(R_rdcc_nbytes) == 0) { rdcc_nbytes = NULL; } else { R_helper = PROTECT(RToH5(R_rdcc_nbytes, h5_datatype[DT_size_t], XLENGTH(R_rdcc_nbytes))); rdcc_nbytes= (size_t*) VOIDPTR(R_helper); vars_protected++; } double* rdcc_w0; if(XLENGTH(R_rdcc_w0) == 0) { rdcc_w0 = NULL; } else { R_helper = PROTECT(RToH5(R_rdcc_w0, h5_datatype[DT_double], XLENGTH(R_rdcc_w0))); rdcc_w0= (double*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_cache(plist_id, mdc_nelmts, rdcc_nslots, rdcc_nbytes, rdcc_w0); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_mdc_nelmts, h5_datatype[DT_int]); R_mdc_nelmts = PROTECT(H5ToR_single_step(mdc_nelmts, h5_datatype[DT_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_rdcc_nslots, h5_datatype[DT_size_t]); R_rdcc_nslots = PROTECT(H5ToR_single_step(rdcc_nslots, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_rdcc_nbytes, h5_datatype[DT_size_t]); R_rdcc_nbytes = PROTECT(H5ToR_single_step(rdcc_nbytes, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_rdcc_w0, h5_datatype[DT_double]); R_rdcc_w0 = PROTECT(H5ToR_single_step(rdcc_w0, h5_datatype[DT_double], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 5)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_mdc_nelmts); SET_VECTOR_ELT(__ret_list, 2, R_rdcc_nslots); SET_VECTOR_ELT(__ret_list, 3, R_rdcc_nbytes); SET_VECTOR_ELT(__ret_list, 4, R_rdcc_w0); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 5)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("mdc_nelmts")); SET_STRING_ELT(__ret_list_names, 2, mkChar("rdcc_nslots")); SET_STRING_ELT(__ret_list_names, 3, mkChar("rdcc_nbytes")); SET_STRING_ELT(__ret_list_names, 4, mkChar("rdcc_w0")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding ); */ SEXP R_H5Pget_char_encoding(SEXP R_plist_id, SEXP R_encoding){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_encoding = PROTECT(duplicate(R_encoding)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5T_cset_t* encoding; if(XLENGTH(R_encoding) == 0) { encoding = NULL; } else { R_helper = PROTECT(RToH5(R_encoding, h5_datatype[DT_H5T_cset_t], XLENGTH(R_encoding))); encoding= (H5T_cset_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_char_encoding(plist_id, encoding); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_encoding, h5_datatype[DT_H5T_cset_t]); R_encoding = PROTECT(H5ToR_single_step(encoding, h5_datatype[DT_H5T_cset_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_encoding); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("encoding")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Pget_chunk(hid_t plist_id, int max_ndims, hsize_t dim[]); */ SEXP R_H5Pget_chunk(SEXP R_plist_id, SEXP R_max_ndims, SEXP R_dim){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_dim = PROTECT(duplicate(R_dim)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); int max_ndims = SEXP_to_longlong(R_max_ndims, 0); hsize_t* dim; if(XLENGTH(R_dim) == 0) { dim = NULL; } else { R_helper = PROTECT(RToH5(R_dim, h5_datatype[DT_hsize_t], XLENGTH(R_dim))); dim= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } int return_val = H5Pget_chunk(plist_id, max_ndims, dim); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_dim, h5_datatype[DT_hsize_t]); R_dim = PROTECT(H5ToR_single_step(dim, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_dim); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("dim")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots, size_t *rdcc_nbytes, double *rdcc_w0); */ SEXP R_H5Pget_chunk_cache(SEXP R_dapl_id, SEXP R_rdcc_nslots, SEXP R_rdcc_nbytes, SEXP R_rdcc_w0){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_rdcc_nslots = PROTECT(duplicate(R_rdcc_nslots)); vars_protected++; R_rdcc_nbytes = PROTECT(duplicate(R_rdcc_nbytes)); vars_protected++; R_rdcc_w0 = PROTECT(duplicate(R_rdcc_w0)); vars_protected++; hid_t dapl_id = SEXP_to_longlong(R_dapl_id, 0); size_t* rdcc_nslots; if(XLENGTH(R_rdcc_nslots) == 0) { rdcc_nslots = NULL; } else { R_helper = PROTECT(RToH5(R_rdcc_nslots, h5_datatype[DT_size_t], XLENGTH(R_rdcc_nslots))); rdcc_nslots= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* rdcc_nbytes; if(XLENGTH(R_rdcc_nbytes) == 0) { rdcc_nbytes = NULL; } else { R_helper = PROTECT(RToH5(R_rdcc_nbytes, h5_datatype[DT_size_t], XLENGTH(R_rdcc_nbytes))); rdcc_nbytes= (size_t*) VOIDPTR(R_helper); vars_protected++; } double* rdcc_w0; if(XLENGTH(R_rdcc_w0) == 0) { rdcc_w0 = NULL; } else { R_helper = PROTECT(RToH5(R_rdcc_w0, h5_datatype[DT_double], XLENGTH(R_rdcc_w0))); rdcc_w0= (double*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_chunk_cache(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_rdcc_nslots, h5_datatype[DT_size_t]); R_rdcc_nslots = PROTECT(H5ToR_single_step(rdcc_nslots, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_rdcc_nbytes, h5_datatype[DT_size_t]); R_rdcc_nbytes = PROTECT(H5ToR_single_step(rdcc_nbytes, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_rdcc_w0, h5_datatype[DT_double]); R_rdcc_w0 = PROTECT(H5ToR_single_step(rdcc_w0, h5_datatype[DT_double], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 4)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_rdcc_nslots); SET_VECTOR_ELT(__ret_list, 2, R_rdcc_nbytes); SET_VECTOR_ELT(__ret_list, 3, R_rdcc_w0); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 4)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("rdcc_nslots")); SET_STRING_ELT(__ret_list_names, 2, mkChar("rdcc_nbytes")); SET_STRING_ELT(__ret_list_names, 3, mkChar("rdcc_w0")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_chunk_opts(hid_t plist_id, unsigned *opts); */ SEXP R_H5Pget_chunk_opts(SEXP R_plist_id, SEXP R_opts){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_opts = PROTECT(duplicate(R_opts)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* opts; if(XLENGTH(R_opts) == 0) { opts = NULL; } else { R_helper = PROTECT(RToH5(R_opts, h5_datatype[DT_unsigned], XLENGTH(R_opts))); opts= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_chunk_opts(plist_id, opts); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_opts, h5_datatype[DT_unsigned]); R_opts = PROTECT(H5ToR_single_step(opts, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_opts); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("opts")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Pget_class(hid_t plist_id); */ SEXP R_H5Pget_class(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hid_t return_val = H5Pget_class(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL char *H5Pget_class_name(hid_t pclass_id); */ SEXP R_H5Pget_class_name(SEXP R_pclass_id){ int vars_protected=0; hid_t pclass_id = SEXP_to_longlong(R_pclass_id, 0); char* return_val = H5Pget_class_name(pclass_id); SEXP R_return_val= R_NilValue; if(return_val==NULL) { R_return_val = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_return_val = PROTECT(mkString(return_val)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; H5free_memory(return_val); UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Pget_class_parent(hid_t pclass_id); */ SEXP R_H5Pget_class_parent(SEXP R_pclass_id){ int vars_protected=0; hid_t pclass_id = SEXP_to_longlong(R_pclass_id, 0); hid_t return_val = H5Pget_class_parent(pclass_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *crt_intmd ); */ SEXP R_H5Pget_copy_object(SEXP R_plist_id, SEXP R_crt_intmd){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_crt_intmd = PROTECT(duplicate(R_crt_intmd)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* crt_intmd; if(XLENGTH(R_crt_intmd) == 0) { crt_intmd = NULL; } else { R_helper = PROTECT(RToH5(R_crt_intmd, h5_datatype[DT_unsigned], XLENGTH(R_crt_intmd))); crt_intmd= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_copy_object(plist_id, crt_intmd); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_crt_intmd, h5_datatype[DT_unsigned]); R_crt_intmd = PROTECT(H5ToR_single_step(crt_intmd, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_crt_intmd); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("crt_intmd")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_core_write_tracking(hid_t fapl_id, hbool_t *is_enabled, size_t *page_size); */ SEXP R_H5Pget_core_write_tracking(SEXP R_fapl_id, SEXP R_is_enabled, SEXP R_page_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_is_enabled = PROTECT(duplicate(R_is_enabled)); vars_protected++; R_page_size = PROTECT(duplicate(R_page_size)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hbool_t* is_enabled; if(XLENGTH(R_is_enabled) == 0) { is_enabled = NULL; } else { R_helper = PROTECT(RToH5(R_is_enabled, h5_datatype[DT_hbool_t], XLENGTH(R_is_enabled))); is_enabled= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } size_t* page_size; if(XLENGTH(R_page_size) == 0) { page_size = NULL; } else { R_helper = PROTECT(RToH5(R_page_size, h5_datatype[DT_size_t], XLENGTH(R_page_size))); page_size= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_core_write_tracking(fapl_id, is_enabled, page_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_is_enabled, h5_datatype[DT_hbool_t]); R_is_enabled = PROTECT(H5ToR_single_step(is_enabled, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_page_size, h5_datatype[DT_size_t]); R_page_size = PROTECT(H5ToR_single_step(page_size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_is_enabled); SET_VECTOR_ELT(__ret_list, 2, R_page_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("is_enabled")); SET_STRING_ELT(__ret_list_names, 2, mkChar("page_size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd ); */ SEXP R_H5Pget_create_intermediate_group(SEXP R_plist_id, SEXP R_crt_intmd){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_crt_intmd = PROTECT(duplicate(R_crt_intmd)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* crt_intmd; if(XLENGTH(R_crt_intmd) == 0) { crt_intmd = NULL; } else { R_helper = PROTECT(RToH5(R_crt_intmd, h5_datatype[DT_unsigned], XLENGTH(R_crt_intmd))); crt_intmd= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_create_intermediate_group(plist_id, crt_intmd); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_crt_intmd, h5_datatype[DT_unsigned]); R_crt_intmd = PROTECT(H5ToR_single_step(crt_intmd, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_crt_intmd); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("crt_intmd")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Pget_data_transform(hid_t plist_id, char* expression , size_t size); */ SEXP R_H5Pget_data_transform(SEXP R_plist_id, SEXP R_expression, SEXP R_size){ int vars_protected=0; R_expression = PROTECT(duplicate(R_expression)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); char* expression; if(XLENGTH(R_expression) == 0) { expression = NULL; } else { expression = R_alloc(strlen(CHAR(STRING_ELT(R_expression, 0))) + 1, 1); strcpy(expression, CHAR(STRING_ELT(R_expression, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Pget_data_transform(plist_id, expression, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(expression==NULL) { R_expression = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_expression = PROTECT(mkString(expression)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_expression); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("expression")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Pget_driver(hid_t plist_id); */ SEXP R_H5Pget_driver(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hid_t return_val = H5Pget_driver(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5Z_EDC_t H5Pget_edc_check(hid_t plist_id); */ SEXP R_H5Pget_edc_check(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5Z_EDC_t return_val = H5Pget_edc_check(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5Z_EDC_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Pget_efile_prefix(hid_t dapl_id, char* prefix , size_t size); */ SEXP R_H5Pget_efile_prefix(SEXP R_dapl_id, SEXP R_prefix, SEXP R_size){ int vars_protected=0; R_prefix = PROTECT(duplicate(R_prefix)); vars_protected++; hid_t dapl_id = SEXP_to_longlong(R_dapl_id, 0); char* prefix; if(XLENGTH(R_prefix) == 0) { prefix = NULL; } else { prefix = R_alloc(strlen(CHAR(STRING_ELT(R_prefix, 0))) + 1, 1); strcpy(prefix, CHAR(STRING_ELT(R_prefix, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Pget_efile_prefix(dapl_id, prefix, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(prefix==NULL) { R_prefix = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_prefix = PROTECT(mkString(prefix)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_prefix); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("prefix")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_elink_acc_flags(hid_t lapl_id, unsigned *flags); */ SEXP R_H5Pget_elink_acc_flags(SEXP R_lapl_id, SEXP R_flags){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_flags = PROTECT(duplicate(R_flags)); vars_protected++; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); unsigned* flags; if(XLENGTH(R_flags) == 0) { flags = NULL; } else { R_helper = PROTECT(RToH5(R_flags, h5_datatype[DT_unsigned], XLENGTH(R_flags))); flags= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_elink_acc_flags(lapl_id, flags); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_flags, h5_datatype[DT_unsigned]); R_flags = PROTECT(H5ToR_single_step(flags, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_flags); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("flags")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Pget_elink_fapl(hid_t lapl_id); */ SEXP R_H5Pget_elink_fapl(SEXP R_lapl_id){ int vars_protected=0; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); hid_t return_val = H5Pget_elink_fapl(lapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_elink_file_cache_size(hid_t plist_id, unsigned *efc_size); */ SEXP R_H5Pget_elink_file_cache_size(SEXP R_plist_id, SEXP R_efc_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_efc_size = PROTECT(duplicate(R_efc_size)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* efc_size; if(XLENGTH(R_efc_size) == 0) { efc_size = NULL; } else { R_helper = PROTECT(RToH5(R_efc_size, h5_datatype[DT_unsigned], XLENGTH(R_efc_size))); efc_size= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_elink_file_cache_size(plist_id, efc_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_efc_size, h5_datatype[DT_unsigned]); R_efc_size = PROTECT(H5ToR_single_step(efc_size, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_efc_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("efc_size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Pget_elink_prefix(hid_t plist_id, char *prefix, size_t size); */ SEXP R_H5Pget_elink_prefix(SEXP R_plist_id, SEXP R_prefix, SEXP R_size){ int vars_protected=0; R_prefix = PROTECT(duplicate(R_prefix)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); char* prefix; if(XLENGTH(R_prefix) == 0) { prefix = NULL; } else { prefix = R_alloc(strlen(CHAR(STRING_ELT(R_prefix, 0))) + 1, 1); strcpy(prefix, CHAR(STRING_ELT(R_prefix, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Pget_elink_prefix(plist_id, prefix, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(prefix==NULL) { R_prefix = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_prefix = PROTECT(mkString(prefix)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_prefix); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("prefix")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries , unsigned *est_name_len ); */ SEXP R_H5Pget_est_link_info(SEXP R_plist_id, SEXP R_est_num_entries, SEXP R_est_name_len){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_est_num_entries = PROTECT(duplicate(R_est_num_entries)); vars_protected++; R_est_name_len = PROTECT(duplicate(R_est_name_len)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* est_num_entries; if(XLENGTH(R_est_num_entries) == 0) { est_num_entries = NULL; } else { R_helper = PROTECT(RToH5(R_est_num_entries, h5_datatype[DT_unsigned], XLENGTH(R_est_num_entries))); est_num_entries= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* est_name_len; if(XLENGTH(R_est_name_len) == 0) { est_name_len = NULL; } else { R_helper = PROTECT(RToH5(R_est_name_len, h5_datatype[DT_unsigned], XLENGTH(R_est_name_len))); est_name_len= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_est_link_info(plist_id, est_num_entries, est_name_len); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_est_num_entries, h5_datatype[DT_unsigned]); R_est_num_entries = PROTECT(H5ToR_single_step(est_num_entries, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_est_name_len, h5_datatype[DT_unsigned]); R_est_name_len = PROTECT(H5ToR_single_step(est_name_len, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_est_num_entries); SET_VECTOR_ELT(__ret_list, 2, R_est_name_len); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("est_num_entries")); SET_STRING_ELT(__ret_list_names, 2, mkChar("est_name_len")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_evict_on_close(hid_t fapl_id, hbool_t *evict_on_close); */ SEXP R_H5Pget_evict_on_close(SEXP R_fapl_id, SEXP R_evict_on_close){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_evict_on_close = PROTECT(duplicate(R_evict_on_close)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hbool_t* evict_on_close; if(XLENGTH(R_evict_on_close) == 0) { evict_on_close = NULL; } else { R_helper = PROTECT(RToH5(R_evict_on_close, h5_datatype[DT_hbool_t], XLENGTH(R_evict_on_close))); evict_on_close= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_evict_on_close(fapl_id, evict_on_close); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_evict_on_close, h5_datatype[DT_hbool_t]); R_evict_on_close = PROTECT(H5ToR_single_step(evict_on_close, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_evict_on_close); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("evict_on_close")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_external(hid_t plist_id, unsigned idx, size_t name_size, char *name, off_t *offset, hsize_t *size); */ SEXP R_H5Pget_external(SEXP R_plist_id, SEXP R_idx, SEXP R_name_size, SEXP R_name, SEXP R_offset, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; R_offset = PROTECT(duplicate(R_offset)); vars_protected++; R_size = PROTECT(duplicate(R_size)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned idx = SEXP_to_longlong(R_idx, 0); size_t name_size = SEXP_to_longlong(R_name_size, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } off_t* offset; if(XLENGTH(R_offset) == 0) { offset = NULL; } else { R_helper = PROTECT(RToH5(R_offset, h5_datatype[DT_off_t], XLENGTH(R_offset))); offset= (off_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_hsize_t], XLENGTH(R_size))); size= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_external(plist_id, idx, name_size, name, offset, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } size_helper = guess_nelem(R_offset, h5_datatype[DT_off_t]); R_offset = PROTECT(H5ToR_single_step(offset, h5_datatype[DT_off_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_size, h5_datatype[DT_hsize_t]); R_size = PROTECT(H5ToR_single_step(size, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 4)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SET_VECTOR_ELT(__ret_list, 2, R_offset); SET_VECTOR_ELT(__ret_list, 3, R_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 4)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_STRING_ELT(__ret_list_names, 2, mkChar("offset")); SET_STRING_ELT(__ret_list_names, 3, mkChar("size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Pget_external_count(hid_t plist_id); */ SEXP R_H5Pget_external_count(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); int return_val = H5Pget_external_count(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_family_offset(hid_t fapl_id, hsize_t *offset); */ SEXP R_H5Pget_family_offset(SEXP R_fapl_id, SEXP R_offset){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_offset = PROTECT(duplicate(R_offset)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hsize_t* offset; if(XLENGTH(R_offset) == 0) { offset = NULL; } else { R_helper = PROTECT(RToH5(R_offset, h5_datatype[DT_hsize_t], XLENGTH(R_offset))); offset= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_family_offset(fapl_id, offset); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_offset, h5_datatype[DT_hsize_t]); R_offset = PROTECT(H5ToR_single_step(offset, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_offset); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("offset")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_fclose_degree(hid_t fapl_id, H5F_close_degree_t *degree); */ SEXP R_H5Pget_fclose_degree(SEXP R_fapl_id, SEXP R_degree){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_degree = PROTECT(duplicate(R_degree)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); H5F_close_degree_t* degree; if(XLENGTH(R_degree) == 0) { degree = NULL; } else { R_helper = PROTECT(RToH5(R_degree, h5_datatype[DT_H5F_close_degree_t], XLENGTH(R_degree))); degree= (H5F_close_degree_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_fclose_degree(fapl_id, degree); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_degree, h5_datatype[DT_H5F_close_degree_t]); R_degree = PROTECT(H5ToR_single_step(degree, h5_datatype[DT_H5F_close_degree_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_degree); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("degree")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_file_space(hid_t plist_id, H5F_file_space_type_t *strategy, hsize_t *threshold); */ SEXP R_H5Pget_file_space(SEXP R_plist_id, SEXP R_strategy, SEXP R_threshold){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_strategy = PROTECT(duplicate(R_strategy)); vars_protected++; R_threshold = PROTECT(duplicate(R_threshold)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5F_file_space_type_t* strategy; if(XLENGTH(R_strategy) == 0) { strategy = NULL; } else { R_helper = PROTECT(RToH5(R_strategy, h5_datatype[DT_H5F_file_space_type_t], XLENGTH(R_strategy))); strategy= (H5F_file_space_type_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* threshold; if(XLENGTH(R_threshold) == 0) { threshold = NULL; } else { R_helper = PROTECT(RToH5(R_threshold, h5_datatype[DT_hsize_t], XLENGTH(R_threshold))); threshold= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_file_space(plist_id, strategy, threshold); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_strategy, h5_datatype[DT_H5F_file_space_type_t]); R_strategy = PROTECT(H5ToR_single_step(strategy, h5_datatype[DT_H5F_file_space_type_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_threshold, h5_datatype[DT_hsize_t]); R_threshold = PROTECT(H5ToR_single_step(threshold, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_strategy); SET_VECTOR_ELT(__ret_list, 2, R_threshold); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("strategy")); SET_STRING_ELT(__ret_list_names, 2, mkChar("threshold")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_file_space_page_size(hid_t plist_id, hsize_t *fsp_size); */ SEXP R_H5Pget_file_space_page_size(SEXP R_plist_id, SEXP R_fsp_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_fsp_size = PROTECT(duplicate(R_fsp_size)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hsize_t* fsp_size; if(XLENGTH(R_fsp_size) == 0) { fsp_size = NULL; } else { R_helper = PROTECT(RToH5(R_fsp_size, h5_datatype[DT_hsize_t], XLENGTH(R_fsp_size))); fsp_size= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_file_space_page_size(plist_id, fsp_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_fsp_size, h5_datatype[DT_hsize_t]); R_fsp_size = PROTECT(H5ToR_single_step(fsp_size, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_fsp_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("fsp_size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t *strategy, hbool_t *persist, hsize_t *threshold); */ SEXP R_H5Pget_file_space_strategy(SEXP R_plist_id, SEXP R_strategy, SEXP R_persist, SEXP R_threshold){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_strategy = PROTECT(duplicate(R_strategy)); vars_protected++; R_persist = PROTECT(duplicate(R_persist)); vars_protected++; R_threshold = PROTECT(duplicate(R_threshold)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5F_fspace_strategy_t* strategy; if(XLENGTH(R_strategy) == 0) { strategy = NULL; } else { R_helper = PROTECT(RToH5(R_strategy, h5_datatype[DT_H5F_fspace_strategy_t], XLENGTH(R_strategy))); strategy= (H5F_fspace_strategy_t*) VOIDPTR(R_helper); vars_protected++; } hbool_t* persist; if(XLENGTH(R_persist) == 0) { persist = NULL; } else { R_helper = PROTECT(RToH5(R_persist, h5_datatype[DT_hbool_t], XLENGTH(R_persist))); persist= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* threshold; if(XLENGTH(R_threshold) == 0) { threshold = NULL; } else { R_helper = PROTECT(RToH5(R_threshold, h5_datatype[DT_hsize_t], XLENGTH(R_threshold))); threshold= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_file_space_strategy(plist_id, strategy, persist, threshold); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_strategy, h5_datatype[DT_H5F_fspace_strategy_t]); R_strategy = PROTECT(H5ToR_single_step(strategy, h5_datatype[DT_H5F_fspace_strategy_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_persist, h5_datatype[DT_hbool_t]); R_persist = PROTECT(H5ToR_single_step(persist, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_threshold, h5_datatype[DT_hsize_t]); R_threshold = PROTECT(H5ToR_single_step(threshold, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 4)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_strategy); SET_VECTOR_ELT(__ret_list, 2, R_persist); SET_VECTOR_ELT(__ret_list, 3, R_threshold); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 4)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("strategy")); SET_STRING_ELT(__ret_list_names, 2, mkChar("persist")); SET_STRING_ELT(__ret_list_names, 3, mkChar("threshold")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_fill_time(hid_t plist_id, H5D_fill_time_t *fill_time); */ SEXP R_H5Pget_fill_time(SEXP R_plist_id, SEXP R_fill_time){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_fill_time = PROTECT(duplicate(R_fill_time)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5D_fill_time_t* fill_time; if(XLENGTH(R_fill_time) == 0) { fill_time = NULL; } else { R_helper = PROTECT(RToH5(R_fill_time, h5_datatype[DT_H5D_fill_time_t], XLENGTH(R_fill_time))); fill_time= (H5D_fill_time_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_fill_time(plist_id, fill_time); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_fill_time, h5_datatype[DT_H5D_fill_time_t]); R_fill_time = PROTECT(H5ToR_single_step(fill_time, h5_datatype[DT_H5D_fill_time_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_fill_time); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("fill_time")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_fill_value(hid_t plist_id, hid_t type_id, void *value); */ SEXP R_H5Pget_fill_value(SEXP R_plist_id, SEXP R_type_id, SEXP R_value, SEXP _dupl_value){ int vars_protected=0; if(SEXP_to_logical(_dupl_value)) { R_value = PROTECT(duplicate(R_value)); vars_protected++; } hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hid_t type_id = SEXP_to_longlong(R_type_id, 0); void* value; if(XLENGTH(R_value) == 0) { value = NULL; } else { value = (void *) VOIDPTR(R_value); } herr_t return_val = H5Pget_fill_value(plist_id, type_id, value); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_value); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("value")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_filter_by_id2(hid_t plist_id, H5Z_filter_t id, unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[], unsigned *filter_config); */ SEXP R_H5Pget_filter_by_id2(SEXP R_plist_id, SEXP R_id, SEXP R_flags, SEXP R_cd_nelmts, SEXP R_cd_values, SEXP R_namelen, SEXP R_name, SEXP R_filter_config){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_flags = PROTECT(duplicate(R_flags)); vars_protected++; R_cd_nelmts = PROTECT(duplicate(R_cd_nelmts)); vars_protected++; R_cd_values = PROTECT(duplicate(R_cd_values)); vars_protected++; R_name = PROTECT(duplicate(R_name)); vars_protected++; R_filter_config = PROTECT(duplicate(R_filter_config)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5Z_filter_t id = SEXP_to_longlong(R_id, 0); unsigned int* flags; if(XLENGTH(R_flags) == 0) { flags = NULL; } else { R_helper = PROTECT(RToH5(R_flags, h5_datatype[DT_unsigned_int], XLENGTH(R_flags))); flags= (unsigned int*) VOIDPTR(R_helper); vars_protected++; } size_t* cd_nelmts; if(XLENGTH(R_cd_nelmts) == 0) { cd_nelmts = NULL; } else { R_helper = PROTECT(RToH5(R_cd_nelmts, h5_datatype[DT_size_t], XLENGTH(R_cd_nelmts))); cd_nelmts= (size_t*) VOIDPTR(R_helper); vars_protected++; } unsigned* cd_values; if(XLENGTH(R_cd_values) == 0) { cd_values = NULL; } else { R_helper = PROTECT(RToH5(R_cd_values, h5_datatype[DT_unsigned], XLENGTH(R_cd_values))); cd_values= (unsigned*) VOIDPTR(R_helper); vars_protected++; } size_t namelen = SEXP_to_longlong(R_namelen, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } unsigned* filter_config; if(XLENGTH(R_filter_config) == 0) { filter_config = NULL; } else { R_helper = PROTECT(RToH5(R_filter_config, h5_datatype[DT_unsigned], XLENGTH(R_filter_config))); filter_config= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_filter_by_id2(plist_id, id, flags, cd_nelmts, cd_values, namelen, name, filter_config); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_flags, h5_datatype[DT_unsigned_int]); R_flags = PROTECT(H5ToR_single_step(flags, h5_datatype[DT_unsigned_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_cd_nelmts, h5_datatype[DT_size_t]); R_cd_nelmts = PROTECT(H5ToR_single_step(cd_nelmts, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_cd_values, h5_datatype[DT_unsigned]); R_cd_values = PROTECT(H5ToR_single_step(cd_values, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } size_helper = guess_nelem(R_filter_config, h5_datatype[DT_unsigned]); R_filter_config = PROTECT(H5ToR_single_step(filter_config, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 6)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_flags); SET_VECTOR_ELT(__ret_list, 2, R_cd_nelmts); SET_VECTOR_ELT(__ret_list, 3, R_cd_values); SET_VECTOR_ELT(__ret_list, 4, R_name); SET_VECTOR_ELT(__ret_list, 5, R_filter_config); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 6)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("flags")); SET_STRING_ELT(__ret_list_names, 2, mkChar("cd_nelmts")); SET_STRING_ELT(__ret_list_names, 3, mkChar("cd_values")); SET_STRING_ELT(__ret_list_names, 4, mkChar("name")); SET_STRING_ELT(__ret_list_names, 5, mkChar("filter_config")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5Z_filter_t H5Pget_filter2(hid_t plist_id, unsigned filter, unsigned int *flags, size_t *cd_nelmts, unsigned cd_values[], size_t namelen, char name[], unsigned *filter_config ); */ SEXP R_H5Pget_filter2(SEXP R_plist_id, SEXP R_filter, SEXP R_flags, SEXP R_cd_nelmts, SEXP R_cd_values, SEXP R_namelen, SEXP R_name, SEXP R_filter_config){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_flags = PROTECT(duplicate(R_flags)); vars_protected++; R_cd_nelmts = PROTECT(duplicate(R_cd_nelmts)); vars_protected++; R_cd_values = PROTECT(duplicate(R_cd_values)); vars_protected++; R_name = PROTECT(duplicate(R_name)); vars_protected++; R_filter_config = PROTECT(duplicate(R_filter_config)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned filter = SEXP_to_longlong(R_filter, 0); unsigned int* flags; if(XLENGTH(R_flags) == 0) { flags = NULL; } else { R_helper = PROTECT(RToH5(R_flags, h5_datatype[DT_unsigned_int], XLENGTH(R_flags))); flags= (unsigned int*) VOIDPTR(R_helper); vars_protected++; } size_t* cd_nelmts; if(XLENGTH(R_cd_nelmts) == 0) { cd_nelmts = NULL; } else { R_helper = PROTECT(RToH5(R_cd_nelmts, h5_datatype[DT_size_t], XLENGTH(R_cd_nelmts))); cd_nelmts= (size_t*) VOIDPTR(R_helper); vars_protected++; } unsigned* cd_values; if(XLENGTH(R_cd_values) == 0) { cd_values = NULL; } else { R_helper = PROTECT(RToH5(R_cd_values, h5_datatype[DT_unsigned], XLENGTH(R_cd_values))); cd_values= (unsigned*) VOIDPTR(R_helper); vars_protected++; } size_t namelen = SEXP_to_longlong(R_namelen, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } unsigned* filter_config; if(XLENGTH(R_filter_config) == 0) { filter_config = NULL; } else { R_helper = PROTECT(RToH5(R_filter_config, h5_datatype[DT_unsigned], XLENGTH(R_filter_config))); filter_config= (unsigned*) VOIDPTR(R_helper); vars_protected++; } H5Z_filter_t return_val = H5Pget_filter2(plist_id, filter, flags, cd_nelmts, cd_values, namelen, name, filter_config); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_flags, h5_datatype[DT_unsigned_int]); R_flags = PROTECT(H5ToR_single_step(flags, h5_datatype[DT_unsigned_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_cd_nelmts, h5_datatype[DT_size_t]); R_cd_nelmts = PROTECT(H5ToR_single_step(cd_nelmts, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_cd_values, h5_datatype[DT_unsigned]); R_cd_values = PROTECT(H5ToR_single_step(cd_values, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } size_helper = guess_nelem(R_filter_config, h5_datatype[DT_unsigned]); R_filter_config = PROTECT(H5ToR_single_step(filter_config, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 6)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_flags); SET_VECTOR_ELT(__ret_list, 2, R_cd_nelmts); SET_VECTOR_ELT(__ret_list, 3, R_cd_values); SET_VECTOR_ELT(__ret_list, 4, R_name); SET_VECTOR_ELT(__ret_list, 5, R_filter_config); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 6)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("flags")); SET_STRING_ELT(__ret_list_names, 2, mkChar("cd_nelmts")); SET_STRING_ELT(__ret_list_names, 3, mkChar("cd_values")); SET_STRING_ELT(__ret_list_names, 4, mkChar("name")); SET_STRING_ELT(__ret_list_names, 5, mkChar("filter_config")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_gc_references(hid_t fapl_id, unsigned *gc_ref); */ SEXP R_H5Pget_gc_references(SEXP R_fapl_id, SEXP R_gc_ref){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_gc_ref = PROTECT(duplicate(R_gc_ref)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); unsigned* gc_ref; if(XLENGTH(R_gc_ref) == 0) { gc_ref = NULL; } else { R_helper = PROTECT(RToH5(R_gc_ref, h5_datatype[DT_unsigned], XLENGTH(R_gc_ref))); gc_ref= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_gc_references(fapl_id, gc_ref); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_gc_ref, h5_datatype[DT_unsigned]); R_gc_ref = PROTECT(H5ToR_single_step(gc_ref, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_gc_ref); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("gc_ref")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_hyper_vector_size(hid_t fapl_id, size_t *size); */ SEXP R_H5Pget_hyper_vector_size(SEXP R_fapl_id, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_size = PROTECT(duplicate(R_size)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); size_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_size_t], XLENGTH(R_size))); size= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_hyper_vector_size(fapl_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_size, h5_datatype[DT_size_t]); R_size = PROTECT(H5ToR_single_step(size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_istore_k(hid_t plist_id, unsigned *ik); */ SEXP R_H5Pget_istore_k(SEXP R_plist_id, SEXP R_ik){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ik = PROTECT(duplicate(R_ik)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* ik; if(XLENGTH(R_ik) == 0) { ik = NULL; } else { R_helper = PROTECT(RToH5(R_ik, h5_datatype[DT_unsigned], XLENGTH(R_ik))); ik= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_istore_k(plist_id, ik); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ik, h5_datatype[DT_unsigned]); R_ik = PROTECT(H5ToR_single_step(ik, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ik); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ik")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL H5D_layout_t H5Pget_layout(hid_t plist_id); */ SEXP R_H5Pget_layout(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5D_layout_t return_val = H5Pget_layout(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarFactor(return_val, h5_datatype[DT_H5D_layout_t])); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_libver_bounds(hid_t plist_id, H5F_libver_t *low, H5F_libver_t *high); */ SEXP R_H5Pget_libver_bounds(SEXP R_plist_id, SEXP R_low, SEXP R_high){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_low = PROTECT(duplicate(R_low)); vars_protected++; R_high = PROTECT(duplicate(R_high)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5F_libver_t* low; if(XLENGTH(R_low) == 0) { low = NULL; } else { R_helper = PROTECT(RToH5(R_low, h5_datatype[DT_H5F_libver_t], XLENGTH(R_low))); low= (H5F_libver_t*) VOIDPTR(R_helper); vars_protected++; } H5F_libver_t* high; if(XLENGTH(R_high) == 0) { high = NULL; } else { R_helper = PROTECT(RToH5(R_high, h5_datatype[DT_H5F_libver_t], XLENGTH(R_high))); high= (H5F_libver_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_libver_bounds(plist_id, low, high); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_low, h5_datatype[DT_H5F_libver_t]); R_low = PROTECT(H5ToR_single_step(low, h5_datatype[DT_H5F_libver_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_high, h5_datatype[DT_H5F_libver_t]); R_high = PROTECT(H5ToR_single_step(high, h5_datatype[DT_H5F_libver_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_low); SET_VECTOR_ELT(__ret_list, 2, R_high); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("low")); SET_STRING_ELT(__ret_list_names, 2, mkChar("high")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_link_creation_order(hid_t plist_id, unsigned *crt_order_flags ); */ SEXP R_H5Pget_link_creation_order(SEXP R_plist_id, SEXP R_crt_order_flags){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_crt_order_flags = PROTECT(duplicate(R_crt_order_flags)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* crt_order_flags; if(XLENGTH(R_crt_order_flags) == 0) { crt_order_flags = NULL; } else { R_helper = PROTECT(RToH5(R_crt_order_flags, h5_datatype[DT_unsigned], XLENGTH(R_crt_order_flags))); crt_order_flags= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_link_creation_order(plist_id, crt_order_flags); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_crt_order_flags, h5_datatype[DT_unsigned]); R_crt_order_flags = PROTECT(H5ToR_single_step(crt_order_flags, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_crt_order_flags); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("crt_order_flags")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_link_phase_change(hid_t plist_id, unsigned *max_compact , unsigned *min_dense ); */ SEXP R_H5Pget_link_phase_change(SEXP R_plist_id, SEXP R_max_compact, SEXP R_min_dense){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_max_compact = PROTECT(duplicate(R_max_compact)); vars_protected++; R_min_dense = PROTECT(duplicate(R_min_dense)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* max_compact; if(XLENGTH(R_max_compact) == 0) { max_compact = NULL; } else { R_helper = PROTECT(RToH5(R_max_compact, h5_datatype[DT_unsigned], XLENGTH(R_max_compact))); max_compact= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* min_dense; if(XLENGTH(R_min_dense) == 0) { min_dense = NULL; } else { R_helper = PROTECT(RToH5(R_min_dense, h5_datatype[DT_unsigned], XLENGTH(R_min_dense))); min_dense= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_link_phase_change(plist_id, max_compact, min_dense); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_max_compact, h5_datatype[DT_unsigned]); R_max_compact = PROTECT(H5ToR_single_step(max_compact, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_min_dense, h5_datatype[DT_unsigned]); R_min_dense = PROTECT(H5ToR_single_step(min_dense, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_max_compact); SET_VECTOR_ELT(__ret_list, 2, R_min_dense); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("max_compact")); SET_STRING_ELT(__ret_list_names, 2, mkChar("min_dense")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_local_heap_size_hint(hid_t plist_id, size_t *size_hint ); */ SEXP R_H5Pget_local_heap_size_hint(SEXP R_plist_id, SEXP R_size_hint){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_size_hint = PROTECT(duplicate(R_size_hint)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); size_t* size_hint; if(XLENGTH(R_size_hint) == 0) { size_hint = NULL; } else { R_helper = PROTECT(RToH5(R_size_hint, h5_datatype[DT_size_t], XLENGTH(R_size_hint))); size_hint= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_local_heap_size_hint(plist_id, size_hint); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_size_hint, h5_datatype[DT_size_t]); R_size_hint = PROTECT(H5ToR_single_step(size_hint, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_size_hint); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("size_hint")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Pget_mdc_config (SEXP R_plist_id, SEXP R_config_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_config_ptr = PROTECT(duplicate(R_config_ptr)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); R_helper = PROTECT(RToH5(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t], guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t]))); H5AC_cache_config_t* config_ptr= (H5AC_cache_config_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Pget_mdc_config (plist_id, config_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t]); R_config_ptr = PROTECT(H5ToR_single_step(config_ptr, h5_datatype[DT_H5AC_cache_config_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_config_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("config_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr ); */ SEXP R_H5Pget_mdc_image_config(SEXP R_plist_id, SEXP R_config_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_config_ptr = PROTECT(duplicate(R_config_ptr)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); R_helper = PROTECT(RToH5(R_config_ptr, h5_datatype[DT_H5AC_cache_image_config_t], guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_image_config_t]))); H5AC_cache_image_config_t* config_ptr= (H5AC_cache_image_config_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Pget_mdc_image_config(plist_id, config_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_image_config_t]); R_config_ptr = PROTECT(H5ToR_single_step(config_ptr, h5_datatype[DT_H5AC_cache_image_config_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_config_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("config_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_mdc_log_options(hid_t plist_id, hbool_t *is_enabled, char *location, size_t *location_size, hbool_t *start_on_access); */ SEXP R_H5Pget_mdc_log_options(SEXP R_plist_id, SEXP R_is_enabled, SEXP R_location, SEXP R_location_size, SEXP R_start_on_access){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_is_enabled = PROTECT(duplicate(R_is_enabled)); vars_protected++; R_location = PROTECT(duplicate(R_location)); vars_protected++; R_location_size = PROTECT(duplicate(R_location_size)); vars_protected++; R_start_on_access = PROTECT(duplicate(R_start_on_access)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hbool_t* is_enabled; if(XLENGTH(R_is_enabled) == 0) { is_enabled = NULL; } else { R_helper = PROTECT(RToH5(R_is_enabled, h5_datatype[DT_hbool_t], XLENGTH(R_is_enabled))); is_enabled= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } char* location; if(XLENGTH(R_location) == 0) { location = NULL; } else { location = R_alloc(strlen(CHAR(STRING_ELT(R_location, 0))) + 1, 1); strcpy(location, CHAR(STRING_ELT(R_location, 0))); } size_t* location_size; if(XLENGTH(R_location_size) == 0) { location_size = NULL; } else { R_helper = PROTECT(RToH5(R_location_size, h5_datatype[DT_size_t], XLENGTH(R_location_size))); location_size= (size_t*) VOIDPTR(R_helper); vars_protected++; } hbool_t* start_on_access; if(XLENGTH(R_start_on_access) == 0) { start_on_access = NULL; } else { R_helper = PROTECT(RToH5(R_start_on_access, h5_datatype[DT_hbool_t], XLENGTH(R_start_on_access))); start_on_access= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_mdc_log_options(plist_id, is_enabled, location, location_size, start_on_access); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_is_enabled, h5_datatype[DT_hbool_t]); R_is_enabled = PROTECT(H5ToR_single_step(is_enabled, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; if(location==NULL) { R_location = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_location = PROTECT(mkString(location)); vars_protected++; } size_helper = guess_nelem(R_location_size, h5_datatype[DT_size_t]); R_location_size = PROTECT(H5ToR_single_step(location_size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_start_on_access, h5_datatype[DT_hbool_t]); R_start_on_access = PROTECT(H5ToR_single_step(start_on_access, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 5)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_is_enabled); SET_VECTOR_ELT(__ret_list, 2, R_location); SET_VECTOR_ELT(__ret_list, 3, R_location_size); SET_VECTOR_ELT(__ret_list, 4, R_start_on_access); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 5)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("is_enabled")); SET_STRING_ELT(__ret_list_names, 2, mkChar("location")); SET_STRING_ELT(__ret_list_names, 3, mkChar("location_size")); SET_STRING_ELT(__ret_list_names, 4, mkChar("start_on_access")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_meta_block_size(hid_t fapl_id, hsize_t *size); */ SEXP R_H5Pget_meta_block_size(SEXP R_fapl_id, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_size = PROTECT(duplicate(R_size)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hsize_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_hsize_t], XLENGTH(R_size))); size= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_meta_block_size(fapl_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_size, h5_datatype[DT_hsize_t]); R_size = PROTECT(H5ToR_single_step(size, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_metadata_read_attempts(hid_t plist_id, unsigned *attempts); */ SEXP R_H5Pget_metadata_read_attempts(SEXP R_plist_id, SEXP R_attempts){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_attempts = PROTECT(duplicate(R_attempts)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* attempts; if(XLENGTH(R_attempts) == 0) { attempts = NULL; } else { R_helper = PROTECT(RToH5(R_attempts, h5_datatype[DT_unsigned], XLENGTH(R_attempts))); attempts= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_metadata_read_attempts(plist_id, attempts); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_attempts, h5_datatype[DT_unsigned]); R_attempts = PROTECT(H5ToR_single_step(attempts, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_attempts); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("attempts")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_multi_type(hid_t fapl_id, H5FD_mem_t *type); */ SEXP R_H5Pget_multi_type(SEXP R_fapl_id, SEXP R_type){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_type = PROTECT(duplicate(R_type)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); H5FD_mem_t* type; if(XLENGTH(R_type) == 0) { type = NULL; } else { R_helper = PROTECT(RToH5(R_type, h5_datatype[DT_H5FD_mem_t], XLENGTH(R_type))); type= (H5FD_mem_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_multi_type(fapl_id, type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_type, h5_datatype[DT_H5FD_mem_t]); R_type = PROTECT(H5ToR_single_step(type, h5_datatype[DT_H5FD_mem_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_type); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("type")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Pget_nfilters(hid_t plist_id); */ SEXP R_H5Pget_nfilters(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); int return_val = H5Pget_nfilters(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_nlinks(hid_t plist_id, size_t *nlinks); */ SEXP R_H5Pget_nlinks(SEXP R_plist_id, SEXP R_nlinks){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_nlinks = PROTECT(duplicate(R_nlinks)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); size_t* nlinks; if(XLENGTH(R_nlinks) == 0) { nlinks = NULL; } else { R_helper = PROTECT(RToH5(R_nlinks, h5_datatype[DT_size_t], XLENGTH(R_nlinks))); nlinks= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_nlinks(plist_id, nlinks); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_nlinks, h5_datatype[DT_size_t]); R_nlinks = PROTECT(H5ToR_single_step(nlinks, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_nlinks); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("nlinks")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_nprops(hid_t id, size_t *nprops); */ SEXP R_H5Pget_nprops(SEXP R_id, SEXP R_nprops){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_nprops = PROTECT(duplicate(R_nprops)); vars_protected++; hid_t id = SEXP_to_longlong(R_id, 0); size_t* nprops; if(XLENGTH(R_nprops) == 0) { nprops = NULL; } else { R_helper = PROTECT(RToH5(R_nprops, h5_datatype[DT_size_t], XLENGTH(R_nprops))); nprops= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_nprops(id, nprops); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_nprops, h5_datatype[DT_size_t]); R_nprops = PROTECT(H5ToR_single_step(nprops, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_nprops); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("nprops")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_obj_track_times(hid_t plist_id, hbool_t *track_times); */ SEXP R_H5Pget_obj_track_times(SEXP R_plist_id, SEXP R_track_times){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_track_times = PROTECT(duplicate(R_track_times)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hbool_t* track_times; if(XLENGTH(R_track_times) == 0) { track_times = NULL; } else { R_helper = PROTECT(RToH5(R_track_times, h5_datatype[DT_hbool_t], XLENGTH(R_track_times))); track_times= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_obj_track_times(plist_id, track_times); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_track_times, h5_datatype[DT_hbool_t]); R_track_times = PROTECT(H5ToR_single_step(track_times, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_track_times); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("track_times")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_page_buffer_size(hid_t plist_id, size_t *buf_size, unsigned *min_meta_per, unsigned *min_raw_per); */ SEXP R_H5Pget_page_buffer_size(SEXP R_plist_id, SEXP R_buf_size, SEXP R_min_meta_per, SEXP R_min_raw_per){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_buf_size = PROTECT(duplicate(R_buf_size)); vars_protected++; R_min_meta_per = PROTECT(duplicate(R_min_meta_per)); vars_protected++; R_min_raw_per = PROTECT(duplicate(R_min_raw_per)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); size_t* buf_size; if(XLENGTH(R_buf_size) == 0) { buf_size = NULL; } else { R_helper = PROTECT(RToH5(R_buf_size, h5_datatype[DT_size_t], XLENGTH(R_buf_size))); buf_size= (size_t*) VOIDPTR(R_helper); vars_protected++; } unsigned* min_meta_per; if(XLENGTH(R_min_meta_per) == 0) { min_meta_per = NULL; } else { R_helper = PROTECT(RToH5(R_min_meta_per, h5_datatype[DT_unsigned], XLENGTH(R_min_meta_per))); min_meta_per= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* min_raw_per; if(XLENGTH(R_min_raw_per) == 0) { min_raw_per = NULL; } else { R_helper = PROTECT(RToH5(R_min_raw_per, h5_datatype[DT_unsigned], XLENGTH(R_min_raw_per))); min_raw_per= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_page_buffer_size(plist_id, buf_size, min_meta_per, min_raw_per); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_buf_size, h5_datatype[DT_size_t]); R_buf_size = PROTECT(H5ToR_single_step(buf_size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_min_meta_per, h5_datatype[DT_unsigned]); R_min_meta_per = PROTECT(H5ToR_single_step(min_meta_per, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_min_raw_per, h5_datatype[DT_unsigned]); R_min_raw_per = PROTECT(H5ToR_single_step(min_raw_per, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 4)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf_size); SET_VECTOR_ELT(__ret_list, 2, R_min_meta_per); SET_VECTOR_ELT(__ret_list, 3, R_min_raw_per); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 4)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf_size")); SET_STRING_ELT(__ret_list_names, 2, mkChar("min_meta_per")); SET_STRING_ELT(__ret_list_names, 3, mkChar("min_raw_per")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL int H5Pget_preserve(hid_t plist_id); */ SEXP R_H5Pget_preserve(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); int return_val = H5Pget_preserve(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned *mesg_type_flags, unsigned *min_mesg_size); */ SEXP R_H5Pget_shared_mesg_index(SEXP R_plist_id, SEXP R_index_num, SEXP R_mesg_type_flags, SEXP R_min_mesg_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_mesg_type_flags = PROTECT(duplicate(R_mesg_type_flags)); vars_protected++; R_min_mesg_size = PROTECT(duplicate(R_min_mesg_size)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned index_num = SEXP_to_longlong(R_index_num, 0); unsigned* mesg_type_flags; if(XLENGTH(R_mesg_type_flags) == 0) { mesg_type_flags = NULL; } else { R_helper = PROTECT(RToH5(R_mesg_type_flags, h5_datatype[DT_unsigned], XLENGTH(R_mesg_type_flags))); mesg_type_flags= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* min_mesg_size; if(XLENGTH(R_min_mesg_size) == 0) { min_mesg_size = NULL; } else { R_helper = PROTECT(RToH5(R_min_mesg_size, h5_datatype[DT_unsigned], XLENGTH(R_min_mesg_size))); min_mesg_size= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_shared_mesg_index(plist_id, index_num, mesg_type_flags, min_mesg_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_mesg_type_flags, h5_datatype[DT_unsigned]); R_mesg_type_flags = PROTECT(H5ToR_single_step(mesg_type_flags, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_min_mesg_size, h5_datatype[DT_unsigned]); R_min_mesg_size = PROTECT(H5ToR_single_step(min_mesg_size, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_mesg_type_flags); SET_VECTOR_ELT(__ret_list, 2, R_min_mesg_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("mesg_type_flags")); SET_STRING_ELT(__ret_list_names, 2, mkChar("min_mesg_size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_shared_mesg_nindexes(hid_t plist_id, unsigned *nindexes); */ SEXP R_H5Pget_shared_mesg_nindexes(SEXP R_plist_id, SEXP R_nindexes){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_nindexes = PROTECT(duplicate(R_nindexes)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* nindexes; if(XLENGTH(R_nindexes) == 0) { nindexes = NULL; } else { R_helper = PROTECT(RToH5(R_nindexes, h5_datatype[DT_unsigned], XLENGTH(R_nindexes))); nindexes= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_shared_mesg_nindexes(plist_id, nindexes); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_nindexes, h5_datatype[DT_unsigned]); R_nindexes = PROTECT(H5ToR_single_step(nindexes, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_nindexes); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("nindexes")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_shared_mesg_phase_change(hid_t plist_id, unsigned *max_list, unsigned *min_btree); */ SEXP R_H5Pget_shared_mesg_phase_change(SEXP R_plist_id, SEXP R_max_list, SEXP R_min_btree){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_max_list = PROTECT(duplicate(R_max_list)); vars_protected++; R_min_btree = PROTECT(duplicate(R_min_btree)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* max_list; if(XLENGTH(R_max_list) == 0) { max_list = NULL; } else { R_helper = PROTECT(RToH5(R_max_list, h5_datatype[DT_unsigned], XLENGTH(R_max_list))); max_list= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* min_btree; if(XLENGTH(R_min_btree) == 0) { min_btree = NULL; } else { R_helper = PROTECT(RToH5(R_min_btree, h5_datatype[DT_unsigned], XLENGTH(R_min_btree))); min_btree= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_shared_mesg_phase_change(plist_id, max_list, min_btree); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_max_list, h5_datatype[DT_unsigned]); R_max_list = PROTECT(H5ToR_single_step(max_list, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_min_btree, h5_datatype[DT_unsigned]); R_min_btree = PROTECT(H5ToR_single_step(min_btree, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_max_list); SET_VECTOR_ELT(__ret_list, 2, R_min_btree); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("max_list")); SET_STRING_ELT(__ret_list_names, 2, mkChar("min_btree")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_sieve_buf_size(hid_t fapl_id, size_t *size); */ SEXP R_H5Pget_sieve_buf_size(SEXP R_fapl_id, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_size = PROTECT(duplicate(R_size)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); size_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_size_t], XLENGTH(R_size))); size= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_sieve_buf_size(fapl_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_size, h5_datatype[DT_size_t]); R_size = PROTECT(H5ToR_single_step(size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_size(hid_t id, const char *name, size_t *size); */ SEXP R_H5Pget_size(SEXP R_id, SEXP R_name, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_size = PROTECT(duplicate(R_size)); vars_protected++; hid_t id = SEXP_to_longlong(R_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); size_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_size_t], XLENGTH(R_size))); size= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_size(id, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_size, h5_datatype[DT_size_t]); R_size = PROTECT(H5ToR_single_step(size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_sizes(hid_t plist_id, size_t *sizeof_addr, size_t *sizeof_size); */ SEXP R_H5Pget_sizes(SEXP R_plist_id, SEXP R_sizeof_addr, SEXP R_sizeof_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_sizeof_addr = PROTECT(duplicate(R_sizeof_addr)); vars_protected++; R_sizeof_size = PROTECT(duplicate(R_sizeof_size)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); size_t* sizeof_addr; if(XLENGTH(R_sizeof_addr) == 0) { sizeof_addr = NULL; } else { R_helper = PROTECT(RToH5(R_sizeof_addr, h5_datatype[DT_size_t], XLENGTH(R_sizeof_addr))); sizeof_addr= (size_t*) VOIDPTR(R_helper); vars_protected++; } size_t* sizeof_size; if(XLENGTH(R_sizeof_size) == 0) { sizeof_size = NULL; } else { R_helper = PROTECT(RToH5(R_sizeof_size, h5_datatype[DT_size_t], XLENGTH(R_sizeof_size))); sizeof_size= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_sizes(plist_id, sizeof_addr, sizeof_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_sizeof_addr, h5_datatype[DT_size_t]); R_sizeof_addr = PROTECT(H5ToR_single_step(sizeof_addr, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_sizeof_size, h5_datatype[DT_size_t]); R_sizeof_size = PROTECT(H5ToR_single_step(sizeof_size, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_sizeof_addr); SET_VECTOR_ELT(__ret_list, 2, R_sizeof_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("sizeof_addr")); SET_STRING_ELT(__ret_list_names, 2, mkChar("sizeof_size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_small_data_block_size(hid_t fapl_id, hsize_t *size); */ SEXP R_H5Pget_small_data_block_size(SEXP R_fapl_id, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_size = PROTECT(duplicate(R_size)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hsize_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_hsize_t], XLENGTH(R_size))); size= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_small_data_block_size(fapl_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_size, h5_datatype[DT_hsize_t]); R_size = PROTECT(H5ToR_single_step(size, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_sym_k(hid_t plist_id, unsigned *ik, unsigned *lk); */ SEXP R_H5Pget_sym_k(SEXP R_plist_id, SEXP R_ik, SEXP R_lk){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_ik = PROTECT(duplicate(R_ik)); vars_protected++; R_lk = PROTECT(duplicate(R_lk)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* ik; if(XLENGTH(R_ik) == 0) { ik = NULL; } else { R_helper = PROTECT(RToH5(R_ik, h5_datatype[DT_unsigned], XLENGTH(R_ik))); ik= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* lk; if(XLENGTH(R_lk) == 0) { lk = NULL; } else { R_helper = PROTECT(RToH5(R_lk, h5_datatype[DT_unsigned], XLENGTH(R_lk))); lk= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_sym_k(plist_id, ik, lk); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_ik, h5_datatype[DT_unsigned]); R_ik = PROTECT(H5ToR_single_step(ik, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_lk, h5_datatype[DT_unsigned]); R_lk = PROTECT(H5ToR_single_step(lk, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ik); SET_VECTOR_ELT(__ret_list, 2, R_lk); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ik")); SET_STRING_ELT(__ret_list_names, 2, mkChar("lk")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_userblock(hid_t plist_id, hsize_t *size); */ SEXP R_H5Pget_userblock(SEXP R_plist_id, SEXP R_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_size = PROTECT(duplicate(R_size)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hsize_t* size; if(XLENGTH(R_size) == 0) { size = NULL; } else { R_helper = PROTECT(RToH5(R_size, h5_datatype[DT_hsize_t], XLENGTH(R_size))); size= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_userblock(plist_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_size, h5_datatype[DT_hsize_t]); R_size = PROTECT(H5ToR_single_step(size, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_version(hid_t plist_id, unsigned *boot, unsigned *freelist, unsigned *stab, unsigned *shhdr); */ SEXP R_H5Pget_version(SEXP R_plist_id, SEXP R_boot, SEXP R_freelist, SEXP R_stab, SEXP R_shhdr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_boot = PROTECT(duplicate(R_boot)); vars_protected++; R_freelist = PROTECT(duplicate(R_freelist)); vars_protected++; R_stab = PROTECT(duplicate(R_stab)); vars_protected++; R_shhdr = PROTECT(duplicate(R_shhdr)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned* boot; if(XLENGTH(R_boot) == 0) { boot = NULL; } else { R_helper = PROTECT(RToH5(R_boot, h5_datatype[DT_unsigned], XLENGTH(R_boot))); boot= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* freelist; if(XLENGTH(R_freelist) == 0) { freelist = NULL; } else { R_helper = PROTECT(RToH5(R_freelist, h5_datatype[DT_unsigned], XLENGTH(R_freelist))); freelist= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* stab; if(XLENGTH(R_stab) == 0) { stab = NULL; } else { R_helper = PROTECT(RToH5(R_stab, h5_datatype[DT_unsigned], XLENGTH(R_stab))); stab= (unsigned*) VOIDPTR(R_helper); vars_protected++; } unsigned* shhdr; if(XLENGTH(R_shhdr) == 0) { shhdr = NULL; } else { R_helper = PROTECT(RToH5(R_shhdr, h5_datatype[DT_unsigned], XLENGTH(R_shhdr))); shhdr= (unsigned*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_version(plist_id, boot, freelist, stab, shhdr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_boot, h5_datatype[DT_unsigned]); R_boot = PROTECT(H5ToR_single_step(boot, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_freelist, h5_datatype[DT_unsigned]); R_freelist = PROTECT(H5ToR_single_step(freelist, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_stab, h5_datatype[DT_unsigned]); R_stab = PROTECT(H5ToR_single_step(stab, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_shhdr, h5_datatype[DT_unsigned]); R_shhdr = PROTECT(H5ToR_single_step(shhdr, h5_datatype[DT_unsigned], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 5)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_boot); SET_VECTOR_ELT(__ret_list, 2, R_freelist); SET_VECTOR_ELT(__ret_list, 3, R_stab); SET_VECTOR_ELT(__ret_list, 4, R_shhdr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 5)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("boot")); SET_STRING_ELT(__ret_list_names, 2, mkChar("freelist")); SET_STRING_ELT(__ret_list_names, 3, mkChar("stab")); SET_STRING_ELT(__ret_list_names, 4, mkChar("shhdr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_virtual_count(hid_t dcpl_id, size_t *count); */ SEXP R_H5Pget_virtual_count(SEXP R_dcpl_id, SEXP R_count){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_count = PROTECT(duplicate(R_count)); vars_protected++; hid_t dcpl_id = SEXP_to_longlong(R_dcpl_id, 0); size_t* count; if(XLENGTH(R_count) == 0) { count = NULL; } else { R_helper = PROTECT(RToH5(R_count, h5_datatype[DT_size_t], XLENGTH(R_count))); count= (size_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_virtual_count(dcpl_id, count); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_count, h5_datatype[DT_size_t]); R_count = PROTECT(H5ToR_single_step(count, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_count); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("count")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Pget_virtual_dsetname(hid_t dcpl_id, size_t index, char *name, size_t size); */ SEXP R_H5Pget_virtual_dsetname(SEXP R_dcpl_id, SEXP R_index, SEXP R_name, SEXP R_size){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t dcpl_id = SEXP_to_longlong(R_dcpl_id, 0); size_t index = SEXP_to_longlong(R_index, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Pget_virtual_dsetname(dcpl_id, index, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Pget_virtual_filename(hid_t dcpl_id, size_t index, char *name, size_t size); */ SEXP R_H5Pget_virtual_filename(SEXP R_dcpl_id, SEXP R_index, SEXP R_name, SEXP R_size){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t dcpl_id = SEXP_to_longlong(R_dcpl_id, 0); size_t index = SEXP_to_longlong(R_index, 0); char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Pget_virtual_filename(dcpl_id, index, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Pget_virtual_prefix(hid_t dapl_id, char* prefix , size_t size); */ SEXP R_H5Pget_virtual_prefix(SEXP R_dapl_id, SEXP R_prefix, SEXP R_size){ int vars_protected=0; R_prefix = PROTECT(duplicate(R_prefix)); vars_protected++; hid_t dapl_id = SEXP_to_longlong(R_dapl_id, 0); char* prefix; if(XLENGTH(R_prefix) == 0) { prefix = NULL; } else { prefix = R_alloc(strlen(CHAR(STRING_ELT(R_prefix, 0))) + 1, 1); strcpy(prefix, CHAR(STRING_ELT(R_prefix, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Pget_virtual_prefix(dapl_id, prefix, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(prefix==NULL) { R_prefix = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_prefix = PROTECT(mkString(prefix)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_prefix); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("prefix")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size); */ SEXP R_H5Pget_virtual_printf_gap(SEXP R_plist_id, SEXP R_gap_size){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_gap_size = PROTECT(duplicate(R_gap_size)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hsize_t* gap_size; if(XLENGTH(R_gap_size) == 0) { gap_size = NULL; } else { R_helper = PROTECT(RToH5(R_gap_size, h5_datatype[DT_hsize_t], XLENGTH(R_gap_size))); gap_size= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_virtual_printf_gap(plist_id, gap_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_gap_size, h5_datatype[DT_hsize_t]); R_gap_size = PROTECT(H5ToR_single_step(gap_size, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_gap_size); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("gap_size")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Pget_virtual_srcspace(hid_t dcpl_id, size_t index); */ SEXP R_H5Pget_virtual_srcspace(SEXP R_dcpl_id, SEXP R_index){ int vars_protected=0; hid_t dcpl_id = SEXP_to_longlong(R_dcpl_id, 0); size_t index = SEXP_to_longlong(R_index, 0); hid_t return_val = H5Pget_virtual_srcspace(dcpl_id, index); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view); */ SEXP R_H5Pget_virtual_view(SEXP R_plist_id, SEXP R_view){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_view = PROTECT(duplicate(R_view)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5D_vds_view_t* view; if(XLENGTH(R_view) == 0) { view = NULL; } else { R_helper = PROTECT(RToH5(R_view, h5_datatype[DT_H5D_vds_view_t], XLENGTH(R_view))); view= (H5D_vds_view_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_virtual_view(plist_id, view); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_view, h5_datatype[DT_H5D_vds_view_t]); R_view = PROTECT(H5ToR_single_step(view, h5_datatype[DT_H5D_vds_view_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_view); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("view")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Pget_virtual_vspace(hid_t dcpl_id, size_t index); */ SEXP R_H5Pget_virtual_vspace(SEXP R_dcpl_id, SEXP R_index){ int vars_protected=0; hid_t dcpl_id = SEXP_to_longlong(R_dcpl_id, 0); size_t index = SEXP_to_longlong(R_index, 0); hid_t return_val = H5Pget_virtual_vspace(dcpl_id, index); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL htri_t H5Pisa_class(hid_t plist_id, hid_t pclass_id); */ SEXP R_H5Pisa_class(SEXP R_plist_id, SEXP R_pclass_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hid_t pclass_id = SEXP_to_longlong(R_pclass_id, 0); htri_t return_val = H5Pisa_class(plist_id, pclass_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pmodify_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int cd_values[]); */ SEXP R_H5Pmodify_filter(SEXP R_plist_id, SEXP R_filter, SEXP R_flags, SEXP R_cd_nelmts, SEXP R_cd_values){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5Z_filter_t filter = SEXP_to_longlong(R_filter, 0); unsigned int flags = SEXP_to_longlong(R_flags, 0); size_t cd_nelmts = SEXP_to_longlong(R_cd_nelmts, 0); const unsigned int* cd_values; if(XLENGTH(R_cd_values) == 0) { cd_values = NULL; } else { R_helper = PROTECT(RToH5(R_cd_values, h5_datatype[DT_unsigned_int], XLENGTH(R_cd_values))); cd_values= (const unsigned int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pmodify_filter(plist_id, filter, flags, cd_nelmts, cd_values); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Premove(hid_t plist_id, const char *name); */ SEXP R_H5Premove(SEXP R_plist_id, SEXP R_name){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); herr_t return_val = H5Premove(plist_id, name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter); */ SEXP R_H5Premove_filter(SEXP R_plist_id, SEXP R_filter){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5Z_filter_t filter = SEXP_to_longlong(R_filter, 0); herr_t return_val = H5Premove_filter(plist_id, filter); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset(hid_t plist_id, const char *name, const void *value); */ SEXP R_H5Pset(SEXP R_plist_id, SEXP R_name, SEXP R_value){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); const void* value; if(XLENGTH(R_value) == 0) { value = NULL; } else { value = (void *) VOIDPTR(R_value); } herr_t return_val = H5Pset(plist_id, name, value); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_alignment(hid_t fapl_id, hsize_t threshold, hsize_t alignment); */ SEXP R_H5Pset_alignment(SEXP R_fapl_id, SEXP R_threshold, SEXP R_alignment){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hsize_t threshold = SEXP_to_longlong(R_threshold, 0); hsize_t alignment = SEXP_to_longlong(R_alignment, 0); herr_t return_val = H5Pset_alignment(fapl_id, threshold, alignment); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_alloc_time(hid_t plist_id, H5D_alloc_time_t alloc_time); */ SEXP R_H5Pset_alloc_time(SEXP R_plist_id, SEXP R_alloc_time){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5D_alloc_time_t alloc_time = SEXP_to_longlong(R_alloc_time, 0); herr_t return_val = H5Pset_alloc_time(plist_id, alloc_time); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_attr_creation_order(hid_t plist_id, unsigned crt_order_flags); */ SEXP R_H5Pset_attr_creation_order(SEXP R_plist_id, SEXP R_crt_order_flags){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned crt_order_flags = SEXP_to_longlong(R_crt_order_flags, 0); herr_t return_val = H5Pset_attr_creation_order(plist_id, crt_order_flags); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_attr_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); */ SEXP R_H5Pset_attr_phase_change(SEXP R_plist_id, SEXP R_max_compact, SEXP R_min_dense){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned max_compact = SEXP_to_longlong(R_max_compact, 0); unsigned min_dense = SEXP_to_longlong(R_min_dense, 0); herr_t return_val = H5Pset_attr_phase_change(plist_id, max_compact, min_dense); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right); */ SEXP R_H5Pset_btree_ratios(SEXP R_plist_id, SEXP R_left, SEXP R_middle, SEXP R_right){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); double left = SEXP_to_double(R_left); double middle = SEXP_to_double(R_middle); double right = SEXP_to_double(R_right); herr_t return_val = H5Pset_btree_ratios(plist_id, left, middle, right); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg); */ SEXP R_H5Pset_buffer(SEXP R_plist_id, SEXP R_size, SEXP R_tconv, SEXP R_bkg, SEXP _dupl_tconv, SEXP _dupl_bkg){ int vars_protected=0; if(SEXP_to_logical(_dupl_tconv)) { R_tconv = PROTECT(duplicate(R_tconv)); vars_protected++; } if(SEXP_to_logical(_dupl_bkg)) { R_bkg = PROTECT(duplicate(R_bkg)); vars_protected++; } hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); size_t size = SEXP_to_longlong(R_size, 0); void* tconv; if(XLENGTH(R_tconv) == 0) { tconv = NULL; } else { tconv = (void *) VOIDPTR(R_tconv); } void* bkg; if(XLENGTH(R_bkg) == 0) { bkg = NULL; } else { bkg = (void *) VOIDPTR(R_bkg); } herr_t return_val = H5Pset_buffer(plist_id, size, tconv, bkg); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_tconv); SET_VECTOR_ELT(__ret_list, 2, R_bkg); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("tconv")); SET_STRING_ELT(__ret_list_names, 2, mkChar("bkg")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_cache(hid_t plist_id, int mdc_nelmts, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0); */ SEXP R_H5Pset_cache(SEXP R_plist_id, SEXP R_mdc_nelmts, SEXP R_rdcc_nslots, SEXP R_rdcc_nbytes, SEXP R_rdcc_w0){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); int mdc_nelmts = SEXP_to_longlong(R_mdc_nelmts, 0); size_t rdcc_nslots = SEXP_to_longlong(R_rdcc_nslots, 0); size_t rdcc_nbytes = SEXP_to_longlong(R_rdcc_nbytes, 0); double rdcc_w0 = SEXP_to_double(R_rdcc_w0); herr_t return_val = H5Pset_cache(plist_id, mdc_nelmts, rdcc_nslots, rdcc_nbytes, rdcc_w0); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding); */ SEXP R_H5Pset_char_encoding(SEXP R_plist_id, SEXP R_encoding){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5T_cset_t encoding = SEXP_to_longlong(R_encoding, 0); herr_t return_val = H5Pset_char_encoding(plist_id, encoding); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_chunk(hid_t plist_id, int ndims, const hsize_t dim[]); */ SEXP R_H5Pset_chunk(SEXP R_plist_id, SEXP R_ndims, SEXP R_dim){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); int ndims = SEXP_to_longlong(R_ndims, 0); const hsize_t* dim; if(XLENGTH(R_dim) == 0) { dim = NULL; } else { R_helper = PROTECT(RToH5(R_dim, h5_datatype[DT_hsize_t], XLENGTH(R_dim))); dim= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pset_chunk(plist_id, ndims, dim); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double rdcc_w0); */ SEXP R_H5Pset_chunk_cache(SEXP R_dapl_id, SEXP R_rdcc_nslots, SEXP R_rdcc_nbytes, SEXP R_rdcc_w0){ int vars_protected=0; hid_t dapl_id = SEXP_to_longlong(R_dapl_id, 0); size_t rdcc_nslots = SEXP_to_longlong(R_rdcc_nslots, 0); size_t rdcc_nbytes = SEXP_to_longlong(R_rdcc_nbytes, 0); double rdcc_w0 = SEXP_to_double(R_rdcc_w0); // INJECTION CODE START if(SEXP_to_longlong(R_rdcc_nslots, 0)==-1) { rdcc_nslots = H5D_CHUNK_CACHE_NSLOTS_DEFAULT; } if(SEXP_to_longlong(R_rdcc_nbytes, 0)==-1) { rdcc_nbytes = H5D_CHUNK_CACHE_NBYTES_DEFAULT; } if(SEXP_to_longlong(R_rdcc_w0, 0)==-1) { rdcc_w0 = H5D_CHUNK_CACHE_W0_DEFAULT; } // INJECTION CODE END herr_t return_val = H5Pset_chunk_cache(dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_chunk_opts(hid_t plist_id, unsigned opts); */ SEXP R_H5Pset_chunk_opts(SEXP R_plist_id, SEXP R_opts){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned opts = SEXP_to_longlong(R_opts, 0); herr_t return_val = H5Pset_chunk_opts(plist_id, opts); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned crt_intmd); */ SEXP R_H5Pset_copy_object(SEXP R_plist_id, SEXP R_crt_intmd){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned crt_intmd = SEXP_to_longlong(R_crt_intmd, 0); herr_t return_val = H5Pset_copy_object(plist_id, crt_intmd); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_core_write_tracking(hid_t fapl_id, hbool_t is_enabled, size_t page_size); */ SEXP R_H5Pset_core_write_tracking(SEXP R_fapl_id, SEXP R_is_enabled, SEXP R_page_size){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hbool_t is_enabled = SEXP_to_longlong(R_is_enabled, 0); size_t page_size = SEXP_to_longlong(R_page_size, 0); herr_t return_val = H5Pset_core_write_tracking(fapl_id, is_enabled, page_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd); */ SEXP R_H5Pset_create_intermediate_group(SEXP R_plist_id, SEXP R_crt_intmd){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned crt_intmd = SEXP_to_longlong(R_crt_intmd, 0); herr_t return_val = H5Pset_create_intermediate_group(plist_id, crt_intmd); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_data_transform(hid_t plist_id, const char* expression); */ SEXP R_H5Pset_data_transform(SEXP R_plist_id, SEXP R_expression){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); const char* expression = CHAR(STRING_ELT(R_expression, 0)); herr_t return_val = H5Pset_data_transform(plist_id, expression); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_deflate(hid_t plist_id, unsigned aggression); */ SEXP R_H5Pset_deflate(SEXP R_plist_id, SEXP R_aggression){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned aggression = SEXP_to_longlong(R_aggression, 0); herr_t return_val = H5Pset_deflate(plist_id, aggression); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_driver(hid_t plist_id, hid_t driver_id, const void *driver_info); */ SEXP R_H5Pset_driver(SEXP R_plist_id, SEXP R_driver_id, SEXP R_driver_info){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hid_t driver_id = SEXP_to_longlong(R_driver_id, 0); const void* driver_info; if(XLENGTH(R_driver_info) == 0) { driver_info = NULL; } else { driver_info = (void *) VOIDPTR(R_driver_info); } herr_t return_val = H5Pset_driver(plist_id, driver_id, driver_info); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check); */ SEXP R_H5Pset_edc_check(SEXP R_plist_id, SEXP R_check){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5Z_EDC_t check = SEXP_to_longlong(R_check, 0); herr_t return_val = H5Pset_edc_check(plist_id, check); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_efile_prefix(hid_t dapl_id, const char* prefix); */ SEXP R_H5Pset_efile_prefix(SEXP R_dapl_id, SEXP R_prefix){ int vars_protected=0; hid_t dapl_id = SEXP_to_longlong(R_dapl_id, 0); const char* prefix = CHAR(STRING_ELT(R_prefix, 0)); herr_t return_val = H5Pset_efile_prefix(dapl_id, prefix); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_elink_acc_flags(hid_t lapl_id, unsigned flags); */ SEXP R_H5Pset_elink_acc_flags(SEXP R_lapl_id, SEXP R_flags){ int vars_protected=0; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); unsigned flags = SEXP_to_longlong(R_flags, 0); herr_t return_val = H5Pset_elink_acc_flags(lapl_id, flags); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_elink_fapl(hid_t lapl_id, hid_t fapl_id); */ SEXP R_H5Pset_elink_fapl(SEXP R_lapl_id, SEXP R_fapl_id){ int vars_protected=0; hid_t lapl_id = SEXP_to_longlong(R_lapl_id, 0); hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); herr_t return_val = H5Pset_elink_fapl(lapl_id, fapl_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_elink_file_cache_size(hid_t plist_id, unsigned efc_size); */ SEXP R_H5Pset_elink_file_cache_size(SEXP R_plist_id, SEXP R_efc_size){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned efc_size = SEXP_to_longlong(R_efc_size, 0); herr_t return_val = H5Pset_elink_file_cache_size(plist_id, efc_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_elink_prefix(hid_t plist_id, const char *prefix); */ SEXP R_H5Pset_elink_prefix(SEXP R_plist_id, SEXP R_prefix){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); const char* prefix = CHAR(STRING_ELT(R_prefix, 0)); herr_t return_val = H5Pset_elink_prefix(plist_id, prefix); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_est_link_info(hid_t plist_id, unsigned est_num_entries, unsigned est_name_len); */ SEXP R_H5Pset_est_link_info(SEXP R_plist_id, SEXP R_est_num_entries, SEXP R_est_name_len){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned est_num_entries = SEXP_to_longlong(R_est_num_entries, 0); unsigned est_name_len = SEXP_to_longlong(R_est_name_len, 0); herr_t return_val = H5Pset_est_link_info(plist_id, est_num_entries, est_name_len); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_evict_on_close(hid_t fapl_id, hbool_t evict_on_close); */ SEXP R_H5Pset_evict_on_close(SEXP R_fapl_id, SEXP R_evict_on_close){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hbool_t evict_on_close = SEXP_to_longlong(R_evict_on_close, 0); herr_t return_val = H5Pset_evict_on_close(fapl_id, evict_on_close); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_external(hid_t plist_id, const char *name, off_t offset, hsize_t size); */ SEXP R_H5Pset_external(SEXP R_plist_id, SEXP R_name, SEXP R_offset, SEXP R_size){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); off_t offset = SEXP_to_longlong(R_offset, 0); hsize_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5Pset_external(plist_id, name, offset, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_family_offset(hid_t fapl_id, hsize_t offset); */ SEXP R_H5Pset_family_offset(SEXP R_fapl_id, SEXP R_offset){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hsize_t offset = SEXP_to_longlong(R_offset, 0); herr_t return_val = H5Pset_family_offset(fapl_id, offset); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_fclose_degree(hid_t fapl_id, H5F_close_degree_t degree); */ SEXP R_H5Pset_fclose_degree(SEXP R_fapl_id, SEXP R_degree){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); H5F_close_degree_t degree = SEXP_to_longlong(R_degree, 0); herr_t return_val = H5Pset_fclose_degree(fapl_id, degree); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_file_image(hid_t fapl_id, void *buf_ptr, size_t buf_len); */ SEXP R_H5Pset_file_image(SEXP R_fapl_id, SEXP R_buf_ptr, SEXP R_buf_len, SEXP _dupl_buf_ptr){ int vars_protected=0; if(SEXP_to_logical(_dupl_buf_ptr)) { R_buf_ptr = PROTECT(duplicate(R_buf_ptr)); vars_protected++; } hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); void* buf_ptr; if(XLENGTH(R_buf_ptr) == 0) { buf_ptr = NULL; } else { buf_ptr = (void *) VOIDPTR(R_buf_ptr); } size_t buf_len = SEXP_to_longlong(R_buf_len, 0); herr_t return_val = H5Pset_file_image(fapl_id, buf_ptr, buf_len); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buf_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buf_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_file_space(hid_t plist_id, H5F_file_space_type_t strategy, hsize_t threshold); */ SEXP R_H5Pset_file_space(SEXP R_plist_id, SEXP R_strategy, SEXP R_threshold){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5F_file_space_type_t strategy = SEXP_to_longlong(R_strategy, 0); hsize_t threshold = SEXP_to_longlong(R_threshold, 0); herr_t return_val = H5Pset_file_space(plist_id, strategy, threshold); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size); */ SEXP R_H5Pset_file_space_page_size(SEXP R_plist_id, SEXP R_fsp_size){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hsize_t fsp_size = SEXP_to_longlong(R_fsp_size, 0); herr_t return_val = H5Pset_file_space_page_size(plist_id, fsp_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_file_space_strategy(hid_t plist_id, H5F_fspace_strategy_t strategy, hbool_t persist, hsize_t threshold); */ SEXP R_H5Pset_file_space_strategy(SEXP R_plist_id, SEXP R_strategy, SEXP R_persist, SEXP R_threshold){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5F_fspace_strategy_t strategy = SEXP_to_longlong(R_strategy, 0); hbool_t persist = SEXP_to_longlong(R_persist, 0); hsize_t threshold = SEXP_to_longlong(R_threshold, 0); herr_t return_val = H5Pset_file_space_strategy(plist_id, strategy, persist, threshold); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_fill_time(hid_t plist_id, H5D_fill_time_t fill_time); */ SEXP R_H5Pset_fill_time(SEXP R_plist_id, SEXP R_fill_time){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5D_fill_time_t fill_time = SEXP_to_longlong(R_fill_time, 0); herr_t return_val = H5Pset_fill_time(plist_id, fill_time); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_fill_value(hid_t plist_id, hid_t type_id, const void *value); */ SEXP R_H5Pset_fill_value(SEXP R_plist_id, SEXP R_type_id, SEXP R_value){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hid_t type_id = SEXP_to_longlong(R_type_id, 0); const void* value; if(XLENGTH(R_value) == 0) { value = NULL; } else { value = (void *) VOIDPTR(R_value); } herr_t return_val = H5Pset_fill_value(plist_id, type_id, value); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, size_t cd_nelmts, const unsigned int c_values[]); */ SEXP R_H5Pset_filter(SEXP R_plist_id, SEXP R_filter, SEXP R_flags, SEXP R_cd_nelmts, SEXP R_c_values){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5Z_filter_t filter = SEXP_to_longlong(R_filter, 0); unsigned int flags = SEXP_to_longlong(R_flags, 0); size_t cd_nelmts = SEXP_to_longlong(R_cd_nelmts, 0); const unsigned int* c_values; if(XLENGTH(R_c_values) == 0) { c_values = NULL; } else { R_helper = PROTECT(RToH5(R_c_values, h5_datatype[DT_unsigned_int], XLENGTH(R_c_values))); c_values= (const unsigned int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pset_filter(plist_id, filter, flags, cd_nelmts, c_values); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_fletcher32(hid_t plist_id); */ SEXP R_H5Pset_fletcher32(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); herr_t return_val = H5Pset_fletcher32(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_gc_references(hid_t fapl_id, unsigned gc_ref); */ SEXP R_H5Pset_gc_references(SEXP R_fapl_id, SEXP R_gc_ref){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); unsigned gc_ref = SEXP_to_longlong(R_gc_ref, 0); herr_t return_val = H5Pset_gc_references(fapl_id, gc_ref); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_hyper_vector_size(hid_t fapl_id, size_t size); */ SEXP R_H5Pset_hyper_vector_size(SEXP R_fapl_id, SEXP R_size){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5Pset_hyper_vector_size(fapl_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_istore_k(hid_t plist_id, unsigned ik); */ SEXP R_H5Pset_istore_k(SEXP R_plist_id, SEXP R_ik){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned ik = SEXP_to_longlong(R_ik, 0); herr_t return_val = H5Pset_istore_k(plist_id, ik); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_layout(hid_t plist_id, H5D_layout_t layout); */ SEXP R_H5Pset_layout(SEXP R_plist_id, SEXP R_layout){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5D_layout_t layout = SEXP_to_longlong(R_layout, 0); herr_t return_val = H5Pset_layout(plist_id, layout); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_libver_bounds(hid_t plist_id, H5F_libver_t low, H5F_libver_t high); */ SEXP R_H5Pset_libver_bounds(SEXP R_plist_id, SEXP R_low, SEXP R_high){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5F_libver_t low = SEXP_to_longlong(R_low, 0); H5F_libver_t high = SEXP_to_longlong(R_high, 0); herr_t return_val = H5Pset_libver_bounds(plist_id, low, high); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_link_creation_order(hid_t plist_id, unsigned crt_order_flags); */ SEXP R_H5Pset_link_creation_order(SEXP R_plist_id, SEXP R_crt_order_flags){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned crt_order_flags = SEXP_to_longlong(R_crt_order_flags, 0); herr_t return_val = H5Pset_link_creation_order(plist_id, crt_order_flags); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_link_phase_change(hid_t plist_id, unsigned max_compact, unsigned min_dense); */ SEXP R_H5Pset_link_phase_change(SEXP R_plist_id, SEXP R_max_compact, SEXP R_min_dense){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned max_compact = SEXP_to_longlong(R_max_compact, 0); unsigned min_dense = SEXP_to_longlong(R_min_dense, 0); herr_t return_val = H5Pset_link_phase_change(plist_id, max_compact, min_dense); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_local_heap_size_hint(hid_t plist_id, size_t size_hint); */ SEXP R_H5Pset_local_heap_size_hint(SEXP R_plist_id, SEXP R_size_hint){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); size_t size_hint = SEXP_to_longlong(R_size_hint, 0); herr_t return_val = H5Pset_local_heap_size_hint(plist_id, size_hint); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_mdc_config(hid_t plist_id, H5AC_cache_config_t * config_ptr); */ SEXP R_H5Pset_mdc_config(SEXP R_plist_id, SEXP R_config_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_config_ptr = PROTECT(duplicate(R_config_ptr)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); R_helper = PROTECT(RToH5(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t], guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t]))); H5AC_cache_config_t* config_ptr= (H5AC_cache_config_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Pset_mdc_config(plist_id, config_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_config_t]); R_config_ptr = PROTECT(H5ToR_single_step(config_ptr, h5_datatype[DT_H5AC_cache_config_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_config_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("config_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_mdc_image_config(hid_t plist_id, H5AC_cache_image_config_t *config_ptr); */ SEXP R_H5Pset_mdc_image_config(SEXP R_plist_id, SEXP R_config_ptr){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_config_ptr = PROTECT(duplicate(R_config_ptr)); vars_protected++; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); R_helper = PROTECT(RToH5(R_config_ptr, h5_datatype[DT_H5AC_cache_image_config_t], guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_image_config_t]))); H5AC_cache_image_config_t* config_ptr= (H5AC_cache_image_config_t*) VOIDPTR(R_helper); vars_protected++; herr_t return_val = H5Pset_mdc_image_config(plist_id, config_ptr); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_config_ptr, h5_datatype[DT_H5AC_cache_image_config_t]); R_config_ptr = PROTECT(H5ToR_single_step(config_ptr, h5_datatype[DT_H5AC_cache_image_config_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_config_ptr); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("config_ptr")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_mdc_log_options(hid_t plist_id, hbool_t is_enabled, const char *location, hbool_t start_on_access); */ SEXP R_H5Pset_mdc_log_options(SEXP R_plist_id, SEXP R_is_enabled, SEXP R_location, SEXP R_start_on_access){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hbool_t is_enabled = SEXP_to_longlong(R_is_enabled, 0); const char* location = CHAR(STRING_ELT(R_location, 0)); hbool_t start_on_access = SEXP_to_longlong(R_start_on_access, 0); herr_t return_val = H5Pset_mdc_log_options(plist_id, is_enabled, location, start_on_access); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_meta_block_size(hid_t fapl_id, hsize_t size); */ SEXP R_H5Pset_meta_block_size(SEXP R_fapl_id, SEXP R_size){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hsize_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5Pset_meta_block_size(fapl_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_metadata_read_attempts(hid_t plist_id, unsigned attempts); */ SEXP R_H5Pset_metadata_read_attempts(SEXP R_plist_id, SEXP R_attempts){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned attempts = SEXP_to_longlong(R_attempts, 0); herr_t return_val = H5Pset_metadata_read_attempts(plist_id, attempts); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_multi_type(hid_t fapl_id, H5FD_mem_t type); */ SEXP R_H5Pset_multi_type(SEXP R_fapl_id, SEXP R_type){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); H5FD_mem_t type = SEXP_to_longlong(R_type, 0); herr_t return_val = H5Pset_multi_type(fapl_id, type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_nbit(hid_t plist_id); */ SEXP R_H5Pset_nbit(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); herr_t return_val = H5Pset_nbit(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_nlinks(hid_t plist_id, size_t nlinks); */ SEXP R_H5Pset_nlinks(SEXP R_plist_id, SEXP R_nlinks){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); size_t nlinks = SEXP_to_longlong(R_nlinks, 0); herr_t return_val = H5Pset_nlinks(plist_id, nlinks); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_obj_track_times(hid_t plist_id, hbool_t track_times); */ SEXP R_H5Pset_obj_track_times(SEXP R_plist_id, SEXP R_track_times){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hbool_t track_times = SEXP_to_longlong(R_track_times, 0); herr_t return_val = H5Pset_obj_track_times(plist_id, track_times); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_page_buffer_size(hid_t plist_id, size_t buf_size, unsigned min_meta_per, unsigned min_raw_per); */ SEXP R_H5Pset_page_buffer_size(SEXP R_plist_id, SEXP R_buf_size, SEXP R_min_meta_per, SEXP R_min_raw_per){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); size_t buf_size = SEXP_to_longlong(R_buf_size, 0); unsigned min_meta_per = SEXP_to_longlong(R_min_meta_per, 0); unsigned min_raw_per = SEXP_to_longlong(R_min_raw_per, 0); herr_t return_val = H5Pset_page_buffer_size(plist_id, buf_size, min_meta_per, min_raw_per); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_preserve(hid_t plist_id, hbool_t status); */ SEXP R_H5Pset_preserve(SEXP R_plist_id, SEXP R_status){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hbool_t status = SEXP_to_longlong(R_status, 0); herr_t return_val = H5Pset_preserve(plist_id, status); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_scaleoffset(hid_t plist_id, H5Z_SO_scale_type_t scale_type, int scale_factor); */ SEXP R_H5Pset_scaleoffset(SEXP R_plist_id, SEXP R_scale_type, SEXP R_scale_factor){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5Z_SO_scale_type_t scale_type = SEXP_to_longlong(R_scale_type, 0); int scale_factor = SEXP_to_longlong(R_scale_factor, 0); herr_t return_val = H5Pset_scaleoffset(plist_id, scale_type, scale_factor); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_shared_mesg_index(hid_t plist_id, unsigned index_num, unsigned mesg_type_flags, unsigned min_mesg_size); */ SEXP R_H5Pset_shared_mesg_index(SEXP R_plist_id, SEXP R_index_num, SEXP R_mesg_type_flags, SEXP R_min_mesg_size){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned index_num = SEXP_to_longlong(R_index_num, 0); unsigned mesg_type_flags = SEXP_to_longlong(R_mesg_type_flags, 0); unsigned min_mesg_size = SEXP_to_longlong(R_min_mesg_size, 0); herr_t return_val = H5Pset_shared_mesg_index(plist_id, index_num, mesg_type_flags, min_mesg_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_shared_mesg_nindexes(hid_t plist_id, unsigned nindexes); */ SEXP R_H5Pset_shared_mesg_nindexes(SEXP R_plist_id, SEXP R_nindexes){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned nindexes = SEXP_to_longlong(R_nindexes, 0); herr_t return_val = H5Pset_shared_mesg_nindexes(plist_id, nindexes); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_shared_mesg_phase_change(hid_t plist_id, unsigned max_list, unsigned min_btree); */ SEXP R_H5Pset_shared_mesg_phase_change(SEXP R_plist_id, SEXP R_max_list, SEXP R_min_btree){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned max_list = SEXP_to_longlong(R_max_list, 0); unsigned min_btree = SEXP_to_longlong(R_min_btree, 0); herr_t return_val = H5Pset_shared_mesg_phase_change(plist_id, max_list, min_btree); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_shuffle(hid_t plist_id); */ SEXP R_H5Pset_shuffle(SEXP R_plist_id){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); herr_t return_val = H5Pset_shuffle(plist_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_sieve_buf_size(hid_t fapl_id, size_t size); */ SEXP R_H5Pset_sieve_buf_size(SEXP R_fapl_id, SEXP R_size){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); size_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5Pset_sieve_buf_size(fapl_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_sizes(hid_t plist_id, size_t sizeof_addr, size_t sizeof_size); */ SEXP R_H5Pset_sizes(SEXP R_plist_id, SEXP R_sizeof_addr, SEXP R_sizeof_size){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); size_t sizeof_addr = SEXP_to_longlong(R_sizeof_addr, 0); size_t sizeof_size = SEXP_to_longlong(R_sizeof_size, 0); herr_t return_val = H5Pset_sizes(plist_id, sizeof_addr, sizeof_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_small_data_block_size(hid_t fapl_id, hsize_t size); */ SEXP R_H5Pset_small_data_block_size(SEXP R_fapl_id, SEXP R_size){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); hsize_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5Pset_small_data_block_size(fapl_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_sym_k(hid_t plist_id, unsigned ik, unsigned lk); */ SEXP R_H5Pset_sym_k(SEXP R_plist_id, SEXP R_ik, SEXP R_lk){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned ik = SEXP_to_longlong(R_ik, 0); unsigned lk = SEXP_to_longlong(R_lk, 0); herr_t return_val = H5Pset_sym_k(plist_id, ik, lk); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_szip(hid_t plist_id, unsigned options_mask, unsigned pixels_per_block); */ SEXP R_H5Pset_szip(SEXP R_plist_id, SEXP R_options_mask, SEXP R_pixels_per_block){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); unsigned options_mask = SEXP_to_longlong(R_options_mask, 0); unsigned pixels_per_block = SEXP_to_longlong(R_pixels_per_block, 0); herr_t return_val = H5Pset_szip(plist_id, options_mask, pixels_per_block); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_userblock(hid_t plist_id, hsize_t size); */ SEXP R_H5Pset_userblock(SEXP R_plist_id, SEXP R_size){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hsize_t size = SEXP_to_longlong(R_size, 0); herr_t return_val = H5Pset_userblock(plist_id, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_virtual(hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const char *src_dset_name, hid_t src_space_id); */ SEXP R_H5Pset_virtual(SEXP R_dcpl_id, SEXP R_vspace_id, SEXP R_src_file_name, SEXP R_src_dset_name, SEXP R_src_space_id){ int vars_protected=0; hid_t dcpl_id = SEXP_to_longlong(R_dcpl_id, 0); hid_t vspace_id = SEXP_to_longlong(R_vspace_id, 0); const char* src_file_name = CHAR(STRING_ELT(R_src_file_name, 0)); const char* src_dset_name = CHAR(STRING_ELT(R_src_dset_name, 0)); hid_t src_space_id = SEXP_to_longlong(R_src_space_id, 0); herr_t return_val = H5Pset_virtual(dcpl_id, vspace_id, src_file_name, src_dset_name, src_space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_virtual_prefix(hid_t dapl_id, const char* prefix); */ SEXP R_H5Pset_virtual_prefix(SEXP R_dapl_id, SEXP R_prefix){ int vars_protected=0; hid_t dapl_id = SEXP_to_longlong(R_dapl_id, 0); const char* prefix = CHAR(STRING_ELT(R_prefix, 0)); herr_t return_val = H5Pset_virtual_prefix(dapl_id, prefix); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size); */ SEXP R_H5Pset_virtual_printf_gap(SEXP R_plist_id, SEXP R_gap_size){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); hsize_t gap_size = SEXP_to_longlong(R_gap_size, 0); herr_t return_val = H5Pset_virtual_printf_gap(plist_id, gap_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view); */ SEXP R_H5Pset_virtual_view(SEXP R_plist_id, SEXP R_view){ int vars_protected=0; hid_t plist_id = SEXP_to_longlong(R_plist_id, 0); H5D_vds_view_t view = SEXP_to_longlong(R_view, 0); herr_t return_val = H5Pset_virtual_view(plist_id, view); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Punregister(hid_t pclass_id, const char *name); */ SEXP R_H5Punregister(SEXP R_pclass_id, SEXP R_name){ int vars_protected=0; hid_t pclass_id = SEXP_to_longlong(R_pclass_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); herr_t return_val = H5Punregister(pclass_id, name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
inst/CWrappers_1.10.0/headers/H5Fpublic.h
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * This file contains public declarations for the H5F module. */ #ifndef _H5Fpublic_H #define _H5Fpublic_H /* Public header files needed by this file */ #include "H5public.h" #include "H5ACpublic.h" #include "H5Ipublic.h" /* When this header is included from a private header, don't make calls to H5check() */ #undef H5CHECK #ifndef _H5private_H #define H5CHECK H5check(), #else /* _H5private_H */ #define H5CHECK #endif /* _H5private_H */ /* When this header is included from a private HDF5 header, don't make calls to H5open() */ #undef H5OPEN #ifndef _H5private_H #define H5OPEN H5open(), #else /* _H5private_H */ #define H5OPEN #endif /* _H5private_H */ /* * These are the bits that can be passed to the `flags' argument of * H5Fcreate() and H5Fopen(). Use the bit-wise OR operator (|) to combine * them as needed. As a side effect, they call H5check_version() to make sure * that the application is compiled with a version of the hdf5 header files * which are compatible with the library to which the application is linked. * We're assuming that these constants are used rather early in the hdf5 * session. * * Note that H5F_ACC_DEBUG is deprecated (nonfuncational) but retained as a * symbol for backward compatibility. */ #define H5F_ACC_RDONLY (H5CHECK H5OPEN 0x0000u) /*absence of rdwr => rd-only */ #define H5F_ACC_RDWR (H5CHECK H5OPEN 0x0001u) /*open for read and write */ #define H5F_ACC_TRUNC (H5CHECK H5OPEN 0x0002u) /*overwrite existing files */ #define H5F_ACC_EXCL (H5CHECK H5OPEN 0x0004u) /*fail if file already exists*/ /* NOTE: 0x0008u was H5F_ACC_DEBUG, now deprecated */ #define H5F_ACC_CREAT (H5CHECK H5OPEN 0x0010u) /*create non-existing files */ #define H5F_ACC_SWMR_WRITE (H5CHECK 0x0020u) /*indicate that this file is * open for writing in a * single-writer/multi-reader (SWMR) * scenario. Note that the * process(es) opening the file * for reading must open the file * with RDONLY access, and use * the special "SWMR_READ" access * flag. */ #define H5F_ACC_SWMR_READ (H5CHECK 0x0040u) /*indicate that this file is * open for reading in a * single-writer/multi-reader (SWMR) * scenario. Note that the * process(es) opening the file * for SWMR reading must also * open the file with the RDONLY * flag. */ /* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the * parent file. */ #define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /*ignore setting on lapl */ /* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */ #define H5F_OBJ_FILE (0x0001u) /* File objects */ #define H5F_OBJ_DATASET (0x0002u) /* Dataset objects */ #define H5F_OBJ_GROUP (0x0004u) /* Group objects */ #define H5F_OBJ_DATATYPE (0x0008u) /* Named datatype objects */ #define H5F_OBJ_ATTR (0x0010u) /* Attribute objects */ #define H5F_OBJ_ALL (H5F_OBJ_FILE|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_DATATYPE|H5F_OBJ_ATTR) #define H5F_OBJ_LOCAL (0x0020u) /* Restrict search to objects opened through current file ID */ /* (as opposed to objects opened through any file ID accessing this file) */ #define H5F_FAMILY_DEFAULT (hsize_t)0 #ifdef H5_HAVE_PARALLEL /* * Use this constant string as the MPI_Info key to set H5Fmpio debug flags. * To turn on H5Fmpio debug flags, set the MPI_Info value with this key to * have the value of a string consisting of the characters that turn on the * desired flags. */ #define H5F_MPIO_DEBUG_KEY "H5F_mpio_debug_key" #endif /* H5_HAVE_PARALLEL */ /* The difference between a single file and a set of mounted files */ typedef enum H5F_scope_t { H5F_SCOPE_LOCAL = 0, /*specified file handle only */ H5F_SCOPE_GLOBAL = 1 /*entire virtual file */ } H5F_scope_t; /* Unlimited file size for H5Pset_external() */ #define H5F_UNLIMITED ((hsize_t)(-1L)) /* How does file close behave? * H5F_CLOSE_DEFAULT - Use the degree pre-defined by underlining VFL * H5F_CLOSE_WEAK - file closes only after all opened objects are closed * H5F_CLOSE_SEMI - if no opened objects, file is close; otherwise, file close fails * H5F_CLOSE_STRONG - if there are opened objects, close them first, then close file */ typedef enum H5F_close_degree_t { H5F_CLOSE_DEFAULT = 0, H5F_CLOSE_WEAK = 1, H5F_CLOSE_SEMI = 2, H5F_CLOSE_STRONG = 3 } H5F_close_degree_t; /* Current "global" information about file */ typedef struct H5F_info2_t { struct { unsigned version; /* Superblock version # */ hsize_t super_size; /* Superblock size */ hsize_t super_ext_size; /* Superblock extension size */ } super; struct { unsigned version; /* Version # of file free space management */ hsize_t meta_size; /* Free space manager metadata size */ hsize_t tot_space; /* Amount of free space in the file */ } free; struct { unsigned version; /* Version # of shared object header info */ hsize_t hdr_size; /* Shared object header message header size */ H5_ih_info_t msgs_info; /* Shared object header message index & heap size */ } sohm; } H5F_info2_t; /* * Types of allocation requests. The values larger than H5FD_MEM_DEFAULT * should not change other than adding new types to the end. These numbers * might appear in files. * * Note: please change the log VFD flavors array if you change this * enumeration. */ typedef enum H5F_mem_t { H5FD_MEM_NOLIST = -1, /* Data should not appear in the free list. * Must be negative. */ H5FD_MEM_DEFAULT = 0, /* Value not yet set. Can also be the * datatype set in a larger allocation * that will be suballocated by the library. * Must be zero. */ H5FD_MEM_SUPER = 1, /* Superblock data */ H5FD_MEM_BTREE = 2, /* B-tree data */ H5FD_MEM_DRAW = 3, /* Raw data (content of datasets, etc.) */ H5FD_MEM_GHEAP = 4, /* Global heap data */ H5FD_MEM_LHEAP = 5, /* Local heap data */ H5FD_MEM_OHDR = 6, /* Object header data */ H5FD_MEM_NTYPES /* Sentinel value - must be last */ } H5F_mem_t; /* Free space section information */ typedef struct H5F_sect_info_t { haddr_t addr; /* Address of free space section */ hsize_t size; /* Size of free space section */ } H5F_sect_info_t; /* Library's file format versions */ typedef enum H5F_libver_t { H5F_LIBVER_EARLIEST, /* Use the earliest possible format for storing objects */ H5F_LIBVER_LATEST /* Use the latest possible format available for storing objects*/ } H5F_libver_t; /* File space handling strategy */ typedef enum H5F_file_space_type_t { H5F_FILE_SPACE_DEFAULT = 0, /* Default (or current) free space strategy setting */ H5F_FILE_SPACE_ALL_PERSIST = 1, /* Persistent free space managers, aggregators, virtual file driver */ H5F_FILE_SPACE_ALL = 2, /* Non-persistent free space managers, aggregators, virtual file driver */ /* This is the library default */ H5F_FILE_SPACE_AGGR_VFD = 3, /* Aggregators, Virtual file driver */ H5F_FILE_SPACE_VFD = 4, /* Virtual file driver */ H5F_FILE_SPACE_NTYPES /* must be last */ } H5F_file_space_type_t; /* Data structure to report the collection of read retries for metadata items with checksum */ /* Used by public routine H5Fget_metadata_read_retry_info() */ #define H5F_NUM_METADATA_READ_RETRY_TYPES 21 typedef struct H5F_retry_info_t { unsigned nbins; uint32_t *retries[H5F_NUM_METADATA_READ_RETRY_TYPES]; } H5F_retry_info_t; /* Callback for H5Pset_object_flush_cb() in a file access property list */ typedef herr_t (*H5F_flush_cb_t)(hid_t object_id, void *udata); #ifdef __cplusplus extern "C" { #endif /* Functions in H5F.c */ H5_DLL htri_t H5Fis_hdf5(const char *filename); H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, hid_t create_plist, hid_t access_plist); H5_DLL hid_t H5Fopen(const char *filename, unsigned flags, hid_t access_plist); H5_DLL hid_t H5Freopen(hid_t file_id); H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope); H5_DLL herr_t H5Fclose(hid_t file_id); H5_DLL hid_t H5Fget_create_plist(hid_t file_id); H5_DLL hid_t H5Fget_access_plist(hid_t file_id); H5_DLL herr_t H5Fget_intent(hid_t file_id, unsigned * intent); H5_DLL ssize_t H5Fget_obj_count(hid_t file_id, unsigned types); H5_DLL ssize_t H5Fget_obj_ids(hid_t file_id, unsigned types, size_t max_objs, hid_t *obj_id_list); H5_DLL herr_t H5Fget_vfd_handle(hid_t file_id, hid_t fapl, void **file_handle); H5_DLL herr_t H5Fmount(hid_t loc, const char *name, hid_t child, hid_t plist); H5_DLL herr_t H5Funmount(hid_t loc, const char *name); H5_DLL hssize_t H5Fget_freespace(hid_t file_id); H5_DLL herr_t H5Fget_filesize(hid_t file_id, hsize_t *size); H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len); H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr); H5_DLL herr_t H5Fset_mdc_config(hid_t file_id, H5AC_cache_config_t * config_ptr); H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate_ptr); H5_DLL herr_t H5Fget_mdc_size(hid_t file_id, size_t * max_size_ptr, size_t * min_clean_size_ptr, size_t * cur_size_ptr, int * cur_num_entries_ptr); H5_DLL herr_t H5Freset_mdc_hit_rate_stats(hid_t file_id); H5_DLL ssize_t H5Fget_name(hid_t obj_id, char *name, size_t size); H5_DLL herr_t H5Fget_info2(hid_t obj_id, H5F_info2_t *finfo); H5_DLL herr_t H5Fget_metadata_read_retry_info(hid_t file_id, H5F_retry_info_t *info); H5_DLL herr_t H5Fstart_swmr_write(hid_t file_id); H5_DLL ssize_t H5Fget_free_sections(hid_t file_id, H5F_mem_t type, size_t nsects, H5F_sect_info_t *sect_info/*out*/); H5_DLL herr_t H5Fclear_elink_file_cache(hid_t file_id); H5_DLL herr_t H5Fstart_mdc_logging(hid_t file_id); H5_DLL herr_t H5Fstop_mdc_logging(hid_t file_id); H5_DLL herr_t H5Fget_mdc_logging_status(hid_t file_id, /*OUT*/ hbool_t *is_enabled, /*OUT*/ hbool_t *is_currently_logging); H5_DLL herr_t H5Fformat_convert(hid_t fid); #ifdef H5_HAVE_PARALLEL H5_DLL herr_t H5Fset_mpi_atomicity(hid_t file_id, hbool_t flag); H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag); #endif /* H5_HAVE_PARALLEL */ /* Symbols defined for compatibility with previous versions of the HDF5 API. * * Use of these symbols is deprecated. */ #ifndef H5_NO_DEPRECATED_SYMBOLS /* Macros */ #define H5F_ACC_DEBUG (H5CHECK H5OPEN 0x0000u) /*print debug info (deprecated)*/ /* Typedefs */ /* Current "global" information about file */ typedef struct H5F_info1_t { hsize_t super_ext_size; /* Superblock extension size */ struct { hsize_t hdr_size; /* Shared object header message header size */ H5_ih_info_t msgs_info; /* Shared object header message index & heap size */ } sohm; } H5F_info1_t; /* Function prototypes */ H5_DLL herr_t H5Fget_info1(hid_t obj_id, H5F_info1_t *finfo); #endif /* H5_NO_DEPRECATED_SYMBOLS */ #ifdef __cplusplus } #endif #endif /* _H5Fpublic_H */
jeroen/hdf5r
src/1_10_2/const_export.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "const_export.h" SEXP show_all_const_data_frame(void) { SEXP df = PROTECT(allocVector(VECSXP, 3)); SET_VECTOR_ELT(df, 0, NEW_CHARACTER(CONST_LAST_ITEM)); SET_VECTOR_ELT(df, 1, NEW_CHARACTER(CONST_LAST_ITEM)); SEXP R_const = PROTECT(NEW_NUMERIC(CONST_LAST_ITEM)); SET_CLASS(R_const, ScalarString(mkChar("integer64"))); SET_VECTOR_ELT(df, 2, R_const); SEXP df_rownames = PROTECT(NEW_INTEGER(CONST_LAST_ITEM)); for(R_xlen_t i = 0; i < CONST_LAST_ITEM; ++i) { INTEGER(df_rownames)[i] = i + 1; } SET_CLASS(df, mkString("data.frame")); SET_ATTR(df, install("row.names"), df_rownames); SEXP df_names = PROTECT(NEW_CHARACTER(3)); SET_STRING_ELT(df_names, 0, mkChar("Category")); SET_STRING_ELT(df_names, 1, mkChar("Name")); SET_STRING_ELT(df_names, 2, mkChar("Constant")); SET_NAMES(df, df_names); SEXP R_categ = VECTOR_ELT(df, 0); SEXP R_name = VECTOR_ELT(df, 1); R_const = VECTOR_ELT(df, 2); SET_STRING_ELT(R_categ, CONST_H5F_ACC_TRUNC, mkChar("H5F_ACC")); SET_STRING_ELT(R_name, CONST_H5F_ACC_TRUNC, mkChar("H5F_ACC_TRUNC")); ((long long *) REAL(R_const))[CONST_H5F_ACC_TRUNC] = (long long) H5F_ACC_TRUNC; SET_STRING_ELT(R_categ, CONST_H5F_ACC_EXCL, mkChar("H5F_ACC")); SET_STRING_ELT(R_name, CONST_H5F_ACC_EXCL, mkChar("H5F_ACC_EXCL")); ((long long *) REAL(R_const))[CONST_H5F_ACC_EXCL] = (long long) H5F_ACC_EXCL; SET_STRING_ELT(R_categ, CONST_H5F_ACC_DEBUG, mkChar("H5F_ACC")); SET_STRING_ELT(R_name, CONST_H5F_ACC_DEBUG, mkChar("H5F_ACC_DEBUG")); ((long long *) REAL(R_const))[CONST_H5F_ACC_DEBUG] = (long long) H5F_ACC_DEBUG; SET_STRING_ELT(R_categ, CONST_H5F_ACC_RDONLY, mkChar("H5F_ACC")); SET_STRING_ELT(R_name, CONST_H5F_ACC_RDONLY, mkChar("H5F_ACC_RDONLY")); ((long long *) REAL(R_const))[CONST_H5F_ACC_RDONLY] = (long long) H5F_ACC_RDONLY; SET_STRING_ELT(R_categ, CONST_H5F_ACC_RDWR, mkChar("H5F_ACC")); SET_STRING_ELT(R_name, CONST_H5F_ACC_RDWR, mkChar("H5F_ACC_RDWR")); ((long long *) REAL(R_const))[CONST_H5F_ACC_RDWR] = (long long) H5F_ACC_RDWR; SET_STRING_ELT(R_categ, CONST_H5F_ACC_DEFAULT, mkChar("H5F_ACC")); SET_STRING_ELT(R_name, CONST_H5F_ACC_DEFAULT, mkChar("H5F_ACC_DEFAULT")); ((long long *) REAL(R_const))[CONST_H5F_ACC_DEFAULT] = (long long) H5F_ACC_DEFAULT; SET_STRING_ELT(R_categ, CONST_H5F_ACC_SWMR_WRITE, mkChar("H5F_ACC")); SET_STRING_ELT(R_name, CONST_H5F_ACC_SWMR_WRITE, mkChar("H5F_ACC_SWMR_WRITE")); ((long long *) REAL(R_const))[CONST_H5F_ACC_SWMR_WRITE] = (long long) H5F_ACC_SWMR_WRITE; SET_STRING_ELT(R_categ, CONST_H5F_ACC_SWMR_READ, mkChar("H5F_ACC")); SET_STRING_ELT(R_name, CONST_H5F_ACC_SWMR_READ, mkChar("H5F_ACC_SWMR_READ")); ((long long *) REAL(R_const))[CONST_H5F_ACC_SWMR_READ] = (long long) H5F_ACC_SWMR_READ; SET_STRING_ELT(R_categ, CONST_H5P_DEFAULT, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_DEFAULT, mkChar("H5P_DEFAULT")); ((long long *) REAL(R_const))[CONST_H5P_DEFAULT] = (long long) H5P_DEFAULT; SET_STRING_ELT(R_categ, CONST_H5S_ALL, mkChar("H5S")); SET_STRING_ELT(R_name, CONST_H5S_ALL, mkChar("H5S_ALL")); ((long long *) REAL(R_const))[CONST_H5S_ALL] = (long long) H5S_ALL; SET_STRING_ELT(R_categ, CONST_H5TOR_CONV_NONE, mkChar("H5TOR")); SET_STRING_ELT(R_name, CONST_H5TOR_CONV_NONE, mkChar("H5TOR_CONV_NONE")); ((long long *) REAL(R_const))[CONST_H5TOR_CONV_NONE] = (long long) H5TOR_CONV_NONE; SET_STRING_ELT(R_categ, CONST_H5TOR_CONV_INT64_INT_NOLOSS, mkChar("H5TOR")); SET_STRING_ELT(R_name, CONST_H5TOR_CONV_INT64_INT_NOLOSS, mkChar("H5TOR_CONV_INT64_INT_NOLOSS")); ((long long *) REAL(R_const))[CONST_H5TOR_CONV_INT64_INT_NOLOSS] = (long long) H5TOR_CONV_INT64_INT_NOLOSS; SET_STRING_ELT(R_categ, CONST_H5TOR_CONV_INT64_FLOAT_NOLOSS, mkChar("H5TOR")); SET_STRING_ELT(R_name, CONST_H5TOR_CONV_INT64_FLOAT_NOLOSS, mkChar("H5TOR_CONV_INT64_FLOAT_NOLOSS")); ((long long *) REAL(R_const))[CONST_H5TOR_CONV_INT64_FLOAT_NOLOSS] = (long long) H5TOR_CONV_INT64_FLOAT_NOLOSS; SET_STRING_ELT(R_categ, CONST_H5TOR_CONV_INT64_FLOAT_FORCE, mkChar("H5TOR")); SET_STRING_ELT(R_name, CONST_H5TOR_CONV_INT64_FLOAT_FORCE, mkChar("H5TOR_CONV_INT64_FLOAT_FORCE")); ((long long *) REAL(R_const))[CONST_H5TOR_CONV_INT64_FLOAT_FORCE] = (long long) H5TOR_CONV_INT64_FLOAT_FORCE; SET_STRING_ELT(R_categ, CONST_H5TOR_CONV_UINT64_NA, mkChar("H5TOR")); SET_STRING_ELT(R_name, CONST_H5TOR_CONV_UINT64_NA, mkChar("H5TOR_CONV_UINT64_NA")); ((long long *) REAL(R_const))[CONST_H5TOR_CONV_UINT64_NA] = (long long) H5TOR_CONV_UINT64_NA; SET_STRING_ELT(R_categ, CONST_H5TOR_CONV_INT64_NOLOSS, mkChar("H5TOR")); SET_STRING_ELT(R_name, CONST_H5TOR_CONV_INT64_NOLOSS, mkChar("H5TOR_CONV_INT64_NOLOSS")); ((long long *) REAL(R_const))[CONST_H5TOR_CONV_INT64_NOLOSS] = (long long) H5TOR_CONV_INT64_NOLOSS; SET_STRING_ELT(R_categ, CONST_H5F_OBJ_FILE, mkChar("H5F_OBJ")); SET_STRING_ELT(R_name, CONST_H5F_OBJ_FILE, mkChar("H5F_OBJ_FILE")); ((long long *) REAL(R_const))[CONST_H5F_OBJ_FILE] = (long long) H5F_OBJ_FILE; SET_STRING_ELT(R_categ, CONST_H5F_OBJ_DATASET, mkChar("H5F_OBJ")); SET_STRING_ELT(R_name, CONST_H5F_OBJ_DATASET, mkChar("H5F_OBJ_DATASET")); ((long long *) REAL(R_const))[CONST_H5F_OBJ_DATASET] = (long long) H5F_OBJ_DATASET; SET_STRING_ELT(R_categ, CONST_H5F_OBJ_GROUP, mkChar("H5F_OBJ")); SET_STRING_ELT(R_name, CONST_H5F_OBJ_GROUP, mkChar("H5F_OBJ_GROUP")); ((long long *) REAL(R_const))[CONST_H5F_OBJ_GROUP] = (long long) H5F_OBJ_GROUP; SET_STRING_ELT(R_categ, CONST_H5F_OBJ_DATATYPE, mkChar("H5F_OBJ")); SET_STRING_ELT(R_name, CONST_H5F_OBJ_DATATYPE, mkChar("H5F_OBJ_DATATYPE")); ((long long *) REAL(R_const))[CONST_H5F_OBJ_DATATYPE] = (long long) H5F_OBJ_DATATYPE; SET_STRING_ELT(R_categ, CONST_H5F_OBJ_ATTR, mkChar("H5F_OBJ")); SET_STRING_ELT(R_name, CONST_H5F_OBJ_ATTR, mkChar("H5F_OBJ_ATTR")); ((long long *) REAL(R_const))[CONST_H5F_OBJ_ATTR] = (long long) H5F_OBJ_ATTR; SET_STRING_ELT(R_categ, CONST_H5F_OBJ_ALL, mkChar("H5F_OBJ")); SET_STRING_ELT(R_name, CONST_H5F_OBJ_ALL, mkChar("H5F_OBJ_ALL")); ((long long *) REAL(R_const))[CONST_H5F_OBJ_ALL] = (long long) H5F_OBJ_ALL; SET_STRING_ELT(R_categ, CONST_H5F_OBJ_LOCAL, mkChar("H5F_OBJ")); SET_STRING_ELT(R_name, CONST_H5F_OBJ_LOCAL, mkChar("H5F_OBJ_LOCAL")); ((long long *) REAL(R_const))[CONST_H5F_OBJ_LOCAL] = (long long) H5F_OBJ_LOCAL; SET_STRING_ELT(R_categ, CONST_H5P_ATTRIBUTE_CREATE, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_ATTRIBUTE_CREATE, mkChar("H5P_ATTRIBUTE_CREATE")); ((long long *) REAL(R_const))[CONST_H5P_ATTRIBUTE_CREATE] = (long long) H5P_ATTRIBUTE_CREATE; SET_STRING_ELT(R_categ, CONST_H5P_DATASET_ACCESS, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_DATASET_ACCESS, mkChar("H5P_DATASET_ACCESS")); ((long long *) REAL(R_const))[CONST_H5P_DATASET_ACCESS] = (long long) H5P_DATASET_ACCESS; SET_STRING_ELT(R_categ, CONST_H5P_DATASET_CREATE, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_DATASET_CREATE, mkChar("H5P_DATASET_CREATE")); ((long long *) REAL(R_const))[CONST_H5P_DATASET_CREATE] = (long long) H5P_DATASET_CREATE; SET_STRING_ELT(R_categ, CONST_H5P_DATASET_XFER, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_DATASET_XFER, mkChar("H5P_DATASET_XFER")); ((long long *) REAL(R_const))[CONST_H5P_DATASET_XFER] = (long long) H5P_DATASET_XFER; SET_STRING_ELT(R_categ, CONST_H5P_DATATYPE_ACCESS, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_DATATYPE_ACCESS, mkChar("H5P_DATATYPE_ACCESS")); ((long long *) REAL(R_const))[CONST_H5P_DATATYPE_ACCESS] = (long long) H5P_DATATYPE_ACCESS; SET_STRING_ELT(R_categ, CONST_H5P_DATATYPE_CREATE, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_DATATYPE_CREATE, mkChar("H5P_DATATYPE_CREATE")); ((long long *) REAL(R_const))[CONST_H5P_DATATYPE_CREATE] = (long long) H5P_DATATYPE_CREATE; SET_STRING_ELT(R_categ, CONST_H5P_FILE_ACCESS, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_FILE_ACCESS, mkChar("H5P_FILE_ACCESS")); ((long long *) REAL(R_const))[CONST_H5P_FILE_ACCESS] = (long long) H5P_FILE_ACCESS; SET_STRING_ELT(R_categ, CONST_H5P_FILE_CREATE, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_FILE_CREATE, mkChar("H5P_FILE_CREATE")); ((long long *) REAL(R_const))[CONST_H5P_FILE_CREATE] = (long long) H5P_FILE_CREATE; SET_STRING_ELT(R_categ, CONST_H5P_FILE_MOUNT, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_FILE_MOUNT, mkChar("H5P_FILE_MOUNT")); ((long long *) REAL(R_const))[CONST_H5P_FILE_MOUNT] = (long long) H5P_FILE_MOUNT; SET_STRING_ELT(R_categ, CONST_H5P_GROUP_ACCESS, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_GROUP_ACCESS, mkChar("H5P_GROUP_ACCESS")); ((long long *) REAL(R_const))[CONST_H5P_GROUP_ACCESS] = (long long) H5P_GROUP_ACCESS; SET_STRING_ELT(R_categ, CONST_H5P_GROUP_CREATE, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_GROUP_CREATE, mkChar("H5P_GROUP_CREATE")); ((long long *) REAL(R_const))[CONST_H5P_GROUP_CREATE] = (long long) H5P_GROUP_CREATE; SET_STRING_ELT(R_categ, CONST_H5P_LINK_ACCESS, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_LINK_ACCESS, mkChar("H5P_LINK_ACCESS")); ((long long *) REAL(R_const))[CONST_H5P_LINK_ACCESS] = (long long) H5P_LINK_ACCESS; SET_STRING_ELT(R_categ, CONST_H5P_LINK_CREATE, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_LINK_CREATE, mkChar("H5P_LINK_CREATE")); ((long long *) REAL(R_const))[CONST_H5P_LINK_CREATE] = (long long) H5P_LINK_CREATE; SET_STRING_ELT(R_categ, CONST_H5P_OBJECT_COPY, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_OBJECT_COPY, mkChar("H5P_OBJECT_COPY")); ((long long *) REAL(R_const))[CONST_H5P_OBJECT_COPY] = (long long) H5P_OBJECT_COPY; SET_STRING_ELT(R_categ, CONST_H5P_OBJECT_CREATE, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_OBJECT_CREATE, mkChar("H5P_OBJECT_CREATE")); ((long long *) REAL(R_const))[CONST_H5P_OBJECT_CREATE] = (long long) H5P_OBJECT_CREATE; SET_STRING_ELT(R_categ, CONST_H5P_STRING_CREATE, mkChar("H5P")); SET_STRING_ELT(R_name, CONST_H5P_STRING_CREATE, mkChar("H5P_STRING_CREATE")); ((long long *) REAL(R_const))[CONST_H5P_STRING_CREATE] = (long long) H5P_STRING_CREATE; SET_STRING_ELT(R_categ, CONST_H5Z_FILTER_ALL, mkChar("H5Z_FILTER")); SET_STRING_ELT(R_name, CONST_H5Z_FILTER_ALL, mkChar("H5Z_FILTER_ALL")); ((long long *) REAL(R_const))[CONST_H5Z_FILTER_ALL] = (long long) H5Z_FILTER_ALL; SET_STRING_ELT(R_categ, CONST_H5Z_FILTER_DEFLATE, mkChar("H5Z_FILTER")); SET_STRING_ELT(R_name, CONST_H5Z_FILTER_DEFLATE, mkChar("H5Z_FILTER_DEFLATE")); ((long long *) REAL(R_const))[CONST_H5Z_FILTER_DEFLATE] = (long long) H5Z_FILTER_DEFLATE; SET_STRING_ELT(R_categ, CONST_H5Z_FILTER_SHUFFLE, mkChar("H5Z_FILTER")); SET_STRING_ELT(R_name, CONST_H5Z_FILTER_SHUFFLE, mkChar("H5Z_FILTER_SHUFFLE")); ((long long *) REAL(R_const))[CONST_H5Z_FILTER_SHUFFLE] = (long long) H5Z_FILTER_SHUFFLE; SET_STRING_ELT(R_categ, CONST_H5Z_FILTER_FLETCHER32, mkChar("H5Z_FILTER")); SET_STRING_ELT(R_name, CONST_H5Z_FILTER_FLETCHER32, mkChar("H5Z_FILTER_FLETCHER32")); ((long long *) REAL(R_const))[CONST_H5Z_FILTER_FLETCHER32] = (long long) H5Z_FILTER_FLETCHER32; SET_STRING_ELT(R_categ, CONST_H5Z_FILTER_SZIP, mkChar("H5Z_FILTER")); SET_STRING_ELT(R_name, CONST_H5Z_FILTER_SZIP, mkChar("H5Z_FILTER_SZIP")); ((long long *) REAL(R_const))[CONST_H5Z_FILTER_SZIP] = (long long) H5Z_FILTER_SZIP; SET_STRING_ELT(R_categ, CONST_H5Z_FILTER_NBIT, mkChar("H5Z_FILTER")); SET_STRING_ELT(R_name, CONST_H5Z_FILTER_NBIT, mkChar("H5Z_FILTER_NBIT")); ((long long *) REAL(R_const))[CONST_H5Z_FILTER_NBIT] = (long long) H5Z_FILTER_NBIT; SET_STRING_ELT(R_categ, CONST_H5Z_FILTER_SCALEOFFSET, mkChar("H5Z_FILTER")); SET_STRING_ELT(R_name, CONST_H5Z_FILTER_SCALEOFFSET, mkChar("H5Z_FILTER_SCALEOFFSET")); ((long long *) REAL(R_const))[CONST_H5Z_FILTER_SCALEOFFSET] = (long long) H5Z_FILTER_SCALEOFFSET; SET_STRING_ELT(R_categ, CONST_H5Z_FLAG_OPTIONAL, mkChar("H5Z_FLAG")); SET_STRING_ELT(R_name, CONST_H5Z_FLAG_OPTIONAL, mkChar("H5Z_FLAG_OPTIONAL")); ((long long *) REAL(R_const))[CONST_H5Z_FLAG_OPTIONAL] = (long long) H5Z_FLAG_OPTIONAL; SET_STRING_ELT(R_categ, CONST_H5Z_FLAG_MANDATORY, mkChar("H5Z_FLAG")); SET_STRING_ELT(R_name, CONST_H5Z_FLAG_MANDATORY, mkChar("H5Z_FLAG_MANDATORY")); ((long long *) REAL(R_const))[CONST_H5Z_FLAG_MANDATORY] = (long long) H5Z_FLAG_MANDATORY; SET_STRING_ELT(R_categ, CONST_H5P_CRT_ORDER_TRACKED, mkChar("H5P_CRT_ORDER")); SET_STRING_ELT(R_name, CONST_H5P_CRT_ORDER_TRACKED, mkChar("H5P_CRT_ORDER_TRACKED")); ((long long *) REAL(R_const))[CONST_H5P_CRT_ORDER_TRACKED] = (long long) H5P_CRT_ORDER_TRACKED; SET_STRING_ELT(R_categ, CONST_H5P_CRT_ORDER_INDEXED, mkChar("H5P_CRT_ORDER")); SET_STRING_ELT(R_name, CONST_H5P_CRT_ORDER_INDEXED, mkChar("H5P_CRT_ORDER_INDEXED")); ((long long *) REAL(R_const))[CONST_H5P_CRT_ORDER_INDEXED] = (long long) H5P_CRT_ORDER_INDEXED; SET_STRING_ELT(R_categ, CONST_H5O_COPY_SHALLOW_HIERARCHY_FLAG, mkChar("H5O_COPY")); SET_STRING_ELT(R_name, CONST_H5O_COPY_SHALLOW_HIERARCHY_FLAG, mkChar("H5O_COPY_SHALLOW_HIERARCHY_FLAG")); ((long long *) REAL(R_const))[CONST_H5O_COPY_SHALLOW_HIERARCHY_FLAG] = (long long) H5O_COPY_SHALLOW_HIERARCHY_FLAG; SET_STRING_ELT(R_categ, CONST_H5O_COPY_EXPAND_SOFT_LINK_FLAG, mkChar("H5O_COPY")); SET_STRING_ELT(R_name, CONST_H5O_COPY_EXPAND_SOFT_LINK_FLAG, mkChar("H5O_COPY_EXPAND_SOFT_LINK_FLAG")); ((long long *) REAL(R_const))[CONST_H5O_COPY_EXPAND_SOFT_LINK_FLAG] = (long long) H5O_COPY_EXPAND_SOFT_LINK_FLAG; SET_STRING_ELT(R_categ, CONST_H5O_COPY_EXPAND_EXT_LINK_FLAG, mkChar("H5O_COPY")); SET_STRING_ELT(R_name, CONST_H5O_COPY_EXPAND_EXT_LINK_FLAG, mkChar("H5O_COPY_EXPAND_EXT_LINK_FLAG")); ((long long *) REAL(R_const))[CONST_H5O_COPY_EXPAND_EXT_LINK_FLAG] = (long long) H5O_COPY_EXPAND_EXT_LINK_FLAG; SET_STRING_ELT(R_categ, CONST_H5O_COPY_EXPAND_REFERENCE_FLAG, mkChar("H5O_COPY")); SET_STRING_ELT(R_name, CONST_H5O_COPY_EXPAND_REFERENCE_FLAG, mkChar("H5O_COPY_EXPAND_REFERENCE_FLAG")); ((long long *) REAL(R_const))[CONST_H5O_COPY_EXPAND_REFERENCE_FLAG] = (long long) H5O_COPY_EXPAND_REFERENCE_FLAG; SET_STRING_ELT(R_categ, CONST_H5O_COPY_WITHOUT_ATTR_FLAG, mkChar("H5O_COPY")); SET_STRING_ELT(R_name, CONST_H5O_COPY_WITHOUT_ATTR_FLAG, mkChar("H5O_COPY_WITHOUT_ATTR_FLAG")); ((long long *) REAL(R_const))[CONST_H5O_COPY_WITHOUT_ATTR_FLAG] = (long long) H5O_COPY_WITHOUT_ATTR_FLAG; SET_STRING_ELT(R_categ, CONST_H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG, mkChar("H5O_COPY")); SET_STRING_ELT(R_name, CONST_H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG, mkChar("H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG")); ((long long *) REAL(R_const))[CONST_H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG] = (long long) H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG; SET_STRING_ELT(R_categ, CONST_H5D_CHUNK_CACHE_W0_DEFAULT, mkChar("H5D_CHUNK")); SET_STRING_ELT(R_name, CONST_H5D_CHUNK_CACHE_W0_DEFAULT, mkChar("H5D_CHUNK_CACHE_W0_DEFAULT")); ((long long *) REAL(R_const))[CONST_H5D_CHUNK_CACHE_W0_DEFAULT] = (long long) H5D_CHUNK_CACHE_W0_DEFAULT; UNPROTECT(4); return(df); }
jeroen/hdf5r
src/convert.h
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #ifndef _CONVERT_H #define _CONVERT_H #define __USE_MINGW_ANSI_STDIO 1 #include <stdbool.h> #include <ctype.h> #include <string.h> #include <math.h> #include "global.h" #define MAX_INT_DOUBLE_PREC (9007199254740992) // (1LL << 53) #define MIN_INT_DOUBLE_PREC -(9007199254740992) // (-1LL << 53) #define NA_INTEGER64 LLONG_MIN #define STRING2(x) #x #define STRING(x) STRING2(x) // the following is needed for HDF5 version 1.8.12 to work with the code; H5free_memory did not exist; // it is therefore here simply defined as being the free function #if _HDF5_USE_1_8_12_ == 1 void H5free_memory(void *ptr); #endif // _HDF5_USE_1_8_12_ SEXP R_RToH5(SEXP _Robj, SEXP _dtype_id, SEXP _nelem); SEXP RToH5(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_RComplex(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_COMPOUND(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_ARRAY(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_ENUM(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_INTEGER(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_FLOAT(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_STRING(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_OPAQUE(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_REFERENCE(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP RToH5_VLEN(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_single_step(void* _h5obj, hid_t dtype_id, R_xlen_t nelem, int flags); // not intended for references SEXP R_H5ToR_Pre(SEXP _dtype_id, SEXP _nelem); SEXP H5ToR_Pre(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_RComplex(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_COMPOUND(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_ARRAY(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_ENUM(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_INTEGER(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_FLOAT(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_STRING(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_OPAQUE(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_REFERENCE(hid_t dtype_id, R_xlen_t nelem); SEXP H5ToR_Pre_VLEN(hid_t dtype_id, R_xlen_t nelem); SEXP R_H5ToR_Post(SEXP _Robj, SEXP _dtype_id, SEXP _nelem, SEXP _flags, SEXP _obj_id); SEXP H5ToR_Post(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id); SEXP H5ToR_Post_RComplex(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags); SEXP H5ToR_Post_COMPOUND(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id); SEXP H5ToR_Post_ARRAY(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id); SEXP H5ToR_Post_ENUM(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags); SEXP H5ToR_Post_INTEGER(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags); SEXP H5ToR_Post_FLOAT(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags); SEXP H5ToR_Post_STRING(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags); SEXP H5ToR_Post_OPAQUE(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags); SEXP H5ToR_Post_REFERENCE(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id); SEXP H5ToR_Post_VLEN(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id); /*************************************** * copy functions and matrix re-rodering *************************************/ void* memcpy_to_record(void* dst, const void* src, hsize_t num_items, hsize_t record_size, hsize_t offset, hsize_t item_size); void* memcpy_from_record(void* dst, const void* src, hsize_t num_items, hsize_t record_size, hsize_t offset, hsize_t item_size); void* memcpy_between_record(void* dst, const void* src, hsize_t num_items, hsize_t record_size, hsize_t offset_dst, hsize_t offset_src, hsize_t item_size); void* transpose_general(void* dst, const void* src, hsize_t num_rows, hsize_t num_cols, hsize_t item_size, bool cpy_by_col); SEXP R_transpose_general(SEXP R_src, SEXP R_dim, SEXP R_item_size); void* reorder(void* dst, const void* src, hsize_t num_rows, hsize_t num_cols, hsize_t item_size, const hsize_t * new_order); SEXP R_reorder(SEXP R_src, SEXP R_num_rows, SEXP R_num_cols, SEXP R_item_size, SEXP R_new_order); SEXP copy_rvec(SEXP _dst, SEXP _src, SEXP _nbytes); SEXP R_read_raw_subset_generic(SEXP R_dst, SEXP R_idx, SEXP R_item_size); void* read_raw_subset_generic(void* dst, void* src, R_xlen_t idx_len, long long *idx, R_xlen_t item_size); SEXP R_write_raw_subset_generic(SEXP R_dst, SEXP R_src, SEXP R_idx, SEXP R_item_size); void* write_raw_subset_generic(void* dst, void* src, R_xlen_t idx_len, long long *idx, R_xlen_t item_size); /***************************************** * helper functions for class checking and simple transformations ****************************************/ int is_rint64(SEXP _Robj); SEXP _is_rint64(SEXP _Robj); R_xlen_t SEXP_to_xlen(SEXP _len); long long SEXP_to_longlong(SEXP value, R_xlen_t pos); bool SEXP_to_logical(SEXP value); double SEXP_to_double(SEXP value); SEXP ScalarInteger64(long long value); SEXP ScalarInteger64_or_int(long long value); SEXP ScalarFactor(int value, hid_t dtype_id); bool is_sequence(SEXP val); // can potentially add clearer error reporting here by passing in an STRSXP of length one, where the first // element is then used to report what when wrong bool is_h5_complex(hid_t dtype_id); bool is_RToH5_empty(SEXP _Robj, R_xlen_t nelem); bool is_enum_factor(hid_t dtype); bool is_enum_logical(hid_t dtype); char* str_to_lower(char * str); bool is_robj_enum(SEXP _Robj, hid_t dtype_id); bool is_robj_compound(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem); SEXP get_array_dim(hid_t dtype_id); bool is_robj_array(SEXP _Robj, hid_t dtype_id); SEXP string_to_UTF8(SEXP _str); // guess the number of elements in an Robj; low-level for C usage as well as // an interface to be used with .Call from R SEXP R_guess_nelem(SEXP _Robj, SEXP _dtype); R_xlen_t guess_nelem(SEXP _Robj, hid_t dtype_id); void* VOIDPTR(SEXP x); size_t R_get_item_size(SEXP x); // converts int64 to int if none of the values are too large SEXP convert_int64_using_flags(SEXP val, int flags); SEXP convert_uint64_using_flags(SEXP val, int flags); // cheaply set the dim attribute SEXP set_dim_attribute(SEXP x, SEXP dim); // convert to a hex character string SEXP R_as_hex(SEXP x); // conversion between double, int64 and int SEXP convert_double_to_int64(SEXP dbl_vec); SEXP convert_int64_to_double(SEXP int64_vec); SEXP convert_int_to_int64(SEXP int_vec); SEXP convert_int64_to_int(SEXP int64_vec); // creating new r6 classes SEXP new_H5R_R6_class(char * class_name, SEXP num, SEXP id); // callback functions for using H5Tconvert typedef struct H5T_conv_op_data { bool H5T_CONV_EXCEPT_RANGE_HI; bool H5T_CONV_EXCEPT_RANGE_LOW; bool H5T_CONV_EXCEPT_TRUNCATE; bool H5T_CONV_EXCEPT_PRECISION; bool H5T_CONV_EXCEPT_PINF; bool H5T_CONV_EXCEPT_NINF; bool H5T_CONV_EXCEPT_NAN; } H5T_conv_op_data; void H5T_conv_log_issue(H5T_conv_except_t except_type, H5T_conv_op_data *conv_op_data); int get_issue_string(H5T_conv_op_data conv_op_data, char* issue_string, size_t string_len); // this callback function will do nothing (return that it is unhandled), and let hdf5 library handle it (which is usually truncation) herr_t conv_cb_log(H5T_conv_except_t except_type, hid_t src_id, hid_t dst_id, void* src_buf, void* dst_buf, void* op_data); // run the conversion; also collects issues and writes a warning; no background support; plist will be set inside the function herr_t H5Tconvert_with_warning(hid_t src_type_id, hid_t dest_type_id, size_t nelmts, void* buf); #endif
jeroen/hdf5r
inst/CWrappers_1.8.12/headers/H5Spublic.h
<filename>inst/CWrappers_1.8.12/headers/H5Spublic.h /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * This file contains public declarations for the H5S module. */ #ifndef _H5Spublic_H #define _H5Spublic_H /* Public headers needed by this file */ #include "H5public.h" #include "H5Ipublic.h" /* Define atomic datatypes */ #define H5S_ALL 0 #define H5S_UNLIMITED ((hsize_t)(hssize_t)(-1)) /* Define user-level maximum number of dimensions */ #define H5S_MAX_RANK 32 /* Different types of dataspaces */ typedef enum H5S_class_t { H5S_NO_CLASS = -1, /*error */ H5S_SCALAR = 0, /*scalar variable */ H5S_SIMPLE = 1, /*simple data space */ H5S_NULL = 2 /*null data space */ } H5S_class_t; /* Different ways of combining selections */ typedef enum H5S_seloper_t { H5S_SELECT_NOOP = -1, /* error */ H5S_SELECT_SET = 0, /* Select "set" operation */ H5S_SELECT_OR, /* Binary "or" operation for hyperslabs * (add new selection to existing selection) * Original region: AAAAAAAAAA * New region: BBBBBBBBBB * A or B: CCCCCCCCCCCCCCCC */ H5S_SELECT_AND, /* Binary "and" operation for hyperslabs * (only leave overlapped regions in selection) * Original region: AAAAAAAAAA * New region: BBBBBBBBBB * A and B: CCCC */ H5S_SELECT_XOR, /* Binary "xor" operation for hyperslabs * (only leave non-overlapped regions in selection) * Original region: AAAAAAAAAA * New region: BBBBBBBBBB * A xor B: CCCCCC CCCCCC */ H5S_SELECT_NOTB, /* Binary "not" operation for hyperslabs * (only leave non-overlapped regions in original selection) * Original region: AAAAAAAAAA * New region: BBBBBBBBBB * A not B: CCCCCC */ H5S_SELECT_NOTA, /* Binary "not" operation for hyperslabs * (only leave non-overlapped regions in new selection) * Original region: AAAAAAAAAA * New region: BBBBBBBBBB * B not A: CCCCCC */ H5S_SELECT_APPEND, /* Append elements to end of point selection */ H5S_SELECT_PREPEND, /* Prepend elements to beginning of point selection */ H5S_SELECT_INVALID /* Invalid upper bound on selection operations */ } H5S_seloper_t; /* Enumerated type for the type of selection */ typedef enum { H5S_SEL_ERROR = -1, /* Error */ H5S_SEL_NONE = 0, /* Nothing selected */ H5S_SEL_POINTS = 1, /* Sequence of points selected */ H5S_SEL_HYPERSLABS = 2, /* "New-style" hyperslab selection defined */ H5S_SEL_ALL = 3, /* Entire extent selected */ H5S_SEL_N /*THIS MUST BE LAST */ }H5S_sel_type; #ifdef __cplusplus extern "C" { #endif /* Functions in H5S.c */ H5_DLL hid_t H5Screate(H5S_class_t type); H5_DLL hid_t H5Screate_simple(int rank, const hsize_t dims[], const hsize_t maxdims[]); H5_DLL herr_t H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[], const hsize_t max[]); H5_DLL hid_t H5Scopy(hid_t space_id); H5_DLL herr_t H5Sclose(hid_t space_id); H5_DLL herr_t H5Sencode(hid_t obj_id, void *buf, size_t *nalloc); H5_DLL hid_t H5Sdecode(const void *buf); H5_DLL hssize_t H5Sget_simple_extent_npoints(hid_t space_id); H5_DLL int H5Sget_simple_extent_ndims(hid_t space_id); H5_DLL int H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[], hsize_t maxdims[]); H5_DLL htri_t H5Sis_simple(hid_t space_id); H5_DLL hssize_t H5Sget_select_npoints(hid_t spaceid); H5_DLL herr_t H5Sselect_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], const hsize_t _stride[], const hsize_t count[], const hsize_t _block[]); /* #define NEW_HYPERSLAB_API */ #ifdef NEW_HYPERSLAB_API H5_DLL hid_t H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], const hsize_t _stride[], const hsize_t count[], const hsize_t _block[]); H5_DLL herr_t H5Sselect_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id); H5_DLL hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id); #endif /* NEW_HYPERSLAB_API */ H5_DLL herr_t H5Sselect_elements(hid_t space_id, H5S_seloper_t op, size_t num_elem, const hsize_t *coord); H5_DLL H5S_class_t H5Sget_simple_extent_type(hid_t space_id); H5_DLL herr_t H5Sset_extent_none(hid_t space_id); H5_DLL herr_t H5Sextent_copy(hid_t dst_id,hid_t src_id); H5_DLL htri_t H5Sextent_equal(hid_t sid1, hid_t sid2); H5_DLL herr_t H5Sselect_all(hid_t spaceid); H5_DLL herr_t H5Sselect_none(hid_t spaceid); H5_DLL herr_t H5Soffset_simple(hid_t space_id, const hssize_t *offset); H5_DLL htri_t H5Sselect_valid(hid_t spaceid); H5_DLL hssize_t H5Sget_select_hyper_nblocks(hid_t spaceid); H5_DLL hssize_t H5Sget_select_elem_npoints(hid_t spaceid); H5_DLL herr_t H5Sget_select_hyper_blocklist(hid_t spaceid, hsize_t startblock, hsize_t numblocks, hsize_t buf[/*numblocks*/]); H5_DLL herr_t H5Sget_select_elem_pointlist(hid_t spaceid, hsize_t startpoint, hsize_t numpoints, hsize_t buf[/*numpoints*/]); H5_DLL herr_t H5Sget_select_bounds(hid_t spaceid, hsize_t start[], hsize_t end[]); H5_DLL H5S_sel_type H5Sget_select_type(hid_t spaceid); #ifdef __cplusplus } #endif #endif /* _H5Spublic_H */
jeroen/hdf5r
inst/CWrappers_1.8.16/headers/H5Opublic.h
<filename>inst/CWrappers_1.8.16/headers/H5Opublic.h /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /*------------------------------------------------------------------------- * * Created: H5Opublic.h * Aug 5 1997 * <NAME> <<EMAIL>> * * Purpose: Public declarations for the H5O (object header) * package. * *------------------------------------------------------------------------- */ #ifndef _H5Opublic_H #define _H5Opublic_H /* Public headers needed by this file */ #include "H5public.h" /* Generic Functions */ #include "H5Ipublic.h" /* IDs */ #include "H5Lpublic.h" /* Links */ /*****************/ /* Public Macros */ /*****************/ /* Flags for object copy (H5Ocopy) */ #define H5O_COPY_SHALLOW_HIERARCHY_FLAG (0x0001u) /* Copy only immediate members */ #define H5O_COPY_EXPAND_SOFT_LINK_FLAG (0x0002u) /* Expand soft links into new objects */ #define H5O_COPY_EXPAND_EXT_LINK_FLAG (0x0004u) /* Expand external links into new objects */ #define H5O_COPY_EXPAND_REFERENCE_FLAG (0x0008u) /* Copy objects that are pointed by references */ #define H5O_COPY_WITHOUT_ATTR_FLAG (0x0010u) /* Copy object without copying attributes */ #define H5O_COPY_PRESERVE_NULL_FLAG (0x0020u) /* Copy NULL messages (empty space) */ #define H5O_COPY_MERGE_COMMITTED_DTYPE_FLAG (0x0040u) /* Merge committed datatypes in dest file */ #define H5O_COPY_ALL (0x007Fu) /* All object copying flags (for internal checking) */ /* Flags for shared message indexes. * Pass these flags in using the mesg_type_flags parameter in * H5P_set_shared_mesg_index. * (Developers: These flags correspond to object header message type IDs, * but we need to assign each kind of message to a different bit so that * one index can hold multiple types.) */ #define H5O_SHMESG_NONE_FLAG 0x0000 /* No shared messages */ #define H5O_SHMESG_SDSPACE_FLAG ((unsigned)1 << 0x0001) /* Simple Dataspace Message. */ #define H5O_SHMESG_DTYPE_FLAG ((unsigned)1 << 0x0003) /* Datatype Message. */ #define H5O_SHMESG_FILL_FLAG ((unsigned)1 << 0x0005) /* Fill Value Message. */ #define H5O_SHMESG_PLINE_FLAG ((unsigned)1 << 0x000b) /* Filter pipeline message. */ #define H5O_SHMESG_ATTR_FLAG ((unsigned)1 << 0x000c) /* Attribute Message. */ #define H5O_SHMESG_ALL_FLAG (H5O_SHMESG_SDSPACE_FLAG | H5O_SHMESG_DTYPE_FLAG | H5O_SHMESG_FILL_FLAG | H5O_SHMESG_PLINE_FLAG | H5O_SHMESG_ATTR_FLAG) /* Object header status flag definitions */ #define H5O_HDR_CHUNK0_SIZE 0x03 /* 2-bit field indicating # of bytes to store the size of chunk 0's data */ #define H5O_HDR_ATTR_CRT_ORDER_TRACKED 0x04 /* Attribute creation order is tracked */ #define H5O_HDR_ATTR_CRT_ORDER_INDEXED 0x08 /* Attribute creation order has index */ #define H5O_HDR_ATTR_STORE_PHASE_CHANGE 0x10 /* Non-default attribute storage phase change values stored */ #define H5O_HDR_STORE_TIMES 0x20 /* Store access, modification, change & birth times for object */ #define H5O_HDR_ALL_FLAGS (H5O_HDR_CHUNK0_SIZE | H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_ATTR_STORE_PHASE_CHANGE | H5O_HDR_STORE_TIMES) /* Maximum shared message values. Number of indexes is 8 to allow room to add * new types of messages. */ #define H5O_SHMESG_MAX_NINDEXES 8 #define H5O_SHMESG_MAX_LIST_SIZE 5000 /*******************/ /* Public Typedefs */ /*******************/ /* Types of objects in file */ typedef enum H5O_type_t { H5O_TYPE_UNKNOWN = -1, /* Unknown object type */ H5O_TYPE_GROUP, /* Object is a group */ H5O_TYPE_DATASET, /* Object is a dataset */ H5O_TYPE_NAMED_DATATYPE, /* Object is a named data type */ H5O_TYPE_NTYPES /* Number of different object types (must be last!) */ } H5O_type_t; /* Information struct for object header metadata (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */ typedef struct H5O_hdr_info_t { unsigned version; /* Version number of header format in file */ unsigned nmesgs; /* Number of object header messages */ unsigned nchunks; /* Number of object header chunks */ unsigned flags; /* Object header status flags */ struct { hsize_t total; /* Total space for storing object header in file */ hsize_t meta; /* Space within header for object header metadata information */ hsize_t mesg; /* Space within header for actual message information */ hsize_t free; /* Free space within object header */ } space; struct { uint64_t present; /* Flags to indicate presence of message type in header */ uint64_t shared; /* Flags to indicate message type is shared in header */ } mesg; } H5O_hdr_info_t; /* Information struct for object (for H5Oget_info/H5Oget_info_by_name/H5Oget_info_by_idx) */ typedef struct H5O_info_t { unsigned long fileno; /* File number that object is located in */ haddr_t addr; /* Object address in file */ H5O_type_t type; /* Basic object type (group, dataset, etc.) */ unsigned rc; /* Reference count of object */ time_t atime; /* Access time */ time_t mtime; /* Modification time */ time_t ctime; /* Change time */ time_t btime; /* Birth time */ hsize_t num_attrs; /* # of attributes attached to object */ H5O_hdr_info_t hdr; /* Object header information */ /* Extra metadata storage for obj & attributes */ struct { H5_ih_info_t obj; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */ H5_ih_info_t attr; /* v2 B-tree & heap for attributes */ } meta_size; } H5O_info_t; /* Typedef for message creation indexes */ typedef uint32_t H5O_msg_crt_idx_t; /* Prototype for H5Ovisit/H5Ovisit_by_name() operator */ typedef herr_t (*H5O_iterate_t)(hid_t obj, const char *name, const H5O_info_t *info, void *op_data); typedef enum H5O_mcdt_search_ret_t { H5O_MCDT_SEARCH_ERROR = -1, /* Abort H5Ocopy */ H5O_MCDT_SEARCH_CONT, /* Continue the global search of all committed datatypes in the destination file */ H5O_MCDT_SEARCH_STOP /* Stop the search, but continue copying. The committed datatype will be copied but not merged. */ } H5O_mcdt_search_ret_t; /* Callback to invoke when completing the search for a matching committed datatype from the committed dtype list */ typedef H5O_mcdt_search_ret_t (*H5O_mcdt_search_cb_t)(void *op_data); /********************/ /* Public Variables */ /********************/ #ifdef __cplusplus extern "C" { #endif /*********************/ /* Public Prototypes */ /*********************/ H5_DLL hid_t H5Oopen(hid_t loc_id, const char *name, hid_t lapl_id); H5_DLL hid_t H5Oopen_by_addr(hid_t loc_id, haddr_t addr); H5_DLL hid_t H5Oopen_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); H5_DLL htri_t H5Oexists_by_name(hid_t loc_id, const char *name, hid_t lapl_id); H5_DLL herr_t H5Oget_info(hid_t loc_id, H5O_info_t *oinfo); H5_DLL herr_t H5Oget_info_by_name(hid_t loc_id, const char *name, H5O_info_t *oinfo, hid_t lapl_id); H5_DLL herr_t H5Oget_info_by_idx(hid_t loc_id, const char *group_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, hid_t lapl_id); H5_DLL herr_t H5Olink(hid_t obj_id, hid_t new_loc_id, const char *new_name, hid_t lcpl_id, hid_t lapl_id); H5_DLL herr_t H5Oincr_refcount(hid_t object_id); H5_DLL herr_t H5Odecr_refcount(hid_t object_id); H5_DLL herr_t H5Ocopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id, const char *dst_name, hid_t ocpypl_id, hid_t lcpl_id); H5_DLL herr_t H5Oset_comment(hid_t obj_id, const char *comment); H5_DLL herr_t H5Oset_comment_by_name(hid_t loc_id, const char *name, const char *comment, hid_t lapl_id); H5_DLL ssize_t H5Oget_comment(hid_t obj_id, char *comment, size_t bufsize); H5_DLL ssize_t H5Oget_comment_by_name(hid_t loc_id, const char *name, char *comment, size_t bufsize, hid_t lapl_id); H5_DLL herr_t H5Ovisit(hid_t obj_id, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data); H5_DLL herr_t H5Ovisit_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, H5O_iterate_t op, void *op_data, hid_t lapl_id); H5_DLL herr_t H5Oclose(hid_t object_id); /* Symbols defined for compatibility with previous versions of the HDF5 API. * * Use of these symbols is deprecated. */ #ifndef H5_NO_DEPRECATED_SYMBOLS /* Macros */ /* Typedefs */ /* A struct that's part of the H5G_stat_t routine (deprecated) */ typedef struct H5O_stat_t { hsize_t size; /* Total size of object header in file */ hsize_t free; /* Free space within object header */ unsigned nmesgs; /* Number of object header messages */ unsigned nchunks; /* Number of object header chunks */ } H5O_stat_t; /* Function prototypes */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ #ifdef __cplusplus } #endif #endif /* _H5Opublic_H */
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5Z.c
<filename>src/1_8_16/Wrapper_auto_H5Z.c /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5Z.h" /* H5_DLL htri_t H5Zfilter_avail(H5Z_filter_t id); */ SEXP R_H5Zfilter_avail(SEXP R_id){ int vars_protected=0; H5Z_filter_t id = SEXP_to_longlong(R_id, 0); htri_t return_val = H5Zfilter_avail(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Zget_filter_info(H5Z_filter_t filter, unsigned int *filter_config_flags); */ SEXP R_H5Zget_filter_info(SEXP R_filter, SEXP R_filter_config_flags){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_filter_config_flags = PROTECT(duplicate(R_filter_config_flags)); vars_protected++; H5Z_filter_t filter = SEXP_to_longlong(R_filter, 0); unsigned int* filter_config_flags; if(XLENGTH(R_filter_config_flags) == 0) { filter_config_flags = NULL; } else { R_helper = PROTECT(RToH5(R_filter_config_flags, h5_datatype[DT_unsigned_int], XLENGTH(R_filter_config_flags))); filter_config_flags= (unsigned int*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Zget_filter_info(filter, filter_config_flags); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_filter_config_flags, h5_datatype[DT_unsigned_int]); R_filter_config_flags = PROTECT(H5ToR_single_step(filter_config_flags, h5_datatype[DT_unsigned_int], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_filter_config_flags); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("filter_config_flags")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Zregister(const void *cls); */ SEXP R_H5Zregister(SEXP R_cls){ int vars_protected=0; const void* cls; if(XLENGTH(R_cls) == 0) { cls = NULL; } else { cls = (void *) VOIDPTR(R_cls); } herr_t return_val = H5Zregister(cls); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Zunregister(H5Z_filter_t id); */ SEXP R_H5Zunregister(SEXP R_id){ int vars_protected=0; H5Z_filter_t id = SEXP_to_longlong(R_id, 0); herr_t return_val = H5Zunregister(id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_10_0/Wrapper_auto_H5R.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5R.h" /* H5_DLL herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name, H5R_type_t ref_type, hid_t space_id); */ SEXP R_H5Rcreate(SEXP R_ref, SEXP R_loc_id, SEXP R_name, SEXP R_ref_type, SEXP R_space_id, SEXP _dupl_ref){ int vars_protected=0; if(SEXP_to_logical(_dupl_ref)) { R_ref = PROTECT(duplicate(R_ref)); vars_protected++; } void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* name = CHAR(STRING_ELT(R_name, 0)); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); hid_t space_id = SEXP_to_longlong(R_space_id, 0); herr_t return_val = H5Rcreate(ref, loc_id, name, ref_type, space_id); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_ref); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("ref")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Rdereference1(hid_t obj_id, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rdereference1(SEXP R_obj_id, SEXP R_ref_type, SEXP R_ref){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } hid_t return_val = H5Rdereference1(obj_id, ref_type, ref); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rdereference2(SEXP R_obj_id, SEXP R_oapl_id, SEXP R_ref_type, SEXP R_ref){ int vars_protected=0; hid_t obj_id = SEXP_to_longlong(R_obj_id, 0); hid_t oapl_id = SEXP_to_longlong(R_oapl_id, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } hid_t return_val = H5Rdereference2(obj_id, oapl_id, ref_type, ref); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL ssize_t H5Rget_name(hid_t loc_id, H5R_type_t ref_type, const void *ref, char *name, size_t size); */ SEXP R_H5Rget_name(SEXP R_loc_id, SEXP R_ref_type, SEXP R_ref, SEXP R_name, SEXP R_size){ int vars_protected=0; R_name = PROTECT(duplicate(R_name)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } char* name; if(XLENGTH(R_name) == 0) { name = NULL; } else { name = R_alloc(strlen(CHAR(STRING_ELT(R_name, 0))) + 1, 1); strcpy(name, CHAR(STRING_ELT(R_name, 0))); } size_t size = SEXP_to_longlong(R_size, 0); ssize_t return_val = H5Rget_name(loc_id, ref_type, ref, name, size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; if(name==NULL) { R_name = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_name = PROTECT(mkString(name)); vars_protected++; } SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_name); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("name")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Rget_obj_type2(hid_t id, H5R_type_t ref_type, const void *_ref, H5O_type_t *obj_type); */ SEXP R_H5Rget_obj_type2(SEXP R_id, SEXP R_ref_type, SEXP R__ref, SEXP R_obj_type){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_obj_type = PROTECT(duplicate(R_obj_type)); vars_protected++; hid_t id = SEXP_to_longlong(R_id, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* _ref; if(XLENGTH(R__ref) == 0) { _ref = NULL; } else { _ref = (void *) VOIDPTR(R__ref); } H5O_type_t* obj_type; if(XLENGTH(R_obj_type) == 0) { obj_type = NULL; } else { R_helper = PROTECT(RToH5(R_obj_type, h5_datatype[DT_H5O_type_t], XLENGTH(R_obj_type))); obj_type= (H5O_type_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Rget_obj_type2(id, ref_type, _ref, obj_type); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_obj_type, h5_datatype[DT_H5O_type_t]); R_obj_type = PROTECT(H5ToR_single_step(obj_type, h5_datatype[DT_H5O_type_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_obj_type); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("obj_type")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, const void *ref); */ SEXP R_H5Rget_region(SEXP R_dataset, SEXP R_ref_type, SEXP R_ref){ int vars_protected=0; hid_t dataset = SEXP_to_longlong(R_dataset, 0); H5R_type_t ref_type = SEXP_to_longlong(R_ref_type, 0); const void* ref; if(XLENGTH(R_ref) == 0) { ref = NULL; } else { ref = (void *) VOIDPTR(R_ref); } hid_t return_val = H5Rget_region(dataset, ref_type, ref); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5IM.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5IM.h" /* H5_HLDLL herr_t H5IMget_image_info( hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t *height, hsize_t *planes, char *interlace, hssize_t *npals ); */ SEXP R_H5IMget_image_info(SEXP R_loc_id, SEXP R_dset_name, SEXP R_width, SEXP R_height, SEXP R_planes, SEXP R_interlace, SEXP R_npals){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_width = PROTECT(duplicate(R_width)); vars_protected++; R_height = PROTECT(duplicate(R_height)); vars_protected++; R_planes = PROTECT(duplicate(R_planes)); vars_protected++; R_interlace = PROTECT(duplicate(R_interlace)); vars_protected++; R_npals = PROTECT(duplicate(R_npals)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t* width; if(XLENGTH(R_width) == 0) { width = NULL; } else { R_helper = PROTECT(RToH5(R_width, h5_datatype[DT_hsize_t], XLENGTH(R_width))); width= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* height; if(XLENGTH(R_height) == 0) { height = NULL; } else { R_helper = PROTECT(RToH5(R_height, h5_datatype[DT_hsize_t], XLENGTH(R_height))); height= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } hsize_t* planes; if(XLENGTH(R_planes) == 0) { planes = NULL; } else { R_helper = PROTECT(RToH5(R_planes, h5_datatype[DT_hsize_t], XLENGTH(R_planes))); planes= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } char* interlace; if(XLENGTH(R_interlace) == 0) { interlace = NULL; } else { interlace = R_alloc(strlen(CHAR(STRING_ELT(R_interlace, 0))) + 1, 1); strcpy(interlace, CHAR(STRING_ELT(R_interlace, 0))); } hssize_t* npals; if(XLENGTH(R_npals) == 0) { npals = NULL; } else { R_helper = PROTECT(RToH5(R_npals, h5_datatype[DT_hssize_t], XLENGTH(R_npals))); npals= (hssize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5IMget_image_info(loc_id, dset_name, width, height, planes, interlace, npals); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_width, h5_datatype[DT_hsize_t]); R_width = PROTECT(H5ToR_single_step(width, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_height, h5_datatype[DT_hsize_t]); R_height = PROTECT(H5ToR_single_step(height, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_planes, h5_datatype[DT_hsize_t]); R_planes = PROTECT(H5ToR_single_step(planes, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; if(interlace==NULL) { R_interlace = PROTECT(NEW_CHARACTER(0)); vars_protected++; } else { R_interlace = PROTECT(mkString(interlace)); vars_protected++; } size_helper = guess_nelem(R_npals, h5_datatype[DT_hssize_t]); R_npals = PROTECT(H5ToR_single_step(npals, h5_datatype[DT_hssize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 6)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_width); SET_VECTOR_ELT(__ret_list, 2, R_height); SET_VECTOR_ELT(__ret_list, 3, R_planes); SET_VECTOR_ELT(__ret_list, 4, R_interlace); SET_VECTOR_ELT(__ret_list, 5, R_npals); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 6)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("width")); SET_STRING_ELT(__ret_list_names, 2, mkChar("height")); SET_STRING_ELT(__ret_list_names, 3, mkChar("planes")); SET_STRING_ELT(__ret_list_names, 4, mkChar("interlace")); SET_STRING_ELT(__ret_list_names, 5, mkChar("npals")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMget_npalettes( hid_t loc_id, const char *image_name, hssize_t *npals ); */ SEXP R_H5IMget_npalettes(SEXP R_loc_id, SEXP R_image_name, SEXP R_npals){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_npals = PROTECT(duplicate(R_npals)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* image_name = CHAR(STRING_ELT(R_image_name, 0)); hssize_t* npals; if(XLENGTH(R_npals) == 0) { npals = NULL; } else { R_helper = PROTECT(RToH5(R_npals, h5_datatype[DT_hssize_t], XLENGTH(R_npals))); npals= (hssize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5IMget_npalettes(loc_id, image_name, npals); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_npals, h5_datatype[DT_hssize_t]); R_npals = PROTECT(H5ToR_single_step(npals, h5_datatype[DT_hssize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_npals); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("npals")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMget_palette( hid_t loc_id, const char *image_name, int pal_number, unsigned char *pal_data ); */ SEXP R_H5IMget_palette(SEXP R_loc_id, SEXP R_image_name, SEXP R_pal_number, SEXP R_pal_data){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_pal_data = PROTECT(duplicate(R_pal_data)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* image_name = CHAR(STRING_ELT(R_image_name, 0)); int pal_number = SEXP_to_longlong(R_pal_number, 0); unsigned char* pal_data; if(XLENGTH(R_pal_data) == 0) { pal_data = NULL; } else { R_helper = PROTECT(RToH5(R_pal_data, h5_datatype[DT_unsigned_char], XLENGTH(R_pal_data))); pal_data= (unsigned char*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5IMget_palette(loc_id, image_name, pal_number, pal_data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_pal_data, h5_datatype[DT_unsigned_char]); R_pal_data = PROTECT(H5ToR_single_step(pal_data, h5_datatype[DT_unsigned_char], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_pal_data); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("pal_data")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMget_palette_info( hid_t loc_id, const char *image_name, int pal_number, hsize_t *pal_dims ); */ SEXP R_H5IMget_palette_info(SEXP R_loc_id, SEXP R_image_name, SEXP R_pal_number, SEXP R_pal_dims){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_pal_dims = PROTECT(duplicate(R_pal_dims)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* image_name = CHAR(STRING_ELT(R_image_name, 0)); int pal_number = SEXP_to_longlong(R_pal_number, 0); hsize_t* pal_dims; if(XLENGTH(R_pal_dims) == 0) { pal_dims = NULL; } else { R_helper = PROTECT(RToH5(R_pal_dims, h5_datatype[DT_hsize_t], XLENGTH(R_pal_dims))); pal_dims= (hsize_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5IMget_palette_info(loc_id, image_name, pal_number, pal_dims); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_pal_dims, h5_datatype[DT_hsize_t]); R_pal_dims = PROTECT(H5ToR_single_step(pal_dims, h5_datatype[DT_hsize_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_pal_dims); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("pal_dims")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMis_image( hid_t loc_id, const char *dset_name ); */ SEXP R_H5IMis_image(SEXP R_loc_id, SEXP R_dset_name){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); herr_t return_val = H5IMis_image(loc_id, dset_name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMis_palette( hid_t loc_id, const char *dset_name ); */ SEXP R_H5IMis_palette(SEXP R_loc_id, SEXP R_dset_name){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); herr_t return_val = H5IMis_palette(loc_id, dset_name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMlink_palette( hid_t loc_id, const char *image_name, const char *pal_name ); */ SEXP R_H5IMlink_palette(SEXP R_loc_id, SEXP R_image_name, SEXP R_pal_name){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* image_name = CHAR(STRING_ELT(R_image_name, 0)); const char* pal_name = CHAR(STRING_ELT(R_pal_name, 0)); herr_t return_val = H5IMlink_palette(loc_id, image_name, pal_name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMmake_image_24bit( hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, const char *interlace, const unsigned char *buffer ); */ SEXP R_H5IMmake_image_24bit(SEXP R_loc_id, SEXP R_dset_name, SEXP R_width, SEXP R_height, SEXP R_interlace, SEXP R_buffer){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t width = SEXP_to_longlong(R_width, 0); hsize_t height = SEXP_to_longlong(R_height, 0); const char* interlace = CHAR(STRING_ELT(R_interlace, 0)); const unsigned char* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_unsigned_char], XLENGTH(R_buffer))); buffer= (const unsigned char*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5IMmake_image_24bit(loc_id, dset_name, width, height, interlace, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMmake_image_8bit( hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, const unsigned char *buffer ); */ SEXP R_H5IMmake_image_8bit(SEXP R_loc_id, SEXP R_dset_name, SEXP R_width, SEXP R_height, SEXP R_buffer){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); hsize_t width = SEXP_to_longlong(R_width, 0); hsize_t height = SEXP_to_longlong(R_height, 0); const unsigned char* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_unsigned_char], XLENGTH(R_buffer))); buffer= (const unsigned char*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5IMmake_image_8bit(loc_id, dset_name, width, height, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMmake_palette( hid_t loc_id, const char *pal_name, const hsize_t *pal_dims, const unsigned char *pal_data ); */ SEXP R_H5IMmake_palette(SEXP R_loc_id, SEXP R_pal_name, SEXP R_pal_dims, SEXP R_pal_data){ SEXP R_helper = R_NilValue; int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* pal_name = CHAR(STRING_ELT(R_pal_name, 0)); const hsize_t* pal_dims; if(XLENGTH(R_pal_dims) == 0) { pal_dims = NULL; } else { R_helper = PROTECT(RToH5(R_pal_dims, h5_datatype[DT_hsize_t], XLENGTH(R_pal_dims))); pal_dims= (const hsize_t*) VOIDPTR(R_helper); vars_protected++; } const unsigned char* pal_data; if(XLENGTH(R_pal_data) == 0) { pal_data = NULL; } else { R_helper = PROTECT(RToH5(R_pal_data, h5_datatype[DT_unsigned_char], XLENGTH(R_pal_data))); pal_data= (const unsigned char*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5IMmake_palette(loc_id, pal_name, pal_dims, pal_data); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMread_image( hid_t loc_id, const char *dset_name, unsigned char *buffer ); */ SEXP R_H5IMread_image(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buffer){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_buffer = PROTECT(duplicate(R_buffer)); vars_protected++; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* dset_name = CHAR(STRING_ELT(R_dset_name, 0)); unsigned char* buffer; if(XLENGTH(R_buffer) == 0) { buffer = NULL; } else { R_helper = PROTECT(RToH5(R_buffer, h5_datatype[DT_unsigned_char], XLENGTH(R_buffer))); buffer= (unsigned char*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5IMread_image(loc_id, dset_name, buffer); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_buffer, h5_datatype[DT_unsigned_char]); R_buffer = PROTECT(H5ToR_single_step(buffer, h5_datatype[DT_unsigned_char], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 2)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_buffer); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 2)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("buffer")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_HLDLL herr_t H5IMunlink_palette( hid_t loc_id, const char *image_name, const char *pal_name ); */ SEXP R_H5IMunlink_palette(SEXP R_loc_id, SEXP R_image_name, SEXP R_pal_name){ int vars_protected=0; hid_t loc_id = SEXP_to_longlong(R_loc_id, 0); const char* image_name = CHAR(STRING_ELT(R_image_name, 0)); const char* pal_name = CHAR(STRING_ELT(R_pal_name, 0)); herr_t return_val = H5IMunlink_palette(loc_id, image_name, pal_name); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5A.h
#ifndef _WRAPPER_AUTO_H5A_H_ #define _WRAPPER_AUTO_H5A_H_ #include "global.h" /* H5_DLL herr_t H5Aclose(hid_t attr_id); */ SEXP R_H5Aclose(SEXP R_attr_id); /* H5_DLL hid_t H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id, hid_t lapl_id); */ SEXP R_H5Acreate_by_name(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_type_id, SEXP R_space_id, SEXP R_acpl_id, SEXP R_aapl_id, SEXP R_lapl_id); /* H5_DLL hid_t H5Acreate2(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t space_id, hid_t acpl_id, hid_t aapl_id); */ SEXP R_H5Acreate2(SEXP R_loc_id, SEXP R_attr_name, SEXP R_type_id, SEXP R_space_id, SEXP R_acpl_id, SEXP R_aapl_id); /* H5_DLL herr_t H5Adelete(hid_t loc_id, const char *name); */ SEXP R_H5Adelete(SEXP R_loc_id, SEXP R_name); /* H5_DLL herr_t H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t lapl_id); */ SEXP R_H5Adelete_by_idx(SEXP R_loc_id, SEXP R_obj_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_lapl_id); /* H5_DLL herr_t H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t lapl_id); */ SEXP R_H5Adelete_by_name(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_lapl_id); /* H5_DLL htri_t H5Aexists(hid_t obj_id, const char *attr_name); */ SEXP R_H5Aexists(SEXP R_obj_id, SEXP R_attr_name); /* H5_DLL htri_t H5Aexists_by_name(hid_t obj_id, const char *obj_name, const char *attr_name, hid_t lapl_id); */ SEXP R_H5Aexists_by_name(SEXP R_obj_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_lapl_id); /* H5_DLL hid_t H5Aget_create_plist(hid_t attr_id); */ SEXP R_H5Aget_create_plist(SEXP R_attr_id); /* H5_DLL herr_t H5Aget_info(hid_t attr_id, H5A_info_t *ainfo ); */ SEXP R_H5Aget_info(SEXP R_attr_id, SEXP R_ainfo); /* H5_DLL herr_t H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5A_info_t *ainfo , hid_t lapl_id); */ SEXP R_H5Aget_info_by_idx(SEXP R_loc_id, SEXP R_obj_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_ainfo, SEXP R_lapl_id); /* H5_DLL herr_t H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, H5A_info_t *ainfo , hid_t lapl_id); */ SEXP R_H5Aget_info_by_name(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_ainfo, SEXP R_lapl_id); /* H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf); */ SEXP R_H5Aget_name(SEXP R_attr_id, SEXP R_buf_size, SEXP R_buf); /* H5_DLL ssize_t H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, char *name , size_t size, hid_t lapl_id); */ SEXP R_H5Aget_name_by_idx(SEXP R_loc_id, SEXP R_obj_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_name, SEXP R_size, SEXP R_lapl_id); /* H5_DLL int H5Aget_num_attrs(hid_t loc_id); */ SEXP R_H5Aget_num_attrs(SEXP R_loc_id); /* H5_DLL hid_t H5Aget_space(hid_t attr_id); */ SEXP R_H5Aget_space(SEXP R_attr_id); /* H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id); */ SEXP R_H5Aget_storage_size(SEXP R_attr_id); /* H5_DLL hid_t H5Aget_type(hid_t attr_id); */ SEXP R_H5Aget_type(SEXP R_attr_id); /* H5_DLL hid_t H5Aopen(hid_t obj_id, const char *attr_name, hid_t aapl_id); */ SEXP R_H5Aopen(SEXP R_obj_id, SEXP R_attr_name, SEXP R_aapl_id); /* H5_DLL hid_t H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, hid_t aapl_id, hid_t lapl_id); */ SEXP R_H5Aopen_by_idx(SEXP R_loc_id, SEXP R_obj_name, SEXP R_idx_type, SEXP R_order, SEXP R_n, SEXP R_aapl_id, SEXP R_lapl_id); /* H5_DLL hid_t H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid_t aapl_id, hid_t lapl_id); */ SEXP R_H5Aopen_by_name(SEXP R_loc_id, SEXP R_obj_name, SEXP R_attr_name, SEXP R_aapl_id, SEXP R_lapl_id); /* H5_DLL hid_t H5Aopen_idx(hid_t loc_id, unsigned idx); */ SEXP R_H5Aopen_idx(SEXP R_loc_id, SEXP R_idx); /* H5_DLL hid_t H5Aopen_name(hid_t loc_id, const char *name); */ SEXP R_H5Aopen_name(SEXP R_loc_id, SEXP R_name); /* H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf); */ SEXP R_H5Aread(SEXP R_attr_id, SEXP R_type_id, SEXP R_buf, SEXP _dupl_buf); /* H5_DLL herr_t H5Arename(hid_t loc_id, const char *old_name, const char *new_name); */ SEXP R_H5Arename(SEXP R_loc_id, SEXP R_old_name, SEXP R_new_name); /* H5_DLL herr_t H5Arename_by_name(hid_t loc_id, const char *obj_name, const char *old_attr_name, const char *new_attr_name, hid_t lapl_id); */ SEXP R_H5Arename_by_name(SEXP R_loc_id, SEXP R_obj_name, SEXP R_old_attr_name, SEXP R_new_attr_name, SEXP R_lapl_id); /* H5_DLL herr_t H5Awrite(hid_t attr_id, hid_t type_id, const void *buf); */ SEXP R_H5Awrite(SEXP R_attr_id, SEXP R_type_id, SEXP R_buf); #endif
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5FDlog.c
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5FDlog.h" /* H5_DLL hid_t H5FD_log_init(void); */ SEXP R_H5FD_log_init(void){ int vars_protected=0; hid_t return_val = H5FD_log_init(); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_fapl_log(hid_t fapl_id, const char *logfile, unsigned long long flags, size_t buf_size); */ SEXP R_H5Pset_fapl_log(SEXP R_fapl_id, SEXP R_logfile, SEXP R_flags, SEXP R_buf_size){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); const char* logfile = CHAR(STRING_ELT(R_logfile, 0)); unsigned long long flags = SEXP_to_longlong(R_flags, 0); size_t buf_size = SEXP_to_longlong(R_buf_size, 0); herr_t return_val = H5Pset_fapl_log(fapl_id, logfile, flags, buf_size); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
src/H5ls.h
/************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #ifndef _H5LS_H #define _H5LS_H #include "global.h" herr_t H5Dget_info(hid_t d_id, H5D_info_t * dataset_info); herr_t H5Dget_info_by_name(hid_t g_id, const char* name, H5D_info_t * dataset_info, hid_t lapl_id); herr_t gather_data_from_link(hid_t g_id, const char *name, const H5L_info_t *info, void *op_data); SEXP R_H5ls(SEXP _g_id, SEXP _recursive, SEXP _index_type, SEXP _order, SEXP _lapl_id, SEXP _dapl_id, SEXP _tapl_id); #endif
jeroen/hdf5r
inst/CWrappers_1.10.0/headers/H5public.h
<filename>inst/CWrappers_1.10.0/headers/H5public.h /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * This file contains public declarations for the HDF5 module. */ #ifndef _H5public_H #define _H5public_H /* Include files for public use... */ /* * Since H5pubconf.h is a generated header file, it is messy to try * to put a #ifndef _H5pubconf_H ... #endif guard in it. * HDF5 has set an internal rule that it is being included here. * Source files should NOT include H5pubconf.h directly but include * it via H5public.h. The #ifndef _H5public_H guard above would * prevent repeated include. */ #include "H5pubconf.h" /*from configure */ /* API Version macro wrapper definitions */ #include "H5version.h" #ifdef H5_HAVE_FEATURES_H #include <features.h> /*for setting POSIX, BSD, etc. compatibility */ #endif #ifdef H5_HAVE_SYS_TYPES_H #include <sys/types.h> #endif #ifdef H5_STDC_HEADERS # include <limits.h> /*for H5T_NATIVE_CHAR defn in H5Tpublic.h */ #endif #ifndef __cplusplus # ifdef H5_HAVE_STDINT_H # include <stdint.h> /*for C9x types */ # endif #else # ifdef H5_HAVE_STDINT_H_CXX # include <stdint.h> /*for C9x types when include from C++ */ # endif #endif #ifdef H5_HAVE_INTTYPES_H # include <inttypes.h> /* For uint64_t on some platforms */ #endif #ifdef H5_HAVE_STDDEF_H # include <stddef.h> #endif #ifdef H5_HAVE_PARALLEL # include <mpi.h> #ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */ # include <mpio.h> #endif #endif /* Include the Windows API adapter header early */ #include "H5api_adpt.h" #ifdef __cplusplus extern "C" { #endif /* Macros for enabling/disabling particular GCC warnings */ /* (see the following web-sites for more info: * http://www.dbp-consulting.com/tutorials/SuppressingGCCWarnings.html * http://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas */ /* These pragmas are only implemented usefully in gcc 4.6+ */ #if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 #define H5_GCC_DIAG_STR(s) #s #define H5_GCC_DIAG_JOINSTR(x,y) H5_GCC_DIAG_STR(x ## y) #define H5_GCC_DIAG_DO_PRAGMA(x) _Pragma (#x) #define H5_GCC_DIAG_PRAGMA(x) H5_GCC_DIAG_DO_PRAGMA(GCC diagnostic x) #define H5_GCC_DIAG_OFF(x) H5_GCC_DIAG_PRAGMA(push) H5_GCC_DIAG_PRAGMA(ignored H5_GCC_DIAG_JOINSTR(-W,x)) #define H5_GCC_DIAG_ON(x) H5_GCC_DIAG_PRAGMA(pop) #else #define H5_GCC_DIAG_OFF(x) #define H5_GCC_DIAG_ON(x) #endif /* Version numbers */ #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 10 /* For minor interface/format changes */ #define H5_VERS_RELEASE 0 /* For tweaks, bug-fixes, or development */ #define H5_VERS_SUBRELEASE "" /* For pre-releases like snap0 */ /* Empty string for real releases. */ #define H5_VERS_INFO "HDF5 library version: 1.10.0" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) /* macros for comparing the version */ #define H5_VERSION_GE(Maj,Min,Rel) \ (((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR==Min) && (H5_VERS_RELEASE>=Rel)) || \ ((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR>Min)) || \ (H5_VERS_MAJOR>Maj)) #define H5_VERSION_LE(Maj,Min,Rel) \ (((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR==Min) && (H5_VERS_RELEASE<=Rel)) || \ ((H5_VERS_MAJOR==Maj) && (H5_VERS_MINOR<Min)) || \ (H5_VERS_MAJOR<Maj)) /* * Status return values. Failed integer functions in HDF5 result almost * always in a negative value (unsigned failing functions sometimes return * zero for failure) while successfull return is non-negative (often zero). * The negative failure value is most commonly -1, but don't bet on it. The * proper way to detect failure is something like: * * if((dset = H5Dopen2(file, name)) < 0) * fprintf(stderr, "unable to open the requested dataset\n"); */ typedef int herr_t; /* * Boolean type. Successful return values are zero (false) or positive * (true). The typical true value is 1 but don't bet on it. Boolean * functions cannot fail. Functions that return `htri_t' however return zero * (false), positive (true), or negative (failure). The proper way to test * for truth from a htri_t function is: * * if ((retval = H5Tcommitted(type))>0) { * printf("data type is committed\n"); * } else if (!retval) { * printf("data type is not committed\n"); * } else { * printf("error determining whether data type is committed\n"); * } */ #ifdef H5_HAVE_STDBOOL_H #include <stdbool.h> #else /* H5_HAVE_STDBOOL_H */ #ifndef __cplusplus #if defined(H5_SIZEOF_BOOL) && (H5_SIZEOF_BOOL != 0) #define bool _Bool #else #define bool unsigned int #endif #define true 1 #define false 0 #endif /* __cplusplus */ #endif /* H5_HAVE_STDBOOL_H */ typedef bool hbool_t; typedef int htri_t; /* Define the ssize_t type if it not is defined */ #if H5_SIZEOF_SSIZE_T==0 /* Undefine this size, we will re-define it in one of the sections below */ #undef H5_SIZEOF_SSIZE_T #if H5_SIZEOF_SIZE_T==H5_SIZEOF_INT typedef int ssize_t; # define H5_SIZEOF_SSIZE_T H5_SIZEOF_INT #elif H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG typedef long ssize_t; # define H5_SIZEOF_SSIZE_T H5_SIZEOF_LONG #elif H5_SIZEOF_SIZE_T==H5_SIZEOF_LONG_LONG typedef long long ssize_t; # define H5_SIZEOF_SSIZE_T H5_SIZEOF_LONG_LONG #else /* Can't find matching type for ssize_t */ # error "nothing appropriate for ssize_t" #endif #endif /* * The sizes of file objects have their own types defined here, use a 64-bit * type. */ #if H5_SIZEOF_LONG_LONG >= 8 H5_GCC_DIAG_OFF(long-long) typedef unsigned long long hsize_t; typedef signed long long hssize_t; H5_GCC_DIAG_ON(long-long) # define H5_SIZEOF_HSIZE_T H5_SIZEOF_LONG_LONG # define H5_SIZEOF_HSSIZE_T H5_SIZEOF_LONG_LONG #else # error "nothing appropriate for hsize_t" #endif #define HSIZE_UNDEF ((hsize_t)(hssize_t)(-1)) /* * File addresses have their own types. */ #if H5_SIZEOF_INT64_T>=8 typedef uint64_t haddr_t; # define HADDR_UNDEF ((haddr_t)(int64_t)(-1)) # define H5_SIZEOF_HADDR_T H5_SIZEOF_INT64_T # ifdef H5_HAVE_PARALLEL # define HADDR_AS_MPI_TYPE MPI_LONG_LONG_INT # endif /* H5_HAVE_PARALLEL */ #elif H5_SIZEOF_INT>=8 typedef unsigned haddr_t; # define HADDR_UNDEF ((haddr_t)(-1)) # define H5_SIZEOF_HADDR_T H5_SIZEOF_INT # ifdef H5_HAVE_PARALLEL # define HADDR_AS_MPI_TYPE MPI_UNSIGNED # endif /* H5_HAVE_PARALLEL */ #elif H5_SIZEOF_LONG>=8 typedef unsigned long haddr_t; # define HADDR_UNDEF ((haddr_t)(long)(-1)) # define H5_SIZEOF_HADDR_T H5_SIZEOF_LONG # ifdef H5_HAVE_PARALLEL # define HADDR_AS_MPI_TYPE MPI_UNSIGNED_LONG # endif /* H5_HAVE_PARALLEL */ #elif H5_SIZEOF_LONG_LONG>=8 typedef unsigned long long haddr_t; # define HADDR_UNDEF ((haddr_t)(long long)(-1)) # define H5_SIZEOF_HADDR_T H5_SIZEOF_LONG_LONG # ifdef H5_HAVE_PARALLEL # define HADDR_AS_MPI_TYPE MPI_LONG_LONG_INT # endif /* H5_HAVE_PARALLEL */ #else # error "nothing appropriate for haddr_t" #endif #if H5_SIZEOF_HADDR_T ==H5_SIZEOF_INT # define H5_PRINTF_HADDR_FMT "%u" #elif H5_SIZEOF_HADDR_T ==H5_SIZEOF_LONG # define H5_PRINTF_HADDR_FMT "%lu" #elif H5_SIZEOF_HADDR_T ==H5_SIZEOF_LONG_LONG # define H5_PRINTF_HADDR_FMT "%" H5_PRINTF_LL_WIDTH "u" #else # error "nothing appropriate for H5_PRINTF_HADDR_FMT" #endif #define HADDR_MAX (HADDR_UNDEF-1) /* uint32_t type is used for creation order field for messages. It may be * defined in Posix.1g, otherwise it is defined here. */ #if H5_SIZEOF_UINT32_T>=4 #elif H5_SIZEOF_SHORT>=4 typedef short uint32_t; # undef H5_SIZEOF_UINT32_T # define H5_SIZEOF_UINT32_T H5_SIZEOF_SHORT #elif H5_SIZEOF_INT>=4 typedef unsigned int uint32_t; # undef H5_SIZEOF_UINT32_T # define H5_SIZEOF_UINT32_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG>=4 typedef unsigned long uint32_t; # undef H5_SIZEOF_UINT32_T # define H5_SIZEOF_UINT32_T H5_SIZEOF_LONG #else # error "nothing appropriate for uint32_t" #endif /* int64_t type is used for creation order field for links. It may be * defined in Posix.1g, otherwise it is defined here. */ #if H5_SIZEOF_INT64_T>=8 #elif H5_SIZEOF_INT>=8 typedef int int64_t; # undef H5_SIZEOF_INT64_T # define H5_SIZEOF_INT64_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG>=8 typedef long int64_t; # undef H5_SIZEOF_INT64_T # define H5_SIZEOF_INT64_T H5_SIZEOF_LONG #elif H5_SIZEOF_LONG_LONG>=8 typedef long long int64_t; # undef H5_SIZEOF_INT64_T # define H5_SIZEOF_INT64_T H5_SIZEOF_LONG_LONG #else # error "nothing appropriate for int64_t" #endif /* uint64_t type is used for fields for H5O_info_t. It may be * defined in Posix.1g, otherwise it is defined here. */ #if H5_SIZEOF_UINT64_T>=8 #elif H5_SIZEOF_INT>=8 typedef unsigned uint64_t; # undef H5_SIZEOF_UINT64_T # define H5_SIZEOF_UINT64_T H5_SIZEOF_INT #elif H5_SIZEOF_LONG>=8 typedef unsigned long uint64_t; # undef H5_SIZEOF_UINT64_T # define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG #elif H5_SIZEOF_LONG_LONG>=8 typedef unsigned long long uint64_t; # undef H5_SIZEOF_UINT64_T # define H5_SIZEOF_UINT64_T H5_SIZEOF_LONG_LONG #else # error "nothing appropriate for uint64_t" #endif /* Common iteration orders */ typedef enum { H5_ITER_UNKNOWN = -1, /* Unknown order */ H5_ITER_INC, /* Increasing order */ H5_ITER_DEC, /* Decreasing order */ H5_ITER_NATIVE, /* No particular order, whatever is fastest */ H5_ITER_N /* Number of iteration orders */ } H5_iter_order_t; /* Iteration callback values */ /* (Actually, any postive value will cause the iterator to stop and pass back * that positive value to the function that called the iterator) */ #define H5_ITER_ERROR (-1) #define H5_ITER_CONT (0) #define H5_ITER_STOP (1) /* * The types of indices on links in groups/attributes on objects. * Primarily used for "<do> <foo> by index" routines and for iterating over * links in groups/attributes on objects. */ typedef enum H5_index_t { H5_INDEX_UNKNOWN = -1, /* Unknown index type */ H5_INDEX_NAME, /* Index on names */ H5_INDEX_CRT_ORDER, /* Index on creation order */ H5_INDEX_N /* Number of indices defined */ } H5_index_t; /* * Storage info struct used by H5O_info_t and H5F_info_t */ typedef struct H5_ih_info_t { hsize_t index_size; /* btree and/or list */ hsize_t heap_size; } H5_ih_info_t; /* Functions in H5.c */ H5_DLL herr_t H5open(void); H5_DLL herr_t H5close(void); H5_DLL herr_t H5dont_atexit(void); H5_DLL herr_t H5garbage_collect(void); H5_DLL herr_t H5set_free_list_limits (int reg_global_lim, int reg_list_lim, int arr_global_lim, int arr_list_lim, int blk_global_lim, int blk_list_lim); H5_DLL herr_t H5get_libversion(unsigned *majnum, unsigned *minnum, unsigned *relnum); H5_DLL herr_t H5check_version(unsigned majnum, unsigned minnum, unsigned relnum); H5_DLL herr_t H5is_library_threadsafe(hbool_t *is_ts); H5_DLL herr_t H5free_memory(void *mem); H5_DLL void *H5allocate_memory(size_t size, hbool_t clear); H5_DLL void *H5resize_memory(void *mem, size_t size); #ifdef __cplusplus } #endif #endif /* _H5public_H */
jeroen/hdf5r
src/1_8_16/Wrapper_auto_H5IM.h
<reponame>jeroen/hdf5r #ifndef _WRAPPER_AUTO_H5IM_H_ #define _WRAPPER_AUTO_H5IM_H_ #include "global.h" /* H5_HLDLL herr_t H5IMget_image_info( hid_t loc_id, const char *dset_name, hsize_t *width, hsize_t *height, hsize_t *planes, char *interlace, hssize_t *npals ); */ SEXP R_H5IMget_image_info(SEXP R_loc_id, SEXP R_dset_name, SEXP R_width, SEXP R_height, SEXP R_planes, SEXP R_interlace, SEXP R_npals); /* H5_HLDLL herr_t H5IMget_npalettes( hid_t loc_id, const char *image_name, hssize_t *npals ); */ SEXP R_H5IMget_npalettes(SEXP R_loc_id, SEXP R_image_name, SEXP R_npals); /* H5_HLDLL herr_t H5IMget_palette( hid_t loc_id, const char *image_name, int pal_number, unsigned char *pal_data ); */ SEXP R_H5IMget_palette(SEXP R_loc_id, SEXP R_image_name, SEXP R_pal_number, SEXP R_pal_data); /* H5_HLDLL herr_t H5IMget_palette_info( hid_t loc_id, const char *image_name, int pal_number, hsize_t *pal_dims ); */ SEXP R_H5IMget_palette_info(SEXP R_loc_id, SEXP R_image_name, SEXP R_pal_number, SEXP R_pal_dims); /* H5_HLDLL herr_t H5IMis_image( hid_t loc_id, const char *dset_name ); */ SEXP R_H5IMis_image(SEXP R_loc_id, SEXP R_dset_name); /* H5_HLDLL herr_t H5IMis_palette( hid_t loc_id, const char *dset_name ); */ SEXP R_H5IMis_palette(SEXP R_loc_id, SEXP R_dset_name); /* H5_HLDLL herr_t H5IMlink_palette( hid_t loc_id, const char *image_name, const char *pal_name ); */ SEXP R_H5IMlink_palette(SEXP R_loc_id, SEXP R_image_name, SEXP R_pal_name); /* H5_HLDLL herr_t H5IMmake_image_24bit( hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, const char *interlace, const unsigned char *buffer ); */ SEXP R_H5IMmake_image_24bit(SEXP R_loc_id, SEXP R_dset_name, SEXP R_width, SEXP R_height, SEXP R_interlace, SEXP R_buffer); /* H5_HLDLL herr_t H5IMmake_image_8bit( hid_t loc_id, const char *dset_name, hsize_t width, hsize_t height, const unsigned char *buffer ); */ SEXP R_H5IMmake_image_8bit(SEXP R_loc_id, SEXP R_dset_name, SEXP R_width, SEXP R_height, SEXP R_buffer); /* H5_HLDLL herr_t H5IMmake_palette( hid_t loc_id, const char *pal_name, const hsize_t *pal_dims, const unsigned char *pal_data ); */ SEXP R_H5IMmake_palette(SEXP R_loc_id, SEXP R_pal_name, SEXP R_pal_dims, SEXP R_pal_data); /* H5_HLDLL herr_t H5IMread_image( hid_t loc_id, const char *dset_name, unsigned char *buffer ); */ SEXP R_H5IMread_image(SEXP R_loc_id, SEXP R_dset_name, SEXP R_buffer); /* H5_HLDLL herr_t H5IMunlink_palette( hid_t loc_id, const char *image_name, const char *pal_name ); */ SEXP R_H5IMunlink_palette(SEXP R_loc_id, SEXP R_image_name, SEXP R_pal_name); #endif
jeroen/hdf5r
src/1_12_0/Wrapper_auto_H5FDcore.c
<reponame>jeroen/hdf5r /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "Wrapper_auto_H5FDcore.h" /* H5_DLL herr_t H5Pget_fapl_core(hid_t fapl_id, size_t *increment, hbool_t *backing_store); */ SEXP R_H5Pget_fapl_core(SEXP R_fapl_id, SEXP R_increment, SEXP R_backing_store){ hsize_t size_helper; SEXP R_helper = R_NilValue; int vars_protected=0; R_increment = PROTECT(duplicate(R_increment)); vars_protected++; R_backing_store = PROTECT(duplicate(R_backing_store)); vars_protected++; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); size_t* increment; if(XLENGTH(R_increment) == 0) { increment = NULL; } else { R_helper = PROTECT(RToH5(R_increment, h5_datatype[DT_size_t], XLENGTH(R_increment))); increment= (size_t*) VOIDPTR(R_helper); vars_protected++; } hbool_t* backing_store; if(XLENGTH(R_backing_store) == 0) { backing_store = NULL; } else { R_helper = PROTECT(RToH5(R_backing_store, h5_datatype[DT_hbool_t], XLENGTH(R_backing_store))); backing_store= (hbool_t*) VOIDPTR(R_helper); vars_protected++; } herr_t return_val = H5Pget_fapl_core(fapl_id, increment, backing_store); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; size_helper = guess_nelem(R_increment, h5_datatype[DT_size_t]); R_increment = PROTECT(H5ToR_single_step(increment, h5_datatype[DT_size_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; size_helper = guess_nelem(R_backing_store, h5_datatype[DT_hbool_t]); R_backing_store = PROTECT(H5ToR_single_step(backing_store, h5_datatype[DT_hbool_t], size_helper, H5TOR_CONV_INT64_NOLOSS)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 3)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SET_VECTOR_ELT(__ret_list, 1, R_increment); SET_VECTOR_ELT(__ret_list, 2, R_backing_store); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 3)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_STRING_ELT(__ret_list_names, 1, mkChar("increment")); SET_STRING_ELT(__ret_list_names, 2, mkChar("backing_store")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); } /* H5_DLL herr_t H5Pset_fapl_core(hid_t fapl_id, size_t increment, hbool_t backing_store); */ SEXP R_H5Pset_fapl_core(SEXP R_fapl_id, SEXP R_increment, SEXP R_backing_store){ int vars_protected=0; hid_t fapl_id = SEXP_to_longlong(R_fapl_id, 0); size_t increment = SEXP_to_longlong(R_increment, 0); hbool_t backing_store = SEXP_to_longlong(R_backing_store, 0); herr_t return_val = H5Pset_fapl_core(fapl_id, increment, backing_store); SEXP R_return_val= R_NilValue; R_return_val = PROTECT(ScalarInteger64_or_int(return_val)); vars_protected++; SEXP __ret_list; PROTECT(__ret_list = allocVector(VECSXP, 1)); SET_VECTOR_ELT(__ret_list, 0, R_return_val); SEXP __ret_list_names; PROTECT(__ret_list_names = allocVector(STRSXP, 1)); SET_STRING_ELT(__ret_list_names, 0, mkChar("return_val")); SET_NAMES(__ret_list, __ret_list_names); vars_protected += 2; UNPROTECT(vars_protected); return(__ret_list); }
jeroen/hdf5r
inst/CWrappers_1.8.16/headers/H5Tpublic.h
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright by The HDF Group. * * Copyright by the Board of Trustees of the University of Illinois. * * All rights reserved. * * * * This file is part of HDF5. The full HDF5 copyright notice, including * * terms governing use, modification, and redistribution, is contained in * * the files COPYING and Copyright.html. COPYING can be found at the root * * of the source code distribution tree; Copyright.html can be found at the * * root level of an installed copy of the electronic HDF5 document set and * * is linked from the top-level documents page. It can also be found at * * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * * access to either file, you may request a copy from <EMAIL>. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* * This file contains public declarations for the H5T module. */ #ifndef _H5Tpublic_H #define _H5Tpublic_H /* Public headers needed by this file */ #include "H5public.h" #include "H5Ipublic.h" #define HOFFSET(S,M) (offsetof(S,M)) /* These are the various classes of datatypes */ /* If this goes over 16 types (0-15), the file format will need to change) */ typedef enum H5T_class_t { H5T_NO_CLASS = -1, /*error */ H5T_INTEGER = 0, /*integer types */ H5T_FLOAT = 1, /*floating-point types */ H5T_TIME = 2, /*date and time types */ H5T_STRING = 3, /*character string types */ H5T_BITFIELD = 4, /*bit field types */ H5T_OPAQUE = 5, /*opaque types */ H5T_COMPOUND = 6, /*compound types */ H5T_REFERENCE = 7, /*reference types */ H5T_ENUM = 8, /*enumeration types */ H5T_VLEN = 9, /*Variable-Length types */ H5T_ARRAY = 10, /*Array types */ H5T_NCLASSES /*this must be last */ } H5T_class_t; /* Byte orders */ typedef enum H5T_order_t { H5T_ORDER_ERROR = -1, /*error */ H5T_ORDER_LE = 0, /*little endian */ H5T_ORDER_BE = 1, /*bit endian */ H5T_ORDER_VAX = 2, /*VAX mixed endian */ H5T_ORDER_MIXED = 3, /*Compound type with mixed member orders */ H5T_ORDER_NONE = 4 /*no particular order (strings, bits,..) */ /*H5T_ORDER_NONE must be last */ } H5T_order_t; /* Types of integer sign schemes */ typedef enum H5T_sign_t { H5T_SGN_ERROR = -1, /*error */ H5T_SGN_NONE = 0, /*this is an unsigned type */ H5T_SGN_2 = 1, /*two's complement */ H5T_NSGN = 2 /*this must be last! */ } H5T_sign_t; /* Floating-point normalization schemes */ typedef enum H5T_norm_t { H5T_NORM_ERROR = -1, /*error */ H5T_NORM_IMPLIED = 0, /*msb of mantissa isn't stored, always 1 */ H5T_NORM_MSBSET = 1, /*msb of mantissa is always 1 */ H5T_NORM_NONE = 2 /*not normalized */ /*H5T_NORM_NONE must be last */ } H5T_norm_t; /* * Character set to use for text strings. Do not change these values since * they appear in HDF5 files! */ typedef enum H5T_cset_t { H5T_CSET_ERROR = -1, /*error */ H5T_CSET_ASCII = 0, /*US ASCII */ H5T_CSET_UTF8 = 1, /*UTF-8 Unicode encoding */ H5T_CSET_RESERVED_2 = 2, /*reserved for later use */ H5T_CSET_RESERVED_3 = 3, /*reserved for later use */ H5T_CSET_RESERVED_4 = 4, /*reserved for later use */ H5T_CSET_RESERVED_5 = 5, /*reserved for later use */ H5T_CSET_RESERVED_6 = 6, /*reserved for later use */ H5T_CSET_RESERVED_7 = 7, /*reserved for later use */ H5T_CSET_RESERVED_8 = 8, /*reserved for later use */ H5T_CSET_RESERVED_9 = 9, /*reserved for later use */ H5T_CSET_RESERVED_10 = 10, /*reserved for later use */ H5T_CSET_RESERVED_11 = 11, /*reserved for later use */ H5T_CSET_RESERVED_12 = 12, /*reserved for later use */ H5T_CSET_RESERVED_13 = 13, /*reserved for later use */ H5T_CSET_RESERVED_14 = 14, /*reserved for later use */ H5T_CSET_RESERVED_15 = 15 /*reserved for later use */ } H5T_cset_t; #define H5T_NCSET H5T_CSET_RESERVED_2 /*Number of character sets actually defined */ /* * Type of padding to use in character strings. Do not change these values * since they appear in HDF5 files! */ typedef enum H5T_str_t { H5T_STR_ERROR = -1, /*error */ H5T_STR_NULLTERM = 0, /*null terminate like in C */ H5T_STR_NULLPAD = 1, /*pad with nulls */ H5T_STR_SPACEPAD = 2, /*pad with spaces like in Fortran */ H5T_STR_RESERVED_3 = 3, /*reserved for later use */ H5T_STR_RESERVED_4 = 4, /*reserved for later use */ H5T_STR_RESERVED_5 = 5, /*reserved for later use */ H5T_STR_RESERVED_6 = 6, /*reserved for later use */ H5T_STR_RESERVED_7 = 7, /*reserved for later use */ H5T_STR_RESERVED_8 = 8, /*reserved for later use */ H5T_STR_RESERVED_9 = 9, /*reserved for later use */ H5T_STR_RESERVED_10 = 10, /*reserved for later use */ H5T_STR_RESERVED_11 = 11, /*reserved for later use */ H5T_STR_RESERVED_12 = 12, /*reserved for later use */ H5T_STR_RESERVED_13 = 13, /*reserved for later use */ H5T_STR_RESERVED_14 = 14, /*reserved for later use */ H5T_STR_RESERVED_15 = 15 /*reserved for later use */ } H5T_str_t; #define H5T_NSTR H5T_STR_RESERVED_3 /*num H5T_str_t types actually defined */ /* Type of padding to use in other atomic types */ typedef enum H5T_pad_t { H5T_PAD_ERROR = -1, /*error */ H5T_PAD_ZERO = 0, /*always set to zero */ H5T_PAD_ONE = 1, /*always set to one */ H5T_PAD_BACKGROUND = 2, /*set to background value */ H5T_NPAD = 3 /*THIS MUST BE LAST */ } H5T_pad_t; /* Commands sent to conversion functions */ typedef enum H5T_cmd_t { H5T_CONV_INIT = 0, /*query and/or initialize private data */ H5T_CONV_CONV = 1, /*convert data from source to dest datatype */ H5T_CONV_FREE = 2 /*function is being removed from path */ } H5T_cmd_t; /* How is the `bkg' buffer used by the conversion function? */ typedef enum H5T_bkg_t { H5T_BKG_NO = 0, /*background buffer is not needed, send NULL */ H5T_BKG_TEMP = 1, /*bkg buffer used as temp storage only */ H5T_BKG_YES = 2 /*init bkg buf with data before conversion */ } H5T_bkg_t; /* Type conversion client data */ typedef struct H5T_cdata_t { H5T_cmd_t command;/*what should the conversion function do? */ H5T_bkg_t need_bkg;/*is the background buffer needed? */ hbool_t recalc; /*recalculate private data */ void *priv; /*private data */ } H5T_cdata_t; /* Conversion function persistence */ typedef enum H5T_pers_t { H5T_PERS_DONTCARE = -1, /*wild card */ H5T_PERS_HARD = 0, /*hard conversion function */ H5T_PERS_SOFT = 1 /*soft conversion function */ } H5T_pers_t; /* The order to retrieve atomic native datatype */ typedef enum H5T_direction_t { H5T_DIR_DEFAULT = 0, /*default direction is inscendent */ H5T_DIR_ASCEND = 1, /*in inscendent order */ H5T_DIR_DESCEND = 2 /*in descendent order */ } H5T_direction_t; /* The exception type passed into the conversion callback function */ typedef enum H5T_conv_except_t { H5T_CONV_EXCEPT_RANGE_HI = 0, /*source value is greater than destination's range */ H5T_CONV_EXCEPT_RANGE_LOW = 1, /*source value is less than destination's range */ H5T_CONV_EXCEPT_PRECISION = 2, /*source value loses precision in destination */ H5T_CONV_EXCEPT_TRUNCATE = 3, /*source value is truncated in destination */ H5T_CONV_EXCEPT_PINF = 4, /*source value is positive infinity(floating number) */ H5T_CONV_EXCEPT_NINF = 5, /*source value is negative infinity(floating number) */ H5T_CONV_EXCEPT_NAN = 6 /*source value is NaN(floating number) */ } H5T_conv_except_t; /* The return value from conversion callback function H5T_conv_except_func_t */ typedef enum H5T_conv_ret_t { H5T_CONV_ABORT = -1, /*abort conversion */ H5T_CONV_UNHANDLED = 0, /*callback function failed to handle the exception */ H5T_CONV_HANDLED = 1 /*callback function handled the exception successfully */ } H5T_conv_ret_t; /* Variable Length Datatype struct in memory */ /* (This is only used for VL sequences, not VL strings, which are stored in char *'s) */ typedef struct { size_t len; /* Length of VL data (in base type units) */ void *p; /* Pointer to VL data */ } hvl_t; /* Variable Length String information */ #define H5T_VARIABLE ((size_t)(-1)) /* Indicate that a string is variable length (null-terminated in C, instead of fixed length) */ /* Opaque information */ #define H5T_OPAQUE_TAG_MAX 256 /* Maximum length of an opaque tag */ /* This could be raised without too much difficulty */ #ifdef __cplusplus extern "C" { #endif /* All datatype conversion functions are... */ typedef herr_t (*H5T_conv_t) (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); /* Exception handler. If an exception like overflow happenes during conversion, * this function is called if it's registered through H5Pset_type_conv_cb. */ typedef H5T_conv_ret_t (*H5T_conv_except_func_t)(H5T_conv_except_t except_type, hid_t src_id, hid_t dst_id, void *src_buf, void *dst_buf, void *user_data); /* When this header is included from a private header, don't make calls to H5open() */ #undef H5OPEN #ifndef _H5private_H #define H5OPEN H5open(), #else /* _H5private_H */ #define H5OPEN #endif /* _H5private_H */ /* * The IEEE floating point types in various byte orders. */ #define H5T_IEEE_F32BE (H5OPEN H5T_IEEE_F32BE_g) #define H5T_IEEE_F32LE (H5OPEN H5T_IEEE_F32LE_g) #define H5T_IEEE_F64BE (H5OPEN H5T_IEEE_F64BE_g) #define H5T_IEEE_F64LE (H5OPEN H5T_IEEE_F64LE_g) H5_DLLVAR hid_t H5T_IEEE_F32BE_g; H5_DLLVAR hid_t H5T_IEEE_F32LE_g; H5_DLLVAR hid_t H5T_IEEE_F64BE_g; H5_DLLVAR hid_t H5T_IEEE_F64LE_g; /* * These are "standard" types. For instance, signed (2's complement) and * unsigned integers of various sizes and byte orders. */ #define H5T_STD_I8BE (H5OPEN H5T_STD_I8BE_g) #define H5T_STD_I8LE (H5OPEN H5T_STD_I8LE_g) #define H5T_STD_I16BE (H5OPEN H5T_STD_I16BE_g) #define H5T_STD_I16LE (H5OPEN H5T_STD_I16LE_g) #define H5T_STD_I32BE (H5OPEN H5T_STD_I32BE_g) #define H5T_STD_I32LE (H5OPEN H5T_STD_I32LE_g) #define H5T_STD_I64BE (H5OPEN H5T_STD_I64BE_g) #define H5T_STD_I64LE (H5OPEN H5T_STD_I64LE_g) #define H5T_STD_U8BE (H5OPEN H5T_STD_U8BE_g) #define H5T_STD_U8LE (H5OPEN H5T_STD_U8LE_g) #define H5T_STD_U16BE (H5OPEN H5T_STD_U16BE_g) #define H5T_STD_U16LE (H5OPEN H5T_STD_U16LE_g) #define H5T_STD_U32BE (H5OPEN H5T_STD_U32BE_g) #define H5T_STD_U32LE (H5OPEN H5T_STD_U32LE_g) #define H5T_STD_U64BE (H5OPEN H5T_STD_U64BE_g) #define H5T_STD_U64LE (H5OPEN H5T_STD_U64LE_g) #define H5T_STD_B8BE (H5OPEN H5T_STD_B8BE_g) #define H5T_STD_B8LE (H5OPEN H5T_STD_B8LE_g) #define H5T_STD_B16BE (H5OPEN H5T_STD_B16BE_g) #define H5T_STD_B16LE (H5OPEN H5T_STD_B16LE_g) #define H5T_STD_B32BE (H5OPEN H5T_STD_B32BE_g) #define H5T_STD_B32LE (H5OPEN H5T_STD_B32LE_g) #define H5T_STD_B64BE (H5OPEN H5T_STD_B64BE_g) #define H5T_STD_B64LE (H5OPEN H5T_STD_B64LE_g) #define H5T_STD_REF_OBJ (H5OPEN H5T_STD_REF_OBJ_g) #define H5T_STD_REF_DSETREG (H5OPEN H5T_STD_REF_DSETREG_g) H5_DLLVAR hid_t H5T_STD_I8BE_g; H5_DLLVAR hid_t H5T_STD_I8LE_g; H5_DLLVAR hid_t H5T_STD_I16BE_g; H5_DLLVAR hid_t H5T_STD_I16LE_g; H5_DLLVAR hid_t H5T_STD_I32BE_g; H5_DLLVAR hid_t H5T_STD_I32LE_g; H5_DLLVAR hid_t H5T_STD_I64BE_g; H5_DLLVAR hid_t H5T_STD_I64LE_g; H5_DLLVAR hid_t H5T_STD_U8BE_g; H5_DLLVAR hid_t H5T_STD_U8LE_g; H5_DLLVAR hid_t H5T_STD_U16BE_g; H5_DLLVAR hid_t H5T_STD_U16LE_g; H5_DLLVAR hid_t H5T_STD_U32BE_g; H5_DLLVAR hid_t H5T_STD_U32LE_g; H5_DLLVAR hid_t H5T_STD_U64BE_g; H5_DLLVAR hid_t H5T_STD_U64LE_g; H5_DLLVAR hid_t H5T_STD_B8BE_g; H5_DLLVAR hid_t H5T_STD_B8LE_g; H5_DLLVAR hid_t H5T_STD_B16BE_g; H5_DLLVAR hid_t H5T_STD_B16LE_g; H5_DLLVAR hid_t H5T_STD_B32BE_g; H5_DLLVAR hid_t H5T_STD_B32LE_g; H5_DLLVAR hid_t H5T_STD_B64BE_g; H5_DLLVAR hid_t H5T_STD_B64LE_g; H5_DLLVAR hid_t H5T_STD_REF_OBJ_g; H5_DLLVAR hid_t H5T_STD_REF_DSETREG_g; /* * Types which are particular to Unix. */ #define H5T_UNIX_D32BE (H5OPEN H5T_UNIX_D32BE_g) #define H5T_UNIX_D32LE (H5OPEN H5T_UNIX_D32LE_g) #define H5T_UNIX_D64BE (H5OPEN H5T_UNIX_D64BE_g) #define H5T_UNIX_D64LE (H5OPEN H5T_UNIX_D64LE_g) H5_DLLVAR hid_t H5T_UNIX_D32BE_g; H5_DLLVAR hid_t H5T_UNIX_D32LE_g; H5_DLLVAR hid_t H5T_UNIX_D64BE_g; H5_DLLVAR hid_t H5T_UNIX_D64LE_g; /* * Types particular to the C language. String types use `bytes' instead * of `bits' as their size. */ #define H5T_C_S1 (H5OPEN H5T_C_S1_g) H5_DLLVAR hid_t H5T_C_S1_g; /* * Types particular to Fortran. */ #define H5T_FORTRAN_S1 (H5OPEN H5T_FORTRAN_S1_g) H5_DLLVAR hid_t H5T_FORTRAN_S1_g; /* * These types are for Intel CPU's. They are little endian with IEEE * floating point. */ #define H5T_INTEL_I8 H5T_STD_I8LE #define H5T_INTEL_I16 H5T_STD_I16LE #define H5T_INTEL_I32 H5T_STD_I32LE #define H5T_INTEL_I64 H5T_STD_I64LE #define H5T_INTEL_U8 H5T_STD_U8LE #define H5T_INTEL_U16 H5T_STD_U16LE #define H5T_INTEL_U32 H5T_STD_U32LE #define H5T_INTEL_U64 H5T_STD_U64LE #define H5T_INTEL_B8 H5T_STD_B8LE #define H5T_INTEL_B16 H5T_STD_B16LE #define H5T_INTEL_B32 H5T_STD_B32LE #define H5T_INTEL_B64 H5T_STD_B64LE #define H5T_INTEL_F32 H5T_IEEE_F32LE #define H5T_INTEL_F64 H5T_IEEE_F64LE /* * These types are for DEC Alpha CPU's. They are little endian with IEEE * floating point. */ #define H5T_ALPHA_I8 H5T_STD_I8LE #define H5T_ALPHA_I16 H5T_STD_I16LE #define H5T_ALPHA_I32 H5T_STD_I32LE #define H5T_ALPHA_I64 H5T_STD_I64LE #define H5T_ALPHA_U8 H5T_STD_U8LE #define H5T_ALPHA_U16 H5T_STD_U16LE #define H5T_ALPHA_U32 H5T_STD_U32LE #define H5T_ALPHA_U64 H5T_STD_U64LE #define H5T_ALPHA_B8 H5T_STD_B8LE #define H5T_ALPHA_B16 H5T_STD_B16LE #define H5T_ALPHA_B32 H5T_STD_B32LE #define H5T_ALPHA_B64 H5T_STD_B64LE #define H5T_ALPHA_F32 H5T_IEEE_F32LE #define H5T_ALPHA_F64 H5T_IEEE_F64LE /* * These types are for MIPS cpu's commonly used in SGI systems. They are big * endian with IEEE floating point. */ #define H5T_MIPS_I8 H5T_STD_I8BE #define H5T_MIPS_I16 H5T_STD_I16BE #define H5T_MIPS_I32 H5T_STD_I32BE #define H5T_MIPS_I64 H5T_STD_I64BE #define H5T_MIPS_U8 H5T_STD_U8BE #define H5T_MIPS_U16 H5T_STD_U16BE #define H5T_MIPS_U32 H5T_STD_U32BE #define H5T_MIPS_U64 H5T_STD_U64BE #define H5T_MIPS_B8 H5T_STD_B8BE #define H5T_MIPS_B16 H5T_STD_B16BE #define H5T_MIPS_B32 H5T_STD_B32BE #define H5T_MIPS_B64 H5T_STD_B64BE #define H5T_MIPS_F32 H5T_IEEE_F32BE #define H5T_MIPS_F64 H5T_IEEE_F64BE /* * The VAX floating point types (i.e. in VAX byte order) */ #define H5T_VAX_F32 (H5OPEN H5T_VAX_F32_g) #define H5T_VAX_F64 (H5OPEN H5T_VAX_F64_g) H5_DLLVAR hid_t H5T_VAX_F32_g; H5_DLLVAR hid_t H5T_VAX_F64_g; /* * The predefined native types. These are the types detected by H5detect and * they violate the naming scheme a little. Instead of a class name, * precision and byte order as the last component, they have a C-like type * name. If the type begins with `U' then it is the unsigned version of the * integer type; other integer types are signed. The type LLONG corresponds * to C's `long long' and LDOUBLE is `long double' (these types might be the * same as `LONG' and `DOUBLE' respectively). */ #define H5T_NATIVE_CHAR (CHAR_MIN?H5T_NATIVE_SCHAR:H5T_NATIVE_UCHAR) #define H5T_NATIVE_SCHAR (H5OPEN H5T_NATIVE_SCHAR_g) #define H5T_NATIVE_UCHAR (H5OPEN H5T_NATIVE_UCHAR_g) #define H5T_NATIVE_SHORT (H5OPEN H5T_NATIVE_SHORT_g) #define H5T_NATIVE_USHORT (H5OPEN H5T_NATIVE_USHORT_g) #define H5T_NATIVE_INT (H5OPEN H5T_NATIVE_INT_g) #define H5T_NATIVE_UINT (H5OPEN H5T_NATIVE_UINT_g) #define H5T_NATIVE_LONG (H5OPEN H5T_NATIVE_LONG_g) #define H5T_NATIVE_ULONG (H5OPEN H5T_NATIVE_ULONG_g) #define H5T_NATIVE_LLONG (H5OPEN H5T_NATIVE_LLONG_g) #define H5T_NATIVE_ULLONG (H5OPEN H5T_NATIVE_ULLONG_g) #define H5T_NATIVE_FLOAT (H5OPEN H5T_NATIVE_FLOAT_g) #define H5T_NATIVE_DOUBLE (H5OPEN H5T_NATIVE_DOUBLE_g) #if H5_SIZEOF_LONG_DOUBLE !=0 #define H5T_NATIVE_LDOUBLE (H5OPEN H5T_NATIVE_LDOUBLE_g) #endif #define H5T_NATIVE_B8 (H5OPEN H5T_NATIVE_B8_g) #define H5T_NATIVE_B16 (H5OPEN H5T_NATIVE_B16_g) #define H5T_NATIVE_B32 (H5OPEN H5T_NATIVE_B32_g) #define H5T_NATIVE_B64 (H5OPEN H5T_NATIVE_B64_g) #define H5T_NATIVE_OPAQUE (H5OPEN H5T_NATIVE_OPAQUE_g) #define H5T_NATIVE_HADDR (H5OPEN H5T_NATIVE_HADDR_g) #define H5T_NATIVE_HSIZE (H5OPEN H5T_NATIVE_HSIZE_g) #define H5T_NATIVE_HSSIZE (H5OPEN H5T_NATIVE_HSSIZE_g) #define H5T_NATIVE_HERR (H5OPEN H5T_NATIVE_HERR_g) #define H5T_NATIVE_HBOOL (H5OPEN H5T_NATIVE_HBOOL_g) H5_DLLVAR hid_t H5T_NATIVE_SCHAR_g; H5_DLLVAR hid_t H5T_NATIVE_UCHAR_g; H5_DLLVAR hid_t H5T_NATIVE_SHORT_g; H5_DLLVAR hid_t H5T_NATIVE_USHORT_g; H5_DLLVAR hid_t H5T_NATIVE_INT_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_g; H5_DLLVAR hid_t H5T_NATIVE_LONG_g; H5_DLLVAR hid_t H5T_NATIVE_ULONG_g; H5_DLLVAR hid_t H5T_NATIVE_LLONG_g; H5_DLLVAR hid_t H5T_NATIVE_ULLONG_g; H5_DLLVAR hid_t H5T_NATIVE_FLOAT_g; H5_DLLVAR hid_t H5T_NATIVE_DOUBLE_g; #if H5_SIZEOF_LONG_DOUBLE !=0 H5_DLLVAR hid_t H5T_NATIVE_LDOUBLE_g; #endif H5_DLLVAR hid_t H5T_NATIVE_B8_g; H5_DLLVAR hid_t H5T_NATIVE_B16_g; H5_DLLVAR hid_t H5T_NATIVE_B32_g; H5_DLLVAR hid_t H5T_NATIVE_B64_g; H5_DLLVAR hid_t H5T_NATIVE_OPAQUE_g; H5_DLLVAR hid_t H5T_NATIVE_HADDR_g; H5_DLLVAR hid_t H5T_NATIVE_HSIZE_g; H5_DLLVAR hid_t H5T_NATIVE_HSSIZE_g; H5_DLLVAR hid_t H5T_NATIVE_HERR_g; H5_DLLVAR hid_t H5T_NATIVE_HBOOL_g; /* C9x integer types */ #define H5T_NATIVE_INT8 (H5OPEN H5T_NATIVE_INT8_g) #define H5T_NATIVE_UINT8 (H5OPEN H5T_NATIVE_UINT8_g) #define H5T_NATIVE_INT_LEAST8 (H5OPEN H5T_NATIVE_INT_LEAST8_g) #define H5T_NATIVE_UINT_LEAST8 (H5OPEN H5T_NATIVE_UINT_LEAST8_g) #define H5T_NATIVE_INT_FAST8 (H5OPEN H5T_NATIVE_INT_FAST8_g) #define H5T_NATIVE_UINT_FAST8 (H5OPEN H5T_NATIVE_UINT_FAST8_g) H5_DLLVAR hid_t H5T_NATIVE_INT8_g; H5_DLLVAR hid_t H5T_NATIVE_UINT8_g; H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST8_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST8_g; H5_DLLVAR hid_t H5T_NATIVE_INT_FAST8_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST8_g; #define H5T_NATIVE_INT16 (H5OPEN H5T_NATIVE_INT16_g) #define H5T_NATIVE_UINT16 (H5OPEN H5T_NATIVE_UINT16_g) #define H5T_NATIVE_INT_LEAST16 (H5OPEN H5T_NATIVE_INT_LEAST16_g) #define H5T_NATIVE_UINT_LEAST16 (H5OPEN H5T_NATIVE_UINT_LEAST16_g) #define H5T_NATIVE_INT_FAST16 (H5OPEN H5T_NATIVE_INT_FAST16_g) #define H5T_NATIVE_UINT_FAST16 (H5OPEN H5T_NATIVE_UINT_FAST16_g) H5_DLLVAR hid_t H5T_NATIVE_INT16_g; H5_DLLVAR hid_t H5T_NATIVE_UINT16_g; H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST16_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST16_g; H5_DLLVAR hid_t H5T_NATIVE_INT_FAST16_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST16_g; #define H5T_NATIVE_INT32 (H5OPEN H5T_NATIVE_INT32_g) #define H5T_NATIVE_UINT32 (H5OPEN H5T_NATIVE_UINT32_g) #define H5T_NATIVE_INT_LEAST32 (H5OPEN H5T_NATIVE_INT_LEAST32_g) #define H5T_NATIVE_UINT_LEAST32 (H5OPEN H5T_NATIVE_UINT_LEAST32_g) #define H5T_NATIVE_INT_FAST32 (H5OPEN H5T_NATIVE_INT_FAST32_g) #define H5T_NATIVE_UINT_FAST32 (H5OPEN H5T_NATIVE_UINT_FAST32_g) H5_DLLVAR hid_t H5T_NATIVE_INT32_g; H5_DLLVAR hid_t H5T_NATIVE_UINT32_g; H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST32_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST32_g; H5_DLLVAR hid_t H5T_NATIVE_INT_FAST32_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST32_g; #define H5T_NATIVE_INT64 (H5OPEN H5T_NATIVE_INT64_g) #define H5T_NATIVE_UINT64 (H5OPEN H5T_NATIVE_UINT64_g) #define H5T_NATIVE_INT_LEAST64 (H5OPEN H5T_NATIVE_INT_LEAST64_g) #define H5T_NATIVE_UINT_LEAST64 (H5OPEN H5T_NATIVE_UINT_LEAST64_g) #define H5T_NATIVE_INT_FAST64 (H5OPEN H5T_NATIVE_INT_FAST64_g) #define H5T_NATIVE_UINT_FAST64 (H5OPEN H5T_NATIVE_UINT_FAST64_g) H5_DLLVAR hid_t H5T_NATIVE_INT64_g; H5_DLLVAR hid_t H5T_NATIVE_UINT64_g; H5_DLLVAR hid_t H5T_NATIVE_INT_LEAST64_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_LEAST64_g; H5_DLLVAR hid_t H5T_NATIVE_INT_FAST64_g; H5_DLLVAR hid_t H5T_NATIVE_UINT_FAST64_g; /* Operations defined on all datatypes */ H5_DLL hid_t H5Tcreate(H5T_class_t type, size_t size); H5_DLL hid_t H5Tcopy(hid_t type_id); H5_DLL herr_t H5Tclose(hid_t type_id); H5_DLL htri_t H5Tequal(hid_t type1_id, hid_t type2_id); H5_DLL herr_t H5Tlock(hid_t type_id); H5_DLL herr_t H5Tcommit2(hid_t loc_id, const char *name, hid_t type_id, hid_t lcpl_id, hid_t tcpl_id, hid_t tapl_id); H5_DLL hid_t H5Topen2(hid_t loc_id, const char *name, hid_t tapl_id); H5_DLL herr_t H5Tcommit_anon(hid_t loc_id, hid_t type_id, hid_t tcpl_id, hid_t tapl_id); H5_DLL hid_t H5Tget_create_plist(hid_t type_id); H5_DLL htri_t H5Tcommitted(hid_t type_id); H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc); H5_DLL hid_t H5Tdecode(const void *buf); /* Operations defined on compound datatypes */ H5_DLL herr_t H5Tinsert(hid_t parent_id, const char *name, size_t offset, hid_t member_id); H5_DLL herr_t H5Tpack(hid_t type_id); /* Operations defined on enumeration datatypes */ H5_DLL hid_t H5Tenum_create(hid_t base_id); H5_DLL herr_t H5Tenum_insert(hid_t type, const char *name, const void *value); H5_DLL herr_t H5Tenum_nameof(hid_t type, const void *value, char *name/*out*/, size_t size); H5_DLL herr_t H5Tenum_valueof(hid_t type, const char *name, void *value/*out*/); /* Operations defined on variable-length datatypes */ H5_DLL hid_t H5Tvlen_create(hid_t base_id); /* Operations defined on array datatypes */ H5_DLL hid_t H5Tarray_create2(hid_t base_id, unsigned ndims, const hsize_t dim[/* ndims */]); H5_DLL int H5Tget_array_ndims(hid_t type_id); H5_DLL int H5Tget_array_dims2(hid_t type_id, hsize_t dims[]); /* Operations defined on opaque datatypes */ H5_DLL herr_t H5Tset_tag(hid_t type, const char *tag); H5_DLL char *H5Tget_tag(hid_t type); /* Querying property values */ H5_DLL hid_t H5Tget_super(hid_t type); H5_DLL H5T_class_t H5Tget_class(hid_t type_id); H5_DLL htri_t H5Tdetect_class(hid_t type_id, H5T_class_t cls); H5_DLL size_t H5Tget_size(hid_t type_id); H5_DLL H5T_order_t H5Tget_order(hid_t type_id); H5_DLL size_t H5Tget_precision(hid_t type_id); H5_DLL int H5Tget_offset(hid_t type_id); H5_DLL herr_t H5Tget_pad(hid_t type_id, H5T_pad_t *lsb/*out*/, H5T_pad_t *msb/*out*/); H5_DLL H5T_sign_t H5Tget_sign(hid_t type_id); H5_DLL herr_t H5Tget_fields(hid_t type_id, size_t *spos/*out*/, size_t *epos/*out*/, size_t *esize/*out*/, size_t *mpos/*out*/, size_t *msize/*out*/); H5_DLL size_t H5Tget_ebias(hid_t type_id); H5_DLL H5T_norm_t H5Tget_norm(hid_t type_id); H5_DLL H5T_pad_t H5Tget_inpad(hid_t type_id); H5_DLL H5T_str_t H5Tget_strpad(hid_t type_id); H5_DLL int H5Tget_nmembers(hid_t type_id); H5_DLL char *H5Tget_member_name(hid_t type_id, unsigned membno); H5_DLL int H5Tget_member_index(hid_t type_id, const char *name); H5_DLL size_t H5Tget_member_offset(hid_t type_id, unsigned membno); H5_DLL H5T_class_t H5Tget_member_class(hid_t type_id, unsigned membno); H5_DLL hid_t H5Tget_member_type(hid_t type_id, unsigned membno); H5_DLL herr_t H5Tget_member_value(hid_t type_id, unsigned membno, void *value/*out*/); H5_DLL H5T_cset_t H5Tget_cset(hid_t type_id); H5_DLL htri_t H5Tis_variable_str(hid_t type_id); H5_DLL hid_t H5Tget_native_type(hid_t type_id, H5T_direction_t direction); /* Setting property values */ H5_DLL herr_t H5Tset_size(hid_t type_id, size_t size); H5_DLL herr_t H5Tset_order(hid_t type_id, H5T_order_t order); H5_DLL herr_t H5Tset_precision(hid_t type_id, size_t prec); H5_DLL herr_t H5Tset_offset(hid_t type_id, size_t offset); H5_DLL herr_t H5Tset_pad(hid_t type_id, H5T_pad_t lsb, H5T_pad_t msb); H5_DLL herr_t H5Tset_sign(hid_t type_id, H5T_sign_t sign); H5_DLL herr_t H5Tset_fields(hid_t type_id, size_t spos, size_t epos, size_t esize, size_t mpos, size_t msize); H5_DLL herr_t H5Tset_ebias(hid_t type_id, size_t ebias); H5_DLL herr_t H5Tset_norm(hid_t type_id, H5T_norm_t norm); H5_DLL herr_t H5Tset_inpad(hid_t type_id, H5T_pad_t pad); H5_DLL herr_t H5Tset_cset(hid_t type_id, H5T_cset_t cset); H5_DLL herr_t H5Tset_strpad(hid_t type_id, H5T_str_t strpad); /* Type conversion database */ H5_DLL herr_t H5Tregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_conv_t func); H5_DLL herr_t H5Tunregister(H5T_pers_t pers, const char *name, hid_t src_id, hid_t dst_id, H5T_conv_t func); H5_DLL H5T_conv_t H5Tfind(hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata); H5_DLL htri_t H5Tcompiler_conv(hid_t src_id, hid_t dst_id); H5_DLL herr_t H5Tconvert(hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background, hid_t plist_id); /* Symbols defined for compatibility with previous versions of the HDF5 API. * * Use of these symbols is deprecated. */ #ifndef H5_NO_DEPRECATED_SYMBOLS /* Macros */ /* Typedefs */ /* Function prototypes */ H5_DLL herr_t H5Tcommit1(hid_t loc_id, const char *name, hid_t type_id); H5_DLL hid_t H5Topen1(hid_t loc_id, const char *name); H5_DLL hid_t H5Tarray_create1(hid_t base_id, int ndims, const hsize_t dim[/* ndims */], const int perm[/* ndims */]); H5_DLL int H5Tget_array_dims1(hid_t type_id, hsize_t dims[], int perm[]); #endif /* H5_NO_DEPRECATED_SYMBOLS */ #ifdef __cplusplus } #endif #endif /* _H5Tpublic_H */
jeroen/hdf5r
src/convert.c
<filename>src/convert.c /************************************************************************** * * Copyright 2016 Novartis Institutes for BioMedical Research Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * *************************************************************************/ #include "convert.h" /********************************************************************************* * Functions for converting an R object to HDF5 *********************************************************************************/ SEXP R_RToH5(SEXP _Robj, SEXP _dtype_id, SEXP _nelem) { // simply unwrap the _dtype_id and _nelem and pass it to RToH5 hid_t dtype_id = SEXP_to_longlong(_dtype_id, 0); R_xlen_t nelem = SEXP_to_xlen(_nelem); return(RToH5(_Robj, dtype_id, nelem)); } SEXP RToH5(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { // dispatch based on the class_name H5T_class_t dtype_class = H5Tget_class(dtype_id); // adds a switch so that one can pass an "empty" r object // will just be a raw vector with class _RToH5_empty // and length equal to nelem // in this case, an empty raw vector of appropriate size will be returned SEXP Rval; if(is_RToH5_empty(_Robj, nelem)) { R_xlen_t vec_size = nelem * H5Tget_size(dtype_id); Rval = PROTECT(NEW_RAW(vec_size)); // initialize array to 0 memset(VOIDPTR(Rval), 0, vec_size); } else { switch(dtype_class) { case H5T_COMPOUND: if(TYPEOF(_Robj)==CPLXSXP) { PROTECT(Rval = RToH5_RComplex(_Robj, dtype_id, nelem)); } else { PROTECT(Rval = RToH5_COMPOUND(_Robj, dtype_id, nelem)); } break; case H5T_ARRAY: PROTECT(Rval = RToH5_ARRAY(_Robj, dtype_id, nelem)); break; case H5T_ENUM: PROTECT(Rval = RToH5_ENUM(_Robj, dtype_id, nelem)); break; case H5T_BITFIELD: case H5T_INTEGER: PROTECT(Rval = RToH5_INTEGER(_Robj, dtype_id, nelem)); break; case H5T_FLOAT: PROTECT(Rval = RToH5_FLOAT(_Robj, dtype_id, nelem)); break; case H5T_STRING: PROTECT(Rval = RToH5_STRING(_Robj, dtype_id, nelem)); break; case H5T_OPAQUE: PROTECT(Rval = RToH5_OPAQUE(_Robj, dtype_id, nelem)); break; case H5T_REFERENCE: PROTECT(Rval = RToH5_REFERENCE(_Robj, dtype_id, nelem)); break; case H5T_VLEN: PROTECT(Rval = RToH5_VLEN(_Robj, dtype_id, nelem)); break; default: error("Error when retrieving class"); } } UNPROTECT(1); return(Rval); } SEXP RToH5_RComplex(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { // check that _Robj is actually complex if(TYPEOF(_Robj) != CPLXSXP) { error("R object passed with Compound looking like a complex variable, is not a complex variable"); } // check that the compound is looking like an h5_complex compound if(!is_h5_complex(dtype_id)) { error("Complex R variable passed, but compound does not look like an h5_complex compound. Needs to be a compound with 2 equal sized float variables with a name of the first variable starting with 'Re' and the second variable starting with 'Im'\n"); } // check that the size is correct if(XLENGTH(_Robj) != nelem) { error("Length of R object not correct"); } // pass it to the REAL variable analyzer hid_t dtype_member = H5Tget_member_type(dtype_id, 0); SEXP res; PROTECT(res = RToH5_FLOAT(_Robj, dtype_member, nelem * 2)); H5Tclose(dtype_member); UNPROTECT(1); return(res); } SEXP RToH5_COMPOUND(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { if(!is_robj_compound(_Robj, dtype_id, nelem)) { error("The Robj does not match the data structure of the compound datatype\n"); } if(nelem != XLENGTH(VECTOR_ELT(_Robj, 0))) { error("Number of rows in Compound not as expected\n"); }; // allocate the raw vector that will hold the data hsize_t total_size = H5Tget_size(dtype_id); SEXP Rval, Rval_attributes; PROTECT(Rval = allocVector(RAWSXP, nelem * total_size)); // for variable length arrays, we need to attach the corresponding data somehow; // do this by attaching a list to the attributes that collects the corresponding // attributes returned by RToH5 functions inside the loop PROTECT(Rval_attributes = allocVector(VECSXP, XLENGTH(_Robj))); // now we need to copy the data over for every list element, depending on the type hsize_t offset = 0; for(int i=0; i < LENGTH(_Robj); i++) { // get the type and its size hid_t cpd_item_id = H5Tget_member_type(dtype_id, i); offset = H5Tget_member_offset(dtype_id, i); if(cpd_item_id < 0) { error("An error occured when fetching the a compound item\n"); } hsize_t item_size = H5Tget_size(cpd_item_id); // wrap the cpd_item_id in an R object SEXP R_item = PROTECT(RToH5(VECTOR_ELT(_Robj, i), cpd_item_id, nelem)); // copy the h5_store attribute; if it doesn't exist, will be null SET_VECTOR_ELT(Rval_attributes, i, GET_ATTR(R_item, install("h5_store"))); memcpy_to_record(VOIDPTR(Rval), VOIDPTR(R_item), nelem, total_size, offset, item_size); H5Tclose(cpd_item_id); UNPROTECT(1); } // install it in the attributes SET_ATTR(Rval, install("h5_store"), Rval_attributes); UNPROTECT(2); return Rval; } SEXP RToH5_ARRAY(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { // First we check that the dtype and the Robj have matching dimensions if(!is_robj_array(_Robj, dtype_id)) { error("The Robj does not match the data type"); } // then put it back into the RToH5 Function with its own base type, so that they base type // is properly handled hsize_t num_rows = nelem; hid_t dtype_base = H5Tget_super(dtype_id); hsize_t dtype_base_size = H5Tget_size(dtype_base); hsize_t num_cols = H5Tget_size(dtype_id) / dtype_base_size; // now call itself on the copied object SEXP res; PROTECT(res = RToH5(_Robj, dtype_base, num_rows * num_cols)); H5Tclose(dtype_base); // now, need to transpose the input so that the data inside the array is in consecutive order // but only if there is more than one element // (i.e. on the first dimensions) if(nelem != 1) { SEXP res_copy = PROTECT(duplicate(res)); // use this as the target to write the transposed data in transpose_general(VOIDPTR(res_copy), VOIDPTR(res), num_rows, num_cols, dtype_base_size, true); UNPROTECT(2); return(res_copy); } else { UNPROTECT(1); return(res); } } SEXP RToH5_ENUM(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { // this can just be done by calling the Integer conversion on the enum base type // but before should check if the R object and the enum are compatible // R object doesn't have to be a "factor", but it should have a levels attribute // that matches the levels in enum; if it is not a factor, should also have a values attribute if(is_enum_logical(dtype_id)) { // need to coerce to logical; capture if NAs are in there // throw error if the logical type doesn't support NAs // convert to value 2 if it does SEXP obj_logical; if(!isLogical(_Robj)) { obj_logical = PROTECT(AS_LOGICAL(_Robj)); } else { obj_logical = PROTECT(duplicate(_Robj)); } int enum_size = H5Tget_nmembers(dtype_id); if(enum_size == 2) { // throw an error if object contains an NA for(R_xlen_t i =0; i < nelem; ++i) { if(LOGICAL(obj_logical)[i] == NA_LOGICAL) { error("Trying to save an R-Logical vector with NA into an HDF5-Logical Enum without NA"); } } } else if(enum_size == 3) { // convert value to 2 if object contains an NA for(R_xlen_t i =0; i < nelem; ++i) { if(LOGICAL(obj_logical)[i] == NA_LOGICAL) { LOGICAL(obj_logical)[i] = 2; } } } else { error("Logical enum cannot have size other than 2 or 3"); } hid_t dtype_base = H5Tget_super(dtype_id); SEXP Rval; PROTECT(Rval = RToH5_INTEGER(obj_logical, dtype_base, nelem)); H5Tclose(dtype_base); UNPROTECT(2); return(Rval); } else { if(!is_robj_enum(_Robj, dtype_id)) { error("Robj to convert does not match enum datatype"); } hid_t dtype_base = H5Tget_super(dtype_id); SEXP Rval; PROTECT(Rval = RToH5_INTEGER(_Robj, dtype_base, nelem)); H5Tclose(dtype_base); UNPROTECT(1); return(Rval); } } SEXP RToH5_INTEGER(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { SEXP Rval; if(nelem != XLENGTH(_Robj)) { error("Length of integer vector not as expected: Actual: %d; Expected %d\n", XLENGTH(_Robj), nelem); } switch(TYPEOF(_Robj)) { case REALSXP: { // check if it is a 64bit integer, then need to coerce it to double if(!is_rint64(_Robj)) { // it is float, // two cases; if the result is UINT64, then will treat it special; // otherwise convert to integer64 and rerun htri_t isUINT64 = H5Tequal(dtype_id, H5T_NATIVE_UINT64); if(isUINT64 < 0) { error("Error when comparing type to UINT64\n"); } if(isUINT64) { // convert to UINT64 and return PROTECT(Rval = NEW_NUMERIC(nelem)); uint64_t* uint64_ptr = (uint64_t *) REAL(Rval); double* dbl_ptr = REAL(_Robj); double dbl_max_unit64 = pow(2, 64); for(R_xlen_t i = 0; i < nelem; ++i) { if(dbl_ptr[i] < 0) { uint64_ptr[i] = 0; } else if(dbl_ptr[i] >= dbl_max_unit64) { uint64_ptr[i] = ULLONG_MAX; } else if(isnan(dbl_ptr[i])) { } else { uint64_ptr[i] = dbl_ptr[i]; } } UNPROTECT(1); return(Rval); } else { PROTECT(Rval = convert_double_to_int64(_Robj)); PROTECT(Rval = RToH5_INTEGER(Rval, dtype_id, nelem)); UNPROTECT(2); return(Rval); } } else { int isNativeLLong = H5Tequal(dtype_id, H5T_NATIVE_LLONG); if(isNativeLLong < 0) { error("Error when comparing if is native long long\n"); } if(isNativeLLong) { // size of a regular llong, no conversion necessary return(_Robj); } // check if it is NATIVE_INT -> then will use R's NA-aware conversion int isNativeInt = H5Tequal(dtype_id, H5T_NATIVE_INT); if(isNativeInt < 0) { error("Error when comparing if is native int\n"); } if(isNativeInt) { // size of a regular llong, no conversion necessary return(convert_int64_to_int(_Robj)); } // needs to convert to smaller integer; do it and return PROTECT(Rval = NEW_NUMERIC(nelem)); // assumes long long is same size as double (but entire bit64 package assumes that memcpy(VOIDPTR(Rval), VOIDPTR(_Robj), nelem * sizeof(long long)); H5Tconvert_with_warning(H5T_NATIVE_LLONG, dtype_id, nelem, VOIDPTR(Rval)); UNPROTECT(1); return(Rval); } } case LGLSXP: // treat logical same as integer case INTSXP: { int isNativeInt = H5Tequal(dtype_id, H5T_NATIVE_INT); if(isNativeInt < 0) { error("Error when comparing if is native integer\n"); } if(isNativeInt) { // size of a regular int, no conversion necessary return(_Robj); } int dtype_size = H5Tget_size(dtype_id); H5T_sign_t dtype_sign = H5Tget_sign(dtype_id); // need to check; if size is > 4, then need to convert to INT64 for correct NA handling; // which is unimportant for unsigned integers // so convert to int64 if signed and size > 4 // and then run everything again if(dtype_sign == H5T_SGN_2 && dtype_size > 4) { PROTECT(Rval = convert_int_to_int64(_Robj)); PROTECT(Rval = RToH5_INTEGER(Rval, dtype_id, nelem)); UNPROTECT(2); return(Rval); } else { // needs to convert to other integer; make sure to allocate enough space (if the output is larger than int) // this can be the case for unsigned integers PROTECT(Rval = NEW_RAW(nelem * (sizeof(int) > dtype_size ? sizeof(int) : dtype_size ))); // assumes long long is same size as double (but entire bit64 package assumes that memcpy(VOIDPTR(Rval), VOIDPTR(_Robj), nelem * sizeof(int)); H5Tconvert_with_warning(H5T_NATIVE_INT, dtype_id, nelem, VOIDPTR(Rval)); UNPROTECT(1); return(Rval); } } default: error("In RToH5_INTEGER can't convert type of object passed\n"); } } SEXP RToH5_FLOAT(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { SEXP Rval; // check the length of the vector switch(TYPEOF(_Robj)) { case CPLXSXP: { if(nelem != 2 * XLENGTH(_Robj)) { error("Length of float vector not as expected\n"); } break; } case REALSXP: case INTSXP: { if(nelem != XLENGTH(_Robj)) { error("Length of float vector not as expected\n"); } break; } default: error("In RToH5_FLOAT can't convert type of object passed\n"); } switch(TYPEOF(_Robj)) { case CPLXSXP: // this case is also treated as REAL (but number of elements has to be twice _Robj size when passed in case REALSXP: { // check if it is a 64bit integer, then need to coerce it to double if(is_rint64(_Robj)) { PROTECT(Rval = convert_int64_to_double(_Robj)); PROTECT(Rval = RToH5_FLOAT(Rval, dtype_id, nelem)); UNPROTECT(2); return(Rval); } else { // if it is float, convert to the right size int dtype_size = H5Tget_size(dtype_id); int isNativeDouble = H5Tequal(dtype_id, H5T_NATIVE_DOUBLE); if(isNativeDouble < 0) { error("Error when comparing if is native double\n"); } if(isNativeDouble) { // size of a regular double, no conversion necessary return(_Robj); } // in case of long double, might need 16 bytes int alloc_size = (dtype_size > sizeof(double) ? dtype_size : sizeof(double)); PROTECT(Rval = NEW_RAW(nelem * alloc_size)); memcpy(VOIDPTR(Rval), VOIDPTR(_Robj), nelem * sizeof(double)); H5Tconvert_with_warning(H5T_NATIVE_DOUBLE, dtype_id, nelem, VOIDPTR(Rval)); SETLENGTH(Rval, XLENGTH(_Robj) * dtype_size); UNPROTECT(1); return(Rval); } } case INTSXP: { // if it is integer, coerce to float, and then call the same function again; SEXP _Robj_coerced; PROTECT(_Robj_coerced = AS_NUMERIC(_Robj)); PROTECT(Rval = RToH5_FLOAT(_Robj_coerced, dtype_id, nelem)); UNPROTECT(2); return(Rval); } default: error("In RToH5_FLOAT can't convert type of object passed\n"); } } SEXP RToH5_STRING(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { int unprotect_counter=0; // check that R is actually a string if(!isString(_Robj)) { error("For STRING enum type, an R object of type character has to be passed\n"); } if(nelem != XLENGTH(_Robj)) { error("Length of string vector not as expected\n"); } hsize_t dtype_size = H5Tget_size(dtype_id); SEXP Rval; // get an array of sufficient size and store it in there; but first check if the strings are of variable size htri_t isVariable = H5Tis_variable_str(dtype_id); if(isVariable < 0) { error("Error retrieving is string has variable length"); } // check out the character encoding H5T_cset_t char_enc = H5Tget_cset(dtype_id); if(char_enc == H5T_CSET_ERROR) { error("Could not retrieve character encoding of datatype\n"); } // now if the character encoding is UTF8, force the input to be changed to UTF8 if(char_enc == H5T_CSET_UTF8) { PROTECT(_Robj = string_to_UTF8(_Robj)); unprotect_counter++; } if(isVariable>0) { // variable length string // in this case just need an array of pointers to the strings we need PROTECT(Rval = NEW_RAW(nelem * dtype_size)); unprotect_counter++; const char ** dataptr = (const char **) RAW(Rval); for(R_xlen_t i = 0; i < nelem; ++i) { dataptr[i] = CHAR(STRING_ELT(_Robj, i)); // copy the pointers to the data strings (are pointers to const char *) } // need to ensure the CHARSXP this is pointing to are not garbage collected; // put them into an attribute SET_ATTR(Rval, install("h5_store"), _Robj); } else { // fixed length string // in this case will copy the content of the strings itself PROTECT(Rval = NEW_RAW(nelem * dtype_size)); unprotect_counter++; char * dataptr = (char *) RAW(Rval); for(R_xlen_t i = 0; i < nelem; ++i) { strncpy(dataptr, CHAR(STRING_ELT(_Robj, i)), dtype_size); dataptr += dtype_size; } } UNPROTECT(unprotect_counter); return(Rval); } SEXP RToH5_OPAQUE(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { // check that the size is correct if(XLENGTH(_Robj) != nelem) { error("Length of R object not correct"); } return(_Robj); } SEXP RToH5_REFERENCE(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { // simply return the ref_obj contained in the object SEXP hdf5r_ns = PROTECT(eval(PROTECT(lang2(PROTECT(install("getNamespace")), PROTECT(mkString("hdf5r")))), R_GlobalEnv)); SEXP result = PROTECT(eval(PROTECT(lang3(PROTECT(install("$")), _Robj, PROTECT(install("ref")))), hdf5r_ns)); UNPROTECT(8); return(result); } SEXP RToH5_VLEN(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { // for this, we expect to get a list in; each list item // determines the variable length; this can be tricky, as it is not always the length // for data frames, it is the number of rows // for array items, it is only the remaining length after the array is taken into account // nelem here refers to the number of variable length items // We save pointers, so the actual data will be saved in a list and attached in the attributes to save it // from garbage collection // we need a rawsxp and a list (VECSXP) of the same length // first check that _Robj is a list of the right length if(TYPEOF(_Robj) != VECSXP) { error("For a variable length array, the R object has to be a list"); } if(XLENGTH(_Robj) != nelem) { error("List does not have the expected length"); } SEXP Rval = PROTECT(NEW_RAW(nelem * H5Tget_size(dtype_id))); SEXP Rh5_store = PROTECT(NEW_LIST(nelem)); hvl_t* vlen_ptr = (hvl_t *) RAW(Rval); hid_t dtype_base = H5Tget_super(dtype_id); for(R_xlen_t i = 0; i < nelem; ++i) { vlen_ptr->len = guess_nelem(VECTOR_ELT(_Robj, i), dtype_base); SET_VECTOR_ELT(Rh5_store, i, RToH5(VECTOR_ELT(_Robj, i), dtype_base, vlen_ptr->len)); vlen_ptr->p = VOIDPTR(VECTOR_ELT(Rh5_store, i)); vlen_ptr++; } H5Tclose(dtype_base); // set the attributes SET_ATTR(Rval, install("h5_store"), Rh5_store); UNPROTECT(2); return(Rval); } /********************************************************************************* * Creating needed R object for a certain data type for translation HDF5 To R *********************************************************************************/ SEXP H5ToR_single_step(void* _h5obj, hid_t dtype_id, R_xlen_t nelem, int flags) { hsize_t dtype_size = H5Tget_size(dtype_id); SEXP Rval = PROTECT(H5ToR_Pre(dtype_id, nelem)); if(nelem > 0) { memcpy(VOIDPTR(Rval), _h5obj, dtype_size * nelem); } Rval = PROTECT(H5ToR_Post(Rval, dtype_id, nelem, flags, -1)); UNPROTECT(2); return(Rval); } SEXP R_H5ToR_Pre(SEXP _dtype_id, SEXP _nelem) { hid_t dtype_id = SEXP_to_xlen(_dtype_id); R_xlen_t nelem = SEXP_to_xlen(_nelem); return(H5ToR_Pre(dtype_id, nelem)); } SEXP H5ToR_Pre(hid_t dtype_id, R_xlen_t nelem) { // dispatch based on the class_name H5T_class_t dtype_class = H5Tget_class(dtype_id); SEXP Rval; switch(dtype_class) { case H5T_COMPOUND: { bool isComplex=is_h5_complex(dtype_id); if(isComplex) { PROTECT(Rval = H5ToR_Pre_RComplex(dtype_id, nelem)); } else { PROTECT(Rval = H5ToR_Pre_COMPOUND(dtype_id, nelem)); } break; } case H5T_ARRAY: PROTECT(Rval = H5ToR_Pre_ARRAY(dtype_id, nelem)); break; case H5T_ENUM: PROTECT(Rval = H5ToR_Pre_ENUM(dtype_id, nelem)); break; case H5T_BITFIELD: case H5T_INTEGER: PROTECT(Rval = H5ToR_Pre_INTEGER(dtype_id, nelem)); break; case H5T_FLOAT: PROTECT(Rval = H5ToR_Pre_FLOAT(dtype_id, nelem)); break; case H5T_STRING: PROTECT(Rval = H5ToR_Pre_STRING(dtype_id, nelem)); break; case H5T_OPAQUE: PROTECT(Rval = H5ToR_Pre_OPAQUE(dtype_id, nelem)); break; case H5T_REFERENCE: PROTECT(Rval = H5ToR_Pre_REFERENCE(dtype_id, nelem)); break; case H5T_VLEN: PROTECT(Rval = H5ToR_Pre_VLEN(dtype_id, nelem)); break; default: error("Error when retrieving class"); } UNPROTECT(1); return(Rval); } SEXP H5ToR_Pre_RComplex(hid_t dtype_id, R_xlen_t nelem) { hsize_t dtype_size = H5Tget_size(dtype_id); // maybe this is stored as 2 16byte floats instead of something smaller int alloc_size = (dtype_size > 2 * sizeof(double) ? dtype_size : 2 * sizeof(double)); size_t num_elem_to_alloc = ceil(nelem * alloc_size / (2 * sizeof(double))); return(NEW_COMPLEX(num_elem_to_alloc)); } SEXP H5ToR_Pre_COMPOUND(hid_t dtype_id, R_xlen_t nelem) { hsize_t dtype_size = H5Tget_size(dtype_id); // allocate a raw vector of appropriate size and return return(NEW_RAW(dtype_size * nelem)); } SEXP H5ToR_Pre_ARRAY(hid_t dtype_id, R_xlen_t nelem) { hid_t dtype_base = H5Tget_super(dtype_id); hsize_t num_elem_array = H5Tget_size(dtype_id) / H5Tget_size(dtype_base); // for the allocation, will do what the base datatype does, but with higher number of elements SEXP res; res = PROTECT(H5ToR_Pre(dtype_base, nelem * num_elem_array)); H5Tclose(dtype_base); UNPROTECT(1); return(res); } SEXP H5ToR_Pre_ENUM(hid_t dtype_id, R_xlen_t nelem) { hid_t dtype_base = H5Tget_super(dtype_id); SEXP Rval; // if it is logical, we need to treat it as a logical, otherwise as an integer if(is_enum_logical(dtype_id)) { if(H5Tget_size(dtype_base) > 4) { // we could make this more flexible, at the expense of an additional copy operation error("Stored a an enum corresponding to logical in a type larger than 32 bit: cannot process it\n"); } PROTECT(Rval = NEW_LOGICAL(nelem)); } else { PROTECT(Rval = H5ToR_Pre_INTEGER(dtype_base, nelem)); } H5Tclose(dtype_base); UNPROTECT(1); return(Rval); } SEXP H5ToR_Pre_INTEGER(hid_t dtype_id, R_xlen_t nelem) { // need to implement heuristic for the output depending on the size of the input integer // if it is int or smaller, return as int; if it is uint or larger, return as int64 int dtype_size = H5Tget_size(dtype_id); int dtype_signed = H5Tget_sign(dtype_id) == H5T_SGN_2; if(dtype_size < 4 || (dtype_size == 4 && dtype_signed)) { // allocate regular int return(NEW_INTEGER(nelem)); } else { // allocate 64 bit integer SEXP Rval; PROTECT(Rval = NEW_NUMERIC(nelem)); SET_CLASS(Rval, ScalarString(mkChar("integer64"))); UNPROTECT(1); return(Rval); } } SEXP H5ToR_Pre_FLOAT(hid_t dtype_id, R_xlen_t nelem) { hsize_t dtype_size = H5Tget_size(dtype_id); int alloc_size = (dtype_size > sizeof(double) ? dtype_size : sizeof(double)); size_t num_elem_to_alloc = ceil(nelem * alloc_size / sizeof(double)); return(NEW_NUMERIC(num_elem_to_alloc)); } SEXP H5ToR_Pre_STRING(hid_t dtype_id, R_xlen_t nelem) { hsize_t dtype_size = H5Tget_size(dtype_id); // here, it does not matter if it is variable size or not; we just need a buffer of the right size // later in post-processing, a new object has to be created in either case; // the reason is that the original buffer needs to be kept in tact in order to be able to free the memory return(NEW_RAW(nelem * dtype_size)); } SEXP H5ToR_Pre_OPAQUE(hid_t dtype_id, R_xlen_t nelem) { // just create a raw vecotr of the approriate length return(NEW_RAW(nelem)); } SEXP H5ToR_Pre_REFERENCE(hid_t dtype_id, R_xlen_t nelem) { return(NEW_RAW(nelem * H5Tget_size(dtype_id))); } SEXP H5ToR_Pre_VLEN(hid_t dtype_id, R_xlen_t nelem) { return(NEW_RAW(nelem * H5Tget_size(dtype_id))); } /********************************************************************************* * Post-processing R object after it has been filled with the data for HDF5 to R *********************************************************************************/ SEXP R_H5ToR_Post(SEXP _Robj, SEXP _dtype_id, SEXP _nelem, SEXP _flags, SEXP _obj_id) { hid_t dtype_id = SEXP_to_xlen(_dtype_id); hid_t obj_id = SEXP_to_longlong(_obj_id, 0); R_xlen_t nelem = SEXP_to_xlen(_nelem); int flags = SEXP_to_longlong(_flags, 0); return(H5ToR_Post(_Robj, dtype_id, nelem, flags, obj_id)); } SEXP H5ToR_Post(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id) { // dispatch based on the class_name H5T_class_t dtype_class = H5Tget_class(dtype_id); SEXP Rval; switch(dtype_class) { case H5T_COMPOUND: { bool isComplex=is_h5_complex(dtype_id); if(isComplex) { PROTECT(Rval = H5ToR_Post_RComplex(_Robj, dtype_id, nelem, flags)); } else { PROTECT(Rval = H5ToR_Post_COMPOUND(_Robj, dtype_id, nelem, flags, obj_id)); } break; } case H5T_ARRAY: PROTECT(Rval = H5ToR_Post_ARRAY(_Robj, dtype_id, nelem, flags, obj_id)); break; case H5T_ENUM: PROTECT(Rval = H5ToR_Post_ENUM(_Robj, dtype_id, nelem, flags)); break; case H5T_BITFIELD: case H5T_INTEGER: PROTECT(Rval = H5ToR_Post_INTEGER(_Robj, dtype_id, nelem, flags)); break; case H5T_FLOAT: PROTECT(Rval = H5ToR_Post_FLOAT(_Robj, dtype_id, nelem, flags)); break; case H5T_STRING: PROTECT(Rval = H5ToR_Post_STRING(_Robj, dtype_id, nelem, flags)); break; case H5T_OPAQUE: PROTECT(Rval = H5ToR_Post_OPAQUE(_Robj, dtype_id, nelem, flags)); break; case H5T_REFERENCE: PROTECT(Rval = H5ToR_Post_REFERENCE(_Robj, dtype_id, nelem, flags, obj_id)); break; case H5T_VLEN: PROTECT(Rval = H5ToR_Post_VLEN(_Robj, dtype_id, nelem, flags, obj_id)); break; default: error("Error when retrieving class"); } UNPROTECT(1); return(Rval); } SEXP H5ToR_Post_RComplex(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags) { hsize_t dtype_size = H5Tget_size(dtype_id); // pass it to the REAL variable analyzer hid_t dtype_member = H5Tget_member_type(dtype_id, 0); SEXP res; PROTECT(res = H5ToR_Post_FLOAT(_Robj, dtype_member, nelem * 2, flags)); H5Tclose(dtype_member); UNPROTECT(1); // if its size is larger than double, need to set the length if(dtype_size > sizeof(double)) { SETLENGTH(_Robj, nelem); } return(res); } SEXP H5ToR_Post_COMPOUND(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id) { char * member_name; hsize_t dtype_num_members = H5Tget_nmembers(dtype_id); // allocate the raw vector that will hold the data // this will be list SEXP Rval, R_item_pre, R_item_post, Rval_names, Rval_rownames; PROTECT(Rval = allocVector(VECSXP, dtype_num_members)); PROTECT(Rval_names = allocVector(STRSXP, dtype_num_members)); hsize_t total_size = H5Tget_size(dtype_id); // for every record element, pre-allocate an r object, copy the data into it, then post-process it hsize_t offset = 0; for(int i=0; i < dtype_num_members; i++) { // get the member name and add it to names_vector for the data frame member_name = H5Tget_member_name(dtype_id, i); // Rprintf("Processing member %s\n", member_name); SET_STRING_ELT(Rval_names, i, mkChar(member_name)); H5free_memory(member_name); offset = H5Tget_member_offset(dtype_id, i); // get the type and its size hid_t cpd_item_id = H5Tget_member_type(dtype_id, i); if(cpd_item_id < 0) { error("An error occured when fetching the a compound item\n"); } // pre-allocate the r-object PROTECT(R_item_pre = H5ToR_Pre(cpd_item_id, nelem)); // copy the record data into it hsize_t item_size = H5Tget_size(cpd_item_id); memcpy_from_record(VOIDPTR(R_item_pre), VOIDPTR(_Robj), nelem, total_size, offset, item_size); // post-process the object PROTECT(R_item_post = H5ToR_Post(R_item_pre, cpd_item_id, nelem, flags, obj_id)); // put it into the right place in the global object SET_VECTOR_ELT(Rval, i, R_item_post); // close the H5T handle and unprotect to clean up at the end of the loop H5Tclose(cpd_item_id); // Rprintf("End Processing member\n"); UNPROTECT(2); } // need an object with rowname PROTECT(Rval_rownames = allocVector(INTSXP, nelem)); for(R_xlen_t i = 0; i < nelem; ++i) { INTEGER(Rval_rownames)[i] = i + 1; } // make the object into a data frame SET_CLASS(Rval, mkString("data.frame")); SET_NAMES(Rval, Rval_names); SET_ATTR(Rval, install("row.names"), Rval_rownames); UNPROTECT(3); return Rval; } SEXP H5ToR_Post_ARRAY(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id) { // need to transpose back and then attach the dimensions, which will be (nelem, array_dim) // it is up to the R-function that requested the data to replace nelem by the right dimensions, if there exist several hid_t dtype_base = H5Tget_super(dtype_id); hsize_t dtype_base_size = H5Tget_size(dtype_base); hsize_t num_rows = H5Tget_size(dtype_id) / dtype_base_size; hsize_t num_cols = nelem; SEXP res; PROTECT(res = H5ToR_Post(_Robj, dtype_base, num_rows * num_cols, flags, obj_id)); H5Tclose(dtype_base); // now, need to transpose the input so that the data inside the array is in consecutive order // but only if there is more than one element // (i.e. on the first dimensions) if(nelem != 1) { SEXP res_copy = PROTECT(duplicate(res)); // use this as the target to write the transposed data in transpose_general(VOIDPTR(res_copy), VOIDPTR(res), num_rows, num_cols, R_get_item_size(res), false); UNPROTECT(2); return(res_copy); } else { UNPROTECT(1); return(res); } } SEXP H5ToR_Post_ENUM(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags) { hid_t dtype_base = H5Tget_super(dtype_id); SEXP Rval; int vars_protected = 0; PROTECT(Rval = H5ToR_Post_INTEGER(_Robj, dtype_base, nelem, flags)); vars_protected++; H5Tclose(dtype_base); if(!is_enum_logical(dtype_id)) { // set the levels in the attributes SEXP levels; PROTECT(levels = VECTOR_ELT(h5get_enum_labels(PROTECT(ScalarInteger64(dtype_id))), 0)); vars_protected+=2; SEXP values; PROTECT(values = VECTOR_ELT(h5get_enum_values(PROTECT(ScalarInteger64(dtype_id))), 0)); vars_protected+=2; // check if the enum is based on int64 types; if yes don't order them // as we don't currently have an easy method to do the ordering; no other reason than this if(is_rint64(values)) { if(!is_rint64(Rval)) { // need to convert to integer64 to make it match Rval = PROTECT(convert_int_to_int64(Rval)); vars_protected++; } // class needs to be factor_ext and integer64 SEXP class_names = PROTECT(NEW_CHARACTER(2)); vars_protected++; SET_STRING_ELT(class_names, 0, mkChar("factor_ext")); SET_STRING_ELT(class_names, 1, mkChar("integer64")); SET_CLASS(Rval, class_names); SET_ATTR(Rval, install("values"), values); SET_ATTR(Rval, install("levels"), levels); } else { // the values may not be sorted; will sort them here R_xlen_t num_vals = XLENGTH(values); SEXP index_vec = PROTECT(NEW_INTEGER(num_vals)); vars_protected++; SEXP order_arglist = PROTECT(Rf_lang1(values)); vars_protected++; R_orderVector(INTEGER(index_vec), num_vals, order_arglist, true, false); SEXP levels_ordered = PROTECT(NEW_CHARACTER(num_vals)); vars_protected++; SEXP values_ordered = PROTECT(NEW_INTEGER(num_vals)); vars_protected++; for(R_xlen_t i =0; i < num_vals; ++i) { SET_STRING_ELT(levels_ordered, i, STRING_ELT(levels, INTEGER(index_vec)[i])); INTEGER(values_ordered)[i] = INTEGER(values)[INTEGER(index_vec)[i]]; } // check if values are a consecutive sequence SET_LEVELS(Rval, levels_ordered); if(is_sequence(values_ordered)) { // it is a factor SET_CLASS(Rval, mkString("factor")); } else { SET_CLASS(Rval, mkString("factor_ext")); SET_ATTR(Rval, install("values"), values_ordered); } } } else { // need to convert value 2 to a NA for(R_xlen_t i = 0; i < nelem; ++i) { if(LOGICAL(Rval)[i] >= 2) { LOGICAL(Rval)[i] = NA_LOGICAL; } } } UNPROTECT(vars_protected); return(Rval); } SEXP H5ToR_Post_INTEGER(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags) { // need to implement heuristic for the output depending on the size of the input integer // if it is int or smaller, return as int; if it is uint or larger, return as int64 int dtype_size = H5Tget_size(dtype_id); int dtype_signed = H5Tget_sign(dtype_id) == H5T_SGN_2; int unprotect_counter=0; if(dtype_size < 4 || (dtype_size == 4 && dtype_signed)) { htri_t isNativeInt = H5Tequal(dtype_id, H5T_NATIVE_INT); if(isNativeInt < 0) { error("Error when comparing if is native integer\n"); } if(isNativeInt) { // size of a regular double, no conversion necessary return(_Robj); } // received non-regular integer, need to convert H5Tconvert_with_warning(dtype_id, H5T_NATIVE_INT, nelem, VOIDPTR(_Robj)); // do it in place; from the way it is used, we know it is safe return(_Robj); } else { // have received 64 bit integer or an unsigned 32 bit integer // Otherwise e.g. 6 byte integer would be possible (albeit not plausible) htri_t isNativeLLONG = H5Tequal(dtype_id, H5T_NATIVE_LLONG); htri_t isNativeUINT64 = H5Tequal(dtype_id, H5T_NATIVE_UINT64); if(isNativeLLONG < 0 || isNativeUINT64 < 0) { error("Error when comparing if is native LLONG or UINT64\n"); } if(!isNativeLLONG && !isNativeUINT64) { // need to convert to a long-long first (assumption is that BE/LE has been dealt with from the R side, // so that only native datatypes arrive here; in this case, it can't be a type that needs UINT64 H5Tconvert_with_warning(dtype_id, H5T_NATIVE_LLONG, nelem, VOIDPTR(_Robj)); // do it in place; from the way it is used, we know it is safe isNativeLLONG = true; } if(isNativeLLONG) { SEXP res = PROTECT(convert_int64_using_flags(_Robj, flags)); unprotect_counter++; UNPROTECT(unprotect_counter); return(res); } else if(isNativeUINT64) { SEXP res = PROTECT(convert_uint64_using_flags(_Robj, flags)); unprotect_counter++; UNPROTECT(unprotect_counter); return(res); } else { error("In H5ToR_Post_INTEGER: assumed to have INT64 of UINT64 but didn't"); } } } SEXP H5ToR_Post_FLOAT(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags) { hsize_t dtype_size = H5Tget_size(dtype_id); int isNativeDouble = H5Tequal(dtype_id, H5T_NATIVE_DOUBLE); if(isNativeDouble < 0) { error("Error when comparing if is native double\n"); } if(isNativeDouble) { // size of a regular double, no conversion necessary return(_Robj); } else { // need to convert H5Tconvert_with_warning(dtype_id, H5T_NATIVE_DOUBLE, nelem, VOIDPTR(_Robj)); // do it in place; from the way it is used, we know it is safe // if its size is larger than double, need to set the length if(dtype_size > sizeof(double)) { SETLENGTH(_Robj, nelem); } return(_Robj); } } SEXP H5ToR_Post_STRING(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags) { hsize_t dtype_size = H5Tget_size(dtype_id); SEXP Rval; // get an array of sufficient size and store it in there; but first check if the strings are of variable size htri_t isVariable = H5Tis_variable_str(dtype_id); if(isVariable < 0) { error("Error retrieving is string has variable length"); } // check out the character encoding H5T_cset_t char_enc = H5Tget_cset(dtype_id); cetype_t out_ce_type; if(char_enc == H5T_CSET_ERROR) { error("Could not retrieve character encoding of datatype\n"); } // now if the character encoding is UTF8, force the input to be changed to UTF8 if(char_enc==H5T_CSET_UTF8) { out_ce_type = CE_UTF8; } else { out_ce_type = CE_ANY; } PROTECT(Rval = allocVector(STRSXP, nelem)); if(isVariable>0) { // variable length string // we have an array of pointers to strings; need to convert them to R strings; // don't change the buffer itself; it is still needed intact so that the memory can be freed later H5Dvlen_reclaim char ** dataptr = (char **) RAW(_Robj); for(R_xlen_t i = 0; i < nelem; i++) { if(dataptr[i] == NULL) { SET_STRING_ELT(Rval, i, mkCharCE("", out_ce_type)); } else { // Rprintf("String to transfer %s\n", dataptr[i]); SET_STRING_ELT(Rval, i, mkCharCE(dataptr[i], out_ce_type)); } } } else { // fixed length string // need to copy the content to R strings (don't forget to add a NUL at the end, for safety in case it was truncated) char buf[dtype_size + 1]; char* dataptr = (char *) RAW(_Robj); // set the last one to NUL to be safe buf[dtype_size] = '\0'; for(R_xlen_t i = 0; i < nelem; i++) { strncpy(buf, dataptr, dtype_size); if(out_ce_type == CE_UTF8) { SET_STRING_ELT(Rval, i, mkCharCE(buf, out_ce_type)); } else { SET_STRING_ELT(Rval, i, mkChar(buf)); } dataptr += dtype_size; } } UNPROTECT(1); return(Rval); } SEXP H5ToR_Post_OPAQUE(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags) { // nothing to be done; just return return(_Robj); } // the object-id is stored in the reference object; the dataset or the attribute are expected objects // internally they will be turned into an appropriate file-id SEXP H5ToR_Post_REFERENCE(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id) { // need to create an r6 class object and assign the reference into it // the id to be passed in has to be the file_id if(obj_id < 0) { error("Object_id for Reference has to be non-negative\n"); } // get the file id hid_t file_id = H5Iget_file_id(obj_id); SEXP result; // create the arguments for calling the R6-class constructor if(H5Tequal(dtype_id, H5T_STD_REF_OBJ)) { result = PROTECT(new_H5R_R6_class("H5R_OBJECT", PROTECT(ScalarInteger(0)), PROTECT(ScalarInteger64(file_id)))); } else if(H5Tequal(dtype_id, H5T_STD_REF_DSETREG)) { result = PROTECT(new_H5R_R6_class("H5R_DATASET_REGION", PROTECT(ScalarInteger(0)), PROTECT(ScalarInteger64(file_id)))); } else { H5Fclose(file_id); error("Could not identify reference type\n"); } // now assign the reference data into it SEXP hdf5r_ns = PROTECT(eval(PROTECT(lang2(PROTECT(install("getNamespace")), PROTECT(mkString("hdf5r")))), R_GlobalEnv)); eval(PROTECT(lang3(install("set_ref.H5R"), result, _Robj)), hdf5r_ns); UNPROTECT(8); return(result); } SEXP H5ToR_Post_VLEN(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem, int flags, hid_t obj_id) { // create a list, and put the data into it SEXP Rval = PROTECT(NEW_LIST(nelem)); SEXP R_item; hid_t dtype_base = H5Tget_super(dtype_id); hsize_t dtype_base_size = H5Tget_size(dtype_base); hvl_t * vlen_ptr = (hvl_t *) VOIDPTR(_Robj); for(R_xlen_t i = 0; i < nelem; ++i) { PROTECT(R_item = H5ToR_Pre(dtype_base, vlen_ptr->len)); // copy the data it is pointing to back and set it into the vector after transforming it to R memcpy(VOIDPTR(R_item), vlen_ptr->p, dtype_base_size * vlen_ptr->len); SET_VECTOR_ELT(Rval, i, H5ToR_Post(R_item, dtype_base, vlen_ptr->len, flags, obj_id)); vlen_ptr++; UNPROTECT(1); } H5Tclose(dtype_base); UNPROTECT(1); return(Rval); } /*********************************************************************************** * Helper function for memory copying ***********************************************************************************/ /* the following function does the copying into a record from a vector * src: pointer to the input data * dst: pointer to where it should be copied * num_items: number of items to copy * recordSize: size in bytes of each record on the output size * offset: offset for the item in the output record * item_size: number of bytes for the item * Code adapted from memcpy */ void *memcpy_to_record(void* dst, const void* src, hsize_t num_items, hsize_t record_size, hsize_t offset, hsize_t item_size) { // check if all the copying can be done in int sizes if ((uintptr_t)dst % sizeof(uint64_t) == 0 && (uintptr_t)src % sizeof(uint64_t) == 0 && record_size % sizeof(uint64_t) == 0 && offset % sizeof(uint64_t) == 0 && item_size % sizeof(uint64_t) == 0) { uint64_t* d=dst; const uint64_t * s=src ; for(hsize_t i=0; i < num_items; ++i) { d += offset / sizeof(uint64_t); for(int j=0; j < item_size / sizeof(uint64_t); ++j) { d[j] = s[j]; } d += record_size / sizeof(uint64_t) - offset / sizeof(uint64_t); s += item_size / sizeof(uint64_t); } } else if ((uintptr_t)dst % sizeof(uint32_t) == 0 && (uintptr_t)src % sizeof(uint32_t) == 0 && record_size % sizeof(uint32_t) == 0 && offset % sizeof(uint32_t) == 0 && item_size % sizeof(uint32_t) == 0) { int* d=dst; const int * s=src ; for(hsize_t i=0; i < num_items; ++i) { d += offset / sizeof(uint32_t); for(int j=0; j < item_size / sizeof(uint32_t); ++j) { d[j] = s[j]; } d += record_size / sizeof(uint32_t) - offset / sizeof(uint32_t); s += item_size / sizeof(uint32_t); } } else { char* d=dst; const char * s=src ; for(hsize_t i=0; i < num_items; ++i) { d += offset; for(int j=0; j < item_size; ++j) { d[j] = s[j]; } d += record_size - offset; s += item_size; } } return(dst); } /* the following function does the copying into a record from a vector * src: pointer to the input data * dst: pointer to where it should be copied * num_items: number of items to copy * recordSize: size in bytes of each record on the output size * offset: offset for the item in the input record * item_size: number of bytes for the item * Code adapted from memcpy */ void *memcpy_from_record(void* dst, const void* src, hsize_t num_items, hsize_t record_size, hsize_t offset, hsize_t item_size) { // check if all the copying can be done in int sizes if ((uintptr_t)dst % sizeof(uint64_t) == 0 && (uintptr_t)src % sizeof(uint64_t) == 0 && record_size % sizeof(uint64_t) == 0 && offset % sizeof(uint64_t) == 0 && item_size % sizeof(uint64_t) == 0) { uint64_t* d=dst; const uint64_t * s=src ; for(hsize_t i=0; i < num_items; ++i) { s += offset / sizeof(uint64_t); for(hsize_t j=0; j < item_size / sizeof(uint64_t); ++j) { d[j] = s[j]; } s += record_size / sizeof(uint64_t) - offset / sizeof(uint64_t); d += item_size / sizeof(uint64_t); } } else if ((uintptr_t)dst % sizeof(uint32_t) == 0 && (uintptr_t)src % sizeof(uint32_t) == 0 && record_size % sizeof(uint32_t) == 0 && offset % sizeof(uint32_t) == 0 && item_size % sizeof(uint32_t) == 0) { uint32_t* d=dst; const uint32_t * s=src ; for(hsize_t i=0; i < num_items; ++i) { s += offset / sizeof(uint32_t); for(hsize_t j=0; j < item_size / sizeof(uint32_t); ++j) { d[j] = s[j]; } s += record_size / sizeof(uint32_t) - offset / sizeof(uint32_t); d += item_size / sizeof(uint32_t); } } else { char* d=dst; const char * s=src ; for(hsize_t i=0; i < num_items; ++i) { s += offset; for(int j=0; j < item_size; ++j) { d[j] = s[j]; } s += record_size - offset; d += item_size; } } return(dst); } /* the following function does the copying from a record into a record * src: pointer to the input data * dst: pointer to where it should be copied * num_items: number of items to copy * recordSize: size in bytes of each record on the output size * offset_dst: offset for the item in the input record * offset_src: offset for the item in the output record * item_size: number of bytes for the item * Code adapted from memcpy */ void *memcpy_between_record(void* dst, const void* src, hsize_t num_items, hsize_t record_size, hsize_t offset_dst, hsize_t offset_src, hsize_t item_size) { // check if all the copying can be done in 8 byte sizes if ((uintptr_t)dst % sizeof(uint64_t) == 0 && (uintptr_t)src % sizeof(uint64_t) == 0 && record_size % sizeof(uint64_t) == 0 && offset_dst % sizeof(uint64_t) == 0 && offset_src % sizeof(uint64_t) == 0 && item_size % sizeof(uint64_t) == 0) { uint64_t* d=dst; const uint64_t * s=src ; for(hsize_t i=0; i < num_items; ++i) { s += offset_src / sizeof(uint64_t); d += offset_dst / sizeof(uint64_t); for(hsize_t j=0; j < item_size / sizeof(uint64_t); ++j) { d[j] = s[j]; } s += record_size / sizeof(uint64_t) - offset_src / sizeof(uint64_t); d += record_size / sizeof(uint64_t) - offset_dst / sizeof(uint64_t); } } else if ((uintptr_t)dst % sizeof(uint32_t) == 0 && (uintptr_t)src % sizeof(uint32_t) == 0 && record_size % sizeof(uint32_t) == 0 && offset_dst % sizeof(uint32_t) == 0 && offset_src % sizeof(uint32_t) == 0 && item_size % sizeof(uint32_t) == 0) { uint32_t* d=dst; const uint32_t * s=src ; for(hsize_t i=0; i < num_items; ++i) { s += offset_src / sizeof(uint32_t); d += offset_dst / sizeof(uint32_t); for(hsize_t j=0; j < item_size / sizeof(uint32_t); ++j) { d[j] = s[j]; } s += record_size / sizeof(uint32_t) - offset_src / sizeof(uint32_t); d += record_size / sizeof(uint32_t) - offset_dst / sizeof(uint32_t); } } else { char* d=dst; const char * s=src ; for(hsize_t i=0; i < num_items; ++i) { s += offset_src; s += offset_dst; for(int j=0; j < item_size; ++j) { d[j] = s[j]; } s += record_size - offset_src; s += record_size - offset_dst; } } return(dst); } /* read a subset defined by idx from src and writes it consecutively into dst */ void* read_raw_subset_generic(void* dst, void* src, R_xlen_t idx_len, long long *idx, R_xlen_t item_size) { if ((uintptr_t)dst % sizeof(uint64_t) == 0 && (uintptr_t)src % sizeof(uint64_t) == 0 && item_size % sizeof(uint64_t) == 0) { uint64_t* d=dst; const uint64_t * s; for(R_xlen_t i = 0; i < idx_len; ++i) { s = ((uint64_t*) src) + idx[i] * (item_size / sizeof(uint64_t)); for(R_xlen_t j=0; j < item_size / sizeof(uint64_t); ++j) { d[j] = s[j]; } d += item_size / sizeof(uint64_t); } } else if ((uintptr_t)dst % sizeof(uint32_t) == 0 && (uintptr_t)src % sizeof(uint32_t) == 0 && item_size % sizeof(uint32_t) == 0) { uint32_t* d=dst; const uint32_t * s; for(R_xlen_t i = 0; i < idx_len; ++i) { s = ((uint32_t*) src) + idx[i] * (item_size / sizeof(uint32_t)); for(R_xlen_t j=0; j < item_size / sizeof(uint32_t); ++j) { d[j] = s[j]; } d += item_size / sizeof(uint32_t); } } else { char* d=dst; const char* s; for(R_xlen_t i = 0; i < idx_len; ++i) { s = ((char*) src) + idx[i] * item_size; for(R_xlen_t j=0; j < item_size; ++j) { d[j] = s[j]; } d += item_size; } } return(dst); } /* Subset a raw vector; the index is 0-based; * subsetting is done for an arbitrary item_size (i.e. any size of a datatype */ SEXP R_read_raw_subset_generic(SEXP R_src, SEXP R_idx, SEXP R_item_size) { R_xlen_t idx_len = XLENGTH(R_idx); R_xlen_t item_size = SEXP_to_xlen(R_item_size); SEXP R_helper = PROTECT(RToH5(R_idx, H5T_NATIVE_LLONG, idx_len)); long long* idx = (long long *) VOIDPTR(R_helper); SEXP R_dst = PROTECT(NEW_RAW(idx_len * item_size)); read_raw_subset_generic(VOIDPTR(R_dst), VOIDPTR(R_src), idx_len, idx, item_size); UNPROTECT(2); return(R_dst); } /* write a vector into a subset defined by idx from src (consecutively) and writes it into dst (consecutively) */ void* write_raw_subset_generic(void* dst, void* src, R_xlen_t idx_len, long long *idx, R_xlen_t item_size) { if ((uintptr_t)dst % sizeof(uint64_t) == 0 && (uintptr_t)src % sizeof(uint64_t) == 0 && item_size % sizeof(uint64_t) == 0) { uint64_t * d; const uint64_t* s=src; for(R_xlen_t i = 0; i < idx_len; ++i) { d = ((uint64_t*) dst) + idx[i] * (item_size / sizeof(uint64_t)); for(R_xlen_t j=0; j < item_size / sizeof(uint64_t); ++j) { d[j] = s[j]; } s += item_size / sizeof(uint64_t); } } else if ((uintptr_t)dst % sizeof(uint32_t) == 0 && (uintptr_t)src % sizeof(uint32_t) == 0 && item_size % sizeof(uint32_t) == 0) { uint32_t* d; const uint32_t * s=src; for(R_xlen_t i = 0; i < idx_len; ++i) { d = ((uint32_t*) dst) + idx[i] * (item_size / sizeof(uint32_t)); for(R_xlen_t j=0; j < item_size / sizeof(uint32_t); ++j) { d[j] = s[j]; } s += item_size / sizeof(uint32_t); } } else { char* d; const char* s=src; for(R_xlen_t i = 0; i < idx_len; ++i) { d = ((char *) dst) + idx[i] * item_size; for(R_xlen_t j=0; j < item_size; ++j) { d[j] = s[j]; } s += item_size; } } return(dst); } /* Subset a raw vector; the index is 0-based; * subsetting is done for an arbitrary item_size (i.e. any size of a datatype */ SEXP R_write_raw_subset_generic(SEXP R_dst, SEXP R_src, SEXP R_idx, SEXP R_item_size) { R_xlen_t idx_len = XLENGTH(R_idx); R_xlen_t item_size = SEXP_to_xlen(R_item_size); // check that the size is correct if(item_size * idx_len != R_get_item_size(R_src) * XLENGTH(R_src)) { error("Item to write into subset of vector doesn't have the right size"); } SEXP R_helper = PROTECT(RToH5(R_idx, H5T_NATIVE_LLONG, idx_len)); long long* idx = (long long *) VOIDPTR(R_helper); R_dst = PROTECT(duplicate(R_dst)); write_raw_subset_generic(VOIDPTR(R_dst), VOIDPTR(R_src), idx_len, idx, item_size); UNPROTECT(2); return(R_dst); } SEXP copy_rvec(SEXP _dst, SEXP _src, SEXP _nbytes) { memcpy(VOIDPTR(_dst), VOIDPTR(_src), INTEGER(_nbytes)[0]); return(_dst); } /**************************************** * Transpose a matrix where an item can have an arbitrary size. Assumption is * that items vary fastest in the rows (as is the case in R) * dst: pointer of the destination * src: pointer to the source * num_rows: number of rows of matrix * num_cols: number of cols of matrix * item_size: size in bytes of each item ****************************************/ void* transpose_general(void* dst, const void* src, hsize_t num_rows, hsize_t num_cols, hsize_t item_size, bool cpy_by_col) { if(cpy_by_col) { // we will use the memcopy_to_record function; here, a "record" corresponds to one column of the transposed matrix hsize_t record_size = num_cols * item_size; hsize_t offset = 0; const char * src_col = src; for(hsize_t i = 0; i < num_cols; i++) { memcpy_to_record(dst, src_col, num_rows, record_size, offset, item_size); offset += item_size; src_col += item_size * num_rows; } } else { hsize_t record_size = num_rows * item_size; hsize_t offset = 0; char * dst_col = dst; for(hsize_t i = 0; i < num_rows; i++) { memcpy_from_record(dst_col, src, num_cols, record_size, offset, item_size); offset += item_size; dst_col += item_size * num_cols; } } return(dst); } // r wrapper for transpose_general SEXP R_transpose_general(SEXP R_src, SEXP R_dim, SEXP R_item_size) { SEXP R_dst = PROTECT(duplicate(R_src)); hsize_t num_rows = SEXP_to_longlong(R_dim, 0); hsize_t num_cols = SEXP_to_longlong(R_dim, 1); hsize_t item_size = SEXP_to_longlong(R_item_size, 0); bool cpy_by_col = (num_cols < num_rows); transpose_general(VOIDPTR(R_dst), VOIDPTR(R_src), num_rows, num_cols, item_size, cpy_by_col); UNPROTECT(1); return(R_dst); } /**************************************** * Reorder the rows of a matrix where an item can have an arbitrary size (and therefore we can always assume it is the rows to reorder). * Assumption is * that items vary fastest in the rows (as is the case in R) * dst: pointer of the destination * src: pointer to the source * num_rows: number of rows of matrix * new_order: Vector with num_row elements, where the i-th element (0-based) is giving the src-row that should be in the i-th dst row * num_cols: number of cols of matrix * item_size: size in bytes of each item ****************************************/ void* reorder(void* dst, const void* src, hsize_t num_rows, hsize_t num_cols, hsize_t item_size, const hsize_t * new_order) { if(dst == src) { error("dst and src should be different"); } hsize_t num_items = num_cols; hsize_t record_size = num_rows * item_size; for(hsize_t i = 0; i < num_rows; ++i) { // use the memcpy_between_record function // offset is simply item_size * row_number memcpy_between_record(dst, src, num_items, record_size, item_size * i, item_size * new_order[i], item_size); } return(dst); } SEXP R_reorder(SEXP R_src, SEXP R_num_rows, SEXP R_num_cols, SEXP R_item_size, SEXP R_new_order) { hsize_t num_rows = SEXP_to_longlong(R_num_rows, 0); hsize_t num_cols = SEXP_to_longlong(R_num_cols, 0); hsize_t item_size = SEXP_to_longlong(R_item_size, 0); SEXP R_helper = PROTECT(RToH5(R_new_order, H5T_NATIVE_ULLONG, num_rows)); hsize_t* new_order = (unsigned long long *) VOIDPTR(R_helper); SEXP R_dst = PROTECT(duplicate(R_src)); reorder(VOIDPTR(R_dst), VOIDPTR(R_src), num_rows, num_cols, item_size, new_order); UNPROTECT(2); return(R_dst); } /*********************************************************************************** * Other Helper functions ***********************************************************************************/ int is_rint64(SEXP _Robj) { if(TYPEOF(_Robj) != REALSXP) { return(false); } return(inherits(_Robj, "integer64")); } SEXP _is_rint64(SEXP _Robj) { SEXP Rval; PROTECT(Rval = NEW_LOGICAL(1)); LOGICAL(Rval)[0] = is_rint64(_Robj); UNPROTECT(1); return(Rval); } #define sgn(x) ((x > 0) - (x < 0)) // get the value of the length given in _len // this function is needed as sometimes it is double, not integer // and therefore needs rounding instead of type casting R_xlen_t SEXP_to_xlen(SEXP _len) { R_xlen_t len; R_xlen_t* len_ptr; switch(TYPEOF(_len)) { case REALSXP: // need to take the double value and coerce it; the 32-bit integer issue in R; also check if this is not maybe an // an integer 64 if(is_rint64(_len)) { len_ptr = (R_xlen_t*) (REAL(_len)); len = len_ptr[0]; return(len); } else { len = (R_xlen_t) (REAL(_len)[0] + sgn(REAL(_len)[0]) * 0.5); return(len); } case INTSXP: len = (R_xlen_t) (INTEGER(_len)[0]); break; default: error("Cannot convert to a length\n"); } return(len); } // get the value of the given in _value as a long long // this function is needed as sometimes it is double, not integer // and therefore needs rounding instead of type casting long long SEXP_to_longlong(SEXP _value, R_xlen_t pos) { long long value; long long * value_ptr; if(pos >= XLENGTH(_value)) { error("pos >= XLENGTH(_value)"); } switch(TYPEOF(_value)) { case REALSXP: // need to take the double value and coerce it; the 32-bit integer issue in R; also check if this is not maybe an // an integer 64 if(is_rint64(_value)) { value_ptr = (long long*) (REAL(_value)); value = value_ptr[pos]; return(value); } else { // need to check if the value of REAL is Inf, if yes, set to maximum // longlong value if(REAL(_value)[pos] == R_PosInf) { value = LLONG_MAX; } else { value = (long long) (REAL(_value)[pos] + sgn(REAL(_value)[pos]) * 0.5); } return(value); } case LGLSXP: value = (long long) (LOGICAL(_value)[pos]); case INTSXP: value = (long long) (INTEGER(_value)[pos]); break; default: if(XLENGTH(_value) == 0) { error("Input is of length 0, cannot convert to a long long\n"); } if(_value == R_NilValue) { error("Input is NULL; expected a value; cannot convert to long long\n"); } error("Cannot convert to a long long\n"); } return(value); } // get the value of the given in _value as a boolean // this function is needed as sometimes it is integer, not logical bool SEXP_to_logical(SEXP _value) { bool value; switch(TYPEOF(_value)) { case LGLSXP: value = (LOGICAL(_value)[0]) != 0; case INTSXP: value = (INTEGER(_value)[0]) != 0; break; default: error("Cannot convert to a logical\n"); } return(value); } // get the value of the given in _value as a double // this function is needed as sometimes it is integer, not double double SEXP_to_double(SEXP _value) { double value; long long *ll_ptr; switch(TYPEOF(_value)) { case REALSXP: // need to take the double value and coerce it; the 32-bit integer issue in R; also check if this is not maybe an // an integer 64 if(is_rint64(_value)) { ll_ptr = (long long *) REAL(_value); value = ll_ptr[0]; } else { value = REAL(_value)[0]; break; } case INTSXP: value = INTEGER(_value)[0]; break; default: error("Cannot convert to a long long\n"); } return(value); } SEXP ScalarInteger64(long long value) { SEXP Rval = PROTECT(ScalarReal(0.0)); ((long long*) REAL(Rval))[0] = value; SET_CLASS(Rval, ScalarString(mkChar("integer64"))); UNPROTECT(1); return(Rval); } // contrary to ScalarInteger64, this only returns a 64bit integer if // the size of the value makes it necessary; // could be a bit messy when it comes to some returns, but makes life // on the R side a lot easier without forcing integer on everything SEXP ScalarInteger64_or_int(long long value) { if(value >= INT_MAX || value <= INT_MIN) { SEXP Rval = PROTECT(ScalarReal(0.0)); ((long long*) REAL(Rval))[0] = value; SET_CLASS(Rval, ScalarString(mkChar("integer64"))); UNPROTECT(1); return(Rval); } else { return(ScalarInteger(value)); } } // create a scalar factor variable SEXP ScalarFactor(int value, hid_t dtype_id) { SEXP Rval = PROTECT(ScalarInteger(value)); SET_CLASS(Rval, mkString("factor")); // get the levels and the values SEXP levels; PROTECT(levels = VECTOR_ELT(h5get_enum_labels(PROTECT(ScalarInteger64(dtype_id))), 0)); SET_LEVELS(Rval, levels); SEXP values; PROTECT(values = VECTOR_ELT(h5get_enum_values(PROTECT(ScalarInteger64(dtype_id))), 0)); // check if values are a consecutive sequence if(is_sequence(values)) { // it is a factor SET_CLASS(Rval, mkString("factor")); } else { SET_CLASS(Rval, mkString("factor_ext")); SET_ATTR(Rval, install("values"), values); } UNPROTECT(5); return(Rval); } bool is_sequence(SEXP val) { size_t len = XLENGTH(val); if(len == 0) return(false); if(TYPEOF(val) != INTSXP) return(false); for(size_t i=0; i < len; ++i) { if(INTEGER(val)[i] != i+1) return(false); } return(true); } /* Checks if the compound can be interpreted as a complex variable * Also require for simplicity that the two parts of the compound have the same * float type */ bool is_h5_complex(hid_t dtype_id) { // check if the compound is a complex variable if(H5Tget_nmembers(dtype_id)!=2) { // warning("Number of members not 2\n"); return(false); } else if(H5Tget_member_class(dtype_id, 0)!=H5T_FLOAT || H5Tget_member_class(dtype_id, 0)!=H5T_FLOAT) { // warning("Members don't have class float\n"); return(false); } else { char * name_item_0, *name_item_1; hid_t member_dtype_0, member_dtype_1; htri_t is_equal; bool returnFalse = false; // check that the types are the same member_dtype_0 = H5Tget_member_type(dtype_id, 0); member_dtype_1 = H5Tget_member_type(dtype_id, 1); is_equal = H5Tequal(member_dtype_0, member_dtype_1); if(is_equal <= 0) { // on error also return false; don't raise the error (convenience) // warning("types are not equal\n"); returnFalse = true; } // need to close them again to avoid resource leaks H5Tclose(member_dtype_0); H5Tclose(member_dtype_1); if(returnFalse) { return(false); } name_item_0 = H5Tget_member_name(dtype_id, 0); name_item_1 = H5Tget_member_name(dtype_id, 1); if((name_item_0[0]!='r' && name_item_0[0]!='R') || (name_item_0[1]!='e' && name_item_0[1]!='E')) { // warning("First letter not equal to r or second letter not equal to e\n"); returnFalse = true; } if((name_item_1[0]!='i' && name_item_1[0]!='I') || (name_item_1[1]!='m' && name_item_1[1]!='M')) { // warning("First letter not equal to i or second letter not equal to m\n"); returnFalse = true; } // need to free them again to avoid memory leaks H5free_memory(name_item_0); H5free_memory(name_item_1); if(returnFalse) { return(false); } } return(true); } // checks if it is a special R object that signals // that an empty buffer should be created corresponding to an h5 object of // all 0s bool is_RToH5_empty(SEXP _Robj, R_xlen_t nelem) { if(!inherits(_Robj, "R_RToH5_empty")) { return(false); } if(nelem != XLENGTH(_Robj)) { error("Incorrect length of object passed for _RToH5_empty object"); } return(true); } /* Check if the enum can be interpreted as a factor variable * This is the case if all values are ordered from 1 to n */ bool is_enum_factor(hid_t dtype_id) { int enum_size = H5Tget_nmembers(dtype_id); hid_t enum_base_type = H5Tget_super(dtype_id); hsize_t enum_base_size = H5Tget_size(enum_base_type); if(enum_base_size > sizeof(long long)) { error("Cannot read an enum with a size > long long"); } long long val; for(int i=0; i < enum_size; ++i) { H5Tget_member_value(dtype_id, i, &val); H5Tconvert(enum_base_type, H5T_NATIVE_LLONG, 1, &val, NULL, H5P_DEFAULT); if(val != i + 1) { H5Tclose(enum_base_type); return(false); } } H5Tclose(enum_base_type); return(true); } bool is_enum_logical(hid_t dtype_id) { int enum_size = H5Tget_nmembers(dtype_id); hid_t enum_base_type = H5Tget_super(dtype_id); hsize_t enum_base_size = H5Tget_size(enum_base_type); if(enum_size != 2 && enum_size != 3) { H5Tclose(enum_base_type); return(false); } if(enum_base_size > sizeof(long long)) { error("Cannot read an enum with a size > long long"); } // check that the enum has the right names // first, false or f needs to be included with value 0 int idx; long long val; if(((idx = H5Tget_member_index(dtype_id, "FALSE")) >= 0) || ((idx = H5Tget_member_index(dtype_id, "false")) >= 0) || ((idx = H5Tget_member_index(dtype_id, "F")) >= 0) || ((idx = H5Tget_member_index(dtype_id, "f")) >= 0)) { H5Tget_member_value(dtype_id, idx, &val); H5Tconvert(enum_base_type, H5T_NATIVE_LLONG, 1, &val, NULL, H5P_DEFAULT); if(val != 0) { H5Tclose(enum_base_type); return(false); } } else { H5Tclose(enum_base_type); return(false); } if(((idx = H5Tget_member_index(dtype_id, "TRUE")) >= 0) || ((idx = H5Tget_member_index(dtype_id, "true")) >= 0) || ((idx = H5Tget_member_index(dtype_id, "T")) >= 0) || ((idx = H5Tget_member_index(dtype_id, "t")) >= 0)) { H5Tget_member_value(dtype_id, idx, &val); H5Tconvert(enum_base_type, H5T_NATIVE_LLONG, 1, &val, NULL, H5P_DEFAULT); if(val != 1) { H5Tclose(enum_base_type); return(false); } } else { H5Tclose(enum_base_type); return(false); } if(enum_size == 3) { if(((idx = H5Tget_member_index(dtype_id, "NA")) >= 0) || ((idx = H5Tget_member_index(dtype_id, "na") >= 0))) { H5Tget_member_value(dtype_id, idx, &val); H5Tconvert(enum_base_type, H5T_NATIVE_LLONG, 1, &val, NULL, H5P_DEFAULT); if(val != 2) { H5Tclose(enum_base_type); return(false); } } else { H5Tclose(enum_base_type); return(false); } } return(true); } char* str_to_lower(char * str) { char * src = str; for ( ; *str; ++str) *str = tolower(*str); return(src); } // when this function is called, it is already ensured that the // dtype doesn't represent a logical bool is_robj_enum(SEXP _Robj, hid_t dtype_id) { // check if the Robject and enum conform to the same standards if(H5Tget_nmembers(dtype_id) == 0) { error("Enum has no members\n"); } // now it has to be a factor (or levels and values set separately) // get the levels of the Robj SEXP levels, values; PROTECT(levels = GET_LEVELS(_Robj)); if(isNull(levels) || !isString(levels)) { UNPROTECT(1); return(false); } // check the class of the Robj. If it is factor, the values are given implicitly if(isFactor(_Robj)) { PROTECT(values = NEW_INTEGER(LENGTH(levels))); for(int i = 0; i < LENGTH(levels); ++i) { INTEGER(values)[i] = i + 1; } } else { PROTECT(values = GET_ATTR(_Robj, install("values"))); if(isNull(values) || LENGTH(values) != LENGTH(levels) || !isInteger(values)) { UNPROTECT(2); return(false); } } // now check if the levels and the values match the enum SEXP enum_values, enum_labels; PROTECT(enum_values = VECTOR_ELT(h5get_enum_values(PROTECT(ScalarInteger64(dtype_id))), 0)); PROTECT(enum_labels = VECTOR_ELT(h5get_enum_labels(PROTECT(ScalarInteger64(dtype_id))), 0)); // check that the length of both matches if(LENGTH(enum_values) != LENGTH(values) || LENGTH(enum_labels) != LENGTH(levels)) { UNPROTECT(6); return(false); } // check that they are the same for(int i=0; i < LENGTH(levels); ++i) { if(INTEGER(enum_values)[i] != INTEGER(values)[i] || strcmp(CHAR(STRING_ELT(enum_labels, i)), CHAR(STRING_ELT(levels, i)))!=0) { UNPROTECT(6); return(false); } } // everything matches UNPROTECT(6); return(true); } bool is_robj_compound(SEXP _Robj, hid_t dtype_id, R_xlen_t nelem) { char* member_name; /* Check that the R object is of the expected type */ // first check that it is actually a list if(TYPEOF(_Robj) != VECSXP) { warning("Input to RToH5_COMPOUND expects a list\n"); return(false); } // check that it is actually a data.frame if(!inherits(_Robj, "data.frame")) { return(false); } if(LENGTH(_Robj)==0) { warning("List has length 0\n"); return(false); } // check that the list is same length as dtype size_t dtype_num_members = H5Tget_nmembers(dtype_id); if(LENGTH(_Robj) != dtype_num_members) { warning("Length of Robj and number of objects in dtype have to be the same\n"); return(false); } // check that the list is named and has the same names in the same order as dtype SEXP list_names; PROTECT(list_names = GET_NAMES(_Robj)); if(LENGTH(list_names) != dtype_num_members) { warning("Not a named list\n"); UNPROTECT(1); return(false); } for(int i=0; i< dtype_num_members; ++i) { member_name = H5Tget_member_name(dtype_id, i); if(strcmp(CHAR(STRING_ELT(list_names, i)), member_name)) { // does not match H5free_memory(member_name); warning("Names of list elements are not the same as compound\n"); UNPROTECT(1); return(false); } else { H5free_memory(member_name); } } UNPROTECT(1); // check that all list elements have the same length SEXP Robj_item; SEXP dim; int unprotect_counter=0; bool ret_val = true; for(int i=0; i< dtype_num_members; ++i) { PROTECT(Robj_item = VECTOR_ELT(_Robj, i)); unprotect_counter++; PROTECT(dim = GET_ATTR(Robj_item, R_DimSymbol)); unprotect_counter++; // have to treat a data frame differently, as its length is the number of columns if(inherits(Robj_item, "data.frame")) { SEXP attr; PROTECT(attr = GET_ATTR(Robj_item, PROTECT(install("row.names")))); unprotect_counter+=2; if(XLENGTH(attr) != nelem) { warning("Number of row names not equal to number of nelem\n"); ret_val = false; } } else if(!isNull(dim)) { // has a dimension, so is an array or matrix // if it is an array, the length does not correspond to the number of rows if(INTEGER(dim)[0]!=nelem) { warning("Has a dimension, but not the number of rows as expected\n"); ret_val = false; } } else { if(XLENGTH(Robj_item) != nelem) { warning("Not all elements of the list have the same length\n"); ret_val = false; } } // loop done - unprotect items UNPROTECT(unprotect_counter); unprotect_counter = 0; if(!ret_val) { // was set to false soemwhere in if statements; return now return(false); } } // nothing to UNPROTECT here; has been taken care of in the loop return(true); } // ascertain the dimensionality of an array datatype // does this recursively if this is a nested array datatype // the dimensionality is returned in R-fashion, i.e. reversed SEXP get_array_dim(hid_t dtype_id) { hid_t dtype_base = H5Tget_super(dtype_id); SEXP dim; int array_rank = H5Tget_array_ndims(dtype_id); if(array_rank < 0) { error("An error occured when tyring to get the array dimensions\n"); } if(array_rank == 0) { error("The array data type has to have at least a single dimension\n"); } if(H5Tget_class(dtype_base)==H5T_ARRAY) { SEXP super_dim; PROTECT(super_dim=get_array_dim(dtype_base)); // copy it and allocate space for array_rank more PROTECT(dim = allocVector(INTSXP, array_rank + XLENGTH(super_dim))); memcpy(INTEGER(dim), INTEGER(super_dim), sizeof(int) * XLENGTH(super_dim)); UNPROTECT(2); /* super_dim, dim */ PROTECT(dim); } else { PROTECT(dim = allocVector(INTSXP, array_rank)); } H5Tclose(dtype_base); int total_num_dims = XLENGTH(dim); hsize_t cur_array_dim[array_rank]; H5Tget_array_dims2(dtype_id, cur_array_dim); for(int i=0; i < array_rank; ++i) { INTEGER(dim)[total_num_dims - 1 - i] = cur_array_dim[i]; } UNPROTECT(1); return(dim); } bool is_robj_array(SEXP _Robj, hid_t dtype_id) { // now check the base class; we are currently not supporting // compound data types in array data types (unless it is of type complex) // may have to change this later to support tables inside arguments // this is not an issue that it isn't posibble, but rather that there is no good // equivalent object in R itself hid_t dtype_base = H5Tget_super(dtype_id); H5T_class_t base_class = H5Tget_class(dtype_base); if(base_class == H5T_COMPOUND && !is_h5_complex(dtype_base)) { H5Tclose(dtype_base); return(false); } H5Tclose(dtype_base); // get the dimensions of the dtype_id; check that it is of array type first if(H5Tget_class(dtype_id) != H5T_ARRAY) { return(false); } return(true); } // converts an R character vector to UTF8 // should internally be replaced by the function // const char *reEnc(const char *x, cetype_t ce_in, cetype_t ce_out, int subst); SEXP string_to_UTF8(SEXP _str) { SEXP res, s, t; t = s = PROTECT(allocList(2)); SET_TYPEOF(s, LANGSXP); SETCAR(t, install("enc2utf8")); t = CDR(t); SETCAR(t, _str); t = CDR(t); PROTECT(res = eval(s, R_GlobalEnv)); UNPROTECT(2); return(res); } SEXP R_guess_nelem(SEXP _Robj, SEXP _dtype) { hid_t dtype_id = SEXP_to_longlong(_dtype, 0); return(ScalarInteger64_or_int(guess_nelem(_Robj, dtype_id))); } R_xlen_t guess_nelem(SEXP _Robj, hid_t dtype_id) { // using this one can estimate the number of elements in the _Robj // this is necessary for variable length arrays // as for this it is too complicated to pass in the length directly in the // Robj itself // first check if it is a request for an empty object if(inherits(_Robj, "R_RToH5_empty")) { return(XLENGTH(_Robj)); } H5T_class_t dtype_class = H5Tget_class(dtype_id); R_xlen_t nelem; switch(dtype_class) { case H5T_COMPOUND: if(TYPEOF(_Robj)==CPLXSXP) { nelem = XLENGTH(_Robj); } else { // check that it is a data frame // estimate it based on the LENGTH of the row.names if(!inherits(_Robj, "data.frame")) { error("dtype is of class compound, but R object is not a data.frame or complex"); } nelem = XLENGTH(GET_ATTR(_Robj, install("row.names"))); return(nelem); break; } case H5T_ARRAY: { // don't need to check if the robj is matching; will be done later hid_t dtype_base = H5Tget_super(dtype_id); hsize_t dtype_base_size = H5Tget_size(dtype_base); hsize_t num_rows = H5Tget_size(dtype_id) / dtype_base_size; H5Tclose(dtype_base); return(XLENGTH(_Robj) / num_rows); break; } case H5T_ENUM: case H5T_BITFIELD: case H5T_INTEGER: case H5T_FLOAT: case H5T_STRING: case H5T_OPAQUE: case H5T_VLEN: return(XLENGTH(_Robj)); break; case H5T_REFERENCE: { SEXP hdf5r_ns = PROTECT(eval(PROTECT(lang2(PROTECT(install("getNamespace")), PROTECT(mkString("hdf5r")))), R_GlobalEnv)); SEXP robj_len = PROTECT(eval(PROTECT(lang3(install("$"), _Robj, install("length"))), hdf5r_ns)); UNPROTECT(6); return(SEXP_to_xlen(robj_len)); } default: error("Error when retrieving class"); } } void* VOIDPTR(SEXP x) { switch(TYPEOF(x)) { case REALSXP: return((void *) REAL(x)); case INTSXP: return((void *) INTEGER(x)); case LGLSXP: return((void *) LOGICAL(x)); case CPLXSXP: return((void *) COMPLEX(x)); case RAWSXP: return((void *) RAW(x)); case STRSXP: return((void *) STRING_PTR(x)); case VECSXP: return((void *) VECTOR_PTR(x)); default: error("Type cannot be converted to voidptr\n"); } } size_t R_get_item_size(SEXP x) { switch(TYPEOF(x)) { case REALSXP: return(sizeof(double)); case INTSXP: return(sizeof(int)); case LGLSXP: return(sizeof(int)); case CPLXSXP: return(2 * sizeof(double)); case RAWSXP: return(1); case STRSXP: return(sizeof(char*)); case VECSXP: return(sizeof(void *)); default: error("Type cannot be converted to voidptr\n"); } } /****************************************** * Converts an int64 to other types depending on the * flags that are set; ******************************************/ SEXP convert_int64_using_flags(SEXP val, int flags) { int64_t* ll_ptr = (int64_t*) REAL(val); R_xlen_t len = XLENGTH(val); int change_to_int; int change_to_double; int change_to_double_force; change_to_int = flags & H5TOR_CONV_INT64_INT_NOLOSS; change_to_double = flags & H5TOR_CONV_INT64_FLOAT_NOLOSS; change_to_double_force = flags & H5TOR_CONV_INT64_FLOAT_FORCE; if(!change_to_int && !change_to_double && !change_to_double_force) { return(val); } if(change_to_double_force) { change_to_double = true; // the NAs are here already set if(change_to_int) { for(R_xlen_t i = 0; i < len; ++i) { if(change_to_int && (ll_ptr[i] > INT_MAX || ll_ptr[i] < INT_MIN) && ll_ptr[i] != NA_INTEGER64) { // note - NA's don't count change_to_int = false; break; } } } } else { for(R_xlen_t i = 0; i < len; ++i) { if((ll_ptr[i] > MAX_INT_DOUBLE_PREC || ll_ptr[i] < MIN_INT_DOUBLE_PREC) && ll_ptr[i] != NA_INTEGER64 ) { return(val); // nothing will be changed as cannot even be represented by double } else if(change_to_int && (ll_ptr[i] > INT_MAX || ll_ptr[i] < INT_MIN) && ll_ptr[i] != NA_INTEGER64) { change_to_int = false; if(!change_to_double) { return(val); // nothing to do anymore } } } } // create an integer vector of the same lenth and return it // or a double vector of the same length if(change_to_int) { change_to_double = false; SEXP val_int = PROTECT(NEW_INTEGER(len)); for(R_xlen_t i = 0; i < len; ++i) { if(ll_ptr[i] == NA_INTEGER64) { INTEGER(val_int)[i] = NA_INTEGER; } else { INTEGER(val_int)[i] = ll_ptr[i]; // handles NA correctly automatically } } UNPROTECT(1); return(val_int); } else if(change_to_double) { SEXP val_double = PROTECT(convert_int64_to_double(val)); // NA-handling done there UNPROTECT(1); return(val_double); } else { // usually we can only arrive here if change_to_int and change_to_double were already false // when starting the function error("no conversion to an int64 to be done; should have returned earlier"); } } /****************************************** * Converts an uint64 to either double of int64 depending on the * flags that are set; ******************************************/ SEXP convert_uint64_using_flags(SEXP val, int flags) { bool na_warning = false; if(flags & H5TOR_CONV_INT64_FLOAT_FORCE) { SEXP res = PROTECT(NEW_NUMERIC(XLENGTH(val))); uint64_t* ull_ptr = (uint64_t*) REAL(val); double* dbl_ptr = (double*) REAL(res); for(R_xlen_t i =0; i < XLENGTH(res); ++i) { dbl_ptr[i] = ull_ptr[i]; } UNPROTECT(1); return(res); } else { SEXP res = PROTECT(duplicate(val)); if(flags & H5TOR_CONV_UINT64_NA) { // set values that are too large to NA uint64_t* ull_ptr = (uint64_t*) REAL(res); int64_t* ll_ptr = (int64_t*) REAL(res); for(R_xlen_t i =0; i < XLENGTH(res); ++i) { if(ull_ptr[i] > LLONG_MAX) { ll_ptr[i] = NA_INTEGER64; na_warning = true; } else { ll_ptr[i] = ull_ptr[i]; } } } else { // do truncation uint64_t* ull_ptr = (uint64_t*) REAL(res); int64_t* ll_ptr = (int64_t*) REAL(res); for(R_xlen_t i =0; i < XLENGTH(res); ++i) { if(ull_ptr[i] > LLONG_MAX) { ll_ptr[i] = LLONG_MAX; } else { ll_ptr[i] = ull_ptr[i]; } } } if(na_warning) { warning("NA created during coercion from uint64 value"); } res = PROTECT(convert_int64_using_flags(res, flags)); UNPROTECT(2); return(res); } } SEXP set_dim_attribute(SEXP x, SEXP dim) { // need to distinguish if it is an H5R object SEXP hdf5r_ns = PROTECT(eval(PROTECT(lang2(PROTECT(install("getNamespace")), PROTECT(mkString("hdf5r")))), R_GlobalEnv)); if(inherits(x, "H5R")) { eval(PROTECT(lang3(install("dim<-"), x, dim)), hdf5r_ns); UNPROTECT(1); } else { setAttrib(x, R_DimSymbol, dim); } UNPROTECT(4); return(x); } SEXP R_as_hex(SEXP x) { SEXP as_hex_r = PROTECT(NEW_CHARACTER(XLENGTH(x))); char as_hex[17]; if(TYPEOF(x) == REALSXP) { for(R_xlen_t i = 0; i < XLENGTH(x); ++i) { sprintf(as_hex, "%016llX", ((long long*)REAL(x))[i]); SET_STRING_ELT(as_hex_r, i, mkChar(as_hex)); } } else if(TYPEOF(x) == INTSXP) { for(R_xlen_t i = 0; i < XLENGTH(x); ++i) { sprintf(as_hex, "%08X", INTEGER(x)[i]); SET_STRING_ELT(as_hex_r, i, mkChar(as_hex)); } } else { error("Only works for INTSXP and REALSXP\n"); } UNPROTECT(1); return(as_hex_r); } // Create code that calls the conversion from R to int64 through the R layer SEXP convert_double_to_int64(SEXP dbl_vec) { SEXP result; // int errorOccured; don't need that here; but otherwise, R_tryEval is the equivalent of try in R // first get the namespace of the bit64 package SEXP bit64_ns = PROTECT(eval(PROTECT(lang2(PROTECT(install("getNamespace")), PROTECT(mkString("bit64")))), R_GlobalEnv)); // now use the namespace to call the as.integer64.double function PROTECT(result = eval(PROTECT(lang2(install("as.integer64.double"), dbl_vec)), bit64_ns)); UNPROTECT(6); return(result); } SEXP convert_int64_to_double(SEXP int64_vec) { SEXP result; SEXP bit64_ns = PROTECT(eval(PROTECT(lang2(PROTECT(install("getNamespace")), PROTECT(mkString("bit64")))), R_GlobalEnv)); // now use the namespace to call the as.integer64.double function PROTECT(result = eval(PROTECT(lang2(install("as.double.integer64"), int64_vec)), bit64_ns)); UNPROTECT(6); return(result); } SEXP convert_int_to_int64(SEXP int_vec) { SEXP result; // int errorOccured; don't need that here; but otherwise, R_tryEval is the equivalent of try in R // first get the namespace of the bit64 package SEXP bit64_ns = PROTECT(eval(PROTECT(lang2(PROTECT(install("getNamespace")), PROTECT(mkString("bit64")))), R_GlobalEnv)); // now use the namespace to call the as.integer64.double function PROTECT(result = eval(PROTECT(lang2(install("as.integer64.integer"), int_vec)), bit64_ns)); UNPROTECT(6); return(result); } SEXP convert_int64_to_int(SEXP int64_vec) { SEXP result; // int errorOccured; don't need that here; but otherwise, R_tryEval is the equivalent of try in R // first get the namespace of the bit64 package SEXP bit64_ns = PROTECT(eval(PROTECT(lang2(PROTECT(install("getNamespace")), PROTECT(mkString("bit64")))), R_GlobalEnv)); // now use the namespace to call the as.integer64.double function PROTECT(result = eval(PROTECT(lang2(install("as.integer.integer64"), int64_vec)), bit64_ns)); UNPROTECT(6); return(result); } // create a new R6 class; do it with a do.call statement SEXP new_H5R_R6_class(char * class_name, SEXP num, SEXP id) { SEXP result; // int errorOccured; don't need that here; but otherwise, R_tryEval is the equivalent of try in R // first get the namespace of the hdf5r package SEXP hdf5r_ns = PROTECT(eval(PROTECT(lang2(PROTECT(install("getNamespace")), PROTECT(mkString("hdf5r")))), R_GlobalEnv)); // now use the namespace to call the as.integer64.double function SEXP r6_class_new = PROTECT(eval(PROTECT(lang3(install("$"), install(class_name), install("new"))), hdf5r_ns)); result = PROTECT(eval(PROTECT(lang3(r6_class_new, num, id)), hdf5r_ns)); UNPROTECT(8); return(result); } /***************************************************** * collecting warnings issued by HDF5 during type conversions ****************************************************/ void H5T_conv_log_issue(H5T_conv_except_t except_type, H5T_conv_op_data *conv_op_data) { switch(except_type) { case H5T_CONV_EXCEPT_RANGE_HI: conv_op_data->H5T_CONV_EXCEPT_RANGE_HI = true; break; case H5T_CONV_EXCEPT_RANGE_LOW: conv_op_data->H5T_CONV_EXCEPT_RANGE_LOW = true; break; case H5T_CONV_EXCEPT_TRUNCATE: conv_op_data->H5T_CONV_EXCEPT_TRUNCATE = true; break; case H5T_CONV_EXCEPT_PRECISION: conv_op_data->H5T_CONV_EXCEPT_PRECISION = true; break; case H5T_CONV_EXCEPT_PINF: conv_op_data->H5T_CONV_EXCEPT_PINF = true; break; case H5T_CONV_EXCEPT_NINF: conv_op_data->H5T_CONV_EXCEPT_NINF = true; break; case H5T_CONV_EXCEPT_NAN: conv_op_data->H5T_CONV_EXCEPT_NAN = true; break; } return; } void H5T_conv_init(H5T_conv_op_data *conv_op_data) { conv_op_data->H5T_CONV_EXCEPT_RANGE_HI = false; conv_op_data->H5T_CONV_EXCEPT_RANGE_LOW = false; conv_op_data->H5T_CONV_EXCEPT_TRUNCATE = false; conv_op_data->H5T_CONV_EXCEPT_PRECISION = false; conv_op_data->H5T_CONV_EXCEPT_PINF = false; conv_op_data->H5T_CONV_EXCEPT_NINF = false; conv_op_data->H5T_CONV_EXCEPT_NAN = false; return; } int get_issue_string(H5T_conv_op_data conv_op_data, char* issue_string, size_t string_len) { int first_issue = true; issue_string[0] = '\0'; if(string_len < 300) { error("The buffer for the issue string should at least have a size of 300"); } strcat(issue_string, "During conversion, the following issues occured: "); if(conv_op_data.H5T_CONV_EXCEPT_RANGE_HI) { if(!first_issue) { strcat(issue_string, ", "); } strcat(issue_string, "H5T_CONV_EXCEPT_RANGE_HI"); first_issue = false; } if(conv_op_data.H5T_CONV_EXCEPT_RANGE_LOW) { if(!first_issue) { strcat(issue_string, ", "); } strcat(issue_string, "H5T_CONV_EXCEPT_RANGE_LOW"); first_issue = false; } if(conv_op_data.H5T_CONV_EXCEPT_TRUNCATE) { if(!first_issue) { strcat(issue_string, ", "); } strcat(issue_string, "H5T_CONV_EXCEPT_TRUNCATE"); first_issue = false; } if(conv_op_data.H5T_CONV_EXCEPT_PRECISION) { if(!first_issue) { strcat(issue_string, ", "); } strcat(issue_string, "H5T_CONV_EXCEPT_PRECISION"); first_issue = false; } if(conv_op_data.H5T_CONV_EXCEPT_PINF) { if(!first_issue) { strcat(issue_string, ", "); } strcat(issue_string, "H5T_CONV_EXCEPT_PINF"); first_issue = false; } if(conv_op_data.H5T_CONV_EXCEPT_NINF) { if(!first_issue) { strcat(issue_string, ", "); } strcat(issue_string, "H5T_CONV_EXCEPT_NINF"); first_issue = false; } if(conv_op_data.H5T_CONV_EXCEPT_NAN) { if(!first_issue) { strcat(issue_string, ", "); } strcat(issue_string, "H5T_CONV_EXCEPT_NAN"); first_issue = false; } int has_issue = !first_issue; if(has_issue) { return(true); } else { return(false); } } // this callback function will do nothing (return that it is unhandled), and let hdf5 library handle it (which is usually truncation) herr_t conv_cb_log(H5T_conv_except_t except_type, hid_t src_id, hid_t dst_id, void* src_buf, void* dst_buf, void* op_data) { H5T_conv_op_data* conv_op_data = op_data; H5T_conv_log_issue(except_type, conv_op_data); return(H5T_CONV_UNHANDLED); } herr_t H5Tconvert_with_warning(hid_t src_type_id, hid_t dest_type_id, size_t nelmts, void* buf) { herr_t herr; H5T_conv_op_data conv_op_data; H5T_conv_init(&conv_op_data); hid_t plist_id = H5Pcreate(H5P_DATASET_XFER); herr = H5Pset_type_conv_cb(plist_id, conv_cb_log, &conv_op_data); if(herr < 0) { error("Issue creating plist in H5Tconvert_with_warning"); } herr = H5Tconvert(src_type_id, dest_type_id, nelmts, buf, NULL, plist_id); if(herr < 0) { H5Pclose(plist_id); return(herr); } H5Pclose(plist_id); // see if a warning needs to be issued char* issue_string = R_alloc(1, 300); int issue_res = get_issue_string(conv_op_data, issue_string, 300); if(issue_res) { warning(issue_string); } return(herr); }
fuyao19920730/testPod
Example/test/FTViewController.h
<gh_stars>0 // // FTViewController.h // test // // Created by <NAME> on 01/03/2020. // Copyright (c) 2020 <NAME>. All rights reserved. // @import UIKit; @interface FTViewController : UIViewController @end
fuyao19920730/testPod
test/Classes/testpod.h
<reponame>fuyao19920730/testPod // // testpod.h // Empty // // Created by fotoable on 2020/1/3. // Copyright © 2020 fotoable. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @interface testpod : NSObject @end NS_ASSUME_NONNULL_END
fuyao19920730/testPod
Example/test/FTAppDelegate.h
// // FTAppDelegate.h // test // // Created by <NAME> on 01/03/2020. // Copyright (c) 2020 <NAME>. All rights reserved. // @import UIKit; @interface FTAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
pankajgree/myproj
pankaj_new.c
#include <stdio.h> main()sdsiqwhsw { printf("my first checking"); printf("this is the first git file\n"); }
pankajgree/myproj
pankaj1.c
<filename>pankaj1.c #include<stdio.h> void main() { prinf("hello DevOps"); }
trkinvincible/DaVinciOrderMatching
hdr/DaVinciDerivatives.h
<gh_stars>0 #pragma once #include <set> #include <string> #include <iostream> #include <string_view> #include <iostream> #include <iterator> #include <vector> #include <regex> #include <unordered_map> #include <chrono> #include <sstream> #include <limits> #include <stack> #include <map> #include <thread> #include <future> #include <deque> #include <condition_variable> #include <atomic> #include <iomanip> #include <fstream> #include <assert.h> #include "command.h" namespace { using namespace std::literals; // just one copy for all orders :-) const char BuySide[] = "BUY"; const char SellSide[] = "SELL"; const char dummy[] = "dummy"; std::vector<std::string> Split(const std::string& input, const char delimiter){ std::vector<std::string> result; std::stringstream ss(input); std::string s; while (std::getline(ss, s, delimiter)) { result.push_back(s); } return result; } template <typename SIDE> constexpr bool isValidOrderType(const SIDE& t) { if (t == BuySide || t == SellSide) { return true; } return false; } template<const char* SIDE> class Order; template<const char* SIDE> using Order_ptr = std::shared_ptr<Order<SIDE>>; using SellOrder_ptr = Order_ptr<SellSide>; using BuyOrder_ptr = Order_ptr<BuySide>; template<const char* SIDE> class Order{ public: Order(std::uint64_t ts, std::string s, std::uint32_t oid, uint64_t v, double p) noexcept : mTimestamp(ts), mSymbol(s), mSymbolHash(std::hash<std::string>{}(mSymbol)), mOrderID(oid), mVolume(v), mPrice(p) { } Order(std::string s, uint64_t v = 0) noexcept :mSymbol(s), mSymbolHash(std::hash<std::string>{}(mSymbol)), mVolume(v) { } Order<SIDE>& operator=(const Order& rhs) = delete; friend bool operator<(const Order_ptr<SIDE>& lhs, const Order_ptr<SIDE>& rhs){ return lhs->Compare(rhs); } /* Order Book (BUY) while SELL just ordered by Symbol and Time * |------------------ * | SYMBOL | volume | * | "1" MAX * | "2" .. * | "3" .. * | "3" .. * | "3" .. * | "4" MIN */ bool Compare(const Order_ptr<SIDE>& rhs) const { if (IsBuyOrder()){ if (mSymbolHash == rhs->mSymbolHash){ return mVolume > rhs->mVolume; } return mSymbolHash < rhs->mSymbolHash; }else{ // assume the input is chronologically ordered return mSymbolHash < rhs->mSymbolHash; } } /* * quick pointer checking instead of string compare * bool IsBuyOrder<&BuySide>(): * push rbp * mov rbp, rsp * mov eax, 1 * pop rbp * ret * main: * push rbp * mov rbp, rsp * call bool IsBuyOrder<&BuySide>() * mov eax, 0 * pop rbp * ret * [eax(return register) is set to 1 with no runtime overhead] this is critical as this function is called often */ inline constexpr bool IsBuyOrder() const { return (mSide == BuySide); } public: // declare private with getter/setter std::uint64_t mTimestamp; std::string mSymbol; //[PK] std::uint32_t mSymbolHash; std::uint32_t mOrderID;//[UNIQUE_KEY] const char* mSide = SIDE; uint64_t mVolume; //[PK + Composite Key] double mPrice; }; /* * multiset is guranteed to add same elements at the upper bound of equal range * multiset performs better than prority_queue with constant time of O(1) */ template<const char* SIDE, std::enable_if_t<isValidOrderType<const char*>(SIDE), bool> = false> class OrdersContainer : public std::multiset<Order_ptr<SIDE>>{ public: using std::multiset<Order_ptr<SIDE>>::insert; friend std::ostream& operator<<(std::ostream& os, const OrdersContainer<SIDE>& oc){ os << SIDE << ": "; for (const auto& i : oc){ os << i << " "; } os << std::endl; return os; } }; class SellOrderBookKeeping{ struct comp { bool operator()(const SellOrder_ptr& lhs, const SellOrder_ptr& rhs) const { return (lhs->mPrice < rhs->mPrice); } }; using BestPriceSellOrdersSet = std::set<SellOrder_ptr, comp>; using BestSellPriceForSymbolHash = std::unordered_map<std::string_view/*symbol*/, BestPriceSellOrdersSet>; using BestSellPriceAtTimePointMap = std::map<std::uint64_t/*timestamp*/, BestSellPriceForSymbolHash>; using MessageType = std::tuple<SellOrder_ptr, bool>; public: bool Process(){ while(true){ std::unique_lock<std::mutex> lk(mMessageBoxMutex); mMessageBoxCondVar.wait(lk, [this]{ return !mMessageBox.empty(); }); const auto [o, isInsert] = mMessageBox.front(); if (isInsert){ DoSellOrderInsert(o); }else{ DoSellOrderCXL(o); } mMessageBox.pop_front(); lk.unlock(); mMessageBoxCondVar.notify_one(); } } void AddMessage(const SellOrder_ptr newOrder, const bool isInsert = true){ std::unique_lock<std::mutex> lk(mMessageBoxMutex); if (!lk.owns_lock()) mMessageBoxCondVar.wait(lk); mMessageBox.push_back(std::make_tuple(newOrder, isInsert)); lk.unlock(); mMessageBoxCondVar.notify_one(); } BestSellPriceAtTimePointMap::iterator GetBestSell(std::uint64_t ts) { while (!mMessageBox.empty()) { std::this_thread::sleep_for(1ms); } return mLookupBestSellPrice.lower_bound(ts);; } public: inline void DoSellOrderInsert(const SellOrder_ptr& newOrder){ if (mLookupBestSellPrice.empty()){ BestSellPriceForSymbolHash& second = mLookupBestSellPrice[newOrder->mTimestamp]; second[newOrder->mSymbol].insert(newOrder); }else{ const BestSellPriceForSymbolHash& prevTS = mLookupBestSellPrice.rbegin()->second; const auto [it, success] = mLookupBestSellPrice.insert({newOrder->mTimestamp, prevTS}); BestSellPriceForSymbolHash& newTS = it->second; newTS[newOrder->mSymbol].insert(newOrder); } } inline void DoSellOrderCXL(const SellOrder_ptr& newOrder){ if (mLookupBestSellPrice.empty()){ // Invalid: ignore }else{ const BestSellPriceForSymbolHash& prevTS = mLookupBestSellPrice.rbegin()->second; const auto [it, success] = mLookupBestSellPrice.insert({newOrder->mTimestamp, prevTS}); BestSellPriceForSymbolHash& newTS = it->second; auto& st = newTS[newOrder->mSymbol]; auto itr = std::find_if(st.begin(), st.end(), [newOrder](const SellOrder_ptr& i) { return (i->mOrderID == newOrder->mOrderID); }); if (itr != st.end()) st.erase(itr); } } std::deque<MessageType> mMessageBox; std::mutex mMessageBoxMutex; std::condition_variable mMessageBoxCondVar; std::atomic_bool mExit; // Mayeb squize it for some regular intervals? BestSellPriceAtTimePointMap mLookupBestSellPrice; }; class OrderBook{ public: OrderBook(){ std::thread(&SellOrderBookKeeping::Process, std::ref(mBookKeeper)).detach(); } /* CORE APIS [START] */ /* * Since the OB is sorted based on (symbols + MAX volmume) its takes log time with no additional memory */ std::unordered_map<std::string_view, std::uint64_t> OrderCounts(){ std::unordered_map<std::string_view, std::uint64_t> ret; if (!mBuyOrders.empty()){ auto firstKeyItr = mBuyOrders.begin(); for (auto currItr = firstKeyItr; currItr != mBuyOrders.end(); ) { // TODO Must be optimized with single call for composite key(fat key) BuyOrder_ptr tmp = std::make_shared<Order<BuySide>>((*currItr)->mSymbol, UINT64_MAX); const auto lb = mBuyOrders.lower_bound(tmp); tmp->mVolume = 0; const auto ub = mBuyOrders.upper_bound(tmp); ret[(*lb)->mSymbol] = std::distance(lb, ub); currItr = ub; } } if (!mSellOrders.empty()){ auto firstKeyItr = mSellOrders.begin(); for (auto currItr = firstKeyItr; currItr != mSellOrders.end(); ) { SellOrder_ptr tmp = std::make_shared<Order<SellSide>>((*currItr)->mSymbol); const auto [lb, ub] = mSellOrders.equal_range(tmp); ret[(*lb)->mSymbol] += std::distance(lb, ub); currItr = ub; } } return ret; } /* * Since the BUY orders in OB are sorted in descending order of hash(symbols, volumes) its takes (log + constant) time to take from top * designed for end of trade day */ std::vector<BuyOrder_ptr> BiggestBuyOrders(const std::string& symbol, const int top){ std::vector<BuyOrder_ptr> ret; ret.reserve(top); BuyOrder_ptr tmp = std::make_shared<Order<BuySide>>(symbol, UINT64_MAX); const auto lb = mBuyOrders.lower_bound(tmp); tmp->mVolume = 0; const auto ub = mBuyOrders.upper_bound(tmp); OrdersContainer<BuySide>::const_iterator currItr = lb; for (int currCount = 0; (currItr != ub && currCount++ < top) ; ++currItr){ ret.emplace_back(*currItr); } return ret; } /* * Sell price must be lowest for maximum profit. lets have whole Order returned just in case need more than volume+price info in future(Open Closed Principle) * 2 approaches: * #1 - store the lowest price of every symbol for every transaction(time point). * pros: cons: * quick turnaround O(1) extra memory * ---------------------------------------------- * [timepoint] [symbol] [orderID of best sell] * --------------------------------------------- * 9'0 clock "1" 1[$5] * "2" 2[$5] * "3" 3 * 10'0 clock "1" 11[$4]->1[$5] * "2" 22[$4]->2[$5] * "3" 3 * "4" 44 * 11'0 clock "1" 11[$4]->1[$5]->5[$6] // ID: 5 added * "2" 22[$4]->2[$5] * "3" 3 * "4" 44 * 12'0 clock "1" 11[$4]->5[$6] // ID: 1 cancelled * "2" 2[$5] // ID: 22 cancelled * "3" 3 * "4" 44 * #2 - rollback the order book to the said time point. using either Command or Memento design patterns * Command pattern: every doAmend() calls will be stacked up for undoAmend() * Memento pattern: cache the OrderBook (of shared pointers) at various time point(or transactions) * pros: cons: * lazy turnaround no (minimum) extra memory * * Implementing #1 for now at constant time complexity O(1) */ SellOrder_ptr BestSellAtTime(const std::string& symbol, const std::string& timestamp){ SellOrder_ptr minOrder; // Below code is to query at the end of trade day #if 0 double minPrice = std::numeric_limits<double>::max(); SellOrder_ptr tmp = std::make_shared<Order<SellSide>>(symbol); const auto [lb, ub] = mSellOrders.equal_range(tmp); std::uint64_t ts = getTime(timestamp) - mMidNightInMS; // std::find_if performs better than std::min_element std::find_if(lb, ub, [ts, &minPrice, &minOrder](const SellOrder_ptr& item){ if (item->mTimestamp > ts) return true; // std::min(minPrice, item->mPrice) if (item->mPrice < minPrice){ minPrice = item->mPrice; minOrder = item; } return false; }); #else // Below code is to query within the trade day std::uint64_t ts = getTime(timestamp) - mMidNightInMS; auto itr = mBookKeeper.GetBestSell(ts); const auto& st = itr->second[symbol]; if (const auto& st = itr->second[symbol]; !st.empty()){ minOrder = *(st.begin()); } #endif return minOrder; } /* CORE APIS [END] */ // BUY inline void DoBuyOrderInsert(const BuyOrder_ptr& newOrder){ auto itr = mBuyOrders.insert(newOrder); mLookupBuyOrders[newOrder->mOrderID] = itr; } inline void DoBuyOrderCXL(const BuyOrder_ptr& newOrder){ auto Buyitr = mLookupBuyOrders.find(newOrder->mOrderID); if (Buyitr != mLookupBuyOrders.end()){ mBuyOrders.erase(Buyitr->second); } } inline void DoBuyOrderCRP(const BuyOrder_ptr& newOrder){ DoBuyOrderCXL(newOrder); DoBuyOrderInsert(newOrder); } // SELL inline void DoSellOrderInsert(const SellOrder_ptr& newOrder){ mBookKeeper.AddMessage(newOrder); auto itr = mSellOrders.insert(newOrder); mLookupSellOrders[newOrder->mOrderID] = itr; } inline void DoSellOrderCXL(const SellOrder_ptr& newOrder){ mBookKeeper.AddMessage(newOrder, false); auto Sellitr = mLookupSellOrders.find(newOrder->mOrderID); if (Sellitr != mLookupSellOrders.end()){ mSellOrders.erase(Sellitr->second); } } inline void DoSellOrderCRP(const SellOrder_ptr& newOrder){ // Do not modify the pointer. choronologial order will be lost so operator= is deleted DoSellOrderCXL(newOrder); DoSellOrderInsert(newOrder); } template<const char* SIDE> Order_ptr<SIDE> GetNewOrder(const std::vector<std::string>& v) noexcept{ std::uint64_t time_since_start_of_day_ms = getTime(v[0]) - mMidNightInMS; return std::make_shared<Order<SIDE>>(time_since_start_of_day_ms, std::move(v[1]), (std::uint64_t)std::atoi(v[2].data()), (std::uint64_t)std::atoi(v[5].data()), (double)std::stod(v[6].data())); } private: /* * Processor is faster at numeric compare than string compare */ std::uint64_t getTime(const std::string& t) noexcept{ // Eg: 14:17:21.877391 const auto& v = Split(t, '.'); std::istringstream ss(v[0]); time_t tmp{0}; struct tm tmm = *localtime(&tmp); ss >> std::get_time(&tmm, "%H:%M:%S"); if (ss.fail()) { return 0; }else { std::time_t time = std::mktime(&tmm); std::chrono::system_clock::time_point t = std::chrono::system_clock::from_time_t(time); auto t_ms = std::chrono::time_point_cast<std::chrono::microseconds>(t); std::uint64_t t_f = t_ms.time_since_epoch().count(); if (v.size() >= 2){ try{ std::size_t tt_ms = std::atoi(v[1].data()); return (t_f + tt_ms); }catch(...){ return 0; } } return t_f; } } // reduced timestamp size by calculating from midnight(or even market start better?) instead of time_since_epoch in microseconds for accuracy const std::uint64_t mMidNightInMS = getTime("00:00:00"); // BST for storage and hash map for fast look up. OrdersContainer<BuySide> mBuyOrders; OrdersContainer<SellSide> mSellOrders; std::unordered_map<std::uint32_t/*orderID*/, OrdersContainer<BuySide>::iterator> mLookupBuyOrders; std::unordered_map<std::uint32_t/*orderID*/, OrdersContainer<SellSide>::iterator> mLookupSellOrders; SellOrderBookKeeping mBookKeeper; }; // As per SOLID Design Principles. Strong exception safety class DaVinciOrderMatchingEngine : public Command { public: void execute(){ // Eg: 14:17:21.877391;DVAM1;00000001;I;BUY;100;12.5 static const std::string file{"../DaVinci_test_data.txt"}; // SSO std::ifstream input; try{ input.open(file); auto start = std::chrono::steady_clock::now(); for (std::string line; std::getline(input, line, '\n'); ) { const auto& v = Split(line, ';'); assert(v.size() == 7); DoOrder(v); } auto end = std::chrono::steady_clock::now(); std::cout << "Time to complete data file processing: " << (end - start)/1s << "s." << std::endl; }catch (...) { input.close(); } input.close(); auto start = std::chrono::steady_clock::now(); std::cout << "OrderCounts: " << std::endl; for (const auto& i : mOB.OrderCounts()){ std::cout << "Symbol: " << i.first << " Count: " << i.second << std::endl; } auto end = std::chrono::steady_clock::now(); std::cout << "API 1 completed in : " << std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() << "µs." << std::endl; start = std::chrono::steady_clock::now(); std::cout << "top 3 BiggestBuyOrders for DVAM1: " << std::endl; for (const BuyOrder_ptr& i : mOB.BiggestBuyOrders("DVAM1", 3)){ std::cout << "Order ID: " << i->mOrderID << " Volume: " << i->mVolume << std::endl; } end = std::chrono::steady_clock::now(); std::cout << "API 2 completed in : " << std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() << "µs." << std::endl; start = std::chrono::steady_clock::now(); std::cout << "BestSellAtTime for TEST0 unitl 15:30:00: " << std::endl; const SellOrder_ptr& s = mOB.BestSellAtTime("TEST0", "15:30:00"); if (!s){ std::cout << "TEST0 has been cancelled or never placed until 15:30:00" << std::endl; }else{ std::cout << "Sell Price: " << s->mPrice << " Volume: " << s->mVolume << std::endl; } end = std::chrono::steady_clock::now(); std::cout << "API 3 completed in : " << std::chrono::duration_cast<std::chrono::microseconds>(end - start).count() << "µs." << std::endl; } private: void DoOrder(const std::vector<std::string>& v){ // non-type template parameter to seperate out buy/sell side at compile time. if (IsBuy(v[4])){ BuyOrder_ptr o = mOB.GetNewOrder<BuySide>(v); if (IsInsert(v[3])){ mOB.DoBuyOrderInsert(o); }else if (IsCancel(v[3])){ mOB.DoBuyOrderCXL(o); }else if (IsAmend(v[3])){ mOB.DoBuyOrderCRP(o); } }else{ SellOrder_ptr o = mOB.GetNewOrder<SellSide>(v); if (IsInsert(v[3])){ mOB.DoSellOrderInsert(o); }else if (IsCancel(v[3])){ mOB.DoSellOrderCXL(o); }else if (IsAmend(v[3])){ mOB.DoSellOrderCRP(o); } } } inline bool IsBuy(const std::string& ID){ return (ID == "BUY"); } inline bool IsInsert(const std::string& OP){ return (OP == "I"); } inline bool IsCancel(const std::string& OP){ return (OP == "C"); } inline bool IsAmend(const std::string& OP){ return (OP == "A"); } OrderBook mOB; }; }// anonymous namespace will shrink binary size by NOT exporting inline functions to as they are static to this file
trkinvincible/DaVinciOrderMatching
hdr/command.h
#pragma once class Command { public: virtual void execute()=0; };
mohsinalimat/ExpenseManager
iRun/Classes/ViewControllers/AddExpenseViewController/IRAddExpenseViewController.h
// // IRCategoryViewController.h // ExpenseManager // // Created by <NAME> on 04/09/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <UIKit/UIKit.h> #import "FPNumberPadView.h" #import "IRCalenderViewController.h" #import "IRCategoryTableViewCell.h" #import "IRExpense.h" typedef enum { EMAdd, EMEdit } ExpenseMode; @interface IRAddExpenseViewController : UIViewController<NumberPadDelegate,UITableViewDataSource,UITableViewDelegate,UITextFieldDelegate,IRCalenderViewDelegate,CategoryCellDelegate> @property (assign, nonatomic) ExpenseMode type; //@property (assign ,nonatomic) float expenseAmount; //@property (strong, nonatomic) NSDate *selectedDate; @property (strong, nonatomic) NSIndexPath *selectedIndexPath; //@property (assign, nonatomic) BOOL isExpense; //@property (strong, nonatomic) NSString *expenseIdForEditedExpense; @property (strong, nonatomic) IRExpense *expenseDetails; @end
mohsinalimat/ExpenseManager
iRun/FAQ/IRFAQAnswerCell.h
// // GSFAQAnswerCell.h // GoSafe // // Created by <NAME> on 19/03/14. // Copyright (c) 2014 Tata Consultancy Services. All rights reserved. // #import <UIKit/UIKit.h> @interface IRFAQAnswerCell : UITableViewCell @property (weak, nonatomic) IBOutlet UITextView *answer; @end
mohsinalimat/ExpenseManager
iRun/Classes/ViewControllers/MainViewController/IRMainViewController.h
// // IRViewController.h // iRun // // Created by <NAME> on 29/08/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <UIKit/UIKit.h> #import "iAd/iAd.h" @interface IRMainViewController : UIViewController<UITableViewDataSource,UITableViewDelegate,UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout,ADBannerViewDelegate> @end
mohsinalimat/ExpenseManager
iRun/Classes/ViewControllers/HistoryViewController/IRHistoryViewController.h
// // IRHistoryViewController.h // ExpenseManager // // Created by <NAME> on 13/09/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <UIKit/UIKit.h> #import <CoreData/CoreData.h> #import <iAd/iAd.h> @interface IRHistoryViewController : UIViewController<NSFetchedResultsControllerDelegate,UITableViewDataSource,UITableViewDelegate,UIAlertViewDelegate> @end
mohsinalimat/ExpenseManager
iRun/Classes/AppDelegate/IRAppDelegate.h
// // IRAppDelegate.h // iRun // // Created by <NAME> on 29/08/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <UIKit/UIKit.h> @interface IRAppDelegate : UIResponder <UIApplicationDelegate> @property (strong, nonatomic) UIWindow *window; @end
mohsinalimat/ExpenseManager
iRun/Classes/CustomCells/IROverviewTableViewCell.h
// // IROverviewTableViewCell.h // ExpenseManager // // Created by <NAME> on 06/09/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <UIKit/UIKit.h> @interface IROverviewTableViewCell : UITableViewCell @property (weak, nonatomic) IBOutlet UILabel *expenseLabel; @property (assign, nonatomic) double expense; @property (assign, nonatomic) double totalExpense; @property (strong, nonatomic) UIColor *color; - (void)createStackedBarChart; @end
mohsinalimat/ExpenseManager
iRun/Classes/ViewControllers/FAQViewController/IRFAQViewController.h
<gh_stars>1-10 // // IRFAQViewController.h // ExpenseMobile // // Created by <NAME> on 05/06/15. // Copyright (c) 2015 Shibin. All rights reserved. // #import <UIKit/UIKit.h> @interface IRFAQViewController : UIViewController<UITableViewDataSource,UITableViewDelegate> @end
mohsinalimat/ExpenseManager
iRun/Classes/CustomCells/IRCategoryExpenseTableViewCell.h
// // IRCategoryExpenseTableViewCell.h // ExpenseManager // // Created by <NAME> on 08/09/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <UIKit/UIKit.h> @interface IRCategoryExpenseTableViewCell : UITableViewCell @property (weak, nonatomic) IBOutlet UILabel *note; @property (weak, nonatomic) IBOutlet UILabel *amount; @property (weak, nonatomic) IBOutlet UILabel *date; @end
mohsinalimat/ExpenseManager
iRun/Classes/Entity/CategoryGroup.h
// // CategoryGroup.h // ExpenseMobile // // Created by <NAME> on 28/05/15. // Copyright (c) 2015 Shibin. All rights reserved. // #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> @class Expense; @interface CategoryGroup : NSManagedObject @property (nonatomic, retain) NSString * categoryName; @property (nonatomic, retain) NSNumber * colorCode; @property (nonatomic, retain) NSDate * date; @property (nonatomic, retain) NSNumber * isExpense; @property (nonatomic, retain) NSString * misc; @property (nonatomic, retain) NSNumber * categoryID; @property (nonatomic, retain) Expense *expenseRelationship; @end
mohsinalimat/ExpenseManager
iRun/Classes/CustomViews/InfoView/IRInfoView.h
<filename>iRun/Classes/CustomViews/InfoView/IRInfoView.h // // IRInfoView.h // iRun // // Created by <NAME> on 30/08/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <UIKit/UIKit.h> @interface IRInfoView : UIView @property (weak, nonatomic) IBOutlet UIButton *closeButton; @property (weak, nonatomic) IBOutlet UIView *infoBaseView; @property (weak, nonatomic) IBOutlet UITextView *infoTextView; @end
mohsinalimat/ExpenseManager
iRun/Classes/Common/IRCommon.h
<reponame>mohsinalimat/ExpenseManager // // IRCommon.h // iRun // // Created by <NAME> on 30/08/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <Foundation/Foundation.h> #import "IRCategory.h" @interface IRCommon : NSObject + (void)showAlertWithTitle:(NSString *)title message:(NSString *)message dismissButtonText:(NSString *)dismissButtonText; + (UIImage *)loadImage:(NSString *)imageName ofType:(NSString *)type; + (NSDate *)startOfMonth; + (NSDate *)endOfMonth; + (NSArray *)filterExpenseByCategory:(NSArray *)expenseArray; + (NSString *)getCurrentMonth; + (NSString *)getCurrentYear; + (double)getTotalExpenseForCurrentMonth:(NSArray *)expenseArray; + (UIColor *)getColorForColorCode:(int)code; + (NSString *)getFirstLetterFromString:(NSString *)text; + (int)getColorCodeForCategory:(NSString *)category andIsExpense:(BOOL)isExpense; + (BOOL)isCategoryAddedinDB:(IRCategory *)category forExpense:(BOOL)isExpense addToDB:(BOOL)toAdd; + (NSString *)getCurrencySymbolFromCode:(NSString *)code; + (BOOL)isToday:(NSDate *)date; + (BOOL)isYesterday:(NSDate *)date; + (BOOL)isTomorrow:(NSDate *)date; + (NSDate *)getDateOnlyFromDate:(NSDate *)date; + (NSString *)getDateStringFromDate:(NSDate *)date; + (NSString *)getWeekDayFromDate:(NSDate *)date; + (UIColor *)getThemeColor; + (BOOL)isThemeApplicableForCategoryIcons; + (NSString *)getCurrentAppVersion; + (NSString *)getDeviceName; + (NSString *)getiOSVersion; + (Grouping)getGroupingName; + (float)getTotalProfitForArray:(NSArray *)expenseArray; + (NSString *)getDayNameFromDate:(NSDate *)date; + (NSString *)getDate:(NSDate *)date inFormat:(NSString *)format; + (int)getIndexForCategory:(NSString *)category isExpense:(BOOL)isExpense; + (void)saveCategoriesToDB; + (UIFont *)getDefaultFontForSize:(float)size isBold:(BOOL)isBold; + (UIColor *)lighterColorForColor:(UIColor *)c; + (UIColor *)darkerColorForColor:(UIColor *)c; + (NSString *)localizeText:(NSString *)textToLocalize; + (void)updateSocialPoints; + (void)updateAdPoints; + (void)updateAppUsagePointsWithValue:(int)val; + (int)calculateAggregatePoints; + (void)resetAchievements; + (int)getCategoryIDToSave:(BOOL)isExpense; + (int)getIndexOfOtherCategory:(BOOL)isExpense; + (BOOL)isFullVersion; + (BOOL)isNetworkAvailable; + (NSArray *)getArrayFromPlist:(NSString *)plistName; @end
mohsinalimat/ExpenseManager
iRun/Classes/Model/IRExpense.h
// // IRExpense.h // ExpenseManager // // Created by <NAME> on 04/09/14. // Copyright (c) 2014 Shibin. All rights reserved. // #import <Foundation/Foundation.h> @class Expense; @interface IRExpense : NSObject @property (nonatomic, strong) NSString *expenseId; @property (nonatomic, strong) NSString * category; @property (nonatomic, assign) double amount; @property (nonatomic, strong) NSDate * date; @property (nonatomic, strong) NSString * note; @property (nonatomic, assign) BOOL isExpense; @property (nonatomic, strong) NSString * image; @property (nonatomic, strong) NSString * currency; @property (nonatomic, assign) BOOL isRecurring; @property (nonatomic, assign) double recurringDuration; - (IRExpense *)readFromEntity:(Expense *)expense; @end