Skip to content

Commit c3f3030

Browse files
committed
fix documentation on buffer get/set value
Signed-off-by: Tony Xiang <19280867+TonyXiang8787@users.noreply.github.com>
1 parent 6b5b2d1 commit c3f3030

File tree

1 file changed

+3
-1
lines changed
  • power_grid_model_c/power_grid_model_c/include/power_grid_model_c

1 file changed

+3
-1
lines changed

power_grid_model_c/power_grid_model_c/include/power_grid_model_c/buffer.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ PGM_API void PGM_buffer_set_nan(PGM_Handle* handle, PGM_MetaComponent const* com
7676
* You can set it to -1, the default stride of the size of the attribute type (like sizeof(double)).
7777
* If you set it to a positive number, the i-th set-value will retrieve the source data at
7878
* (void const*)((char const*)src_ptr + i * src_stride)
79+
* where i ranges from buffer_offset to buffer_offset + size - 1.
7980
*/
8081
PGM_API void PGM_buffer_set_value(PGM_Handle* handle, PGM_MetaAttribute const* attribute, void* buffer_ptr,
8182
void const* src_ptr, PGM_Idx buffer_offset, PGM_Idx size, PGM_Idx src_stride);
@@ -95,8 +96,9 @@ PGM_API void PGM_buffer_set_value(PGM_Handle* handle, PGM_MetaAttribute const* a
9596
* @param size The size of the buffer in terms of number of elements.
9697
* @param dest_stride The stride of the destination array in bytes.
9798
* You can set it to -1, the default stride of the size of the attribute type (like sizeof(double)).
98-
* If you set it to a positive number, the i-th get-value will retrieve the source data at
99+
* If you set it to a positive number, the i-th get-value will write to the destination data at
99100
* (void*)((char*)dest_ptr + i * dest_stride)
101+
* where i ranges from buffer_offset to buffer_offset + size - 1.
100102
*/
101103
PGM_API void PGM_buffer_get_value(PGM_Handle* handle, PGM_MetaAttribute const* attribute, void const* buffer_ptr,
102104
void* dest_ptr, PGM_Idx buffer_offset, PGM_Idx size, PGM_Idx dest_stride);

0 commit comments

Comments
 (0)