title: How to transpose an Image buffer in Halide?
body: <p>I want to transpose a Halide::Buffer.Is there a way to do it?  </p>
  
  <p>I have tried transpose() in Halide. But it shows error.</p>
  
  <pre><code>    Halide::Func B;
      Halide::Var x, y, c; 
      B(x, y, c)= 0.0f;
      B(0,0,c)=  1.0f; B(1,0,c)= 0.0f; B(2,0,c)= 0.0f; 
      B(0,1,c)=  1.0f; B(1,1,c)= 2.0f; B(2,1,c)= 0.0f; 
      B(0,2,c)=  1.0f; B(1,2,c)= 2.0f; B(2,2,c)= 3.0f;
  
      Halide::Buffer&lt;float&gt; B_mat = B.realize(6, 6, 1);
  
      Halide::Buffer&lt;float&gt; C_mat = B_mat.transposed(0,1);
  </code></pre>
  
  <p>error: conversion from ‘void’ to non-scalar type ‘Halide::Buffer’ requested
       Halide::Buffer C_mat = B_mat.transpose(0,1);</p>