H5FDdirect.h

00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00002  * Copyright by The HDF Group.                                               *
00003  * Copyright by the Board of Trustees of the University of Illinois.         *
00004  * All rights reserved.                                                      *
00005  *                                                                           *
00006  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
00007  * terms governing use, modification, and redistribution, is contained in    *
00008  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
00009  * of the source code distribution tree; Copyright.html can be found at the  *
00010  * root level of an installed copy of the electronic HDF5 document set and   *
00011  * is linked from the top-level documents page.  It can also be found at     *
00012  * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
00013  * access to either file, you may request a copy from help@hdfgroup.org.     *
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 /*
00017  * Programmer:  Raymond Lu <slu@hdfgroup.uiuc.edu>
00018  *              Wednesday, 20 September 2006
00019  *
00020  * Purpose:     The public header file for the direct driver.
00021  */
00022 #ifndef H5FDdirect_H
00023 #define H5FDdirect_H
00024 
00025 #include "H5Ipublic.h"
00026 
00027 #ifdef H5_HAVE_DIRECT
00028 #       define H5FD_DIRECT      (H5FD_direct_init())
00029 #else
00030 #       define H5FD_DIRECT      (-1)
00031 #endif /* H5_HAVE_DIRECT */
00032 
00033 #ifdef H5_HAVE_DIRECT
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037 
00038 /* Default values for memory boundary, file block size, and maximal copy buffer size.
00039  * Application can set these values through the function H5Pset_fapl_direct. */
00040 #define MBOUNDARY_DEF           4096
00041 #define FBSIZE_DEF              4096
00042 #define CBSIZE_DEF              16*1024*1024
00043 
00044 H5_DLL hid_t H5FD_direct_init(void);
00045 H5_DLL void H5FD_direct_term(void);
00046 H5_DLL herr_t H5Pset_fapl_direct(hid_t fapl_id, size_t alignment, size_t block_size,
00047                         size_t cbuf_size);
00048 H5_DLL herr_t H5Pget_fapl_direct(hid_t fapl_id, size_t *boundary/*out*/,
00049                         size_t *block_size/*out*/, size_t *cbuf_size/*out*/);
00050 
00051 #ifdef __cplusplus
00052 }
00053 #endif
00054 
00055 #endif /* H5_HAVE_DIRECT */
00056 
00057 #endif