Skip to content

Commit

Permalink
Add a field to GPUBuffer C struct so FFIGen can handle it
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 575020084
  • Loading branch information
schmidt-sebastian authored and copybara-github committed Oct 19, 2023
1 parent 1601073 commit 305d7ab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mediapipe/tasks/c/vision/image_classifier/image_classifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,17 @@ struct ImageFrame {
};

// TODO: Add GPU buffer declaration and proccessing logic for it.
struct GpuBuffer {};
struct GpuBuffer {
int width;
int height;
};

// The object to contain an image, realizes `OneOf` concept.
struct MpImage {
enum { IMAGE_FRAME, GPU_BUFFER } type;
union {
ImageFrame image_frame;
GpuBuffer gpu_buffer;
struct ImageFrame image_frame;
struct GpuBuffer gpu_buffer;
};
};

Expand Down

0 comments on commit 305d7ab

Please sign in to comment.