MCPcopy Create free account
hub / github.com/ml-explore/mlx-data / apply_key

Method apply_key

mlx/data/op/ImageTransform.cpp:22–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 const std::string& okey)
21 : KeyTransformOp(ikey, okey) {}
22std::shared_ptr<Array> ImageTransformOp::apply_key(
23 const std::shared_ptr<const Array>& src) const {
24 if (src->shape().size() == 4) {
25 core::video::verify_video(src);
26 return apply_video(src);
27 } else {
28 core::image::verify_image(src);
29 return apply_image(src);
30 }
31}
32
33std::shared_ptr<Array> ImageTransformOp::apply_video(
34 const std::shared_ptr<const Array>& video) const {

Callers

nothing calls this directly

Calls 4

verify_videoFunction · 0.85
verify_imageFunction · 0.85
sizeMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected