  COsmic Ray SImulations for KAscade) is a program for detailed simulation of
extensive air showers initiated by high energy cosmic ray particles in the
atmosphere, and is used today by almost all the major instruments that aim at
measuring primary and secondary cosmic rays on the ground. The Cherenkov
Telescope Array (CTA), currently under construction, is the next-generation
instrument in the field of very-high-energy gamma-ray astronomy. Detailed
CORSIKA Monte Carlo simulations will be regularly performed in parallel to CTA
operations to estimate the instrument response functions, necessary to extract
the physical properties of the cosmic sources from the measurements during data
analysis. The estimated CPU time associated with these simulations is very
high, of the order of 200 million HS06 hours per year. Code optimization
becomes a necessity towards fast productions and limited costs. We propose in
this paper multiple code transformations that aim to facilitate automatic
vectorization done by the compiler, ensuring minimal external libraries
requirement and high hardware portability.
