taskGNU Astronomy Utilities - Tasks: task #14254, Type conversion operators in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #14254: Type conversion operators in Arithmetic

Submitter:  Mohammad Akhlaghi <makhlaghi>
Submitted:  Tue 29 Nov 2016 03:14:34 PM UTC
   
 
Should Start On:  Mon 28 Nov 2016 03:00:00 PM UTC Should be Finished on:  Mon 28 Nov 2016 03:00:00 PM UTC
Category:  Arithmetic Priority:  5 - Normal
Item Group:  Enhancement Status:  Done
Privacy:  Public Assigned to:  makhlaghi
Percent Complete:  100% Open/Closed:  Closed
Effort:  0.00

Thu 08 Dec 2016 07:04:33 PM UTC, comment #1: 

This is done and is pushed to my development fork (like all the ongoing work with this new root data structure). Just as a reference (since its not in the main repository yet), this is the full commit hash: c6462d12540bf9bd2a76ef0ad24a18cf29b25af3.

Mohammad Akhlaghi <makhlaghi>
Group administrator
Tue 29 Nov 2016 03:14:34 PM UTC, original submission:  

In task #14245, we are working on a root data structure to facilitate the manipulation of input, output and generally internal data processing. In particular, a data array pointer is generally stored as a `void *' and there is an element in the structure to keep its type. This will enable a high-level usage of the data structure independent of the actual type of the data. As discussed in task #14245, work is ongoing to implement it in all the utilities/libraries.

Until now, Arithmetic would convert all input numbers and arrays into double precision floating point numbers and do the processing on them. But as the datasets get larger, this process (both the conversion and the processing) can make things slow when the input data aren't `double' (most astronomical images are stored in single precision floating point types).

Thanks to the new data type, it is now possible to actually do the arithmetic on arrays and numbers with their original input types and I am now working on it. When necessary, there is also a new gal_data_copy_to_new_type function that can convert between any of the known numerical types.

Since the original types are preserved in Arithmetic now, in some cases (for example division of two integer arrays), it might be necessary to change the input types to another type before some operation. So with this task, we will add an operator for each type that popd one operand from the stack, and converts it to the type it represents.

Mohammad Akhlaghi <makhlaghi>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-08 makhlaghi Open/ClosedOpen Closed
    2016-12-08 makhlaghi StatusPostponed Done
        Percent Complete20% 100%

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code