The third argument must be something like "size * sizeof(*ptr)", not just "size". This should be done even if ptr has type "char *", otherwise we might change the type and forget to update the call to memset(). This patch has been generated by this semantic patch : @@ identifier func; identifier nelems; identifier p; expression buffer; type t; @@ func(...) { ... p = (t) STARPU_VECTOR_GET_PTR(...) ... nelems = STARPU_VECTOR_GET_NX(...) ... memset(p,..., -nelems +nelems * sizeof(*p) ); ... }
|
|||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
|
|||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
|
|||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
|
|||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|