@@ -129,82 +129,6 @@ module ClArray =
129129
130130 outputArray
131131
132- /// <summary>
133- /// Exclude inplace prefix sum.
134- /// </summary>
135- /// <example>
136- /// <code>
137- /// let arr = [| 1; 1; 1; 1 |]
138- /// let sum = [| 0 |]
139- /// runExcludeInplace clContext workGroupSize processor arr sum <@ (+) @> 0
140- /// |> ignore
141- /// ...
142- /// > val arr = [| 0; 1; 2; 3 |]
143- /// > val sum = [| 4 |]
144- /// </code>
145- /// </example>
146- ///<param name="workGroupSize">Should be a power of 2 and greater than 1.</param>
147- ///<param name="plus">Associative binary operation.</param>
148- ///<param name="zero">Zero element for binary operation.</param>
149- let prefixSumExcludeInplace = PrefixSum.runExcludeInplace
150-
151- /// <summary>
152- /// Include inplace prefix sum.
153- /// </summary>
154- /// <example>
155- /// <code>
156- /// let arr = [| 1; 1; 1; 1 |]
157- /// let sum = [| 0 |]
158- /// runExcludeInplace clContext workGroupSize processor arr sum <@ (+) @> 0
159- /// |> ignore
160- /// ...
161- /// > val arr = [| 1; 2; 3; 4 |]
162- /// > val sum = [| 4 |]
163- /// </code>
164- /// </example>
165- ///<param name="workGroupSize">Should be a power of 2 and greater than 1.</param>
166- ///<param name="plus">Associative binary operation.</param>
167- ///<param name="zero">Zero element for binary operation.</param>
168- let prefixSumIncludeInplace = PrefixSum.runIncludeInplace
169-
170- let prefixSumExclude plus ( clContext : ClContext ) workGroupSize =
171-
172- let runExcludeInplace =
173- prefixSumExcludeInplace plus clContext workGroupSize
174-
175- let copy = copy clContext workGroupSize
176-
177- fun ( processor : MailboxProcessor < _ >) allocationMode ( inputArray : ClArray < 'a >) ( zero : 'a ) ->
178-
179- let outputArray = copy processor allocationMode inputArray
180-
181- let totalSum =
182- runExcludeInplace processor outputArray zero
183-
184- outputArray, totalSum
185-
186- let prefixSumInclude plus ( clContext : ClContext ) workGroupSize =
187-
188- let runIncludeInplace =
189- prefixSumIncludeInplace plus clContext workGroupSize
190-
191- let copy = copy clContext workGroupSize
192-
193- fun ( processor : MailboxProcessor < _ >) allocationMode ( inputArray : ClArray < 'a >) ( zero : 'a ) ->
194-
195- let outputArray = copy processor allocationMode inputArray
196-
197- let totalSum =
198- runIncludeInplace processor outputArray zero
199-
200- outputArray, totalSum
201-
202- let prefixSumBackwardsExcludeInplace plus =
203- PrefixSum.runBackwardsExcludeInplace plus
204-
205- let prefixSumBackwardsIncludeInplace plus =
206- PrefixSum.runBackwardsIncludeInplace plus
207-
208132 let getUniqueBitmap ( clContext : ClContext ) workGroupSize =
209133
210134 let getUniqueBitmap =
@@ -250,7 +174,7 @@ module ClArray =
250174 let getUniqueBitmap = getUniqueBitmap clContext workGroupSize
251175
252176 let prefixSumExclude =
253- prefixSumExcludeInplace <@ (+) @> clContext workGroupSize
177+ PrefixSum.runExcludeInplace <@ (+) @> clContext workGroupSize
254178
255179 fun ( processor : MailboxProcessor < _ >) ( inputArray : ClArray < 'a >) ->
256180
@@ -380,7 +304,7 @@ module ClArray =
380304 <| Map.optionToValueOrZero Unchecked.defaultof< 'b>
381305
382306 let prefixSum =
383- prefixSumExcludeInplace <@ (+) @> clContext workGroupSize
307+ PrefixSum.runExcludeInplace <@ (+) @> clContext workGroupSize
384308
385309 let scatter =
386310 Scatter.runInplace clContext workGroupSize
0 commit comments