Why does order matter in constant buffers?

I have a rather peculiar question remaining after solving most of my own question on StackOverflow. When creating the constant buffers used by my shaders, I’ve learned that the order of variables between the cbuffer and the struct representing it have to be an accurate match. I am still unsure as to why this is such an issue, and that’s why I’m here.

When creating a cbuffer to hold object data, I create the cbuffer and struct like so:

cbuffer ObjectBuffer : register(b0) {     float4x4 World;     float4x4 WorldViewProjection;     float4x4 WorldInverseTranspose; } public struct ObjectBuffer {     public Matrix World;     public Matrix WorldViewProjection;     public Matrix WorldInverseTranspose; } 

This way works just fine, but if I reorder the cbuffer variables, or the struct variables and do not reflect the changes in the other, issues arise.

cbuffer ObjectBuffer : register(b0) {     float4x4 WorldInverseTranspose;     float4x4 WorldViewProjection;     float4x4 World; } public struct ObjectBuffer {     public Matrix World;     public Matrix WorldViewProjection;     public Matrix WorldInverseTranspose; } 

In this case, the types are exactly the same and given the fact that HLSL expects constant buffers to be in 16 byte chunks; why does the ordering matter so much?

Aren’t float4x4 types the same as Matrix types where it’s essentially an array of arrays?

[ 0, 0, 0, 0 ] = 16 bytes [ 0, 0, 0, 0 ] = 16 bytes [ 0, 0, 0, 0 ] = 16 bytes [ 0, 0, 0, 0 ] = 16 bytes [    TOTAL   ] = 64 bytes 

Since a float is 4 bytes on its own, this would mean a float4 is 16 bytes, and thus a float4x4 is 64 bytes. So why does the order matter if the size remained the same?

Best constant for H\”{o}lder inequality in Lorentz spaces

It’s well known (and proved by R. O’neil) that there is a version of H\”{o}lder’s inequality for Lorentz spaces, namely

$ $ \|fg\|_{L^{p, q}} \lesssim_{p_1, p_2, q_1, q_2} \|f\|_{L^{p_1, q_1}}\|g\|_{L^{p_2, q_2}}$ $

for all $ 0 < p, q, p_1, q_1, p_2, q_2 \leq \infty$ such that $ 1/p = 1/p_1 + 1/p_2$ and $ 1/q = 1/q_1 + 1/q_2$ .

My question is whether anything is known about the best dependence on the exponents, and in particular best dependence on $ p_2$ asymptotically for $ p_2$ very large?