Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1/*!2 Copyright 2013 Lovell Fuller and others.3 SPDX-License-Identifier: Apache-2.04*/5 6#ifndef SRC_PIPELINE_H_7#define SRC_PIPELINE_H_8 9#include <memory>10#include <string>11#include <unordered_map>12#include <vector>13 14#include <napi.h>15#include <vips/vips8>16 17#include "./common.h"18 19Napi::Value pipeline(const Napi::CallbackInfo& info);20 21struct Composite {22 sharp::InputDescriptor *input;23 VipsBlendMode mode;24 int gravity;25 int left;26 int top;27 bool hasOffset;28 bool tile;29 bool premultiplied;30 31 Composite():32 input(nullptr),33 mode(VIPS_BLEND_MODE_OVER),34 gravity(0),35 left(0),36 top(0),37 hasOffset(false),38 tile(false),39 premultiplied(false) {}40};41 42struct PipelineBaton {43 sharp::InputDescriptor *input;44 std::vector<sharp::InputDescriptor *> join;45 std::string formatOut;46 std::string fileOut;47 void *bufferOut;48 size_t bufferOutLength;49 int pageHeightOut;50 int pagesOut;51 bool typedArrayOut;52 bool hasAlphaOut;53 std::vector<Composite *> composite;54 std::vector<sharp::InputDescriptor *> joinChannelIn;55 int topOffsetPre;56 int leftOffsetPre;57 int widthPre;58 int heightPre;59 int topOffsetPost;60 int leftOffsetPost;61 int widthPost;62 int heightPost;63 int width;64 int height;65 int channels;66 VipsKernel kernel;67 sharp::Canvas canvas;68 int position;69 std::vector<double> resizeBackground;70 bool hasCropOffset;71 int cropOffsetLeft;72 int cropOffsetTop;73 bool hasAttentionCenter;74 int attentionX;75 int attentionY;76 bool premultiplied;77 bool tileCentre;78 bool fastShrinkOnLoad;79 std::vector<double> tint;80 bool flatten;81 std::vector<double> flattenBackground;82 bool unflatten;83 bool negate;84 bool negateAlpha;85 double blurSigma;86 VipsPrecision precision;87 double minAmpl;88 double brightness;89 double saturation;90 int hue;91 double lightness;92 int medianSize;93 double sharpenSigma;94 double sharpenM1;95 double sharpenM2;96 double sharpenX1;97 double sharpenY2;98 double sharpenY3;99 int threshold;100 bool thresholdGrayscale;101 std::vector<double> trimBackground;102 double trimThreshold;103 bool trimLineArt;104 int trimOffsetLeft;105 int trimOffsetTop;106 int trimMargin;107 std::vector<double> linearA;108 std::vector<double> linearB;109 int dilateWidth;110 int erodeWidth;111 double gamma;112 double gammaOut;113 bool greyscale;114 bool normalise;115 int normaliseLower;116 int normaliseUpper;117 int claheWidth;118 int claheHeight;119 int claheMaxSlope;120 int angle;121 double rotationAngle;122 std::vector<double> rotationBackground;123 bool rotateBefore;124 bool orientBefore;125 bool flip;126 bool flop;127 int extendTop;128 int extendBottom;129 int extendLeft;130 int extendRight;131 std::vector<double> extendBackground;132 VipsExtend extendWith;133 bool withoutEnlargement;134 bool withoutReduction;135 std::vector<double> affineMatrix;136 std::vector<double> affineBackground;137 double affineIdx;138 double affineIdy;139 double affineOdx;140 double affineOdy;141 std::string affineInterpolator;142 int jpegQuality;143 bool jpegProgressive;144 std::string jpegChromaSubsampling;145 bool jpegTrellisQuantisation;146 int jpegQuantisationTable;147 bool jpegOvershootDeringing;148 bool jpegOptimiseScans;149 bool jpegOptimiseCoding;150 bool pngProgressive;151 int pngCompressionLevel;152 bool pngAdaptiveFiltering;153 bool pngPalette;154 int pngQuality;155 int pngEffort;156 int pngBitdepth;157 double pngDither;158 int jp2Quality;159 bool jp2Lossless;160 int jp2TileHeight;161 int jp2TileWidth;162 std::string jp2ChromaSubsampling;163 int webpQuality;164 int webpAlphaQuality;165 bool webpNearLossless;166 bool webpLossless;167 bool webpSmartSubsample;168 bool webpSmartDeblock;169 VipsForeignWebpPreset webpPreset;170 int webpEffort;171 bool webpMinSize;172 bool webpMixed;173 bool webpExact;174 int gifBitdepth;175 int gifEffort;176 double gifDither;177 double gifInterFrameMaxError;178 double gifInterPaletteMaxError;179 bool gifKeepDuplicateFrames;180 bool gifReuse;181 bool gifProgressive;182 int tiffQuality;183 VipsForeignTiffCompression tiffCompression;184 bool tiffBigtiff;185 VipsForeignTiffPredictor tiffPredictor;186 bool tiffPyramid;187 int tiffBitdepth;188 bool tiffMiniswhite;189 bool tiffTile;190 int tiffTileHeight;191 int tiffTileWidth;192 double tiffXres;193 double tiffYres;194 VipsForeignTiffResunit tiffResolutionUnit;195 int heifQuality;196 VipsForeignHeifCompression heifCompression;197 int heifEffort;198 std::string heifChromaSubsampling;199 bool heifLossless;200 int heifBitdepth;201 std::string heifTune;202 double jxlDistance;203 int jxlDecodingTier;204 int jxlEffort;205 bool jxlLossless;206 VipsBandFormat rawDepth;207 std::string err;208 bool errUseWarning;209 int keepMetadata;210 int withMetadataOrientation;211 double withMetadataDensity;212 std::string withIccProfile;213 std::unordered_map<std::string, std::string> withExif;214 bool withExifMerge;215 std::string withXmp;216 bool withGainMap;217 bool keepGainMap;218 int timeoutSeconds;219 std::vector<double> convKernel;220 int convKernelWidth;221 int convKernelHeight;222 double convKernelScale;223 double convKernelOffset;224 sharp::InputDescriptor *boolean;225 VipsOperationBoolean booleanOp;226 VipsOperationBoolean bandBoolOp;227 int extractChannel;228 bool removeAlpha;229 double ensureAlpha;230 VipsInterpretation colourspacePipeline;231 VipsInterpretation colourspace;232 std::vector<int> delay;233 int loop;234 int tileSize;235 int tileOverlap;236 VipsForeignDzContainer tileContainer;237 VipsForeignDzLayout tileLayout;238 std::string tileFormat;239 int tileAngle;240 std::vector<double> tileBackground;241 int tileSkipBlanks;242 VipsForeignDzDepth tileDepth;243 std::string tileId;244 std::string tileBasename;245 std::vector<double> recombMatrix;246 247 PipelineBaton():248 input(nullptr),249 bufferOutLength(0),250 pageHeightOut(0),251 pagesOut(0),252 typedArrayOut(false),253 hasAlphaOut(false),254 topOffsetPre(-1),255 topOffsetPost(-1),256 channels(0),257 kernel(VIPS_KERNEL_LANCZOS3),258 canvas(sharp::Canvas::CROP),259 position(0),260 resizeBackground{ 0.0, 0.0, 0.0, 255.0 },261 hasCropOffset(false),262 cropOffsetLeft(0),263 cropOffsetTop(0),264 hasAttentionCenter(false),265 attentionX(0),266 attentionY(0),267 premultiplied(false),268 tint{ -1.0, 0.0, 0.0, 0.0 },269 flatten(false),270 flattenBackground{ 0.0, 0.0, 0.0 },271 unflatten(false),272 negate(false),273 negateAlpha(true),274 blurSigma(0.0),275 brightness(1.0),276 saturation(1.0),277 hue(0),278 lightness(0),279 medianSize(0),280 sharpenSigma(0.0),281 sharpenM1(1.0),282 sharpenM2(2.0),283 sharpenX1(2.0),284 sharpenY2(10.0),285 sharpenY3(20.0),286 threshold(0),287 thresholdGrayscale(true),288 trimBackground{},289 trimThreshold(-1.0),290 trimLineArt(false),291 trimOffsetLeft(0),292 trimOffsetTop(0),293 trimMargin(0),294 linearA{},295 linearB{},296 dilateWidth(0),297 erodeWidth(0),298 gamma(0.0),299 greyscale(false),300 normalise(false),301 normaliseLower(1),302 normaliseUpper(99),303 claheWidth(0),304 claheHeight(0),305 claheMaxSlope(3),306 angle(0),307 rotationAngle(0.0),308 rotationBackground{ 0.0, 0.0, 0.0, 255.0 },309 flip(false),310 flop(false),311 extendTop(0),312 extendBottom(0),313 extendLeft(0),314 extendRight(0),315 extendBackground{ 0.0, 0.0, 0.0, 255.0 },316 extendWith(VIPS_EXTEND_BACKGROUND),317 withoutEnlargement(false),318 withoutReduction(false),319 affineMatrix{ 1.0, 0.0, 0.0, 1.0 },320 affineBackground{ 0.0, 0.0, 0.0, 255.0 },321 affineIdx(0),322 affineIdy(0),323 affineOdx(0),324 affineOdy(0),325 affineInterpolator("bicubic"),326 jpegQuality(80),327 jpegProgressive(false),328 jpegChromaSubsampling("4:2:0"),329 jpegTrellisQuantisation(false),330 jpegQuantisationTable(0),331 jpegOvershootDeringing(false),332 jpegOptimiseScans(false),333 jpegOptimiseCoding(true),334 pngProgressive(false),335 pngCompressionLevel(6),336 pngAdaptiveFiltering(false),337 pngPalette(false),338 pngQuality(100),339 pngEffort(7),340 pngBitdepth(8),341 pngDither(1.0),342 jp2Quality(80),343 jp2Lossless(false),344 jp2TileHeight(512),345 jp2TileWidth(512),346 jp2ChromaSubsampling("4:4:4"),347 webpQuality(80),348 webpAlphaQuality(100),349 webpNearLossless(false),350 webpLossless(false),351 webpSmartSubsample(false),352 webpSmartDeblock(false),353 webpPreset(VIPS_FOREIGN_WEBP_PRESET_DEFAULT),354 webpEffort(4),355 webpMinSize(false),356 webpMixed(false),357 webpExact(false),358 gifBitdepth(8),359 gifEffort(7),360 gifDither(1.0),361 gifInterFrameMaxError(0.0),362 gifInterPaletteMaxError(3.0),363 gifKeepDuplicateFrames(false),364 gifReuse(true),365 gifProgressive(false),366 tiffQuality(80),367 tiffCompression(VIPS_FOREIGN_TIFF_COMPRESSION_JPEG),368 tiffBigtiff(false),369 tiffPredictor(VIPS_FOREIGN_TIFF_PREDICTOR_HORIZONTAL),370 tiffPyramid(false),371 tiffBitdepth(0),372 tiffMiniswhite(false),373 tiffTile(false),374 tiffTileHeight(256),375 tiffTileWidth(256),376 tiffXres(1.0),377 tiffYres(1.0),378 tiffResolutionUnit(VIPS_FOREIGN_TIFF_RESUNIT_INCH),379 heifQuality(50),380 heifCompression(VIPS_FOREIGN_HEIF_COMPRESSION_AV1),381 heifEffort(4),382 heifChromaSubsampling("4:4:4"),383 heifLossless(false),384 heifBitdepth(8),385 heifTune("auto"),386 jxlDistance(1.0),387 jxlDecodingTier(0),388 jxlEffort(7),389 jxlLossless(false),390 rawDepth(VIPS_FORMAT_UCHAR),391 errUseWarning(false),392 keepMetadata(0),393 withMetadataOrientation(-1),394 withMetadataDensity(0.0),395 withExifMerge(true),396 withGainMap(false),397 keepGainMap(false),398 timeoutSeconds(0),399 convKernelWidth(0),400 convKernelHeight(0),401 convKernelScale(0.0),402 convKernelOffset(0.0),403 boolean(nullptr),404 booleanOp(VIPS_OPERATION_BOOLEAN_LAST),405 bandBoolOp(VIPS_OPERATION_BOOLEAN_LAST),406 extractChannel(-1),407 removeAlpha(false),408 ensureAlpha(-1.0),409 colourspacePipeline(VIPS_INTERPRETATION_LAST),410 colourspace(VIPS_INTERPRETATION_LAST),411 loop(-1),412 tileSize(256),413 tileOverlap(0),414 tileContainer(VIPS_FOREIGN_DZ_CONTAINER_FS),415 tileLayout(VIPS_FOREIGN_DZ_LAYOUT_DZ),416 tileAngle(0),417 tileBackground{ 255.0, 255.0, 255.0, 255.0 },418 tileSkipBlanks(-1),419 tileDepth(VIPS_FOREIGN_DZ_DEPTH_LAST) {}420};421 422#endif // SRC_PIPELINE_H_423 