@@ -748,4 +748,95 @@ __attribute__((deprecated("This API is experimental.")))
748748
749749@end
750750
751+ #pragma mark - Full Category
752+
753+ @interface ExecuTorchTensor (Full)
754+
755+ /* *
756+ * Creates a tensor filled with the specified scalar value, with full specification of shape, strides, data type, and shape dynamism.
757+ *
758+ * @param shape An NSArray of NSNumber objects representing the desired shape.
759+ * @param scalar An NSNumber representing the value to fill the tensor.
760+ * @param strides An NSArray of NSNumber objects representing the desired strides.
761+ * @param dataType An ExecuTorchDataType value specifying the element type.
762+ * @param shapeDynamism An ExecuTorchShapeDynamism value specifying whether the shape is static or dynamic.
763+ * @return A new ExecuTorchTensor instance filled with the scalar value.
764+ */
765+ + (instancetype )fullTensorWithShape : (NSArray <NSNumber *> *)shape
766+ scalar : (NSNumber *)scalar
767+ strides : (NSArray <NSNumber *> *)strides
768+ dataType : (ExecuTorchDataType)dataType
769+ shapeDynamism : (ExecuTorchShapeDynamism)shapeDynamism
770+ NS_SWIFT_NAME(full(shape:scalar:strides:dataType:shapeDynamism:));
771+
772+ /* *
773+ * Creates a tensor filled with the specified scalar value, with the given shape, data type, and shape dynamism.
774+ *
775+ * @param shape An NSArray of NSNumber objects representing the desired shape.
776+ * @param scalar An NSNumber representing the value to fill the tensor.
777+ * @param dataType An ExecuTorchDataType value specifying the element type.
778+ * @param shapeDynamism An ExecuTorchShapeDynamism value specifying whether the shape is static or dynamic.
779+ * @return A new ExecuTorchTensor instance filled with the scalar value.
780+ */
781+ + (instancetype )fullTensorWithShape : (NSArray <NSNumber *> *)shape
782+ scalar : (NSNumber *)scalar
783+ dataType : (ExecuTorchDataType)dataType
784+ shapeDynamism : (ExecuTorchShapeDynamism)shapeDynamism
785+ NS_SWIFT_NAME(full(shape:scalar:dataType:shapeDynamism:));
786+
787+ /* *
788+ * Creates a tensor filled with the specified scalar value, with the given shape and data type,
789+ * using dynamic bound shape for strides and dimension order.
790+ *
791+ * @param shape An NSArray of NSNumber objects representing the desired shape.
792+ * @param scalar An NSNumber representing the value to fill the tensor.
793+ * @param dataType An ExecuTorchDataType value specifying the element type.
794+ * @return A new ExecuTorchTensor instance filled with the scalar value.
795+ */
796+ + (instancetype )fullTensorWithShape : (NSArray <NSNumber *> *)shape
797+ scalar : (NSNumber *)scalar
798+ dataType : (ExecuTorchDataType)dataType
799+ NS_SWIFT_NAME(full(shape:scalar:dataType:));
800+
801+ /* *
802+ * Creates a tensor filled with the specified scalar value, similar to an existing tensor, with the given data type and shape dynamism.
803+ *
804+ * @param tensr An existing ExecuTorchTensor instance whose shape and strides are used.
805+ * @param scalar An NSNumber representing the value to fill the tensor.
806+ * @param dataType An ExecuTorchDataType value specifying the desired element type.
807+ * @param shapeDynamism An ExecuTorchShapeDynamism value specifying whether the shape is static or dynamic.
808+ * @return A new ExecuTorchTensor instance filled with the scalar value.
809+ */
810+ + (instancetype )fullTensorLikeTensor : (ExecuTorchTensor *)tensr
811+ scalar : (NSNumber *)scalar
812+ dataType : (ExecuTorchDataType)dataType
813+ shapeDynamism : (ExecuTorchShapeDynamism)shapeDynamism
814+ NS_SWIFT_NAME(full(like:scalar:dataType:shapeDynamism:));
815+
816+ /* *
817+ * Creates a tensor filled with the specified scalar value, similar to an existing tensor, with the given data type.
818+ *
819+ * @param tensr An existing ExecuTorchTensor instance whose shape and strides are used.
820+ * @param scalar An NSNumber representing the value to fill the tensor.
821+ * @param dataType An ExecuTorchDataType value specifying the desired element type.
822+ * @return A new ExecuTorchTensor instance filled with the scalar value.
823+ */
824+ + (instancetype )fullTensorLikeTensor : (ExecuTorchTensor *)tensr
825+ scalar : (NSNumber *)scalar
826+ dataType : (ExecuTorchDataType)dataType
827+ NS_SWIFT_NAME(full(like:scalar:dataType:));
828+
829+ /* *
830+ * Creates a tensor filled with the specified scalar value, similar to an existing tensor.
831+ *
832+ * @param tensr An existing ExecuTorchTensor instance.
833+ * @param scalar An NSNumber representing the value to fill the tensor.
834+ * @return A new ExecuTorchTensor instance filled with the scalar value.
835+ */
836+ + (instancetype )fullTensorLikeTensor : (ExecuTorchTensor *)tensr
837+ scalar : (NSNumber *)scalar
838+ NS_SWIFT_NAME(full(like:scalar:));
839+
840+ @end
841+
751842NS_ASSUME_NONNULL_END
0 commit comments