h&Wl      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Safe-Inferred "(1? Hhalide-haskellCan be used to silence individual "redundant constraint" warnings foo :: ConstraintUsefulForDebugging => ... foo = .. where _ = keepRedundantConstraint (Proxy @ConstraintUsefulForDebugging))Note: this function is taken from  https://github.com/input-output-hk/ouroboros-network/blob/master/ouroboros-consensus/src/Ouroboros/Consensus/Util/RedundantConstraints.hs!input-output-hk/ouroboros-network.Low-level types(c) Tom Westerhout, 2023 Safe-Inferred "()1?halide-haskell4A helper typeclass to convert a function that takes  as input into a normal curried function. This is the inverse of .$For instance, if we have a function &f :: Arguments '[Int, Float] -> Double , then it will be converted to f' :: Int -> Float -> Double.halide-haskellA helper typeclass to convert a normal curried function to a function that takes  as input.$For instance, if we have a function f :: Int -> Float -> Double , then it will be converted to 'f' :: Arguments '[Int, Float] -> Double.halide-haskell(Apply constraint to all types in a list.halide-haskell"Get the return type of a function. halide-haskell3Return the list of arguments to of a function type.halide-haskellAppend to a type-level list. halide-haskell;A type family that returns the length of a type-level list.halide-haskellA heterogeneous list.halide-haskell5Specifies that a given Haskell type can be used with  std::vector.E.g. if we have HasCxxVector Int16 , then using  std::vector int16_t* in inline-c quotes will work. halide-haskell-Specifies that a type is supported by Halide.halide-haskellHaskell counterpart of  halide_type_t.halide-haskellHaskell counterpart of halide_type_code_t.halide-haskellHaskell counterpart of  std::stringhalide-haskellHaskell counterpart of Halide::Internal::StageSchedule.halide-haskellHaskell counterpart of  std::vector. halide-haskellHaskell counterpart of Halide::Target.halide-haskellHaskell counterpart of Halide::Callable.halide-haskellHaskell counterpart of Halide::JITUserContext. halide-haskellHaskell counterpart of  Halide::Func.halide-haskellHaskell counterpart of Halide::ImageParam.halide-haskellHaskell counterpart of Halide::Internal::Parameter.halide-haskellHaskell counterpart of Halide::VarOrRVar.halide-haskellHaskell counterpart of  Halide::RVar.halide-haskellHaskell counterpart of  Halide::Var.halide-haskellHaskell counterpart of  Halide::Expr.halide-haskellHelper function to coerce  to  and  to  before passing them to inline-c quasiquotes. This is needed because inline-c assumes that float in C corresponds to  in Haskell.halide-haskell2Template Haskell splice that defines instances of   for a given Haskell type.halide-haskellDerive  # instances for all supported types.halide-haskell4Template Haskell splice that defines an instance of  for a given C type name.halide-haskellList of all supported types.halide-haskellAppend a value to 6     5$Helpers to setup inline-c for Halide(c) Tom Westerhout, 2023 Safe-Inferred "(1?halide-haskellOne stop function to include all the neccessary machinery to call Halide functions via inline-c.Put  importHalide somewhere at the beginning of the file and enjoy using the C++ interface of Halide via inline-c quasiquotes.Utilities for writing FFI code(c) Tom Westerhout, 2023 Safe-Inferred "(1?halide-haskellConvert a pointer to  std::string into a string.'It properly handles unicode characters.halide-haskellCall  and delete the pointer.&Compilation targets and their features(c) Tom Westerhout, 2023 Safe-Inferred "(1?! halide-haskell#Note: generated automatically using cat $HALIDE_PATH/include/Halide.h | \ grep -E '.* = halide_target_feature_.*' | \ sed -E 's/^\s*(.*) = .*$/ | \1/g' | \ grep -v FeatureEnd_halide-haskell*An enum describing the type of device API.#This is the Haskell counterpart of  https://halide-lang.org/docs/namespace_halide.html#aa26c7f430d2b1c44ba3e1d3f6df2ba6eHalide::DeviceAPI.jhalide-haskellThe compilation target.#This is the Haskell counterpart of  :https://halide-lang.org/docs/struct_halide_1_1_target.htmlHalide::Target.lhalide-haskell2Return the target that Halide will use by default.If the  HL_TARGET environment variable is set, it uses that. Otherwise, it returns the target corresponding to the host machine.mhalide-haskellGet the default GPU target. We first check for CUDA and then for OpenCL. If neither of the two is usable,  is returned.nhalide-haskell!Attempt to sniff whether a given j (and its implied _!) is usable on the current host.Note that a return value of True does not guarantee that future usage of that device will succeed; it is intended mainly as a simple diagnostic to allow early-exit when a desired device is definitely not usable.Also note that this call is NOT threadsafe, as it temporarily redirects various global error-handling hooks in Halide.ohalide-haskellAdd a feature to target.phalide-haskell0Return whether a GPU compute runtime is enabled.Checks whether  and similar are going to work.For more info, see  https://halide-lang.org/docs/struct_halide_1_1_target.html#a22bf80aa6dc3a700c9732050d2341a80Target::has_gpu_feature.halide-haskellConvert j into Halide::Target* and use it in an  action.qhalide-haskell=A test that tries to compile and run a Halide pipeline using #.This is implemented fully in C++ to make sure that we test the installation rather than our Haskell code.1On non-NixOS systems one should do the following: nixGLNvidia cabal repl --ghc-options='-fobject-code -O0' ghci> testCUDArhalide-haskell Similar to q but for -.nhalide-haskell'Whether the target appears to be usableohalide-haskellFeature to addhalide-haskellInitial targethalide-haskell New target-# !"$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr Buffers(c) Tom Westerhout, 2021-2023 Safe-Inferred"(1?4shalide-haskellAn n(-dimensional buffer of elements of type a.Most pipelines use  (s n a)& for input and output array arguments.vhalide-haskell*The low-level untyped Haskell analogue of  9https://halide-lang.org/docs/structhalide__buffer__t.htmlhalide_buffer_t.It's quite difficult to use v correctly, and misusage can result in crashes and segmentation faults. Hence, prefer the higher-level s wrapper for all your codehalide-haskellHaskell analogue of  https://halide-lang.org/docs/structhalide__device__interface__t.htmlhalide_device_interface_t.halide-haskell*Information about a dimension in a buffer.It is the Haskell analogue of  Ptr a -> IO [ListPeekElem a]halide-haskellSpecifies that a type t can be used as an n1-dimensional Halide buffer with elements of type a.halide-haskell Construct a s from a pointer to the data, a list of extents, and a list of strides, and use it in an  action.This function throws a runtime error if the number of dimensions does not match n.halide-haskell Similar to ,, but assumes column-major ordering of data.halide-haskell Treat a type t as a s and use it in an  action.)This function is a simple wrapper around , except that the order of type parameters is reversed. If you have TypeApplications. extension enabled, this allows you to write withHalideBuffer 3 Float yourBuffer4 to specify that you want a 3-dimensional buffer of Float.halide-haskell Temporary allocate a CPU buffer.This is useful for testing and debugging when you need to allocate an output buffer for your pipeline. E.g.  [3, 3] $ out -> do myKernel out -- fill the buffer print =<<  out -- print it for debugging halide-haskellDo we have changes on the device the have not been copied to the host?halide-haskellSet the  device_dirty flag to the given value.halide-haskellDo we have changes on the device the have not been copied to the host?halide-haskellSet the  host_dirty flag to the given value.halide-haskell/Copy the underlying memory from device to host.halide-haskell&Perform an action on a cropped buffer.halide-haskellwithCopiedToHost buf action performs the action action ensuring that buf- has been copied to the host beforehand. If buf1 is already on the host, no copying is performed.halide-haskell&Lists can also act as Halide buffers. Use for testing only.halide-haskell&Lists can also act as Halide buffers. Use for testing only.halide-haskell&Lists can also act as Halide buffers. Use for testing only.halide-haskell&Lists can also act as Halide buffers. Use for testing only.halide-haskellStorable vectors are one-dimensional buffers. This involves no copying.halide-haskellStorable vectors are one-dimensional buffers. This involves no copying.halide-haskellExtentshalide-haskellExtentshalide-haskellCPU pointer to the datahalide-haskell Extents (in number of elements, not in bytes)halide-haskell Strides (in number of elements, not in bytes)halide-haskell Action to runhalide-haskellCPU pointer to the datahalide-haskell Extents (in number of elements, not in bytes)halide-haskellbufferhalide-haskell dimensionhalide-haskellminhalide-haskellextenthalide-haskell what to do&stuvwxyz{|}~ Scalar expressions(c) Tom Westerhout, 2023 Safe-Inferred "(1?P6halide-haskellHaskell counterpart of  Halide::RDom.halide-haskellHaskell counterpart of  Halide::Range.halide-haskellA single-dimensional span.halide-haskellA scalar expression in Halide.To have a nice experience writing arithmetic expressions in terms of Exprs, we want to derive ,  etc. instances for Expr+. Unfortunately, that means that we encode , , , and " by the same type, and passing an Expr to a function that expects a Var will produce a runtime error.halide-haskellScalar expression.halide-haskellIndex variable.halide-haskellReduction variable.halide-haskellScalar parameter.The  is initialized with % and filled in on the first call to .halide-haskellAn n-dimensional reduction domain.halide-haskell4A multi-dimensional box -- cartesian product of the s.halide-haskellEither  or .halide-haskellAn .halide-haskellA .halide-haskellGenerates a tuple of n elements of type t.halide-haskell6Specifies that there is an isomorphism between a type a and a tuple t.%We use this class to convert between  and normal tuples.halide-haskell2Type family that maps tuples to the corresponding  ts+ type. This is essentially the inverse of .halide-haskellType family that maps  ts! to the corresponding tuple type.halide-haskell0Create a scalar expression from a Haskell value.halide-haskellCreate a named index variable.halide-haskellCreate a reduction domain. Use  to cast it into an index.4For more information about reduction variables, see  8https://halide-lang.org/docs/class_halide_1_1_r_dom.html Halide::RDom.halide-haskellCast a reduction domain into a multi-dimensional index that can be used to perform multi-dimensional reductions.halide-haskell"Create a named reduction variable.4For more information about reduction variables, see  8https://halide-lang.org/docs/class_halide_1_1_r_dom.html Halide::RDom.halide-haskell(Return an undef value of the given type.For more information, see  https://halide-lang.org/docs/namespace_halide.html#a9389bcacbed602df70eae94826312e03 Halide::undef.halide-haskell-Cast a scalar expression to a different type..Use TypeApplications with this function, e.g.  cast @Float x.halide-haskellPrint all expressions to stdout when the result is evaluates. The first expression is returned..This is useful for debugging Halide pipelines.This function is similar to   in that it accepts a variable number of arguments, i.e the following is valid: let x :: Expr Float x = 1 in printed (sin x) ("<- sin(" :: Text) x (")" :: Text) :: Text0 specifications are only needed if you have the OverloadedStrings extension enabled. Arguments to printed can be  a, , or .halide-haskell but lifted to return an .halide-haskell but lifted to return an .halide-haskell but lifted to return an .halide-haskell but lifted to return an .halide-haskell but lifted to return an .halide-haskell but lifted to return an .halide-haskell but lifted to return an .halide-haskell but lifted to return an .halide-haskell but lifted to return an .halide-haskell but lifted to return an .halide-haskell+Divide two integers, rounding towards zero.halide-haskellCompute the remainder of dividing two integers, when division is rounding toward zero.halide-haskell)'ifThenElse cond a b' is the analogue of if cond then a else b, but lifted to work with  types. See also the  https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/rebindable_syntax.html#extension-RebindableSyntaxRebindableSyntax extension.halide-haskellEvaluate a scalar expression.It should contain no parameters. If it does contain parameters, an exception will be thrown.halide-haskell(Convert expression to integer immediate.Tries to extract the value of an expression if it is a compile-time constant. If the expression isn't known at compile-time of the Halide pipeline, returns .halide-haskell Wrap a raw  Halide::Expr pointer in a Haskell value.Note: This function checks the runtime type of the expression. wrapCxxExpr :: forall a. (HasCallStack, IsHalideType a) => Ptr CxxExpr -> IO (Expr a) wrapCxxExpr p = do checkType @a p Expr  $ newForeignPtr deleter p where deleter = [C.funPtr| void deleteExpr(Halide::Expr *p) { delete p; } |]halide-haskell Wrap a raw  Halide::RVar pointer in a Haskell value.Note: + objects correspond to expressions of type .halide-haskell Wrap a raw Halide::Internal::Parameter pointer in a Haskell value.Note: + objects correspond to expressions of type .halide-haskellHelper function to assert that the runtime type of the expression matches it's compile-time type.Essentially, given an (x ::  a), we check that x.type() in C++ is equal to  (Proxy @a) in Haskell.halide-haskellMake sure that the expression is fully constructed. That means that if we are dealing with a  rather than an /, we force the construction of the underlying Halide::Internal::Parameter and convert it to an .halide-haskellUse the underlying  Halide::Expr in an  action.halide-haskellAllows applying , , , and  to multiple arguments.Example usage: asVectorOf @((~) (Expr Int32)) asVarOrRVar (fromTuple args) $ \v -> do withFunc func $ \f -> [C.throwBlock| void { $(Halide::Func* f)->reorder( *$(std::vector* v)); } |]halide-haskellUse the underlying  Halide::Var in an  action.halide-haskellUse the underlying  Halide::RVar in an  action.halide-haskellUse the underlying  or  as Halide::VarOrRVar in an  action.halide-haskellUse the underlying  Halide::RVar in an  action.halide-haskell(Get the underlying 'ForeignPtr CxxExpr'.halide-haskell#Lift a unary function working with  Halide::Expr to work with .halide-haskell$Lift a binary function working with  Halide::Expr to work with .halide-haskellnamehalide-haskellminshalide-haskellextentshalide-haskellreduction variableshalide-haskellEstimatehalide-haskell Parameterhalide-haskellnamehalide-haskell min indexhalide-haskellextent444444(c) Tom Westerhout, 2023 Safe-Inferred"()1?T>halide-haskellHaskell counterpart of Halide::LoopLevelhalide-haskellDifferent ways to handle the case when the start/end of the loops of stages computed with (fused) are not aligned.halide-haskell,Shift the start of the fused loops to align.halide-haskell*Shift the end of the fused loops to align.halide-haskell computeWith will make no attempt to align the start/end of the fused loops.halide-haskell(By default, LoopAlignStrategy is set to .halide-haskellA reference to a site in a Halide statement at the top of the body of a particular for loop.(c) Tom Westerhout, 2023 Safe-Inferred"(1?Z_halide-haskellHaskell counterpart of  https://halide-lang.org/docs/class_halide_1_1_internal_1_1_dimension.htmlHalide::Internal::Dimension.halide-haskellInformation about a buffer's dimension, such as the min, extent, and stride.halide-haskellSet the min in a given dimension to equal the given expression. Setting the mins to zero may simplify some addressing math.For more info, see  https://halide-lang.org/docs/class_halide_1_1_internal_1_1_dimension.html#a84acaf7733391fdaea4f4cec24a60de2$Halide::Internal::Dimension::set_min.halide-haskellSet the extent in a given dimension to equal the given expression.Halide will generate runtime errors for Buffers that fail this check.For more info, see  https://halide-lang.org/docs/class_halide_1_1_internal_1_1_dimension.html#a54111d8439a065bdaca5b9ff9bcbd630'Halide::Internal::Dimension::set_extent.halide-haskellSet the stride in a given dimension to equal the given expression.This is particularly useful to set when vectorizing. Known strides for the vectorized dimensions generate better code.For more info, see  https://halide-lang.org/docs/class_halide_1_1_internal_1_1_dimension.html#a94f4c432a89907e2cc2aa908b5012cf8'Halide::Internal::Dimension::set_stride.halide-haskell!Set estimates for autoschedulers.halide-haskellmin estimatehalide-haskellextent estimate Functions / Arrays(c) Tom Westerhout, 2023 Safe-Inferred "()1?e4halide-haskellHaskell counterpart of  8https://halide-lang.org/docs/class_halide_1_1_stage.html Halide::Stage.halide-haskellCommon scheduling functionshalide-haskellVectorize the dimension.halide-haskellUnroll the dimension.halide-haskellReorder variables to have the given nesting order, from innermost out. Note that  variables should only contain variables that belong to the function. If this is not the case, a runtime error will be thrown.halide-haskellSplit a dimension into inner and outer subdimensions with the given names, where the inner dimension iterates from 0 to factor-1.The inner and outer subdimensions can then be dealt with using the other scheduling calls. It's okay to reuse the old variable name as either the inner or outer variable. The first argument specifies how the tail should be handled if the split factor does not provably divide the extent.halide-haskell1Join two dimensions into a single fused dimenion.The fused dimension covers the product of the extents of the inner and outer dimensions given.halide-haskell+Mark the dimension to be traversed seriallyhalide-haskell.Mark the dimension to be traversed in parallelhalide-haskell#Issue atomic updates for this Func.halide-haskellSchedule the iteration over this stage to be fused with another stage from outermost loop to a given LoopLevel.For more info, see  https://halide-lang.org/docs/class_halide_1_1_stage.html#a82a2ae25a009d6a2d52cb407a25f0a5bHalide::Stage::compute_with.halide-haskellDifferent ways to handle a tail case in a split when the split factor does not provably divide the extent.#This is the Haskell counterpart of  https://halide-lang.org/docs/namespace_halide.html#a6c6557df562bd7850664e70fdb8fea0fHalide::TailStrategy.halide-haskell9Round up the extent to be a multiple of the split factor.Not legal for RVars, as it would change the meaning of the algorithm.+Pros: generates the simplest, fastest code.Cons: if used on a stage that reads from the input or writes to the output, constrains the input or output size to be a multiple of the split factor.halide-haskellGuard the inner loop with an if statement that prevents evaluation beyond the original extent.Always legal. The if statement is treated like a boundary condition, and factored out into a loop epilogue if possible.Pros: no redundant re-evaluation; does not constrain input our output sizes.Cons: increases code size due to separate tail-case handling; vectorization will scalarize in the tail case to handle the if statement.halide-haskellGuard the loads and stores in the loop with an if statement that prevents evaluation beyond the original extent.Always legal. The if statement is treated like a boundary condition, and factored out into a loop epilogue if possible. * Pros: no redundant re-evaluation; does not constrain input or output sizes. * Cons: increases code size due to separate tail-case handling.halide-haskellGuard the loads in the loop with an if statement that prevents evaluation beyond the original extent.Only legal for innermost splits. Not legal for RVars, as it would change the meaning of the algorithm. The if statement is treated like a boundary condition, and factored out into a loop epilogue if possible. * Pros: does not constrain input sizes, output size constraints are simpler than full predication. * Cons: increases code size due to separate tail-case handling, constrains the output size to be a multiple of the split factor.halide-haskellGuard the stores in the loop with an if statement that prevents evaluation beyond the original extent.Only legal for innermost splits. Not legal for RVars, as it would change the meaning of the algorithm. The if statement is treated like a boundary condition, and factored out into a loop epilogue if possible. * Pros: does not constrain output sizes, input size constraints are simpler than full predication. * Cons: increases code size due to separate tail-case handling, constraints the input size to be a multiple of the split factor.halide-haskellPrevent evaluation beyond the original extent by shifting the tail case inwards, re-evaluating some points near the end.Only legal for pure variables in pure definitions. If the inner loop is very simple, the tail case is treated like a boundary condition and factored out into an epilogue.7This is a good trade-off between several factors. Like , it supports vectorization well, because the inner loop is always a fixed size with no data-dependent branching. It increases code size slightly for inner loops due to the epilogue handling, but not for outer loops (e.g. loops over tiles). If used on a stage that reads from an input or writes to an output, this stategy only requires that the input/output extent be at least the split factor, instead of a multiple of the split factor as with .halide-haskellFor pure definitions use .(For pure vars in update definitions use '. For RVars in update definitions use .halide-haskellA single definition of a .halide-haskell2Synonym for the most commonly used parameter type.halide-haskell1Synonym for the most commonly used function type.halide-haskell Function type. It can either be > which means that we have defined the function ourselves, or 3 which means that it's a parameter to our pipeline.halide-haskellA function in Halide. Conceptually, it can be thought of as a lazy n-dimensional buffer of type a.Here, a is most often  t for a type t that is an instance of   . However, one can also define Func-s that return multiple values. In this case, a will be a tuple of s.This is a wrapper around the  7https://halide-lang.org/docs/class_halide_1_1_func.html Halide::Func C++ type.halide-haskellGHC is not able to automatically prove the transitivity property for type-level naturals. We help GHC out .halide-haskellStatically declare the range over which the function will be evaluated in the general case.This provides a basis for the auto scheduler to make trade-offs and scheduling decisions. The auto generated schedules might break when the sizes of the dimensions are very different from the estimates specified. These estimates are used only by the auto scheduler if the function is a pipeline output.halide-haskellStatically declare the range over which a function should be evaluated.This can let Halide perform some optimizations. E.g. if you know there are going to be 4 color channels, you can completely vectorize the color channel dimension without the overhead of splitting it up. If bounds inference decides that it requires more of this function than the bounds you have stated, a runtime error will occur when you try to run your pipeline.halide-haskell(Get the index arguments of the function.#The returned list contains exactly n elements.halide-haskell0Compute all of this function once ahead of time.See  https://halide-lang.org/docs/class_halide_1_1_func.html#a29df45a4a16a63eb81407261a9783060Halide::Func::compute_root for more info.halide-haskell=Creates and returns a new identity Func that wraps this Func.During compilation, Halide replaces all calls to this Func done by f with calls to the wrapper. If this Func is already wrapped for use in f#, will return the existing wrapper.For more info, see  https://halide-lang.org/docs/class_halide_1_1_func.html#a9d619f2d0111ea5bf640781d1324d050Halide::Func::in.halide-haskellCreate and return a global identity wrapper, which wraps all calls to this Func by any other Func.If a global wrapper already exists, returns it. The global identity wrapper is only used by callers for which no custom wrapper has been specified.halide-haskell>Declare that this function should be implemented by a call to halide_buffer_copy# with the given target device API.Asserts that the Func has a pure definition which is a simple call to a single input, and no update definitions. The wrapper Funcs returned by  are suitable candidates. Consumes all pure variables, and rewrites the Func) to have an extern definition that calls halide_buffer_copy.halide-haskellSame as  ahalide-haskellSame as &, but ensures that we're dealing with  instead of a .halide-haskellGet the underlying pointer to  Halide::Func and invoke an  action with it.halide-haskellDefine a Halide function.define "f" i e0 defines a Halide function called "f" such that f[i] = e.Here, i is an n-element tuple of #, i.e. the following are all valid:'[x, y, z] <- mapM mkVar ["x", "y", "z"]%f1 <- define "f1" x (0 :: Expr Float)*f2 <- define "f2" (x, y) (0 :: Expr Float)-f3 <- define "f3" (x, y, z) (0 :: Expr Float)halide-haskell2Create an update definition for a Halide function. update f i e" creates an update definition for f that performs f[i] = e.halide-haskell'Apply a Halide function. Conceptually, f ! i is equivalent to f[i]#, i.e. indexing into a lazy array.halide-haskell3Get a particular dimension of a pipeline parameter.halide-haskell?Get the loop nests specified by the schedule for this function.3Helpful for understanding what a schedule is doing.For more info, see https://halide-lang.org/docs/class_halide_1_1_func.html#a03f839d9e13cae4b87a540aa618589aeHalide::Func::print_loop_nesthalide-haskell Similar to $ except that the pipeline is run on l.halide-haskell1Evaluate this function over a rectangular domain.If your target is a GPU, this function will not automatically copy data back from the GPU.halide-haskell8A view pattern to specify the name of a buffer argument.Example usage::{+_ <- compile $ \(buffer "src" -> src) -> do i <- mkVar "i"+ define "dest" i $ (src ! i :: Expr Float):}or if we want to specify the dimension and type, we can use type applications::{5_ <- compile $ \(buffer @1 @Float "src" -> src) -> do i <- mkVar "i" define "dest" i $ src ! i:}halide-haskell Similar to , but for scalar parameters.Example usage::{._ <- compile $ \(scalar @Float "a" -> a) -> do i <- mkVar "i" define "dest" i $ a:}halide-haskellGet the pure stage of a # for the purposes of scheduling it.halide-haskellReturn + when the function has update definitions,  otherwise.halide-haskellGet a handle to an update step for the purposes of scheduling it.halide-haskellIdentify the loop nest corresponding to some dimension of some function.halide-haskellSame as  except that the stage is -1.halide-haskellAllocate storage for this function within a particular loop level.Scheduling storage is optional, and can be used to separate the loop level at which storage is allocated from the loop level at which computation occurs to trade off between locality and redundant work.For more info, see  https://halide-lang.org/docs/class_halide_1_1_func.html#a417c08f8aa3a5cdf9146fba948b65193Halide::Func::store_at.halide-haskellSchedule a function to be computed within the iteration over a given loop level.For more info, see  https://halide-lang.org/docs/class_halide_1_1_func.html#a800cbcc3ca5e3d3fa1707f6e1990ec83Halide::Func::compute_at.halide-haskellWrap a buffer into a .Suppose, we are defining a pipeline that adds together two vectors, and we'd like to call = to evaluate it directly, how do we pass the vectors to the ?  allows to do exactly this. asBuffer [1, 2, 3] $ \a -> asBuffer [4, 5, 6] $ \b -> do i <- mkVar "i" f <- define "vectorAdd" i $ a ! i + b ! i realize f [3] $ \result -> print =<< peekToList fhalide-haskell variableshalide-haskellfunction or stagehalide-haskell*whether to override the associativity testhalide-haskellindex variablehalide-haskellmin estimatehalide-haskellextent estimatehalide-haskellindex variablehalide-haskellmin estimatehalide-haskellextent estimatehalide-haskellFunction to evaluatehalide-haskellDomain over which to evaluatehalide-haskellWhat to do with the buffer afterwards. Note that the buffer is allocated only temporary, so do not return it directly.halide-haskell#Target on which to run the pipelinehalide-haskellFunction to evaluatehalide-haskellDomain over which to evaluatehalide-haskellWhat to do with the buffer afterwards. Note that the buffer is allocated only temporary, so do not return it directly.halide-haskell update indexhalide-haskellObject to treat as a bufferhalide-haskellWhat to do with the  temporary buffer9 (c) Tom Westerhout, 2023 Safe-Inferred "(1?halide-haskellHaskell counterpart of  https://halide-lang.org/docs/_halide_runtime_8h.html#a485130f12eb8bb5fa5a9478eeb6b0dfahalide_trace_event_code_t.halide-haskellCustom trace functionhalide-haskellFor which func to enable ithalide-haskell2For the duration of which computation to enable it Safe-Inferred"%(1 ReturnsFunc f n a | f -> n a(Convert a function that builds a Halide 8 into a normal Haskell function acccepting scalars and ss. For example: builder :: Expr Float -> Func 'ParamTy 1 Float -> IO (Func 'FuncTy 1 Float) builder scale inputVector = do i <-  "i" scaledVector <- ( "scaledVector" i $ scale * inputVector  i pure scaledVector The builder function accepts a scalar parameter and a vector and scales the vector by the given factor. We can now pass builder to :  scaler <-  builder  1 #Float [1, 1, 1] $ inputVector ->  [3] $ outputVector -> do -- invoke the kernel scaler 2.0 inputVector outputVector -- print the result print =<<  outputVector halide-haskell Similar to , but the first argument lets you explicitly specify the compilation target.halide-haskell0Get the internal representation of lowered code.Useful for analyzing and debugging scheduling. Can emit HTML or plain text.halide-haskellFunction to compilehalide-haskellCompiled kernel(c) Tom Westerhout, 2023 Safe-Inferred "(1?halide-haskellImpose a boundary condition such that the nearest edge sample is returned everywhere outside the given region.For more information, see  https://halide-lang.org/docs/namespace_halide_1_1_boundary_conditions.html#a0548f23db36e4a8a03690bc8bee1e850Halide::repeat_edge.halide-haskellImpose a boundary condition such that a given expression is returned everywhere outside the boundary.For more information, see  https://halide-lang.org/docs/namespace_halide_1_1_boundary_conditions.html#aa4ed713b5f9a6f13e6323f2a21d41d5eHalide::constant_exterior.(c) Tom Westerhout, 2023 Safe-Inferred "(1?. -# !"$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ stujklm_`abcdefghi-# !"$%&'()*+,./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^opn qrvwxyz{|}~    !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                                     halide-haskell-0.0.2.0-inplaceLanguage.Halide$Language.Halide.RedundantConstraintsLanguage.Halide.TypeLanguage.Halide.ContextLanguage.Halide.UtilsLanguage.Halide.TargetLanguage.Halide.Func gpuBlocksLanguage.Halide.BufferGHC.ExtsIsListLanguage.Halide.Expr Text.PrintfprintfPreludeminmaxLanguage.Halide.LoopLevelLanguage.Halide.DimensionLanguage.Halide.TraceLanguage.Halide.ScheduleLanguage.Halide.Kernel"Language.Halide.BoundaryConditionsbase GHC.TypeNatsKnownNatGHC.IntInt32GHC.PtrPtrCurrycurryGUnCurryuncurryGAllFunctionReturnFunctionArgumentsLength IsHalideType CxxTargetCxxFunc CxxImageParam CxxParameterCxxRVarCxxVarCxxExpr importHalide TargetFeature FeatureJIT FeatureDebugFeatureNoAssertsFeatureNoBoundsQuery FeatureSSE41 FeatureAVX FeatureAVX2 FeatureFMA FeatureFMA4 FeatureF16C FeatureARMv7s FeatureNoNEON FeatureVSXFeaturePOWER_ARCH_2_07 FeatureCUDAFeatureCUDACapability30FeatureCUDACapability32FeatureCUDACapability35FeatureCUDACapability50FeatureCUDACapability61FeatureCUDACapability70FeatureCUDACapability75FeatureCUDACapability80FeatureCUDACapability86 FeatureOpenCLFeatureCLDoubles FeatureCLHalfFeatureCLAtomics64FeatureOpenGLCompute FeatureEGLFeatureUserContextFeatureProfileFeatureNoRuntime FeatureMetalFeatureCPlusPlusManglingFeatureLargeBuffersFeatureHexagonDmaFeatureHVX_128FeatureHVX_v62FeatureHVX_v65FeatureHVX_v66FeatureFuzzFloatStoresFeatureSoftFloatABI FeatureMSAN FeatureAVX512FeatureAVX512_KNLFeatureAVX512_SkylakeFeatureAVX512_CannonlakeFeatureAVX512_SapphireRapidsFeatureTraceLoadsFeatureTraceStoresFeatureTraceRealizationsFeatureTracePipelineFeatureD3D12ComputeFeatureStrictFloat FeatureTSAN FeatureASANFeatureCheckUnsafePromisesFeatureEmbedBitcodeFeatureEnableLLVMLoopOptFeatureWasmSimd128FeatureWasmSignExtFeatureWasmSatFloatToIntFeatureWasmThreadsFeatureWasmBulkMemory FeatureSVE FeatureSVE2FeatureARMDotProdFeatureARMFp16 FeatureRVVFeatureARMv81aFeatureSanitizerCoverageFeatureProfileByTimer FeatureSPIRV DeviceAPI DeviceNone DeviceHostDeviceDefaultGPU DeviceCUDA DeviceOpenCLDeviceOpenGLCompute DeviceMetal DeviceHexagonDeviceHexagonDmaDeviceD3D12ComputeTarget hostTarget gpuTargethostSupportsTargetDevice setFeature hasGpuFeaturetestCUDA testOpenCL HalideBufferunHalideBufferRawHalideBufferhalideBufferDevicehalideBufferDeviceInterfacehalideBufferHosthalideBufferFlagshalideBufferTypehalideBufferDimensionshalideBufferDimhalideBufferPaddingHalideDeviceInterfaceHalideDimensionhalideDimensionMinhalideDimensionExtenthalideDimensionStridehalideDimensionFlagsrowMajorStridescolMajorStrides IsListPeek peekToListIsHalideBufferwithHalideBufferImplbufferFromPtrShapeStridesbufferFromPtrShapewithHalideBufferallocaCpuBuffer allocaBuffer isDeviceDirty isHostDirtybufferCopyToHost withCroppedgetBufferExtent peekScalarwithCopiedToHostExprVarRVar ScalarParamReductionDomain VarOrRVarIsTupletoTuple fromTuple FromTupleToTuplemkExprmkVarmkRDomtoRVarssetScalarEstimatemkRVarundefcastprinted printedWheneqneqltltegtgteandordivmod ifThenElseevaluatetoIntImmtestWriteToStderr CxxLoopLevelLoopAlignStrategyLoopAlignStart LoopAlignEnd LoopNoAlign LoopAlignAuto SomeLoopLevel LoopLevelInlinedLoopLevel RootLoopLevel LoopLevelTy InlinedTyRootTyLockedTy CxxDimension DimensionsetMin setExtent setStride setEstimateCxxStage Schedulable vectorizeunrollreordersplitfuseserialparallelatomic specializespecializeFail gpuThreadsgpuLanes computeWith TailStrategy TailRoundUpTailGuardWithIf TailPredicateTailPredicateLoadsTailPredicateStoresTailShiftInwardsTailAutoStage ParameterFunctionFuncTyParamTyFuncParamestimateboundgetArgs computeRootasUsedByasUsed copyToDevice copyToHostdefineupdate!dimprettyLoopNestrealizerealizeOnTargetbufferscalargetStagehasUpdateDefinitionsgetUpdateStagegetLoopLevelAtStage getLoopLevelstoreAt computeAt asBufferParam TraceEventfuncName eventCodeloadStoreContentsTraceLoadStoreContentsvaluePtr valueType coordinatesTraceEventCode TraceLoad TraceStoreTraceBeginRealizationTraceEndRealization TraceProduceTraceEndProduce TraceConsumeTraceEndConsumeTraceBeginPipelineTraceEndPipelineTraceTagsetCustomTrace traceStores traceLoadscollectIterationOrder StageSchedule$sel:rvars:StageSchedule$sel:splits:StageSchedule$sel:dims:StageSchedule$sel:prefetches:StageSchedule$sel:fuseLevel:StageSchedule$sel:fusedPairs:StageSchedule&$sel:allowRaceConditions:StageSchedule$sel:atomic:StageSchedule2$sel:overrideAtomicAssociativityTest:StageSchedulePrefetchDirective#$sel:prefetchFunc:PrefetchDirective!$sel:prefetchAt:PrefetchDirective#$sel:prefetchFrom:PrefetchDirective%$sel:prefetchOffset:PrefetchDirective'$sel:prefetchStrategy:PrefetchDirective($sel:prefetchParameter:PrefetchDirectiveReductionVariable$sel:varName:ReductionVariable$sel:minExpr:ReductionVariable!$sel:extentExpr:ReductionVariable FuseLoopLevel FusedPair StorageDim$sel:storageVar:StorageDim $sel:storageAlignment:StorageDim$sel:storageBound:StorageDim$sel:storageFold:StorageDimBound$sel:boundVar:Bound$sel:boundMin:Bound$sel:boundExtent:Bound$sel:boundModulus:Bound$sel:boundRemainder:BoundSplitSplitVarFuseVars SplitContents$sel:splitOld:SplitContents$sel:splitOuter:SplitContents$sel:splitInner:SplitContents$sel:splitFactor:SplitContents$sel:splitExact:SplitContents$sel:splitTail:SplitContents FuseContents$sel:fuseOuter:FuseContents$sel:fuseInner:FuseContents$sel:fuseNew:FuseContentsDim $sel:var:Dim$sel:forType:Dim$sel:deviceApi:Dim$sel:dimType:DimForType ForSerial ForParallel ForVectorized ForUnrolled ForExtern ForGPUBlock ForGPUThread ForGPULaneDimType DimPureVar DimPureRVar DimImpureRVar AutoScheduler Adams2019Li2018 Mullapudi2016getStageSchedulegetHalideLibraryPathloadAutoSchedulerapplyAutoScheduler applySplits applyDims applyScheduleStmtOutputFormatStmtTextStmtHTMLLoweredSignaturecompileToCallablecompilecompileForTargetcompileToLoweredStmt repeatEdgeconstantExteriorkeepRedundantConstraint ArgumentsAppend HasCxxVector HalideTypeHalideTypeCode CxxStringCxxStageSchedule CxxVector CxxCallableCxxUserContext CxxVarOrRVaroptionallyCastghc-prim GHC.TypesFloatForeign.C.TypesCFloatDoubleCDoubleinstanceIsHalideTypedefineIsHalideTypeInstancesinstanceHasCxxVector halideTypesargumentsAppendConcatNil::: newCxxVectordeleteCxxVector cxxVectorSizecxxVectorPushBack cxxVectorData peekCxxVector halideTypeFor toCxxExprhalideTypeCodehalideTypeBitshalideTypeLanes HalideTypeIntHalideTypeUIntHalideTypeFloatHalideTypeHandleHalideTypeBfloatCxxConstructible cxxSizeOf cxxConstructinstanceCxxConstructible peekCxxStringpeekAndDeleteCxxString GHC.MaybeNothing withCxxTargetIOdeviceAPIForTargetsimpleDimension NestedListsetDeviceDirty setHostDirty$fIsHalideBuffer[]4a$fIsHalideBuffer[]3a$fIsHalideBuffer[]2a$fIsHalideBuffer[]1a$fIsHalideBufferMVector1a$fIsHalideBufferVector1aCxxRDomCxxRangeRangeGHC.NumNum GHC.FloatFloating GHC.IORefIORefasExprRegion UniformTupleasRVarGHC.BaseString text-1.2.5.0Data.Text.InternalText GHC.Classes==/=< Data.Type.Ord<=>>=&&||cxxConstructExpr wrapCxxRVarwrapCxxParameter checkType forceExpr asVectorOfasVar asVarOrRVar asScalarParamexprToForeignPtrunaryOpbinaryOp GHC.TupleSoloIndexTypeProperties IndexType HasIndexTypeUniformTuplePropertiesproveUniformTuplePropertiesproveIndexTypePropertieswrapCxxVarOrRVarmkScalarParameterwithManywrapCxxLoopLevelwithCxxLoopLevelwrapCxxDimensionwithCxxDimension proveTransitivityOfLessThanEqualwithBufferParamwithFuncTrueFalse withCxxFunc wrapCxxFunc wrapCxxStage withCxxStage CxxArgument ValidArgument