public static AllocationShape buildAllocationShape ( DataBuffer buffer ) { AllocationShape shape = new AllocationShape ( ) ; shape . setStride ( 1 ) ; shape . setOffset ( buffer . originalOffset ( ) ) ; shape . setDataType ( buffer . dataType ( ) ) ; shape . setLength ( buffer . length ( ) ) ; return shape ; }
This method returns AllocationShape for the whole DataBuffer .