Commit cdfbda34 authored by Swann Perarnau's avatar Swann Perarnau
Browse files

[fix] missing doc/name fixes

Missing commit from merge request !145.
parent 24fc700e
Pipeline #11045 passed with stages
in 3 minutes and 27 seconds
......@@ -458,14 +458,14 @@ struct aml_layout_ops {
* If the layout relies on sublayouts (e.g. pad, reshape), those will be
* copied too.
* @param[in] layout a non-NULL handle to a layout to copy.
* @param[out] dest a pointer to where to store the new layout.
* @param[out] out a pointer to where to store the new layout.
* @return -AML_ENOTSUP if operation is not available.
* @return -AML_ENOMEM if layout allocation failed.
* @return -AML_EINVAL if src or dest are NULL.
* @return AML_SUCCESS if copy succeeded.
**/
int (*duplicate)(const struct aml_layout *layout,
struct aml_layout **dest);
struct aml_layout **out);
/**
* Destroys the layout and frees all associated memory.
......@@ -641,13 +641,12 @@ int aml_layout_fprintf(FILE *stream, const char *prefix,
* Creates a duplicate of the layout (independent deep copy of all its metadata,
* no user data is actually copied).
* @param[in] src the layout to duplicate
* @param[out] dest a pointer to where to store the new layout
* @param[out] out a pointer to where to store the new layout
* @return -AML_ENOMEM if layout allocation failed.
* @return -AML_EINVAL if src or dest are NULL.
* @return AML_SUCCESS if copy succeeded.
**/
int aml_layout_duplicate(const struct aml_layout *src,
struct aml_layout **dest);
int aml_layout_duplicate(const struct aml_layout *src, struct aml_layout **out);
/**
* Destroy (free) a layout, irrespective of its type.
......
......@@ -129,7 +129,7 @@ int aml_layout_dense_create(struct aml_layout **layout,
}
int aml_layout_dense_duplicate(const struct aml_layout *layout,
struct aml_layout **dest)
struct aml_layout **out)
{
const struct aml_layout_dense *data;
struct aml_layout_dense *dret;
......@@ -138,7 +138,7 @@ int aml_layout_dense_duplicate(const struct aml_layout *layout,
data = (const struct aml_layout_dense *)layout->data;
if (layout->data == NULL || dest == NULL)
if (layout->data == NULL || out == NULL)
return -AML_EINVAL;
err = aml_layout_dense_alloc(&ret, data->ndims);
......@@ -153,7 +153,7 @@ int aml_layout_dense_duplicate(const struct aml_layout *layout,
* single allocation (everything after the _data struct).
*/
memcpy(dret->dims, data->dims, 3 * data->ndims * sizeof(size_t));
*dest = ret;
*out = ret;
return AML_SUCCESS;
}
......
......@@ -107,7 +107,7 @@ int aml_layout_pad_create(struct aml_layout **layout, const int order,
}
int aml_layout_pad_duplicate(const struct aml_layout *layout,
struct aml_layout **dest)
struct aml_layout **out)
{
const struct aml_layout_pad *data;
struct aml_layout_pad *dret;
......@@ -117,7 +117,7 @@ int aml_layout_pad_duplicate(const struct aml_layout *layout,
data = (const struct aml_layout_pad *)layout->data;
if (layout->data == NULL || dest == NULL)
if (layout->data == NULL || out == NULL)
return -AML_EINVAL;
err = aml_layout_pad_alloc(&ret, data->ndims, data->element_size);
......@@ -133,7 +133,7 @@ int aml_layout_pad_duplicate(const struct aml_layout *layout,
**/
sz = ((char *)dret->neutral - (char *)dret->dims) + data->element_size;
memcpy(dret->dims, data->dims, sz);
*dest = ret;
*out = ret;
return AML_SUCCESS;
}
......
......@@ -126,7 +126,7 @@ int aml_layout_reshape_create(struct aml_layout **layout,
}
int aml_layout_reshape_duplicate(const struct aml_layout *layout,
struct aml_layout **dest)
struct aml_layout **out)
{
const struct aml_layout_data_reshape *data;
struct aml_layout_data_reshape *dret;
......@@ -135,7 +135,7 @@ int aml_layout_reshape_duplicate(const struct aml_layout *layout,
data = (const struct aml_layout_data_reshape *)layout->data;
if (layout->data == NULL || dest == NULL)
if (layout->data == NULL || out == NULL)
return -AML_EINVAL;
err = aml_layout_reshape_alloc(&ret, data->ndims, data->target_ndims);
......@@ -148,7 +148,7 @@ int aml_layout_reshape_duplicate(const struct aml_layout *layout,
/* small optimization, copying all data at the end of the structure */
memcpy(dret->dims, data->dims,
(2 * data->ndims + data->target_ndims) * sizeof(size_t));
*dest = ret;
*out = ret;
return AML_SUCCESS;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment