out_of_core.doxy 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * This file is part of the StarPU Handbook.
  3. * Copyright (C) 2013 Corentin Salingue
  4. * See the file version.doxy for copying conditions.
  5. */
  6. /*! \page OutOfCore Out Of Core
  7. \section Introduction Introduction
  8. When you are using Starpu, you can need more memory than main memory (RAM) is able to receive datas. This part describes the method to add a new memory node on a disk and to use it.
  9. \section UseANewDiskMemory Use a new disk memory
  10. To use a disk memory node, you have to register it with this function:
  11. \code{.c}
  12. int new_dd = starpu_disk_register(&starpu_disk_stdio_ops, (void *) "/tmp/", 1024*1024*200);
  13. \endcode
  14. Here, we use the library called stdio to realize the read/write process. This structure must have a path to make the work and at the end, we give it the maximum size the software can use on the disk. <br />
  15. Don't forget to check if the result is correct !<br />
  16. When the register function is called, we benchmark it. You have to know that it can take a few time.
  17. <strong>Warning: the size must be at least 1 MB ! </strong>
  18. To write or read on the node, you can use the \ref API_Standard_Memory_Library or the \ref API_Data_Interfaces .
  19. At the end, you have to unregister your disk memory:
  20. \code{.c}
  21. starpu_disk_unregister(dd);
  22. \endcode
  23. \section DiskFunctions Disk functions
  24. You have various ways to use a disk memory node. You have, for instance, the starpu_disk_stdio_ops.
  25. All structures are in... TODO
  26. \section ExampleDiskCopy Example: disk_copy
  27. \snippet disk_copy.c To be included
  28. */