amd

AMD vs NVIDIA. How do they differentiate in terms of support of OpenCL?

橙三吉。 提交于 2019-12-10 12:12:30
问题 I have an EC2 instance. It's specs are: g2.2xlarge Instance. Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz NVIDIA GRID GPU (Kepler GK104) with Ubuntu 14.04 - 64 bit. I have two questions: 1. After installing the CUDA toolkit on this system, I have the following output when using clinfo : clinfo: /usr/local/cuda-8.0/targets/x86_64-linux/lib/libOpenCL.so.1: no version information available (required by clinfo) Platform Version: OpenCL 1.2 CUDA 8.0.46 Platform Name: NVIDIA CUDA Platform Vendor:

Requirejs, what it means “Requirejs loads each module once”

大兔子大兔子 提交于 2019-12-10 11:46:15
问题 So if i have some module like: //test1.js define([], function() { var counter = 0; return { increment: function() { counter++ } }; }); Requirejs will load this module once(to be aware of local variables of this module) and never again? Variable counter will be alive through closure from returning object(through increment function)? What about next example? //test2.js define([], function() { var value = 10; document.getElementById('asd').addEventListener('mousedown', function(e) { value = Math

How can I load non-AMD dependencies in the defined order with dojo?

情到浓时终转凉″ 提交于 2019-12-10 10:39:18
问题 I try to make a non-AMD library loadable with dojo, I've chosen a separate folder as a new (pseudo) AMD-package and placed the files of that library in that folder, together with the main.js file, which will get loaded by convention by the dojo loader when the package is requested. In this main.js file I simply put the names of my library files in the dependency list of the define() call. define([ "jquery", "./lib/jquery-ui/jquery-ui.min", "./the.actual.library.that.uses.the.others", ],

Restructuring TypeScript internal modules to external modules

蓝咒 提交于 2019-12-10 10:23:29
问题 I have a website that uses a large typescript code base. All clases as in their own files, and wrapped with an internal module like so: file BaseClass.ts module my.module { export class BaseClass { } } file ChildClass.ts module my.module { export ChildClass extends my.module.BaseClass { } } All file are included globally with script tags, in the appropriate order (using ASP.NET Bundling). I would like to move to a more modern setup and use webpack. I would like my module syntax to use

How can I import TypeScript AMD modules without making the dependent code a module

女生的网名这么多〃 提交于 2019-12-10 10:19:22
问题 I have a Chrome extension content script that has 2 AMD dependencies. The script works fine when I load the dependencies using the requirejs "require" function. I ported the script to TypeScript with the rest of my project, and am now using import Dependency = require("Dependency"); which is all fine and dandy, the modules have been ported to TS and are working fine in other parts of the project. My issue is that as soon as I add an import statement, the TS compiler wants to make my script

AMD perf events

时光总嘲笑我的痴心妄想 提交于 2019-12-10 10:05:49
问题 I am trying to use perf on my device with an AMD cpu, but I can't really find any information about how to get, let's say, cache-misses from AMD. I read that you need to write -e rNNN , where NNN is a hex-code of event, but I didn't manage to find any table or something to look at those codes. Could you help me with this, because it seems that there is no information in the internet at all! Actually, in the manual for perf there are some links, but they are not valid :( 回答1: Check perf list

DataJS library not loading in RequireJS

[亡魂溺海] 提交于 2019-12-10 10:04:36
问题 I am new to RequireJS, so this might be a stupid question! I am using require-jquery. I want to load the DataJS library as a module. It is a standalone library and does not depend on jQuery. This is what my HTML file start.htm looks like: <html> <head> </head> <body> <script type="text/javascript" src="Scripts/Loader.js"></script> </body> </html> This is what the Loader.js file looks like: (function (window, undefined) { var script = document.createElement('script'); script.async = true;

Unable to load jQuery plugins when using requirejs & r.js optimizer

可紊 提交于 2019-12-10 04:19:45
问题 I'm having a bit of trouble with my the requirejs optimizer. After I run the optimizer, I get a few error messages in my build/compiled file. When running my web application without the optimize step I do not have any errors. This is my client.js file (contains config) (coffeescript) requirejs.config baseUrl: '/source/' paths: text: 'lib/text' io: 'lib/socket.io' underscore: 'lib/underscore' backbone: 'lib/backbone' jquery: 'lib/jquery' # almond: 'lib/almond' bootstrap: 'lib/bootstrap'

How to define Module and use it in dojo with AMD?

拜拜、爱过 提交于 2019-12-09 13:29:44
问题 I am maintaining and extending an old project which was pre-AMD. I wish to add an Chart to the application. for this, I have created a js file as follows: define(["dojox/charting/Chart",...."dijit/Dialog","dojo/dom-construct"], function (Chart) { function showDailyChart(data){ //code to show the chart in a dialog } return customModules.singleChart; }); I have saved this file as /customModules/singleChart.js In My main HTML Page, I have added it to the packages as follows: var dojoConfig = {

How to write a module that works with Node.js, RequireJS as well as without them

烂漫一生 提交于 2019-12-09 09:28:40
问题 I am working on a JavaScript library for JSON/XML processing. My library works in browser as well as Node.js (with xmldom and xmlhttprequest modules). One of the users recently asked for RequireJS support. I have taken a look at the RequireJS/AMD thing and think it is a good approach so I'd like to provide this. However I'd like to retain the portability: my library must work in browsers (with and without RequireJS) as well as Node.js. And in the browser environment I don't depend on xmldom