| 
    YAKL
    
   | 
 
An object of this class can optionally be passed to yakl::init() to configure the initialization. IMPORTANT: Creating an InitConfig object pings environment variables, making it quite expensive to create. Please do not create a lot of these. More...
#include <YAKL_InitConfig.h>
Public Member Functions | |
| InitConfig () | |
| Creating an InitConfig() controls the memory pool parameters, timer function overrides, and device allocation and deallocation overrides. IMPORTANT: Creating an InitConfig object pings environment variables, making it quite expensive to create. Please do not create a lot of these.  More... | |
| std::function< void *(size_t, char const *)> | get_device_allocator () const | 
| Get the device allocator function. Returns an empty std::function if the user has not set one.  More... | |
| std::function< void(void *, char const *)> | get_device_deallocator () const | 
| Get the device deallocator function. Returns an empty std::function if the user has not set one.  More... | |
| size_t | get_pool_block_bytes () const | 
| Determine how many bytes this config will request the pool to use for block size.  More... | |
| bool | get_pool_enabled () const | 
| Determine whether this config object will enable the device memory pool.  More... | |
| size_t | get_pool_grow_mb () const | 
| Determine how many MB this config will request the pool to use for additional pools.  More... | |
| size_t | get_pool_initial_mb () const | 
| Determine how many MB this config will request the pool to use for the initial device memory pool.  More... | |
| std::function< void()> | get_timer_finalize () const | 
| Get the timer finalize function. Returns an empty std::function if the user has not set one.  More... | |
| std::function< void()> | get_timer_init () const | 
| Get the timer init function. Returns an empty std::function if the user has not set one.  More... | |
| std::function< void(char const *)> | get_timer_start () const | 
| Get the timer start function. Returns an empty std::function if the user has not set one.  More... | |
| std::function< void(char const *)> | get_timer_stop () const | 
| Get the timer stop function. Returns an empty std::function if the user has not set one.  More... | |
| InitConfig | set_device_allocator (std::function< void *(size_t)> func) | 
| Pass the device allocator function you wish to use to override YAKL's default (NO LABEL)  More... | |
| InitConfig | set_device_allocator (std::function< void *(size_t, char const *)> func) | 
| Pass the device allocator function you wish to use to override YAKL's default (LABEL)  More... | |
| InitConfig | set_device_deallocator (std::function< void(void *)> func) | 
| Pass the device deallocator function you wish to use to override YAKL's default (NO LABEL)  More... | |
| InitConfig | set_device_deallocator (std::function< void(void *, char const *)> func) | 
| Pass the device deallocator function you wish to use to override YAKL's default (LABEL)  More... | |
| InitConfig | set_pool_block_bytes (size_t block_bytes) | 
| Tell YAKL how big each additional pool should be in MB.  More... | |
| InitConfig | set_pool_enabled (bool enabled) | 
| Tell YAKL whether to enable the pool or not.  More... | |
| InitConfig | set_pool_grow_mb (size_t grow_mb) | 
| Tell YAKL how big each additional pool should be in MB.  More... | |
| InitConfig | set_pool_initial_mb (size_t initial_mb) | 
| Tell YAKL how big the initial pool should be in MB.  More... | |
| InitConfig | set_timer_finalize (std::function< void()> func) | 
| Pass the timer finalize function you wish to use to override YAKL's default.  More... | |
| InitConfig | set_timer_init (std::function< void()> func) | 
| Pass the timer init function you wish to use to override YAKL's default.  More... | |
| InitConfig | set_timer_start (std::function< void(char const *)> func) | 
| Pass the timer start function you wish to use to override YAKL's default.  More... | |
| InitConfig | set_timer_stop (std::function< void(char const *)> func) | 
| Pass the timer stop function you wish to use to override YAKL's default.  More... | |
An object of this class can optionally be passed to yakl::init() to configure the initialization. IMPORTANT: Creating an InitConfig object pings environment variables, making it quite expensive to create. Please do not create a lot of these.
This allows the user to override timer, allocation, and deallocation routines.
All set_ functions return the InitConfig object they were called on. Therefore, the user can code, e.g., yakl::init(yakl::InitConfig().set_device_allocator(myalloc).set_device_deallocator(myfree)); 
      
  | 
  inline | 
Creating an InitConfig() controls the memory pool parameters, timer function overrides, and device allocation and deallocation overrides. IMPORTANT: Creating an InitConfig object pings environment variables, making it quite expensive to create. Please do not create a lot of these.
      
  | 
  inline | 
Get the device allocator function. Returns an empty std::function if the user has not set one.
      
  | 
  inline | 
Get the device deallocator function. Returns an empty std::function if the user has not set one.
      
  | 
  inline | 
Determine how many bytes this config will request the pool to use for block size.
      
  | 
  inline | 
Determine whether this config object will enable the device memory pool.
      
  | 
  inline | 
Determine how many MB this config will request the pool to use for additional pools.
      
  | 
  inline | 
Determine how many MB this config will request the pool to use for the initial device memory pool.
      
  | 
  inline | 
Get the timer finalize function. Returns an empty std::function if the user has not set one.
      
  | 
  inline | 
Get the timer init function. Returns an empty std::function if the user has not set one.
      
  | 
  inline | 
Get the timer start function. Returns an empty std::function if the user has not set one.
      
  | 
  inline | 
Get the timer stop function. Returns an empty std::function if the user has not set one.
      
  | 
  inline | 
Pass the device allocator function you wish to use to override YAKL's default (NO LABEL)
      
  | 
  inline | 
Pass the device allocator function you wish to use to override YAKL's default (LABEL)
      
  | 
  inline | 
Pass the device deallocator function you wish to use to override YAKL's default (NO LABEL)
      
  | 
  inline | 
Pass the device deallocator function you wish to use to override YAKL's default (LABEL)
      
  | 
  inline | 
Tell YAKL how big each additional pool should be in MB.
      
  | 
  inline | 
Tell YAKL whether to enable the pool or not.
      
  | 
  inline | 
Tell YAKL how big each additional pool should be in MB.
      
  | 
  inline | 
Tell YAKL how big the initial pool should be in MB.
      
  | 
  inline | 
Pass the timer finalize function you wish to use to override YAKL's default.
      
  | 
  inline | 
Pass the timer init function you wish to use to override YAKL's default.
      
  | 
  inline | 
Pass the timer start function you wish to use to override YAKL's default.
      
  | 
  inline | 
Pass the timer stop function you wish to use to override YAKL's default.
 1.8.17