Hi -

On 3/3/16, 5:34 PM, "ct clmsn" <[email protected]> wrote:

>Chapel users!
>
>Is there a mechanism to determine the "sizeof" a data type's instance
>before it's passed to itemWriter?

If you mean - how many bytes will it write - you could write one and count
the
bytes. But not all types are fixed length when written (e.g. strings are
not;
ints are not unless you're doing binary I/O).

>I'd like to embed the size information into the data type's instance
>before it is passed to itemWriter.

I'm a little bit confused about why you would want to do that.
Doesn't a data type already know how many bytes it will occupy when
written?
E.g. a string will write string.length bytes (depending on the iostyle)?

Are you talking about a user data type (like a record you wrote, say)
or an internal type (such as an int or a string)?

Cheers,

-michael

>I understand that in some cases, the data type's instance is serialized
>to a string during itemWriter's the 'write' operation.
>
>
>This would mean a call to extern proc sizeof(type t) : int won't
>necessarily return the correct information.
>
>
>Thanks in advance for the help!
>
>
>ct.clmsn
>


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Chapel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-users

Reply via email to