Closed cuiwei0322 closed 10 years ago
Hi Wei,
Which snippets don't work? Can you point to an example?
source.cuda-c++ is the ScopeName for the package. Each snippet in the package has `
Make sure when you open a .cu file that the scope (lower right corner of the ST window) says "CUDA C++". If it doesn't, make sure the default for that file type isn't set differently click on that scope, select "Open all with current extension as..." and select "CUDA C++".
Mark
Hello Mark,
For example, the "for loop" and "printf" snippets works on the .cu file. But when I type "cuda", there is snippets shows. There should be something like "cudaMalloc" or "cudaMemcpy" shows.
please see the picture as reference.
Thanks
Wei
Hello Mark,
I solved my problem. I should use "cmem" instead of "cuda" in invoke the snippets. I am new to cuda and sublime. sorry to trouble you.
By the way, could you tell me why do you use "g++" in the cuda build system instead of "nvcc"?
Thanks
I think it's possible to have multiple snippets with the same tabTrigger,
so maybe it would be more useful to have all the CUDA API snippets just use
cuda
I don't think I ever set up a build system for this plugin. I don't use Sublime to build, only to edit. If someone provides me a suggestion on how to improve that (or pull request), I can incorporate it.
Thanks! Mark
On Thu, Aug 28, 2014 at 2:17 AM, cuiwei0322 notifications@github.com wrote:
Hello Mark,
I solved my problem. I should use "cmem" instead of "cuda" in invoke the snippets. I am new to cuda and sublime. sorry to trouble you.
By the way, could you tell me why do you use "g++" in the cuda build system instead of "nvcc"?
Thanks
Reply to this email directly or view it on GitHub https://github.com/harrism/sublimetext-cuda-cpp/issues/3#issuecomment-53599103 .
Hello Mark,
I have write a simple build system for this cuda package.
Maybe we use it for build of simple cuda program.
The build is pasted here:
{ "cmd": ["nvcc", "-arch=sm_20", "$file", "-o", "${file_path}/${file_base_name}"], "fileregex": "^(..[^:]):([0-9]+):?([0-9]+)?:? (._)$", "working_dir": "${file_path}", "selector": "source.cu",
"variants":
[
{
"name": "Run",
"cmd": ["bash", "-c", "nvcc -arch=sm_20 '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
}
]
}
Wei
Hello Harrism,
I have one problem about current cuda plugin. The "scope" in all snippets doesn't support the the file with ".cu" suffix, which is the default suffix in cuda. However, in your plugin, only ".cuda-c++" is supported, which is not recognized by "nvcc". If I use ".cu" as the source file suffix, many snippets in this plugin don't work.
Could you tell me how can I change the settings of this plugin?
Any help would be much appreciated!
Wei