get_target_lut - Gets target lut for "building block" routines
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
This routine implements the creation/over-writing symantics used in the KJB
library. If *target_lp_ptr is NULL, then this routine creates the lut. If
it is not null, and it is the right size, then this routine does nothing. If
it is the wrong size, then it is resized.
If an actual resize is needed, then a new lut of the required size is
first created. If the creation is successful, then the old lut is free'd.
The reason is that if the new allocation fails, a calling application should
have use of the old lut. The alternate is to free the old lut first.
This is more memory efficient. A more sophisticated alternative is to free
the old lut if it can be deterimined that the subsequent allocation will
succeed. Although such approaches have merit, it is expected that
resizing will occur infrequently enought that it is not worth implementing
them. Thus the simplest method with good symantics under most conditions
has been used.
On success, NO_ERROR is returned. On failure, ERROR is returned, with an
error message being set.
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.