首页 \ 问答 \ 从多个parallel_for_each调用执行lambdas的顺序(Order of execution of lambdas from multiple parallel_for_each calls)

从多个parallel_for_each调用执行lambdas的顺序(Order of execution of lambdas from multiple parallel_for_each calls)

假设我有连续两个parallel_for_each调用的C ++ AMP代码。 第二次通话的lambdas开始之前,第一次通话的所有lambdas都会完成吗?

一般来说,是否有关于lambdas执行顺序的保证?


Let's say I have C++ AMP code with two parallel_for_each calls in a row. Will all the lambdas from the first call complete before lambdas from the second call begin?

In general, is there any guarantee about the order of execution of lambdas?


原文:https://stackoverflow.com/questions/10400702
更新时间:2023-11-30 22:11

最满意答案

我有同样的问题,但终于得到了解决方案! 问题是javascript节点cicle。 我建议你先改变createJavaScriptNode():

var levelChecker = context.createScriptProcessor(4096, 1 ,1);

垃圾收集器有“levelChecker”变量和他的onaudioprocess的问题,所以你必须将脚本处理器或onaudioProcess回调绑定到窗口。 这里的HOLY SOLUTION:

 levelChecker.onaudioprocess = window.audioProcess = function(e) { ...

只需在该行中添加window.audioProcess,您将永远不再处理tat问题。

在这里您可以找到更多信息: http//lists.w3.org/Archives/Public/public-audio/2013JanMar/0304.html

希望对你有用!


I had the same problem but finally got the solution! The problem is the javascript node cicle. I suggest you to change the createJavaScriptNode() first:

var levelChecker = context.createScriptProcessor(4096, 1 ,1);

The garbage collector has a problem with "levelChecker" variable and his onaudioprocess , so you have to bind the scriptprocessor or the onaudioProcess callback to the window. Here the HOLY SOLUTION:

 levelChecker.onaudioprocess = window.audioProcess = function(e) { ...

Just add window.audioProcess in that line and you will never deal with tat problem anymore.

Here you can find further info : http://lists.w3.org/Archives/Public/public-audio/2013JanMar/0304.html

Hope that works for you!

相关问答

更多
  • Firefox不支持MP3。 它不会显示回退消息,因为它支持音频标签。 https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements#MPEG_H.264_(AAC_or_MP3) Firefox doesn't support MP3. It won't show the fallback message because it supports the audio tag. https:// ...
  • 我有完全相同的问题。 我的解决方案:我为audiofile源添加了完整的URL。 不知道为什么,但它有所作为。 这是我的完整代码。 CSS修改只是为了隐藏下载按钮。 但是当我把它拿出来的时候,我没有看到时间表。 很奇怪,但这个代码恰恰适合我。 html5 audio player on iPhone
    这是一个应该帮助的要点: https : //gist.github.com/kevincennis/9754325 。 我没有真正测试过这个,所以可能会有一个愚蠢的错字或某事,但基本的方法将工作(我以前做过)。 实质上,您将直接使用Recorder.js中的网络工作人员,以便您可以一次性处理一个大型AudioBuffer,而不是实时增量记录。 我也会在这里粘贴代码,以防万一出现问题。 // assuming a var named `buffer` exists and is an AudioBuffer ...
  • 我自己得到了答案。 经过双重,三重,四重检查后,我发现该网站由GoDaddy托管,我知道它并不是您能期望的最佳品质。 (实际上它们在很多方面都很糟糕。如果你能避免它,就不要跟GoDaddy一起去。只是我的个人观点。)我们改变了托管,问题就消失了。 糟糕的是,我花了几天的时间无所事事。 I got the answer myself to this one. After double-, triple-, quadruple-checking everything it hit me, the site wa ...
  • 如果你只是要下载文件,你不需要
  • 不会喜欢这个答案,但Chromecast根本不支持自签名证书。 它构建在Chromium安全模型中。 如果您可以将证书装载到证书商店中,它就可以工作(Android和Fire平板电脑和电视可以做到这一点),但这可能会有所帮助,但Chromecast(和FireStick)无法做到这一点。 Not gonna like this answer, but Chromecast simply won't support self-signed certs. It is built into the Chromiu ...
  • 不幸的是,与Chrome的HTML5音频实现不同,Chrome的Web音频不支持audio / ogg; codecs = opus ,这就是您的请求在此使用的内容。 您需要将格式设置为audio/wav才能使其正常工作。 为了确保它传递给服务器请求,我建议将它放在查询字符串中( accept=audio/wav ,urlencoded)。 您只是想播放音频,还是需要访问Web Audio API进行音频转换? 如果您只需要播放音频,我可以向您展示如何使用HTML5音频API(而非Web音频)轻松播放。 使 ...
  • 我有同样的问题,但终于得到了解决方案! 问题是javascript节点cicle。 我建议你先改变createJavaScriptNode(): var levelChecker = context.createScriptProcessor(4096, 1 ,1); 垃圾收集器有“levelChecker”变量和他的onaudioprocess的问题,所以你必须将脚本处理器或onaudioProcess回调绑定到窗口。 这里的HOLY SOLUTION: levelChecker.onaudiopro ...
  • 如果我正确理解这一点(代码示例中有一些缺失部分)...... decodeAudioData只能解码MP3或WAV等内容。 看起来你正在传递一个原始的Int16Array或Uint16Array 。 因为底层的ArrayBuffer不是decodeAudioData理解的格式,所以它放弃了。 我想你想做的是这样的: function playsound( raw ) { // i'll assume you know how to convert in this direction // since ...
  • play(),pause()等来自HTMLMediaElement接口,这里记录: http : //www.w3.org/TR/html5/video.html#htmlmediaelement play(), pause() etc come from HTMLMediaElement interface, documented here: http://www.w3.org/TR/html5/video.html#htmlmediaelement

相关文章

更多

最新问答

更多
  • h2元素推动其他h2和div。(h2 element pushing other h2 and div down. two divs, two headers, and they're wrapped within a parent div)
  • 创建一个功能(Create a function)
  • 我投了份简历,是电脑编程方面的学徒,面试时说要培训三个月,前面
  • PDO语句不显示获取的结果(PDOstatement not displaying fetched results)
  • Qt冻结循环的原因?(Qt freezing cause of the loop?)
  • TableView重复youtube-api结果(TableView Repeating youtube-api result)
  • 如何使用自由职业者帐户登录我的php网站?(How can I login into my php website using freelancer account? [closed])
  • SQL Server 2014版本支持的最大数据库数(Maximum number of databases supported by SQL Server 2014 editions)
  • 我如何获得DynamicJasper 3.1.2(或更高版本)的Maven仓库?(How do I get the maven repository for DynamicJasper 3.1.2 (or higher)?)
  • 以编程方式创建UITableView(Creating a UITableView Programmatically)
  • 如何打破按钮上的生命周期循环(How to break do-while loop on button)
  • C#使用EF访问MVC上的部分类的自定义属性(C# access custom attributes of a partial class on MVC with EF)
  • 如何获得facebook app的publish_stream权限?(How to get publish_stream permissions for facebook app?)
  • 如何防止调用冗余函数的postgres视图(how to prevent postgres views calling redundant functions)
  • Sql Server在欧洲获取当前日期时间(Sql Server get current date time in Europe)
  • 设置kotlin扩展名(Setting a kotlin extension)
  • 如何并排放置两个元件?(How to position two elements side by side?)
  • 如何在vim中启用python3?(How to enable python3 in vim?)
  • 在MySQL和/或多列中使用多个表用于Rails应用程序(Using multiple tables in MySQL and/or multiple columns for a Rails application)
  • 如何隐藏谷歌地图上的登录按钮?(How to hide the Sign in button from Google maps?)
  • Mysql左连接旋转90°表(Mysql Left join rotate 90° table)
  • dedecms如何安装?
  • 在哪儿学计算机最好?
  • 学php哪个的书 最好,本人菜鸟
  • 触摸时不要突出显示表格视图行(Do not highlight table view row when touched)
  • 如何覆盖错误堆栈getter(How to override Error stack getter)
  • 带有ImageMagick和许多图像的GIF动画(GIF animation with ImageMagick and many images)
  • USSD INTERFACE - > java web应用程序通信(USSD INTERFACE -> java web app communication)
  • 电脑高中毕业学习去哪里培训
  • 正则表达式验证SMTP响应(Regex to validate SMTP Responses)