Hello
I would like to read a binary file contain short (16 bit) ints into an array. However, I would like that
array to be of type float (32 bit). Presently I am simply reading the file into an int array using fread
and then doing a loop to assign the short ints to another array that is of type float. The problem is that
the arrays can be rather large and I would like to be memory efficient by avoiding allocating memory
for the both an int and a float array. Is there a straighforward way to read this file directly and quickly
into the float array?
Thanks