/* * Copyright 2012-15 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: AMD *
*/
/* 'initial_value' is optional. If initial_value not supplied,
* each "structure" in the vector will contain zeros by default. */ struct vector *dal_vector_presized_create( struct dc_context *ctx,
uint32_t size, void *initial_value,
uint32_t struct_size);
/* dal_vector_insert_at * reallocate container if necessary * then shell items at right and insert * return if the container modified * do not check that index belongs to container * since the function is private and index is going to be calculated
* either with by function or as get_count+1 */ bool dal_vector_insert_at( struct vector *vector, constvoid *what,
uint32_t position);
/* create a clone (copy) of a vector */ struct vector *dal_vector_clone( conststruct vector *vector_other);
/* dal_vector_remove_at_index * Shifts elements on the right from remove position to the left,
* removing an element at position by overwrite means*/ bool dal_vector_remove_at_index( struct vector *vector,
uint32_t index);
/* Note: "type_t" is the ONLY token accepted by "checkpatch.pl" and by * "checkcommit" as *return type*. * For uniformity reasons "type_t" is used for all type-safe macro
* definitions here. */ #define DAL_VECTOR_AT_INDEX(vector_type, type_t) \ static type_t vector_type##_vector_at_index( \ conststruct vector *vector, \
uint32_t index) \
{ \ return dal_vector_at_index(vector, index); \
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.