SetHeteroParam

API definition

APP_ERROR SetHeteroParam(size_t deviceCapacity, size_t deviceBuffer, size_t hostCapacity);

Function

Sets heterogeneous storage policy parameters.

Input

size_t deviceCapacity: database capacity (bytes) on the device when the heterogeneous memory policy is used.

size_t deviceBuffer: cache capacity (bytes) on the device when the heterogeneous memory policy is used.

size_t hostCapacity: database capacity (bytes) on the host when the heterogeneous memory policy is used.

Output

N/A

Return value

APP_ERROR: return status. For details, see Return Code Reference.

Restrictions

  • This API can be used only after the memory policy is set to MemoryStrategy::HETERO_MEMORY (heterogeneous memory policy) by calling Init.
  • The minimum value of deviceCapacity is 1 GB, and the maximum value is the actual remaining memory size of the device.
  • The minimum value of deviceBuffer is 2 × 262144 × dim and the maximum value is 8G. Set this parameter based on the actual remaining memory size on the device.
  • The value of deviceCapacity + deviceBuffer must be smaller than the actual remaining memory size of the device.
  • Value range of hostCapacity: [1 GB, 512 GB]. Set this parameter based on the actual memory size that can be allocated on the host.