Difference between Memspace/Filespace

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Difference between Memspace/Filespace

Landon Clipp
Hello everyone,

Can someone please inform me what the difference is between memspace and filespace? I am looking at H5Dread which is defined as:

herr_t H5Dread( hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, void * buf )

For everything I've done so far I've just set the file_space_id to H5S_ALL. The API description discusses a little bit about file and memspace but I don't understand what the difference between them is. Thanks.

Regards,
--
Landon Clipp

National Center for Supercomputing Applications
BS Computer Engineering Student
University of Illinois Urbana-Champaign             

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Difference between Memspace/Filespace

Binh-Minh Ribler

Hi Landon,


Is Section 7.4, Dataspaces and Data Transfer, in the HDF5 User's Guide helpful to you?


Binh-Minh




From: Hdf-forum <[hidden email]> on behalf of Landon Clipp <[hidden email]>
Sent: Wednesday, March 22, 2017 11:38 AM
To: HDF Users Discussion List
Subject: [Hdf-forum] Difference between Memspace/Filespace
 
Hello everyone,

Can someone please inform me what the difference is between memspace and filespace? I am looking at H5Dread which is defined as:

herr_t H5Dread( hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, void * buf )

For everything I've done so far I've just set the file_space_id to H5S_ALL. The API description discusses a little bit about file and memspace but I don't understand what the difference between them is. Thanks.

Regards,
--
Landon Clipp

National Center for Supercomputing Applications
BS Computer Engineering Student
University of Illinois Urbana-Champaign             

_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Difference between Memspace/Filespace

Miller, Mark C.
In reply to this post by Landon Clipp

Think in terms of src and dst args in a move operation...

 

In a *read* operation, file_space represents the source data (size and shape) _selection_ and mem_space the destination data (size and shape).

 

Here is a detailed description...

 

http://davis.lbl.gov/Manuals/HDF5-1.8.7/UG/12_Dataspaces.html

 

 

 

"Hdf-forum on behalf of Landon Clipp" wrote:

 

Hello everyone,

Can someone please inform me what the difference is between memspace and filespace? I am looking at H5Dread which is defined as:

herr_t H5Dread( hid_t dataset_id, hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, hid_t xfer_plist_id, void * buf )

For everything I've done so far I've just set the file_space_id to H5S_ALL. The API description discusses a little bit about file and memspace but I don't understand what the difference between them is. Thanks.

Regards,

--

Landon Clipp

 

National Center for Supercomputing Applications

BS Computer Engineering Student

University of Illinois Urbana-Champaign             


_______________________________________________
Hdf-forum is for HDF software users discussion.
[hidden email]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
Loading...