The GDP deflator measures the average price of all of the Gross National Product. That is, the weights for the GDP deflator reflect the share of each good in the Gross Domestic Product. There could also be other price indices. That depends on your purposes. However, if you need to estimate the purchasing power of the dollar for all sorts of goods and services, including investment goods, the consumer price index doesn't do that, and the Gross Domestic Product Deflator is probably your best choice.
Inflation is measured as a percentage change in the price index.